![참조 섹션 & 앞의 쉼표](https://rvso.com/image/286374/%EC%B0%B8%EC%A1%B0%20%EC%84%B9%EC%85%98%20%26%20%EC%95%9E%EC%9D%98%20%EC%89%BC%ED%91%9C.png)
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}
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명 이상인 경우에만 인쇄됩니다).
MWE
\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}}%
{}{}%