Biblatex 缺少首字母缩写,且名称不唯一

Biblatex 缺少首字母缩写,且名称不唯一

我引用了姓氏相同的不同作者biblatex,通常会添加首字母以区分他们,但如果一个引用中有两位同名的作者,则只会添加第一作者的首字母。我如何才能为第二作者也添加首字母?

bib文件:

@Book{MuthenMuthen19982017a,
  title     = {{Mplus User's Guide}},
  publisher = {Muth{\'e}n \& Muth{\'e}n},
  year      = {1998--2017},
  author    = {Muth{\'e}n, L. K. and Muth{\'e}n, B. O.},
  address   = {Los Angeles, CA},
  edition   = {8},
}

@Article{Muthen1983a,
  author  = {Muth{\'e}n, B. O.},
  title   = {{Latent variable structural equation modeling with categorical data}},
  journal = {{Journal of Econometrics}},
  year    = {1983},
  volume  = {22},
  pages   = {43--65},
}

tex 文件:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}
\usepackage[style=apa, backend=biber, bibencoding=utf8]{biblatex}
\addbibresource{example.bib}

\begin{document}
\noindent
\parencite{Muthen1983a}\\
\parencite{MuthenMuthen19982017a}

\printbibliography
\end{document}

输出:

在此处输入图片描述

答案1

如果我理解https://blog.apastyle.org/apastyle/2014/01/when-to-use-author-initials-for-text-citations.html正确的是,APA 格式仅希望首字母缩写能够区分同姓氏的不同作者。这意味着我们观察到的行为是 APA 想要的结果。

幸运的是,在这种情况下,很容易改变行为来消除引文中所有名称的歧义。我们只需要重新定义labelname:doname一点。与原始定义相比(在当前版本 7.7 中,biblatex-apa可以在第 77-96 行找到apa.cbx)我们删除了涉及的初始测试\ifuniqueprimaryauthor

总体而言,需要注意的是,biblatex-apa即使“应该很容易”,修改起来也可能相当棘手。因此,如果不打算遵循 APA 风格,通常建议从标准风格之一开始,而不是从高度定制且复杂的风格开始biblatex-apa

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}

\renewbibmacro*{labelname:doname}[8]{%
  \ifcase\value{uniquename}%
    \ifuseprefix
      {\usebibmacro{name:family}{#1}{#3}{#5}{\relax}}
      {\usebibmacro{name:family}{#1}{#3}{\relax}{\relax}}%
  \or
     \ifuseprefix
       {\usebibmacro{name:given-family}{#1}{#4}{#5}{\relax}}
       {\usebibmacro{name:given-family}{#1}{#4}{\relax}{\relax}}%
  \or
     \ifuseprefix
       {\usebibmacro{name:given-family}{#1}{#3}{#5}{\relax}}
       {\usebibmacro{name:given-family}{#1}{#3}{\relax}{\relax}}%
  \fi
  \usebibmacro{name:andothers}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{MuthenMuthen19982017a,
  title     = {{Mplus} User's Guide},
  publisher = {Muthén \& Muthén},
  date      = {1998/2017},
  author    = {Muthén, L. K. and Muthén, B. O.},
  address   = {Los Angeles, CA},
  edition   = {8},
}
@article{Muthen1983a,
  author  = {Muthén, B. O.},
  title   = {Latent variable structural equation modeling with categorical data},
  journal = {Journal of Econometrics},
  year    = {1983},
  volume  = {22},
  pages   = {43--65},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\parencite{Muthen1983a}

\parencite{MuthenMuthen19982017a}

\printbibliography
\end{document}

(BO Muthén,1983 年)//(LK Muthén 和 BO Muthén,1998–2017 年)

请注意,该year字段只能包含整数。对于年份/日期范围,请使用该date字段和 ISO 8601 输入格式(例如date = {1998/2017},)。

由于自动检测来自bibencoding=utf8,因此 MWE 中不需要显式。该文件实际上没有使用任何 UTF-8,它仅是 US-ASCII,因此我将 MWE 切换为 UTF-8。biblatexbibencoding\usepackage[utf8]{inputenc}.bib

相关内容