biblatex-chicago
如果条目在文档中仅被引用一次,那么是否可以不打印带有简写条目的“以下引用为 X”消息?
梅威瑟:
\documentclass{article}
\begin{filecontents}{test.bib}
@book{entry,
title = {Book's title},
author = {Author, Some},
shorthand = {shorthand}
}
\end{filecontents}
\usepackage{biblatex-chicago}
\bibliography{test}
\begin{document}
Lorem ipsum.\autocite{entry}
\end{document}
理想情况下,这将产生一个脚注,简单地说“某位作者,书名',而不是像现在这样包括“(以下称为简写)”。
答案1
如果我们启用该citecounter
选项,我们可以测试某个条目是否被引用多次,并执行cms:shorthandintro
宏,该宏会打印“以下引用为......”短语,条件是该作品被引用多次
\documentclass{article}
\usepackage[citecounter=context]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}
\renewbibmacro*{cms:shorthandintro}{%
\ifboolexpr{ test {\iffieldundef{shorthand}}
or not test {\ifnumgreater{\value{citecounter}}{1}}}%
{}%
{\iffieldundef{shorthandintro}%
{\ifthenelse{\ifentrytype{jurisdiction}\OR\ifentrytype{legal}\OR%
\ifentrytype{legislation}}%
{\printtext[brackets]{%
\bibstring{hereinafter}\addspace%
\printfield{shorthand}}}%
{\printtext[parens]{%
\bibstring{citedas}\addspace%
\printfield{shorthand}}}}%
{%\addspace%\setunit{\addspace}% Ditto
\printfield{shorthandintro}}}}
\begin{document}
Lorem ipsum.\autocite{kant:kpv}
Lorem ipsum.\autocite{kant:ku}
Lorem ipsum.\autocite{kant:ku}
\end{document}