biblatex APA 스타일 수정에 대한 후속 질문

biblatex APA 스타일 수정에 대한 후속 질문

최종 논문에서는 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}

내가 바꿔야 할 것은 다음과 같습니다.

  1. 참고문헌 항목의 초기 위치에 저자/편집자가 2명 이상인 경우 "&" 앞에 쉼표가 있어야 합니다.
  2. MWE의 항목 3번과 4번처럼 나중에 편집자가 나타나는 경우 편집자가 2명 이상인 경우 "&" 앞에 쉼표만 있어야 합니다. 여기에는 편집자가 2명뿐이므로 쉼표가 없습니다. 왜냐고 묻지 마세요. 그냥 그렇게 하면 돼요!
  3. APA는 일반적으로 저자/편집자/기관과 연도(괄호 안) 사이에 마침표를 인쇄합니다. 거기에 마침표를 삽입할 수 없습니다. 어떻게 제거할 수 있나요? 이 예에서는 항목 번호 2에서 "(Hrsg.)" 뒤에 마침표가 허용되지 않습니다.

출력 이미지를 삽입했습니다. 무엇이 잘못되었는지 나타내기 위해 빨간색을 사용하고 올바른 것을 나타내기 위해 녹색을 사용했습니다.

서지

또한보십시오Biblatex APA 스타일 수정.

답변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},
}
@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}

    \usepackage{xpatch}

     \DefineBibliographyExtras{ngerman}{\def\finalandcomma{\addcomma}}

    \xpatchbibmacro{editorinauthpos}{%
           \clearname{editor}%
           \setunit{\adddot\addspace}%
    }{%
           \clearname{editor}%
           \setunit{\addspace}%
    }{}{}
\AtBeginBibliography{\renewcommand*{\finalnamedelim}{%
    \ifthenelse{\value{listcount}>\maxprtauth}
      {}
      {\finalandcomma\addspace\&\space}
         }}

\renewbibmacro*{author}{%
  \ifnameundef{author}
    {\usebibmacro{labeltitle}}
    {\printnames[apaauthor][-\value{listtotal}]{author}%
     \setunit*{\addspace}%
     \printfield{nameaddon}%
     \ifnameundef{with}
       {}
       {\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}%
        \printnames[apaauthor][-\value{listtotal}]{with}}
        \setunit*{\addspace}}}%
  \setunit{\addspace}\newblock%
  \usebibmacro{labelyear+extrayear}}

\xpretobibmacro{editor+trans}{\renewcommand*{\finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\&\space}}


\begin{document}
\parencite{XYZ2010,XYZ2011,XYZ2012,XYZ2013,XYZ2014a,XYZ2014b,XYZ2014c}
\printbibliography
\end{document} 

여기에 이미지 설명을 입력하세요

관련 정보