2

I am using the document class APA 6 (\documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}) and Biblatex (\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}) to write my thesis. I adapted this to the German settings for APA 6 and it works quite well, but I can't get rid of the comma in these situations:

enter image description here

The highlighted section in yellow below is the one I don't want in the German citation version (for English APA6, it would be correct). Has anyone got an idea of how to get rid of these commas (in the text and in the bibliography)?

MWEB:

 \documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{german}{german-apa}
\usepackage{booktabs}
\DefineBibliographyStrings{ngerman}{
   andothers = {{et\,al\adddot}},}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}

@article{varazzani_noradrenaline_2015,
    title = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off: A Direct Electrophysiological Comparison in Behaving Monkeys},
    volume = {35},
    issn = {0270-6474, 1529-2401},
    shorttitle = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off},
    pages = {7866--7877},
    number = {20},
    journaltitle = {Journal of Neuroscience},
    author = {Varazzani, C. and San-Galli, A. and Gilardeau, S. and Bouret, S.},
    date = {2015},
    langid = {english}
}



\end{filecontents}
\shorttitle{Gedächtnisleistung und Pupillenweitung}
\begin{document}
Text \parencite{varazzani_noradrenaline_2015}
\printbibliography[heading=bibintoc]
\end{document}
Tina
  • 758
Anne B.
  • 165
  • 3
    Please provide a MWEB. – David Purton Nov 14 '17 at 09:25
  • 1
    I reinforce David's request. But in the meantime, a guess. Does this answer help? https://tex.stackexchange.com/a/400528/105447 – gusbrs Nov 14 '17 at 09:43
  • 1
    An MWE/MWEB is really required to properly diagnose what is going on here. But you might also want to check your versions of biblatex, Biber and biblatex-apa. I seem to remember there was a problem with an older version of biblatex-apa that would incorrectrly enable the Oxford comma (comma before and) for German even though that is not wanted. That was fixed by an update a while ago. – moewe Nov 14 '17 at 09:47
  • Thank you for your answers, I edited my question and included an MWEB. I will have a look at the other tips as well. – Anne B. Nov 14 '17 at 09:49
  • Your MWE shows only '&'s for me? You probably want not only \DeclareLanguageMapping{german}{german-apa}, but also \DeclareLanguageMapping{ngerman}{ngerman-apa} (that does not help with the problem, however). – moewe Nov 14 '17 at 09:56
  • That is another problem- for some citations, I get "[author], and [author]" and for some I get "[author], & [author]" (as in the MWEB) – Anne B. Nov 14 '17 at 10:00
  • If I use \textcite instead of \parencite I get 'und' without a comma before it, but of course then only the year is in brackets and not the entire citation. Please write \litsfiles to the very first line of your document and show us the output you get in the .log file, at the very end there will be a list with all the files used and their versions. – moewe Nov 14 '17 at 10:00
  • These are the files that have "biblatex" in the names: biblatex.sty 2016/05/14 v3.4 programmable bibliographies (PK/JW/AB) apa.dbx 2016/05/13 v6.9 APA biblatex style data model biblatex-dm.cfg blx-compat.def 2016/05/14 v3.4 biblatex compatibility (PK/JW/AB) – Anne B. Nov 14 '17 at 10:05
  • biblatex.def 2016/05/14 v3.4 biblatex compatibility (PK/JW/AB) standard.bbx 2016/05/14 v3.4 biblatex bibliography style (PK/JW/AB) apa.bbx 2016/05/13 v6.9 APA biblatex references style apa.cbx 2016/05/13 v6.9 APA biblatex citation style biblatex.cfg german.lbx 2016/05/14 v3.4 biblatex localization (PK/JW/AB) german-apa.lbx 2016/05/13 v6.9 APA biblatex localisation ngerman.lbx 2016/05/14 v3.4 biblatex localization (PK/JW/AB) – Anne B. Nov 14 '17 at 10:05
  • 2
    Your versions of biblatex and biblatex-apa as well as Biber are out of date. The current version of biblatex is 3.8a, that of Biber 2.8 and biblatex-apa is at 7.5. I'd suggest an update, but you need to be aware of the fact that updates could always cause trouble. How soon does the document need to be ready? – moewe Nov 14 '17 at 10:14
  • It has to be ready in 5 weeks and I would rather not change anything major until then.. Do you have an idea of how to address this problem without updating the packages? – Anne B. Nov 14 '17 at 13:11
  • do you want und or &? I can modify my answer to provide und everywhere. – David Purton Nov 15 '17 at 01:18
  • I modified my answer to show how you can get und if you want it. – David Purton Nov 15 '17 at 01:45

1 Answers1

2

As noted in the comments, this is fixed for more recent versions of biblatex-apa, but it's not too hard to make things work without upgrading.

You need to redefine \finalandcomma for the ngerman language:

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

Also, I notice you have ngerman as your babel language, but then you instruct biblatex-apa to use german. Shouldn't they be the same?

If you want und instead of &, then add this to the preamble of the MWE below:

\AtEveryCitekey{%
  \renewcommand{\finalnamedelim}{%
    \ifnum\value{liststop}>2 \finalandcomma\fi\addspace\bibstring{and}\space}}
\AtBeginBibliography{\renewcommand*{\finalnamedelim}{%
    \ifthenelse{\value{listcount}>\maxprtauth}
      {}
      {\ifthenelse{\value{liststop}>2}
        {\finalandcomma\addspace\bibstring{and}\space}
         {\addspace\bibstring{and}\space}}}}

Here's my MWE. It works with your versions of biblatex, biber, and biblatex-apa. (It uses & instead of und, but I assume you've changed other things to deal with this, since & is hard coded in biblatex-apa.)

\documentclass[man,a4paper,floatsintext,donotrepeattitle]{apa6}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}% <-- use ngerman mapping
\usepackage{booktabs}
\DefineBibliographyStrings{ngerman}{
   andothers = {{et\,al\adddot}},}
\DefineBibliographyExtras{ngerman}{% <-- redefine finalandcomma for ngerman
  \def\finalandcomma{}
}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}

@article{varazzani_noradrenaline_2015,
    title = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off: A Direct Electrophysiological Comparison in Behaving Monkeys},
    volume = {35},
    issn = {0270-6474, 1529-2401},
    shorttitle = {Noradrenaline and Dopamine Neurons in the Reward/Effort Trade-Off},
    pages = {7866--7877},
    number = {20},
    journaltitle = {Journal of Neuroscience},
    author = {Varazzani, C. and San-Galli, A. and Gilardeau, S. and Bouret, S.},
    date = {2015},
    langid = {english}
}
\end{filecontents}
\shorttitle{Gedächtnisleistung und Pupillenweitung}
\begin{document}
Text \parencite{varazzani_noradrenaline_2015}
\printbibliography[heading=bibintoc]
\end{document}

enter image description here

David Purton
  • 25,884
  • Thank you very much, this works perfectly. Also, I changed "german" to "ngerman" for all the settings. I looked up my citation manual, the "&" is correct for \parencite, the "und" for \textcite. – Anne B. Nov 16 '17 at 12:22