使用 biblatex-apa 从第一个引用开始截断名称

使用 biblatex-apa 从第一个引用开始截断名称

我非常确定我的问题是针对该biblatex-apa软件包的。

让我从我的最小工作示例开始:

\begin{filecontents}{\jobname.bib}
@book{foo,
    Author = {Last1, First1 and Last2, First2 and Last3, First3},
    Address = {City}, Publisher = {Publisher}, Title = {Title}, Year = {2015}}
}
\end{filecontents}

\documentclass{article}
\usepackage[american]{babel}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}

\begin{document}
The APA standard says that the first citation with 3--5 authors should have the author list in full, like so: \autocite{foo}.

Subsequent citations are truncated according to their disambiguation rules \autocite{foo}.

\printbibliography
\end{document}

最小工作示例的输出

看一下apa.cbx,似乎要付出很多努力才能产生这种行为!

所以我有点不好意思问:有没有办法禁用此功能?我想要一种类似 APA 的引用格式,其行为始终类似于第二次(及后续)引用。

我的一些想法:

  • 是否有一种简单的方法来操纵引用跟踪器(或使用任何机制来确定它是第一次引用还是后续引用)?
  • 如果作者超过 5 位,第一个引文仍会被截断。此设置可以调整吗?它似乎没有响应maxnamesmaxcitenames

答案1

没有真正的方法可以改变这一点,因为它不是 APA 样式,而且很大程度上是硬编码的。\DeclareNameFormat不过,您可以根据需要重新声明 labelname 的整个名称格式。

答案2

我最终使用了 @PLK 建议的方法。为了便于将来参考,下面是实现方法。在使用 apa 样式加载 biblatex 后放置此代码:

% Hack to make biblatex-apa truncate names on all citations, even though the
% APA style says to include the full author list (up to 5) on the first
% citation.
% This is copied from apa.cbx in the biblatex-apa package, and modified to
% remove the \ifciteseen test
\makeatletter
\DeclareNameFormat{labelname}{%
  \ifthenelse{\value{uniquelist}>1}
    {\numdef\cbx@min{\value{uniquelist}}}
    {\numdef\cbx@min{\value{minnames}}}%
  \ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
              or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
    {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}
    {\ifnumcomp{\value{listcount}}{<}{\cbx@min + 1}% normal name
       {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}%
       {}%
     \ifnumcomp{\value{listcount}}{=}{\cbx@min + 1}% first past ul is et al
       {\ifnumcomp{\value{listcount}}{<}{\value{listtotal}}
         {\andothersdelim\bibstring{andothers}}
         {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}%
       {}%
     \ifnumcomp{\value{listcount}}{>}{\cbx@min + 1}% nothing thereafter
       {\relax}%
       {}%
     }%
  }
\makeatother

相关内容