13

Here is a simple document:

\documentclass{article}
\usepackage[%
  backend      = biber,
  bibstyle     = biblatex-sp-unified,
]{biblatex}
\addbibresource{test.bib}
\begin{document}

\cite{test}

\printbibliography{}
\end{document}

Which refers to this bbx and this simple bib file:

@article{test,
  Author = {test},
  Title = {test}
}

This used to work. After updating my MacTeX distribution this Sunday morning and (full disclosure) doing a sudo tlmgr update --all, I now receive errors like the following:

! Undefined control sequence.
<argument> \bbl@main@language

l.12 \printbibliography{
                        }
?

Curiously, if either the Author or Title field is missing, I don't get an error. Moreover, if I remove the bibstyle option, the error goes away. This leads me to suspect that the problem is somewhere in the bbx file linked above, but that's as far as my limited knowledge and expertise gets me.

I realize this might be a rather specific question (and I have opened an issue on the github I linked to), but perhaps there is a general issue causing the problem here, in which case others might benefit from a general solution.

  • Did you remove all of your auxiliary files? There has been a Biber update and it's possible that some .bbl files might thus need to be regenerated. – Joseph Wright Jun 19 '16 at 14:55
  • Yes. I created this MWE from scratch to try to pin down the problem. – Simon C Jun 19 '16 at 14:56
  • 2
    That's a non-standard .bbx: probably it's in need of an update – Joseph Wright Jun 19 '16 at 14:57
  • No doubt -- I thought it might be edifying to know what's going wrong here. – Simon C Jun 19 '16 at 15:00
  • 2
    Does loading babel (with a language option) help? – moewe Jun 19 '16 at 15:14
14

This problem was fixed in version 3.5 of biblatex. An update to the current version of biblatex should solve the issue.

Note that a similar problem could occur with ancient versions of babel or polyglossia, in which case the solution is again to update these packages.

The culprit is the line

\DeclareFieldFormat[article,book,thesis,incollection,unpublished,inproceedings]{titlecase}{\MakeSentenceCase*{#1}}%

\MakeSentenceCase* checks for the document language as saved in \bbl@main@language, since you load neither babel nor polyglossia, no such command is available and biblatex complains.

The problem has been addressed in the dev version and a fix will be included in the upcoming version 3.5 of biblatex (see the discussion from 2016-06-19 on issue #393).

Of course the issue is not restricted to your special .bbx file - all code that uses \MakeSentenceCase* is affected. biblatex-ieee uses a special format for titles which calls that macro and so is also affected, even though you won't find a direct call for \MakeSentenceCase* in its \DeclareFieldFormat commands.


Solution one is to load babel or polyglossia with the correct language option (american or british for babel), this is especially recommended if you don't write in English.

If you don't want to load either of the packages, you can use the language-unaware unstarred version note that the starred version of \MakeSentenceCase* is normally strongly preferred because it obeys the language settings, so using the unstarred version can only be a temporary work-around

\DeclareFieldFormat[article,book,thesis,incollection,unpublished,inproceedings]{titlecase}{\MakeSentenceCase{#1}}%

or get rid of sentence case for good with

\DeclareFieldFormat[article,book,thesis,incollection,unpublished,inproceedings]{titlecase}{#1}%
  • 1
    This could be considered a bug in biblatex, I believe since babel/polyglossia are strongly recommended, but not required. – moewe Jun 19 '16 at 15:26
  • Thank you! That is super helpful. I am somewhat curious why this wasn't exposed until I updated my TeX distribution, but that'd just be gravy. – Simon C Jun 19 '16 at 15:27
  • 4
    @SimonC Checking for the document language was only implemented in version 3.4 of biblatex (see github.com/plk/biblatex/issues/393). You will only have gotten up to version 3.3 in TeX live 2015. But 2016 ships with 3.4 – moewe Jun 19 '16 at 15:29
  • 1
    See also groups.google.com/d/msg/comp.text.tex/FKahkrwlS4Q/Q6bJgcCjDAAJ from this morning. – moewe Jun 19 '16 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.