引用书目中的文章

引用书目中的文章

我想在 中引用另一篇论文()keyB,并将其标记为“已被 取代” 。 notekeyCkeyCkeyB

当我这样做时,biblatex 无法遵守该maxcitenames参数。如何获取“Superseded by One et al. (2015b)”而不是完整作者列表?请注意,我想保留当前的全局设置maxbibnames

梅威瑟:

\documentclass[a4paper,11pt]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{csquotes}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib} 
@Inproceedings{keyA,
  author = {Author One and Author Two and Author Three and Author Four},
    title={titleA},
    booktitle={bookA},
    year=2015,
}
@inproceedings{keyB,
  Title = {titleB},
  author = {Author One and Author Two and Author Three and Author Four},
  booktitle={bookB},
  year=2015,
}

@Inbook{keyC,
  Title = {titleC},
  author = {Author One and Author Two and Author Three and Author Four},
  booktitle={bookC},
  year=2016,
  % The following /should/ print ``One et al.'', but prints all four authors.
  note = {Superseded by \citet{keyB}}
}
\end{filecontents} 


\usepackage[natbib,maxcitenames=2,maxbibnames=99,style=authoryear,
    mincitenames=1,backend=biber]{biblatex}
\addbibresource{\jobname.bib} 
\begin{document}
\citet{keyA}

\citet{keyB}

\citet{keyC}

\printbibliography

\end{document}

答案1

在参考书目中,biblatex 使用 maxbibnames 的值。但您可以在 cite 命令之前恢复 cite 值:

\documentclass[a4paper,11pt]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{csquotes}
\usepackage{filecontents}
\makeatletter
\newcommand\restoremaxcitenames{\let\blx@maxbibnames\blx@maxcitenames}
\makeatother
\begin{filecontents}{\jobname.bib}
@Inproceedings{keyA,
  author = {Author One and Author Two and Author Three and Author Four},
    title={titleA},
    booktitle={bookA},
    year=2015,
}
@inproceedings{keyB,
  Title = {titleB},
  author = {Author One and Author Two and Author Three and Author Four},
  booktitle={bookB},
  year=2015,
}

@Inbook{keyC,
  Title = {titleC},
  author = {Author One and Author Two and Author Three and Author Four},
  booktitle={bookC},
  year=2016,
  % The following /should/ print ``One et al.'', but prints all four authors.
  note = {Superseded by {\restoremaxcitenames\citet{keyB}}},
  related={keyB},
  relatedstring={Superseded by}
}
\end{filecontents}


\usepackage[natbib,maxcitenames=2,maxbibnames=99,style=authoryear,
    mincitenames=1,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\citet{keyA}

\citet{keyB}

\citet{keyC}

\printbibliography

\end{document}

在此处输入图片描述

相关内容