Subject: Re: bug#44976: 28.0.50; bibtex.el does not consider biblatex field name aliases

From: [email-masked]
Date: Thu, 03 Dec 2020 22:17:08 +0000

> Do I understand correctly that, from biblatex's perspective,
> "journal" and "journaltitle" are alternatives similar to "year" and
> "date"? The code in bibtex.el already includes the machinery to
> support such alternatives.

I think you understand correctly. The biblatex doc specifies:

"The aliases listed in this section are provided for backwards compatibility with traditional
BibTeX and other applications based on traditional BibTeX styles. Note that these aliases are
immediately resolved as the bibfile is processed. All bibliography and citation styles must use the
names of the fields they point to, not the alias. In bibfiles, you may use either the alias or the
field name but not both at the same time."
https://mirrors.concertpass.com/tex-archive/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsubsection.2.2.5

> So all that's needed for this is to replace in bibtex-biblatex-entry-alist the elements
>
> ("journaltitle")
> 
> with
> 
> ("journaltitle" nil nil 17) ("journal" nil nil 17)
> 
> with 17 replaced by the lowest unused number for the alternatives of
> this entry type, see "ALTERNATIVES" in the docstring of
> bibtex-BibTeX-entry-alist.

Great!

> Or am I missing something?
> 
> When bibtex-entry inserts a template for a new entry, this includes
> the different alternatives with prefix "ALT". It could be useful to
> distingiush between alternatives that are listed in bibtex-entry's
> templates and "hidden" alternatives that are only silently accepted
> in the background because of biblatex's backward compatibility with
> the BibTeX format. For example, the ALTERNATIVE number could be
> positive or negative. Then, only if this number is positive, all
> alternatives are all included in the entry template with the ALT prefix.
> Otherwise, only the first alternative in bibtex-biblatex-entry-alist
> is printed without the prefix. Such a feature could also make sense
> for "year" and "date".

That would be a nice feature as well.

Do you have time to commit a fix for the aliases and possibly add the negative/positive distinction of ALTERNATIVEs?