# Conflict between biblatex's refsection and lot/lof with citation in float caption [closed]

I'm writing a standard complex document (ie, thesis), in which chapters are separated into different files which are included. I am using biblatex, and I would like to have a separate bibliography per chapter, so I am using the refsection option to automatically separate bibliographical scopes per section (as explained here and on the biblatex documentation, in section 3.11.3: "Multiple bibliographies").

However, my existing document did not like this at all, and crashed with an error stating

! You can't use \relax' after \advance.


I use Kile as my IDE, and according to Kile, the file where the error occurred was the .lot file. After some strategic commenting, I managed to pinpoint the problem:

When a float (figure or table) inside a refsection has a caption with a citation, printing a list of tables or list of figures (as appropriate) causes the error.

Removing the refsection fixes the problem. Removing the citation from the caption (either using the optional argument in \caption or by removing the caption altogether) fixes the problem. Removing the LoT or LoF fixes the problem. But how can I fix the problem without removing any of these?

MWE follows:

\documentclass{book}

\usepackage[
backend=biber,
refsection=chapter,
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A,
title = {A title},
pages = {55--61},
journal = {{JoRS}},
author = {Author, A.N.},
date = {1990}
}
@article{B,
title = {Another title},
pages = {550--610},
journal = {{JoBS}},
author = {Other, A.N.},
date = {1995}
}
\end{filecontents}

\begin{document}

\tableofcontents
\listoftables

\chapter{One}

This is a test \textcite{A}.

\begin{table}
\centering
\caption{A table. From \textcite{A}}
\begin{tabular}{ccc}
A & B & C \\
1 & 2 & 3 \\
\end{tabular}
\end{table}

\printbibliography

\chapter{Two}

This is a test \textcite{B}.

\printbibliography

\end{document}


As common as this seems to me, I was not able to find anything online that referred to this specific circumstance. There is one more question on this site with a promising title, but the core problem is one of sorting, not a crash. (And it's marked as a duplicate of something unrelated to my question).

There is also an issue on the biblatex repository on GitHub, but it doesn't seem to deal with citations in captions and LoF/LoTs at all. In any case, I tried both the development and the experimental versions mentioned in that discussion, and the problem still exists on both.

## closed as off-topic by moewe, Romain Picot, Andrew Swann, Andrew, ChrisSJan 20 '16 at 9:43

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Use optional argument → \caption[]{... – user11232 Apr 12 '15 at 23:45
• I have the same problem (citations in figure captions), but only on my Linux machine where biblatex v2.92 (2014) is installed. Instead, on my MAC where an old biblatex v1.7 (2011) is installed, I have no problems in compiling the same .tex code (and I get the citation in the List of Figures as well). Very strange... something broke in between the two versions... – rmbianchi Sep 17 '15 at 16:14
• Issue #361 in the biblatex bugtracker has been fixed. As far as I could tell the fix also resolves your issue here, would you be able to confirm that (note that the biblatex version on CTAN doesn't incorporate the fix yet, you will have to pull from github or download the dev version from sourceforge)? – moewe Dec 9 '15 at 10:29
• @moewe I just noticed that your comments are from last week. I just skimmed and thought they were from april as well. Let's wait then. – Johannes_B Dec 21 '15 at 12:37
• I'm voting to close this question as off-topic because it is about a bug in biblatex` that has been resolved in a recent update. An update resolves the issue. – moewe Jan 20 '16 at 8:52