If I invoke \cite
within a tabularx
environment and biblatex
is loaded with defernumbers=true
and sorting=none
, references do not get a number.
I get these warnings:
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) file
(biblatex) and rerun LaTeX afterwards.
But nothing changes no matter how many times I rerun biber
and pdflatex
.
If I change the tabularx
environment to plain tabular
references do get a number.
I have already brought this to PLK's (biblatex
maintainer) attention on the biblatex
bug tracker and he has said that:
This is because
sorting=none
invokes a special check to see if citation order has changed so that re-run messages can be issued for biber. For some reason,tabularx
is triggering this every time. You can see something strange going on by just runing latex once and they you get, in the.bcf
:<bcf:citekey order="1">gob</bcf:citekey> <bcf:citekey order="3">michael</bcf:citekey> <bcf:citekey order="4">tobias</bcf:citekey>
There is a missing "2" order. With plain
tabular
, it is there. Sotabularx
is doing something strange like processing the\cite
twice. I think it's worth asking this as a TSE question as thetabularx
people are around on there.
Issue:
MWE:
\documentclass[10pt]{article}
\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@Article{gob,
title = {I've Made a Huge Mistake: The Hermano Story},
author = {Bluth, Gob},
journal = {Journal of Magicians},
year = {2003},
volume = {1},
number = {1},
pages = {1--10},
}
@Article{michael,
title = {Her?},
author = {Bluth, Michael},
journal = {Sudden Valley},
year = {2003},
volume = {1},
number = {1},
pages = {1--10},
}
@Article{tobias,
title = {Never-nudism},
author = {F{\"u}nke, Tobias},
journal = {Blue Man Group},
year = {2003},
volume = {1},
number = {1},
pages = {1--10},
}
\end{filecontents}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[%
backend=biber,
defernumbers=true,
style=numeric,
sorting=none,
]{biblatex}
\addbibresource{bibliography.bib}
\usepackage{tabularx}
\begin{document}
\section{A section}
Check this out~\cite{gob}.
\section{A section}
% With plain tabular, it works with sorting=none or no sorting option.
% \begin{tabular}{ll}
% \textbf{The term \enquote{issue} is used to refer to:} & \textbf{Reference(s)} \\ \hline
% An issue. & \cite{michael}
% \end{tabular}
% With tabularx, it does not work with sorting=none.
\begin{tabularx}{\textwidth}{ll}
\textbf{The term \enquote{issue} is used to refer to:} & \textbf{Reference(s)} \\ \hline
An issue. & \cite{michael}
\end{tabularx}
\nocite{tobias}
\printbibliography
\end{document}
Extra information: With the latest stable biblatex
release, numbers are omitted altogether and only the brackets are shown. With the dev 3.0 version, all bibliography entries are assigned the number 0. But this is irrelevant because the same .bcf
issue is seen in both cases:
This numbering in the
.bcf
issue also occurs with the released 2.9 version ofbiblatex
. Further runs throw an error with 2.9 due to issues already fixed in in 3.0 but this strangetabularx
behaviour is there. — PLK
tabularx
with justl
columns?:-)
tabularx
squashes the table body a few times in order to measure the columns' widths. At least anX
column is necessary for the example to be meaningful, or the answer would be “usetabular
”.tabular
is not really an option.