![作者年份 biblatex 样式中第一作者姓名后的逗号表示有两个作者](https://linux22.com/image/247183/%E4%BD%9C%E8%80%85%E5%B9%B4%E4%BB%BD%20biblatex%20%E6%A0%B7%E5%BC%8F%E4%B8%AD%E7%AC%AC%E4%B8%80%E4%BD%9C%E8%80%85%E5%A7%93%E5%90%8D%E5%90%8E%E7%9A%84%E9%80%97%E5%8F%B7%E8%A1%A8%E7%A4%BA%E6%9C%89%E4%B8%A4%E4%B8%AA%E4%BD%9C%E8%80%85.png)
我正在使用以下内容:
\documentclass{article}
\usepackage[american]{babel}
\usepackage{filecontents}
\usepackage[style=authoryear,%
natbib=true, % enable natbib macros
%firstinits=true, % use initials as first names
dashed=false, % do not use a dash instead of author name in case of several publications
useprefix=true,
maxnames=100, % in the bibliography show all names
maxcitenames=2, % in the text use et al. for more than 2
backref=true, % have backrefs in the bibliography
]{biblatex}
\setlength\bibitemsep{1mm}
\setlength\bibhang{1cm}
%print authors in smallcaps everywhere
\renewcommand*{\mkbibnamelast}[1]{%
\ifmknamesc{\textsc{#1}}{#1}}
\renewcommand*{\mkbibnameprefix}[1]{%
\ifboolexpr{ test {\ifmknamesc} and test {\ifuseprefix} }
{\textsc{#1}}
{#1}}
\def\ifmknamesc{%
\ifboolexpr{ test {\ifcurrentname{labelname}}
or test {\ifcurrentname{author}}
or ( test {\ifnameundef{author}} and test {\ifcurrentname{editor}} ) }}
\begin{filecontents}{\jobname.bib}
@Article{gillies,
author = {Gillies, Alexander and Mister Miller},
title = {Herder and the Preparation of Goethe's Idea of World Literature},
journaltitle = {Publications of the English Goethe Society},
volume = {9},
date = {1933},
pages = {46--67}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citep{gillies}
\printbibliography
\end{document}
然而这给出了:
GILLIES, Alexander and Mister MILLER (1933). “Herder and the Preparation of Goethe’s Idea of World Literature.” In: Publications of the English Goethe Society 9, pp. 46–67 (cit. on p. 1).
但我想要:
GILLIES, Alexander, and Mister MILLER (1933). “Herder and the Preparation of Goethe’s Idea of World Literature.” In: Publications of the English Goethe Society 9, pp. 46–67 (cit. on p. 1).
我如何添加逗号?
答案1
在您的序言中添加:
\renewcommand*{\finalnamedelim}{%
% \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% DELETED
\finalandcomma% ADDED
\addspace\bibstring{and}\space}
或者如果您不想在引用中添加逗号:
\AtBeginBibliography{%
\renewcommand*{\finalnamedelim}{%
% \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% DELETED
\finalandcomma% ADDED
\addspace\bibstring{and}\space}%
}
第二种变体的输出: