1

For my final thesis I need to use a slightly modified version of the APA style. Before I go into more detail, I would like to show you a 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}

What I need to change is:

  1. There should be a comma before "&" in case of 2 AND more than 2 authors/editors in the initial position of the bibliography entry.
  2. In case the editors appear afterwards like in entry No. 3 and 4 in the MWE there should be only a comma before "&" in case there are more than 2 editors. No comma for only 2 editors here. Don't ask me why, I just have to do it like that!
  3. APA normally prints a period between the authors/editors/institution and the year (in brackets). I am not allowed to insert a period there. How can I remove it? In the example, the period in entry No. 2 after "(Hrsg.)" would not be allowed.

I've inserted an image of the output. I used red to indicate what's wrong and green to show what's correct.

Bibliography

See also Modification of biblatex APA style.

1

I think this code should satisfy your requirements:

\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} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.