我使用文档类 APA 6 ( \documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}
) 和 Biblatex ( \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
) 来撰写论文。我将其调整为 APA 6 的德语设置,效果很好,但在以下情况下我无法删除逗号:
下面黄色突出显示的部分是我在德语引文版本中不需要的部分(对于英语 APA6,它是正确的)。有人知道如何去掉这些逗号(在文本和参考书目中)吗?
移动网络:
\documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{german}{german-apa}
\usepackage{booktabs}
\DefineBibliographyStrings{ngerman}{
andothers = {{et\,al\adddot}},}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{varazzani_noradrenaline_2015,
title = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off: A Direct Electrophysiological Comparison in Behaving Monkeys},
volume = {35},
issn = {0270-6474, 1529-2401},
shorttitle = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off},
pages = {7866--7877},
number = {20},
journaltitle = {Journal of Neuroscience},
author = {Varazzani, C. and San-Galli, A. and Gilardeau, S. and Bouret, S.},
date = {2015},
langid = {english}
}
\end{filecontents}
\shorttitle{Gedächtnisleistung und Pupillenweitung}
\begin{document}
Text \parencite{varazzani_noradrenaline_2015}
\printbibliography[heading=bibintoc]
\end{document}
答案1
正如评论中所述,这个问题已在较新版本中得到修复biblatex-apa
,但如果不升级的话,让它正常运行并不难。
您需要重新定义\finalandcomma
语言ngerman
:
\DefineBibliographyExtras{ngerman}{
\def\finalandcomma{}
}
另外,我注意到您有ngerman
作为babel
语言,但您指示biblatex-apa
使用german
。它们不应该是一样的吗?
如果你想和代替&,然后将其添加到下面的 MWE 序言中:
\AtEveryCitekey{%
\renewcommand{\finalnamedelim}{%
\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\bibstring{and}\space}}
\AtBeginBibliography{\renewcommand*{\finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\ifthenelse{\value{liststop}>2}
{\finalandcomma\addspace\bibstring{and}\space}
{\addspace\bibstring{and}\space}}}}
这是我的 MWE。它适用于您的biblatex
、biber
和版本biblatex-apa
。(它使用&代替和,但我认为你已经改变了其他事情来解决这个问题,因为&是硬编码的biblatex-apa
。)
\documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}% <-- use ngerman mapping
\usepackage{booktabs}
\DefineBibliographyStrings{ngerman}{
andothers = {{et\,al\adddot}},}
\DefineBibliographyExtras{ngerman}{% <-- redefine finalandcomma for ngerman
\def\finalandcomma{}
}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{varazzani_noradrenaline_2015,
title = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off: A Direct Electrophysiological Comparison in Behaving Monkeys},
volume = {35},
issn = {0270-6474, 1529-2401},
shorttitle = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off},
pages = {7866--7877},
number = {20},
journaltitle = {Journal of Neuroscience},
author = {Varazzani, C. and San-Galli, A. and Gilardeau, S. and Bouret, S.},
date = {2015},
langid = {english}
}
\end{filecontents}
\shorttitle{Gedächtnisleistung und Pupillenweitung}
\begin{document}
Text \parencite{varazzani_noradrenaline_2015}
\printbibliography[heading=bibintoc]
\end{document}