对于我的最终论文,我需要使用稍微修改过的 APA 格式。在详细介绍之前,我想向您展示一个 MWE:
\documentclass[12pt]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[%
backend=biber,
style=authoryear-comp,
bibstyle=apa]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{andothers={et\ \addabbrvspace al\adddot}}
\usepackage{filecontents}
\begin{filecontents}{literatur.bib}
@book{XYZ2010,
author = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2010},
title = {{Ein Testbuch}},
publisher = {Springer},
address = {Stuttgart}
}
@book{XYZ2011,
editor = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2011},
title = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
@incollection{XYZ2012,
title = {{Meine kleine Testdatei}},
author = {Dirk Deltason},
editor = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2012},
booktitle = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
@incollection{XYZ2013,
title = {{Meine kleine Testdatei}},
author = {Dirk Deltason},
editor = {Andrew Alphason and Bertram Betason},
year = {2013},
booktitle = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
@book{XYZ2014a,
author = {Phil Phison and Bertram Betason},
year = {2014},
title = {{Ein Testbuch}},
publisher = {Springer},
address = {Stuttgart},
}
@book{XYZ2014b,
author = {{Fictional Institution}},
year = {2014},
title = {{Ein Testbuch}},
publisher = {Springer},
address = {Stuttgart},
}
@incollection{XYZ2014c,
title = {{Meine kleine Testdatei}},
author = {Dirk Deltason and Ezra Epsilonson},
editor = {Andrew Alphason and Bertram Betason},
year = {2014},
booktitle = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
\end{filecontents}
\bibliography{literatur}
\begin{document}
\parencite{XYZ2010,XYZ2011,XYZ2012,XYZ2013,XYZ2014a,XYZ2014b,XYZ2014c}
\printbibliography
\end{document}
我需要改变的是:
- 当参考书目条目的起始位置有 2 个或 2 个以上的作者/编辑时,应该在“&”前加一个逗号。
- 如果编辑者出现在后面,如 MWE 中的条目 3 和 4,则在有超过 2 个编辑者的情况下,在“&”之前应该只有一个逗号。这里只有 2 个编辑者,所以没有逗号。不要问我为什么,我就是必须这样做!
- APA 通常会在作者/编辑/机构和年份之间打印一个句号(在括号中)。我不能在那里插入句号。我该如何删除它?在示例中,条目 2 中“(Hrsg.)”后面的句号是不允许的。
我插入了输出的图片。我用红色表示错误,用绿色表示正确。
编辑信息:我添加了一些例子来说明我正在谈论的问题。
答案1
给你;
\documentclass[12pt]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[%
backend=biber,
style=authoryear-comp,
bibstyle=apa]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{andothers={et\ \addabbrvspace al\adddot}}
\usepackage{filecontents}
\begin{filecontents}{literatur.bib}
@book{XYZ2010,
author = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2010},
title = {{Ein Testbuch}},
publisher = {Springer},
address = {Stuttgart}
}
@book{XYZ2011,
editor = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2011},
title = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
@incollection{XYZ2012,
title = {{Meine kleine Testdatei}},
author = {Dirk Deltason},
editor = {Andrew Alphason and Bertram Betason and Christian Gammason},
year = {2012},
booktitle = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
@incollection{XYZ2013,
title = {{Meine kleine Testdatei}},
author = {Dirk Deltason},
editor = {Andrew Alphason and Bertram Betason},
year = {2013},
booktitle = {{Ein Sammelwerk}},
publisher = {Springer},
address = {Stuttgart},
}
\end{filecontents}
\addbibresource{literatur.bib}
\usepackage{xpatch}
\DefineBibliographyExtras{ngerman}{\def\finalandcomma{\addcomma}}
\xpatchbibmacro{editorinauthpos}{%
\clearname{editor}%
\setunit{\adddot\addspace}%
}{%
\clearname{editor}%
\setunit{\addspace}%
}{}{}
\begin{document}
\parencite{XYZ2010,XYZ2011,XYZ2012,XYZ2013}
\printbibliography
\end{document}