调整 BibLaTeX 样式 - 显示的编辑器数量

调整 BibLaTeX 样式 - 显示的编辑器数量

附件的 MWE 给出以下结果

作者 A.、B. 作者、C. 作者等 (1992)。“标题”。收录于:书名,由 A. 编辑、B. 编辑和 C. 编辑编辑。第 59 卷。Springer,纽约。

我想要的是

作者 A.、作者 B.、作者 C. 等 (1992)。“标题”。出自:书名,A. Editor 等编辑,第 59 卷。Springer,纽约。

即仅显示第一个编辑,后面跟着 et al.,同时保留 et al. 之前的前三位作者。

梅威瑟:

\documentclass{article}

\usepackage[    
    backend=biber,      % use biber backend or bibtex
    bibencoding=utf8,   % use auto file encode
    style=authoryear,   % use alphabetic (or numeric) bib style
    natbib=true,            % allow natbib commands
    hyperref=true,      % activate hyperref support
    backref=false,      % activate backrefs
    isbn=true,              % don't show isbn tags
    url=false,              % don't show url tags
    doi=true,                   % show doi tags
    urldate=long,           % display type for dates
    maxnames=2,             % max number of names in text ??
    minnames=1,             % min number of names in text ??
    maxbibnames=4,      % max number of names in bibliography
    minbibnames=3,      % number of names in bibliography (bevor et al)
    maxcitenames=2,     % max number of names in text ??
    mincitenames=1,     % max number of names in text ??
    dashed=false,           % do not replace same author with dash 
    useprefix=false,    % ?
    firstinits=true,    % abbreviate first names
    uniquename=init,    % otherwise option conflict with firstinits=true
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@incollection{test,
    year={1992},
    booktitle={Booktitle},
    volume={59},
    editor={Editor, A. and Editor, B. and Editor, C.},
    title="{Title}",
    publisher={Springer, New York},
    author={Author, A. and Author, B. and Author, C. and Author, D. and Author, E.},
}
\end{filecontents}

\newbibmacro*{byeditor+others}{%
    \ifnameundef{editor}
    {}
    {   \setunit{\addcomma\space}
        \usebibmacro{byeditor+othersstrg}%
        \setunit{\addspace}%
        \printnames[byeditor]{editor}%
        \clearname{editor}%
        \newunit}%
    \usebibmacro{byeditorx}%
    \usebibmacro{bytranslator+others}}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

    \printbibliography

\end{document}

答案1

您可以使用第二个可选参数来\printnames指定打印的名称数量,语法是[<start>-<stop>],因此在您的情况下

\printnames[byeditor][1-1]{editor}

相关事件发生在byeditor+others

\renewbibmacro*{byeditor+others}{%
  \setunit{\addcomma\space}%
  \ifnameundef{editor}
    {}
    {\usebibmacro{byeditor+othersstrg}%
     \setunit{\addspace}%
     \printnames[byeditor][1-1]{editor}%
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

相关内容