BibLaTeX 中的带连字符的复合姓氏

BibLaTeX 中的带连字符的复合姓氏

考虑以下 MWE:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
    @article{GRW_high1,
        author = {Galatius, S{\o}ren and Randal-Williams, Oscar},
        title = {Homological stability for moduli spaces of high dimensional manifolds. {I}},
        journal = {Journal of the American Mathematical Society},
        volume = {31},
        year = {2018}
    }
\end{filecontents*}


% \usepackage[%
%   backend=biber,
%   style=alphabetic,
%   ]%
% {biblatex}
% \addbibresource{\jobname.bib}

\begin{document}
    \cite{GRW_high1}

    \bibliographystyle{alpha} % <- comment out
    \bibliography{test}{}     % <- comment out
    % \printbibliography
\end{document}

这将生成(预期的)标签[GRW18]。但是,如果注释掉 BibTeX 特定部分并在 BibLaTeX 配置中注释,则生成的标签为[GR18]

如何使用 BibLaTeX 重新创建 BibTeX 行为?

我只能[GRW18]通过使用\namepart[compound=true]{family}in\DeclareLabelalphaNameTemplate来删除连字符 - 但我希望[GRW18]这是标准行为。

显然,添加label={GRW}到 bib 条目可以达到预期的效果,但是那有什么乐趣呢……

答案1

compound=truein选项可以在这里\namepart提供\DeclareLabelalphaNameTemplate帮助(正如问题中所提到的)。

\DeclareLabelalphaNameTemplate{
  \namepart[use=true, pre=true, strwidth=1, compound=true]{prefix}
  \namepart[compound=true]{family}
}

2.13 之前的 Biber 版本中存在一个错误,这意味着连字符不适用于复合名称。该问题在报告后已得到解决https://github.com/plk/biber/issues/272

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}

\usepackage[
  backend=biber,
  style=alphabetic,
]{biblatex}

\DeclareLabelalphaNameTemplate{
  \namepart[use=true, pre=true, strwidth=1, compound=true]{prefix}
  \namepart[compound=true]{family}
}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{GRW_high1,
  author  = {Galatius, Søren and Randal-Williams, Oscar},
  title   = {Homological stability for moduli spaces of high dimensional manifolds. {I}},
  journal = {Journal of the American Mathematical Society},
  volume  = {31},
  year    = {2018}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
  \cite{GRW_high1}

  \printbibliography
\end{document}

[GRW18]

相关内容