biblatex feedback

Getting an idea of what users actually use can sometimes be tricky. To help understand how people are using biblatex, there’s a short survey set up. In particular, we are looking for some idea of how people use back-ends: as I’ve mentioned before, having two of them means more ‘interesting’ development so it’s important to get some insight into real life use.

Managing biblatex backends

For the past few years, biblatex has been looked after by a small team led by Philip Kime. When we first took this up we were mindful of the need to think carefully about back-ends: how reference data is extracted from a .bib file or similar sources.

There are currently two back-ends for biblatex: BibTeX and Biber. Biber is where the development is taking place and offers Unicode support, whilst BibTeX itself is frozen but also does a lot less ‘stuff’. So there are several features in biblatex that are Biber-only. When the current team took over the maintained, there was consideration of dropping BibTeX entirely. Philip and I have discussed this quite a bit, as the original biblatex developer (Philippe Lehman) picked BibTeX as the original back-end from necessity. (Biber was developed after biblatex, and for extracting and sorting data there was only originally BibTeX.) We decided against it some time ago: what the BibTeX back-end offers is stability but also speed, precisely as it’s more limited that Biber. At least for people like me, in the physical sciences and writing in western European scripts, the BibTeX back-end is perfectly usable.

The way we originally decided to allow continued Biber improvement but keep BibTeX use stable was to split the LaTeX code into two paths. That made sense with the proviso that new Biber features were essentially extensions to the code rather than any changes to existing ideas. However, over time that’s not quite worked out, particularly recently with the new data model driven approach that Philip has developed for Biber. As I’ve detailed elsewhere, that’s led to a new (breaking) syntax for \DeclareNameFormat, as well as various other changes that could be covered in BibTeX but to-date haven’t been. We’ve therefore decided we need to look again at this.

The current plan is for me to work on re-integrating the two back-end code paths, which I’m doing in a fork of biblatex as it’s non-trivial and I don’t want to mess the main development line up. I’ll also look to extend the BibTeX back-end code as appropriate such that we get back to the differences being about the differing capabilities of the back-ends rather than anything in the LaTeX code. I need a little while to do that, probably a couple of months. However, if I get it right we should be in a much stronger position for the future.

biblatex: A new syntax for \DeclareNameFormat

The ‘traditional’ BibTeX model for dividing up names is based around four parts:

  • First name(s)
  • Last name(s)
  • Prefix(es) (the ‘von part’)
  • Suffix(es) (the ‘junior part’)

This works well for many western European names, but falls down for many cases.

As part of Biber/biblatex developments, Philippe Kime has been working on moving beyond this rigid model for names to allow true flexibility. However, this comes with a caveat: a breaking change to \DeclareNameFormat in biblatex. The older syntax takes hard-wired arguments for each name part, but that obviously can’t be extended. The new format only deals with one argument (the name as a whole), but this requires changes to (non-standard) styles.

At the moment, the change is only true for Biber, which means some conditional code is needed. The best way to do that is to test for the older (BibTeX) back-end. For example, in the latest release of biblatex-chem I have in chem-acs.bbx:

% Modify the name format
\@ifpackageloaded{biblatex_legacy}
  {
    % Original syntax for BibTeX model
    \DeclareNameFormat{default}{%
      \renewcommand*{\multinamedelim}{\addsemicolon\addspace}%
      \usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
      \usebibmacro{name:andothers}%
    }

    \DeclareNameFormat{editor}{%
      \renewcommand*{\multinamedelim}{\addcomma\addspace}%
      \usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
      \usebibmacro{name:andothers}%
    }
  }
  {
   % New syntax for flexible back end
    \DeclareNameFormat{default}{%
      \renewcommand*{\multinamedelim}{\addsemicolon\addspace}%
      \nameparts{#1}%
      \usebibmacro{name:family-given}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffix}%
      \usebibmacro{name:andothers}%
    }

    \DeclareNameFormat{editor}{%
      \renewcommand*{\multinamedelim}{\addcomma\addspace}%
      \nameparts{#1}%
      \usebibmacro{name:family-given}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffix}%
      \usebibmacro{name:andothers}%
    }
  }

I’ll deal with the differences in back-ends in another post, but for the present this formulation will keep styles working for everyone.