我偶然发现了超链接和比布拉特克斯包裹和latexdiff. 如果添加的引文作者多于比布拉特克斯 maxcitenames
参数,那么我在编译时会收到两对错误:
额外的},或者被遗忘的\endgroup。}
缺少} 插入。}
麦格维:
\documentclass{memoir}
%DIF LATEXDIFF DIFFERENCE FILE
\usepackage{hyperref}
\usepackage[
backend=bibtex,
style=authoryear-ibid,
defernumbers=true,
maxnames=1, %%% OPTION ONE: Change this to a number greater or equal to the maximal number of authors
]
{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{dr1957cat,
title={The Cat in the Hat},
author={Seuss, Dr. and Ginsburg, Avi},
series={Beginner books},
year={1957},
publisher={Random House}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF and edited by me for the MCVE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
% OPTION THREE: Define this as:{\DIFadd}[1]{#1} and lose the intent
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
\DIFaddbegin
\DIFadd{ %%% OPTION TWO: Comment out this line and the corresponding }
\textcite{dr1957cat}
} %%% OPTION TWO: This is the corresponding }
\DIFaddend
. 'twas a good book.
\end{document}
我已经找到了一些解决方法(在 MCVE 中注明),但无法确定这是设计错误还是为什么会发生这种情况。那么,为什么我必须使用这些解决方法?
PS 错误发生在这个序列之后(即不在编译 bibtex 之前)
pdflatex mcve.tex
bibtex mcve
pdflatex mcve.tex
该问题也可以在
\documentclass{article}
\RequirePackage[normalem]{ulem}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{biblatex-examples.bib}
\renewbibmacro*{cite}{{\penalty-1}\space}
\begin{document}
\uwave{\cite{sigfridsson}}
\uwave{{\penalty-1}\space}
\end{document}
文档环境中的第一行导致错误,而第二行则正常。