10

I'm using biblatex with biber as the backend to write my document. Without \printbibliography, all the citations work perfectly well, and appear in the document, so I assume that my bibliography.bib file is fine. The problem comes, however, when I include the line \printbibliography at the end of my document (just before \end{document}): suddenly every time I try to compile I get "undefined control sequence" referencing whatever line is after \printbibliography.

Following suggestions elsewhere on the internet, I combed my document for "smart" quotation marks, and other weird characters, but there aren't any. My citations are downloaded from ADSABS, with the occasional @ONLINE resource, too. As I said, though, all the references work fine, it's just the \printbibliography command that bails.

To illustrate (I'm not going to paste the entire document here unless someone thinks it will be helpful):

\usepackage[style=authoryear-icomp,sorting=anyt]{biblatex}
\addbibresource{bibliography.bib}

...

\printbibliography
  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Benedikt Bauer Mar 27 '14 at 13:44
  • 1
    i'd start by looking at the .bbl file to make sure nothing is wrong there -- all brace groups closed, that sort of thing, and also, whether the control sequence cited as "undefined" occurs in that file. – barbara beeton Mar 27 '14 at 14:01
  • 1
    Normally if biblatex fails at \printbibliography it's not a biblatex problem but a problem with the .bib file. The problem does not become apparent in the citations though because not all entry fields are evaluated at cite-time. A MWE (and the error message: which command?) would greatly help us find the problem. In searching for it you might very well find out where the problem lies yourself. (Try for example only to cite one entry from the .bib file and print the bibliography, if that works that entry is not the culprit, try another one). – moewe Mar 27 '14 at 14:13
  • So @moewe I took your advice and made an MWE at gist.github.com/gfarrell/9892791. I've copied my document's original preamble exactly. I've included a citation for every bib entry. This MWE doesn't die on \printbibliography, but it doesn't properly cite anything either. All the citations are just printed as the citation keys, and the references section isn't populated (see compiled PDF here: cl.ly/2f1e3T243o1n). I've tried multiple runs but no cigar. It seems I can't even create a proper MWE... – GTF Mar 31 '14 at 13:59
  • (OK, ignore the problem with the MWE, Biber was throwing a hissy fit - fixed using bit.ly/1gHp3Bm) I'll go through the citations to see what breaks. – GTF Mar 31 '14 at 14:10
8

I had a similar issue. I pinpointed the problem to be in the .bib file. My advice is to carefully examine your .bib file for possible ambiguous syntax. In my case, the problematic syntax was:

...
title = {A 70~kW stationary fuel cell system},
...

The undefined control sequence issue was resolved, when this was changed to the following (i.e., the expression with the tilde was enclosed in the curly braces):

...
title = {A {70~kW} stationary fuel cell system},
...

A short comment (maybe someone will find it useful). In my case, the issue occurred after the matlab-prettifier package was loaded, which also loads the listings package. Until these packages were load, I had experienced no issues whatsoever.

5

The problem in the bibliography.bib file (https://gist.github.com/gfarrell/9892791) was an undefined control sequence after all: ADSABS inserts control sequences for journals like \aap.

Removing these and replacing them with the actual journal names fixes the problem.

(If anyone knows a package that defines all of these it would be quite helpful).

  • 2
    Another possible cause, which I experienced after switching from bibtex to biblatex, is the use of fancy quotes (') and hyphens (-). After replacing these with plain text the errors went away. – jsaven Dec 6 '16 at 10:57
0

I had the same problem from a bibtex entry which was imported by DOI (using Jabref).

In one article's title there was a {\textquotesingle} included. This caused biblatex to break.

After removing it, the compilation worked again.

  • 1
    In a short test I ran {\textquotesingle} seemed to work in the title field if comped with Biber (indeed Biber converts it to {'}, which may or may not be a good idea). If compiled with BibTeX, the command is not converted and may be reported as unknown if the textcomp is not loaded, since \textquotesingle is not defined in the LaTeX kernel for all encodings, see tex.stackexchange.com/q/202166/35864. – moewe Dec 7 '18 at 14:37
  • Thanks for the effort. I did not check for missing packages. – loki Dec 7 '18 at 14:40
0

In my case it was a $\mathsemicolon$ in booktitle in the automatically imported entry using jabref.

fixed it, re-run biber, recompiled and works now.

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.