情况是这样的:我有一个biblatex
带有预注的参考书目。预注包含许多作者的引文。我希望它表现得像服从一样maxnames=3
。但我希望我的参考书目表现得像maxnames=99
。有没有办法maxnames
为该引文在本地设置值?
更一般地说,是否存在本地设置选项的程序biblatex
?
答案1
这是我第一次在参考书目中遇到引用命令。注意:\defcounter
(etoolbox 宏)而不是\setcounter
允许对计数器进行本地重新定义。(编辑:我在我的回答到在参考书目条目开头添加 [AuthorYear] 块。
\documentclass{article}
\usepackage[style=authoryear,maxnames=99,maxcitenames=3]{biblatex}
\newcounter{mymaxcitenames}
\AtBeginDocument{%
\setcounter{mymaxcitenames}{\value{maxnames}}% i.e., 3 (!)
}
\defbibnote{recommended}{If you don't have time to read anything else, read
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\textcite{A01}.%
\endgroup
}
\usepackage{filecontents}
\begin{filecontents}{biblatextest.bib}
@misc{A01,
author = {Author, A. and Buthor, B., and Cuthor, C. and Duthor, D.},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{biblatextest.bib}
\begin{document}
If you don't have time to read anything else, read \textcite{A01}.
\printbibliography[prenote=recommended]
\end{document}