私は APA スタイルでのソースの参照と引用に関する問題を扱っています。
ここに私のサンプルコードがあります:
\documentclass[a4paper,
12pt,
bibtotoc,
liststotoc,
pointlessnumbers
]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[american,ngerman]{babel}
\usepackage[babel=true]{csquotes}
\usepackage[style=apa,backend=biber, doi=false, url=false]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{andothers={et\ \addabbrvspace al\adddot}}
\renewcommand\finalandcomma{\addcomma}
\usepackage{filecontents}
\begin{filecontents}{literatur.bib}
@article{DroitVolet2007,
author = {Droit-Volet, S. and Meck, W. H.},
year = {2007},
title = {{H}ow emotions colour our perception of time},
pages = {504--513},
volume = {11},
number = {12},
issn = {13646613},
journal = {Trends in Cognitive Sciences},
doi = {10.1016/j.tics.2007.09.008 Titel anhand dieser DOI in Citavi-Projekt übernehmen
}
@article{Gibbon1984,
author = {Gibbon, J. and Church, R. M. and Meck, W. H.},
year = {1984},
title = {{S}calar timing in memory},
pages = {52--77},
volume = {423},
issn = {0077-8923},
journal = {Annals of the New York Academy of Sciences}
}
}
\end{filecontents}
\bibliography{literatur}
\begin{document}
There is no comma in this citation \parencite{DroitVolet2007}, but the comma is missing in the references.
For more than two authors there has to be a comma in front of & \parencite{Gibbon1984}.
\printbibliography
\end{document}
著者が 2 人だけの場合、Latex では参考文献セクションの & の前のカンマが抜けています。著者が 2 人の場合は本文中の引用はまったく問題ありませんが、参考文献のエントリは次のようになります: Droit-Volet, S., & Meck, WH (2007). ....
著者が 2 名を超える場合は、テキスト引用でも & の前にコンマが必要です。
解決策を探している間、私は
\renewcommand*{\finalnamedelim}{%
\finalandcomma
\addspace
\bibstring{and}%
\space
}
または
\renewcommand\finalandcomma{\addcomma}
しかし残念ながら、私のケースではどちらの解決策も機能しませんでした...
ご協力やアドバイスをいただければ幸いです。
ご多幸をお祈りします、フェルディナンド
答え1
何らかの理由でフック内でbiblatex-apa
再定義します。\finalnamedelim
\AtBeginBibliography
したがって、設定を上書きするには同じことを行う必要があります。さらに、フック\finalandcomma
内のを再定義します。\AtBeginDocument
\AtBeginDocument{\renewcommand\finalandcomma{\addcomma}}
\AtBeginBibliography{%
\renewcommand*{\finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\finalandcomma\addspace\&\space}}}
これは常に印刷されます\finalandcomma
(通常は、著者が 2 人以上いる場合にのみ印刷されます)。
ムウェ
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american,ngerman]{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=apa,backend=biber, doi=false, url=false]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}}
\AtBeginDocument{\renewcommand\finalandcomma{\addcomma}}
\AtBeginBibliography{%
\renewcommand*{\finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\finalandcomma\addspace\&\space}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
There is no comma in this citation \parencite{baez/article}, but the comma is missing in the reference.
\printbibliography
\end{document}
答え2
を抑制します\renewcommand{\finalandcomma}{\addcomma}
(APA スタイルでは、\finalendcomma はアンパサンドを出力しますが、これを保持します)。プリアンブルで次のように置き換えます。
\usepackage{xpatch}
\xpatchnameformat{apaauthor}{%
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}%
{%
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{\addcomma\space}}%
{}{}%