![如何将作者姓名列表 (&.) 更改为 (and),以引用已编辑书籍中的章节](https://linux22.com/image/401986/%E5%A6%82%E4%BD%95%E5%B0%86%E4%BD%9C%E8%80%85%E5%A7%93%E5%90%8D%E5%88%97%E8%A1%A8%20(%26.)%20%E6%9B%B4%E6%94%B9%E4%B8%BA%20(and)%EF%BC%8C%E4%BB%A5%E5%BC%95%E7%94%A8%E5%B7%B2%E7%BC%96%E8%BE%91%E4%B9%A6%E7%B1%8D%E4%B8%AD%E7%9A%84%E7%AB%A0%E8%8A%82.png)
如何改变:
Author A, Author B & Author C
到
Author A, Author B and Author C
我检查过:
\renewcommand*{\finalnamedelim}{\addspace\&\space}
基本上:
到:
我的完整 MWE:
\documentclass{article}
\usepackage{xpatch}
% \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}
\usepackage[backend=biber,
% style=authoryear,
style=authoryear-comp,
% citestyle=authoryear,
dashed=false,
maxcitenames=2,
maxbibnames=99,
giveninits,
uniquename=init]{biblatex}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}
\renewcommand*{\finalnamedelim}{\addspace\&\space}
\renewcommand*{\intitlepunct}{\space}
\DeclareFieldFormat[article, incollection, unpublished]{pages}{#1}
\DeclareFieldFormat[article, incollection, unpublished]{title}{#1}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{editorin}{given-family}
\newbibmacro*{byeditor:in}{%
\ifnameundef{editor}
{}
{\printnames[editorin]{editor}%
\setunit{\addcomma\space}%
\usebibmacro{editorstrg}%
\clearname{editor}}}
\xpatchbibdriver{inbook}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor:in}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{byeditor:in}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor}}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{byeditor:in}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{}{}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@incollection{lennon1965,
author = {John Lennon},
booktitle = {A book with articles},
editor = {Paul McCartney and John Lennon and George Harrison and Richard Starkey},
title = {This is my article in this book},
year = {1965},
location = {Liverpool},
pages = {65--87},
publisher = {Cavern Club},
}
@incollection{deborah123,
author = "Deborah Lewis and Marie O'Boyle-Duggan and Susan Poultney",
title = "Communication skills education and training in pre-registeration BSc Nursing",
editor = "David W. Kissane and Barry D. Bultz and Phyllis N. Butow and Carma L. Bylund and Simon Noble and Susie Wilkinson",
booktitle = "Oxford Textbook of Communication in Oncology and Palliative Care",
publisher = "Oxford University Press",
address = "Oxford",
year = 2017,
pages = "149-154",
Edition = "2nd edn"
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
book done \parencite{deborah123}.
\printbibliography
\end{document}
答案1
和
\renewcommand*{\finalnamedelim}{\addspace\&\space}
您明确要求列表中最后两个名称之间使用“&”而不是“and”。
如果您不想要“&”,我建议您删除此行,因为默认输出已经是“and”(默认定义比稍微复杂一些\renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\space}
,它包含如果需要则排版牛津逗号的代码)。
无论如何,在较新版本中,biblatex
finalnamedelim
是一个上下文相关的分隔符,最好用
\DeclareDelimFormat{finalnamedelim}{...}
\
(请注意,之前没有finalnamedelim
)并且没有\renewcommand{\finalnamedelim}
。
然后,在引用和参考书目中使用不同的分隔符就非常容易了。