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

From: "Roland Winkler" <[email-masked]>
Date: Wed, 2 Dec 2020 14:43:57 -0600

On Tue Dec 1 2020 Basil L. Contovounesios wrote:
> > bibtex.el does not consider biblatex aliases correctly. The biblatex package
> > documentation specifies in Section 2.2.5 beginning on page 32 a series of
> > Field Aliases.
> >
> > These include for example the alias "journal" for "journaltitle" which helps
> > biblatex to preserve backwards compatibility with bibtex. This causes bibtex.el
> > to throw error messages of the style "Mandatory field `%s' is missing" despite
> > the alias field being present.
> 
> I, for one, would be in favour of supporting these aliases.
> 
> Roland, are there any reasons not to?

Years ago, I added biblatex support to bibtex.el.  However, I myself
only use old-fashioned BibTeX, so I am not an expert of how biblatex
is supposed to work, and it can well be that the current code can be
improved in one or the other way.

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.  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.

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".