7

When using ibid citations inside a longtabu whilst on a page that already has a citation on it, the citation is ibid regardless of whether the author has been cited on that page already or not.

\documentclass{article}
\usepackage[style=authoryear-icomp]{biblatex}
\usepackage{longtable, tabu}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{test1,
  author = {Doe, John},
  year = {1999},
  title = {Testing title},
  journaltitle = {Journal of tests},
  volume = {100},
  number = {5},
  pages = {100--200},
}
@article{test2,
  author = {Dee, Jane},
  year = {2000},
  title = {Second title},
  journaltitle = {Second journal},
  volume = {150},
  number = {10},
  pages = {300-400},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
One \autocite{test1}.
\begin{longtabu}{X}
Two \autocite{test2}.
\end{longtabu}
\end{document}

This produces the following output:

Output of a file with a citation inside longtabu with another citation elsewhere on the page

Am I using tabu or biblatex incorrectly?

  • 1
    Sounds like a bug. I obtained the same (wrong) result. – ppr Dec 9 '13 at 22:12
3

tabu uses some code derived partly from tabularx that sets the table multiple times to determine the column widths so you need to disable \autocite during the trials. tabu has a hook for that:

enter image description here

\documentclass{article}
\usepackage[backend=bibtex,style=authoryear-icomp]{biblatex}
\usepackage{longtable, tabu}
\tabuDisableCommands{\def\autocite{}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{test1,
  author = {Doe, John},
  year = {1999},
  title = {Testing title},
  journaltitle = {Journal of tests},
  volume = {100},
  number = {5},
  pages = {100--200},
}
@article{test2,
  author = {Dee, Jane},
  year = {2000},
  title = {Second title},
  journaltitle = {Second journal},
  volume = {150},
  number = {10},
  pages = {300-400},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

One \autocite{test1}.
\begin{longtabu}{X}
Two \autocite{test2}.
\end{longtabu}
\end{document}

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.