如何强制使用作者年份的 Biblatex 内联显示仅两个作者的名字首字母?

如何强制使用作者年份的 Biblatex 内联显示仅两个作者的名字首字母?

使用 authoryear 样式的 Biblatex 会自动且有效地尝试消除内联作者姓氏相同的歧义。例如,如果我引用了 F. Howell 和 WW Howell,使用\parencite{Howell1951}and\parencite{Howell1975}会产生:

这些都是为了与早期的“进步的尼安德特人”在现已被取代的前尼安德特人假说(F. Howell 1951)的背景下进行对比,但现在它们也被用来与西南亚尼安德特人进行对比(W. Howell 1975)。

但在我的例子中,第二作者不是 WW Howell,而是 WW Howells,后面加 s。因此,Biblatex 无法消除歧义:

这些都是为了与早期的“进步的尼安德特人”在现已被取代的前尼安德特人假说(Howell 1951)的背景下进行对比,但现在它们也被用来与西南亚尼安德特人进行对比(Howells 1975)。

无论如何,我希望它能够消除歧义,这样阅读速度快的人就不会认为这两个作者是同一个人,阅读速度慢的人也不会认为这是打字错误。我希望它产生:

这些都是为了与早期的“进步的尼安德特人”在现已被取代的前尼安德特人假说(F. Howell 1951)的背景下进行对比,但现在它们也被用来与西南亚尼安德特人进行对比(WW Howells 1975)。

如何才能做到这一点?

\documentclass[10pt]{article}

\usepackage[american]{babel}
\usepackage{csquotes}

\usepackage[sorting=nyt, style=authoryear-comp, backend=biber, maxbibnames=10, maxcitenames=1, doi=false]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\begin{filecontents}{biblio.bib}
@article{Howell1951,
title = {Some title},
year = {1951},
author = {F. Howell},
journal = {Some journal}
}
@article{Howells1975,
title = {Another title},
year = {1975},
author = {W.W. Howells},
journal = {Another journal}
}

\end{filecontents}

\addbibresource{biblio.bib}



    \begin{document}

Blabla \parencite{Howell1951},  bla blo \parencite{Howells1975}. 

    \printbibliography
    \end{document}

在此处输入图片描述

答案1

我不知道能否让 Biber 根据某种“模糊相似性”自动执行此操作。但您可以手动执行此操作。

使用 PLK 解释的注释功能使用 biblatex 将特定作者设为粗体(也可以看看重载 Author+an / 突出显示多个作者而且当然文档biblatex,第 74-75 页)

@article{Howell1951,
  title     = {Some title},
  year      = {1951},
  author    = {F. Howell},
  author+an = {1=initials},
  journal   = {Some journal},
}
@article{Howells1975,
  title     = {Another title},
  year      = {1975},
  author    = {W. W. Howells},
  author+an = {1=initials},
  journal   = {Another journal},
}

您可以在其中给出initials或在相应项目的字段中打印首字母或全名。full+an

然后重新定义labelname

\DeclareNameFormat{labelname}{%
  \ifboolexpr{test {\ifnumless{\value{uniquename}}{1}} and test {\ifitemannotation{initials}}}
    {\setcounter{uniquename}{1}}
    {}%
  \ifboolexpr{test {\ifnumless{\value{uniquename}}{2}} and test {\ifitemannotation{full}}}
    {\setcounter{uniquename}{2}}
    {}%
  \ifcase\value{uniquename}%
    \usebibmacro{name:family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \or
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \or
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}

initials如果或请求,这会将姓名消歧义的计数器重置为更高的值,以显示更多内容(即首字母或全名)full

平均能量损失

\documentclass[american]{article}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[sorting=nyt, style=authoryear-comp, backend=biber, maxbibnames=10, maxcitenames=1, doi=false]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Howell1951,
  title     = {Some title},
  year      = {1951},
  author    = {F. Howell},
  author+an = {1=initials},
  journal   = {Some journal},
}
@article{Howells1975,
  title     = {Another title},
  year      = {1975},
  author    = {W. W. Howells},
  author+an = {1=initials},
  journal   = {Another journal},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareNameFormat{labelname}{%
  \ifboolexpr{test {\ifnumless{\value{uniquename}}{1}} and test {\ifitemannotation{initials}}}
    {\setcounter{uniquename}{1}}
    {}%
  \ifboolexpr{test {\ifnumless{\value{uniquename}}{2}} and test {\ifitemannotation{full}}}
    {\setcounter{uniquename}{2}}
    {}%
  \ifcase\value{uniquename}%
    \usebibmacro{name:family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \or
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \or
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}

\begin{document}
Blabla \parencite{Howell1951},  bla blo \parencite{Howells1975}. 
\printbibliography
\end{document}

示例输出

相关内容