我想将作者分隔符从当前的 & 符号更改&
为and
。我显然能够对引文中的分隔符进行一些控制,但到目前为止还没有找到在参考书目中控制它的技巧。
这基本上是同一个问题,但在彻底重写之后,答案显然已经过时了biblatex
https://tex.stackexchange.com/questions/200467/
我找到了两种更改引文分隔符的方法,使用\finalnamedelim
和使用\DefineBibliographyStrings
。如何控制参考书目中的分隔符?
以下是我的 MWE 评论:
\documentclass{article}
\usepackage[backend=biber,hyperref,style=apa,citestyle=authoryear,maxcitenames=6]{biblatex}
\begin{filecontents}{mybib.bib}
@book{ref,
author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
title = {The LaTeX Companion},
year = {1993},
publisher = {Addison-Wesley},
address = {Reading, Massachusetts}
}
\end{filecontents}
\addbibresource{mybib.bib}
\AtBeginDocument{%
\renewcommand*{\finalandcomma}{}
\renewcommand*{\finalnamedelim}{\space and\space}
}
% With \parencite and \textcite, the ampersand can be removed by adding the biblatex option citestyle=authoryear. But it can also be set here, except that \finalnamedelim overrules:
\DefineBibliographyStrings{english}{%
and = {y}%
}
\begin{document}
\begin{itemize}
\item[] A cite: \cite{ref}.
\item[] A parencite: \parencite{ref}.
\item[] A textcite: \textcite{ref}.
\end{itemize}
\printbibliography
\end{document}
答案1
如果你只想用“and”替换 APA 样式的“&”符号,你可以使用
\documentclass{article}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareDelimFormat*{finalnamedelim}
{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\bibstring{and}\space}
% the bibliography also needs another conditional, so we can't wrap
% everything up with just the two lines above
\DeclareDelimFormat[bib,biblist]{finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\ifthenelse{\value{liststop}>2}
{\finalandcomma\addspace\bibstring{and}\space}
{\addspace\bibstring{and}\space}}}
% this is a special delimiter to solve the bugs reported in
% https://tex.stackexchange.com/q/417648/35864
\DeclareDelimFormat*{finalnamedelim:apa:family-given}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\finalandcomma\addspace\bibstring{and}\space}}
\begin{document}
% \citereset is only used to obtain a citation with all names every time
\begin{itemize}
\item \citereset A cite: \cite{companion,sigfridsson}.
\item \citereset A parencite: \parencite{companion,sigfridsson}.
\item \citereset A textcite: \textcite{companion,sigfridsson}.
\end{itemize}
\printbibliography
\end{document}
请注意,这是特定于biblatex-apa
大多数其他biblatex
样式(当然是标准样式)的简单
\DeclareDelimFormat{finalnamedelim}{<your definition here>}
就足够了。