如果使用 引用多个项目\citet
,我希望在最后一项和倒数第二项之间实现特定的分隔符(如“and”)。例如,\citet{Grieg,Greg,Gregor}
应该给出类似...Grieg (2002), Greg (2001) and Gregor (2003) ...
一个最小的工作示例:
\documentclass{article}
\usepackage[natbib=true,firstinits=true,
bibstyle=authoryear,citestyle=authoryear-comp,
minnames=1,maxnames=2,isbn=false,url=false,eprint=false,doi=false,
maxbibnames=20
]{biblatex}
\renewcommand*{\finalnamedelim}{\addspace\&\addspace}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@misc{A01,
author = {Author, A. A. and Buthor, B. B. and Cuthor, C. C.},
year = {2001},
title = {Alpha},
}
@misc{B01,
author = {Dodelson, D. and Edward, E.},
year = {2011},
title = {Beta},
}
\end{filecontents}
\addbibresource{test.bib}
\begin{document}
As shown in \citet{A01,B01}, ...
\printbibliography
\end{document}
编辑:我已经看到了 Guido 的回答(https://tex.stackexchange.com/a/89634/30051),但它不适用于 authoryear 样式。因此,这里有一个更具体的问题。
答案1
使用以下包的解决方案xpatch
( \usepackage{xpatch}
)
\xpatchbibmacro{textcite}
{\multicitedelim}
{\ifnumequal{\value{citecount}}{\value{citetotal}}
{\addspace\bibstring{and}\addspace}
{\multicitedelim}}
{}
{}