8

I am using bibtex as the backend for my biblatex bibliography but there seems to be some clash between it and the etoolbox package that I don't understand. This is on a fresh install of TeXlive 2014. The error only appears if the following conditions are met:

1: BibTeX is the backend
2: I am using biblatex-chicago (there's no tag for that - sorry!)
3: A bib entry is cited twice in the same paragraph

A minimal example follows (in which I have embedded the bibliography in the file for the sake of keeping it simple - doing it this way didn't change the error).

\documentclass{article}

\usepackage{filecontents}  
\begin{filecontents}{biblio.bib}  
@book{smith_john_1970,  
    address = {City},  
    edition = {1st},  
    title = {Help},  
    publisher = {A. N. Other},  
    author = {Smith, John},  
    year = {1970},  
}  
\end{filecontents}  

\usepackage[backend=bibtex]{biblatex-chicago}  
\addbibresource{biblio.bib}

\begin{document}

\cite[732]{smith_john_1970} and \cite[732]{smith_john_1970}

\end{document}
  • Welcome to TeX.SX! Where does etoolbox come in within your MWE? – user31729 Sep 9 '14 at 23:10
  • @ChristianHupfer The error I get is ! Package etoolbox Error: Invalid boolean expression. I get no error when the backend is Biber. – egreg Sep 9 '14 at 23:14
  • @egreg: Yes, I confirm that... I have not looked into the biblatex-chicago file so far. – user31729 Sep 9 '14 at 23:28
  • Thank you for taking the time to try the example. Yes biber works (which is why I listed bibtex as a condition) but it would be a real headache for me to make that switch (for unrelated reasons). – Kevin Sep 9 '14 at 23:38
  • 1
    Since the 'notes' style is not yet fully dependent on biber, you should file a bug report. The developer has always been quite responsive in times past. (Note, however, that biber seems poised to become a requirement for biblatex-chicago. Note also that biber is quite good at converting to and from BibTeX-compliant bibliographies, which may prove useful to you.) – jon Sep 10 '14 at 2:30
8

If one does some digging in chicago-notes.cbx, in the definition for the cite bibmacro one finds

\ifboolexpr{
    test {\iffieldundef{shorthand}}%
    or
    (
    togl {blx@skipbiblist}%
    and
    togl {cms@inheritshhand}%
    and
    not test {\iffieldundef{crossref}}%
    )
  }

And indeed that seems to be the boolean expression that causes etoolbox to get the hiccups. All but one of these conditions are completely fine, the problem arises from togl {blx@skipbiblist}.

skipbiblist is - like its friendsskipbib and skiplab - a Biber-only option (unfortunately, skipbiblist is quite new and not documented in the docs, it is an extension of skiplos and works in similar fashion to its "friends", see p. 62 §3.1.3.2 Type/Entry Options of the biblatex documentation)

If you do not use Biber, but BibTeX or BibTeX8, the file biblatex1.sty is loaded (with Biber it would be biblatex2.sty), biblatex1.sty, however does not have a definition for blx@skipbiblist (it does provide one for blx@skipbib, blx@skiplos and blx@skiplab though - so it rather seems like a biblatex1 bug for me) and therefore the conditional is invalid for etoolbox, because blx@skipbiblist does not exist if you do not use Biber.

But I want a fix now!

There are two fixes for this issue

1. Use Biber

Just use Biber as your backend, enjoy all its functionalities and capabilities and get rid of this little bug; you merely have to pass backend=biber as loading-time option to biblatex/biblatex-chicago (and obviously have Biber installed and run it instead of BibTeX).

That is the preferred solution, see for example page 1 (!) of the biblatex-chicago documentation:

I also strongly encourage all users who haven’t already done so to switch to Biber as their backend; it has long been a requirement for the author-date styles, but it is now becoming indispensable for accessing all the features of the notes & bibliography style, as well.

Or

2. Provide the missing toggle yourself

Just put

\providetoggle{blx@skipbiblist}

into your preamble.

MWE

\documentclass{article}
\usepackage[notes,backend=bibtex]{biblatex-chicago}  
\addbibresource{biblatex-examples.bib}

\providetoggle{blx@skipbiblist}

\begin{document}
\cite{wilde} and \cite{wilde}
\end{document}
  • I have filed a bug report biblatex bug tracker #267: skipbiblist vs skiplos, in the meantime you can use one of the two fixes above. – moewe Sep 10 '14 at 6:10
  • You have to put a \makeatletter before and \makeatotherafter the \providetoggle. – Sveinung Sep 10 '14 at 7:54
  • 1
    @Sveinung no you haven't :) – clemens Sep 10 '14 at 8:07
  • blx@skiplos has now been internally renamed to blx@skibiblist (e9f4f3d) so with the upcoming version of biblatex that issue should be resolved. – moewe Sep 10 '14 at 10:12
  • 1
    @Sveinung because at some point the argument must be placed between \csname ... \endcsname. They build the command name from the whole (expanded) argument, also with catcode 12 tokens... – clemens Sep 11 '14 at 5:59

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.