Apa6 biblatex:首次引用时仅显示 et. al

Apa6 biblatex:首次引用时仅显示 et. al

我认为我的 .bib 文件有问题。我有参考文献,其中一个可以完美运行,而另一个则不行。第一次引用其中一个参考文献时,我希望看到所有作者的名字和姓氏。这仅适用于我的第二个参考文献,这里是 MWE。

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Wohlin2000,
address = {Norwell, MA, USA},
author = {Wohlin, Claes and Runeson, Per and H\"{o}st, Martin and Ohlsson, Magnus C and Regnell, Bj\"{o}orn and Wessl\'{e}n, Anders},
isbn = {0-7923-8682-5},
publisher = {Kluwer Academic Publishers},
title = {{Experimentation in Software Engineering: An Introduction}},
year = {2000}
}

@book{Rogers2011,
abstract = {.....},
author = {Rogers, Yvonne and Sharp, Helen and Preece, Jenny},
isbn = {0470665769},
publisher = {John Wiley \& Sons, Ltd.},
title = {{Interaction Design: Beyond Human - Computer Interaction}},
volume = {6},
year = {2011}
}

\end{filecontents*}

\documentclass{article} 
\usepackage[%
 % backend=bibtex   % use BibTeX
 backend=biber    % Use biber
]{biblatex} 
\addbibresource{\jobname.bib}
\begin{document} 
Hello \textcite{Wohlin2000}. How are you? And Hello to you, \textcite{Rogers2011}.
\printbibliography 
\end{document} 

答案1

biblatex-apa如果姓名列表包含 5 位以上的作者,则即使第一次引用也会打印“et al.”

为了改变这种情况,我们可以重新定义名称自定义名称格式apa.cbx:只需更改一行(我们更改\ifnumcomp{\value{listtotal}}{>}{5}\ifnumcomp{\value{listtotal}}{>}{999}),即使我们必须复制一整段代码:

\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}}
    {\ifboolexpr{test {\ifnumcomp{\value{listtotal}}{>}{999}}% standard biblatex-apa has "\ifnumcomp{\value{listtotal}}{>}{5}" here
                 or test {\ifciteseen}}
     {\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
      % but enforce plurality of et al - only truncate here if there is at
      % least one more element after the current potential truncation point
      % so that "et al" covers at least two elements.
       {\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}%
       {}}%
     {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}}
\makeatother

这使得biblatex在第一次引用时显示所有名称。

平均能量损失

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Wohlin2000,
  address   = {Norwell, MA, USA},
  author    = {Wohlin, Claes and Runeson, Per and H\"{o}st, Martin and Ohlsson, Magnus C and Regnell, Bj\"{o}orn and Wessl\'{e}n, Anders},
  isbn      = {0-7923-8682-5},
  publisher = {Kluwer Academic Publishers},
  title     = {{Experimentation in Software Engineering: {An} Introduction}},
  year      = {2000},
}

@book{Rogers2011,
  author    = {Rogers, Yvonne and Sharp, Helen and Preece, Jenny},
  isbn      = {0470665769},
  publisher = {John Wiley \& Sons, Ltd.},
  title     = {{Interaction Design: Beyond Human - Computer Interaction}},
  volume    = {6},
  year      = {2011},
}

\end{filecontents*}

\documentclass{article} 
\usepackage[%
  style=apa,
  backend=biber,
]{biblatex} 
\DeclareLanguageMapping{english}{english-apa}

\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}}
    {\ifboolexpr{test {\ifnumcomp{\value{listtotal}}{>}{999}}% standard biblatex-apa has "\ifnumcomp{\value{listtotal}}{>}{5}" here
                 or test {\ifciteseen}}
     {\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
      % but enforce plurality of et al - only truncate here if there is at
      % least one more element after the current potential truncation point
      % so that "et al" covers at least two elements.
       {\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}%
       {}}%
     {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}}
\makeatother

\addbibresource{\jobname.bib}
\begin{document} 
Hello \textcite{Wohlin2000}. How are you? And Hello to you, \textcite{Rogers2011}.


Hello \textcite{Wohlin2000}. How are you? And Hello to you, \textcite{Rogers2011}.

\printbibliography 
\end{document} 

在此处输入图片描述

相关内容