Biblatex 同上。longtabu 环境中的引用

Biblatex 同上。longtabu 环境中的引用

longtabu当在已经有引用的页面上使用同上引用时,无论作者是否已在该页面上被引用,该引用都是同上。

\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}

这将产生以下输出:

输出一个文件,其中有 longtabu 内部的引用,以及页面其他地方的另一个引用

我是否使用tabu不当biblatex

答案1

tabu使用部分源自的代码tabularx多次设置表格以确定列宽,因此您需要\autocite在试验期间禁用它。tabu有一个钩子:

在此处输入图片描述

\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}

相关内容