# biblatex-apa is missing commas

The biblatex-apa style seems to be missing commas in two instances.

• When having only two authors at the beginning of a reference, the comma before the ampersand is missing. The following MWE should read: Herbst-Damm, K. L., & Kulik ...
• The German APA variant is missing the comma in parentheses when only year and month are given. Like its English counterpart, it should read: Clay, R. (2008b, Juni). ...

Here is the MWE (compiled with lualatex and biber):

\documentclass[]{scrbook}
\usepackage[ngerman,american]{babel}
\usepackage{csquotes}

\begin{filecontents*}{\jobname.bib}
@ARTICLE{7.01:1,
AUTHOR         = {K. L. Herbst-Damm and J. A. Kulik},
TITLE          = {Volunteer Support, Marital Status, and the Survival Times of Terminally Ill Patients},
JOURNALTITLE   = {Health Psychology},
VOLUME         = {24},
PAGES          = {225--229},
DATE           = {2005},
DOI            = {10.1037/0278-6133.24.2.225},
URL            = {http://some.url},
langid         = {american},
}
@ARTICLE{7.01:8,
AUTHOR         = {Richard Clay},
TITLE          = {Science vs. Ideology},
SUBTITLE       = {Psychologists Fight Back About the Misuse of Research},
JOURNALTITLE   = {Monitor on Psychology},
VOLUME         = {39},
NUMBER         = {6},
DATE           = {2008-06},
URL            = {http://www.apa.org/monitor/},
langid         = {american},
}
@ARTICLE{7.01:8de,
AUTHOR         = {Richard Clay},
TITLE          = {Science vs. Ideology},
SUBTITLE       = {Psychologists Fight Back About the Misuse of Research},
JOURNALTITLE   = {Monitor on Psychology},
VOLUME         = {39},
NUMBER         = {6},
DATE           = {2008-06},
URL            = {http://www.apa.org/monitor/},
langid         = {ngerman},
}

@INBOOK{7.02:25,
AUTHOR         = {D. M. Haybron},
EDITOR         = {M. Eid and R. J. Larsen},
TITLE          = {Philosophy and the Science of Subjective Well-Being},
BOOKTITLE      = {The Science of Subjective Well-Being},
LOCATION       = {New York, NY},
PUBLISHER      = {Guildford Press},
PAGES          = {17-43},
DATE           = {2008},
langid         = {american},
}
\end{filecontents*}

\usepackage[backend=biber,style=apa,autolang=other]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}

\begin{document}
\textcite{7.01:1}
\textcite{7.01:8}
\textcite{7.01:8de}
\textcite{7.02:25}
\printbibliography
\end{document}


How can this be fixed?

• Please double check your APA style guide and if biblatex-apa misbehaves, report this to the developer at github.com/plk/biblatex-apa/issues – moewe Feb 28 '18 at 7:18
• I checked the 'Oxford comma' part and reported the issue github.com/plk/biblatex-apa/issues/48. Regarding the date comma, can you check back with the DPG manual what they have to say about these kinds of dates? BTW: It is better two ask these two questions in two separate questions. The two issues are only tangentially related and you have a better chance of getting answers if you split them up, see also tex.meta.stackexchange.com/q/7425/35864 – moewe Feb 28 '18 at 10:29
• @moewe you seem to have a better idea of what to do with this comma. I have found a way to remove the unwanted comma, given the approach on my answer. But it is an abuse of the Oxford comma/finalnamedelim mechanism from the start, it seems. So please feel free for another answer or an edit, as you see fit. – gusbrs Feb 28 '18 at 10:41
• Thanks a lot! Both issues surely need an official fix. I checked the DGP manual about the dates according to which the comma is needed. Next time, I will split such questions. Moewe, you seem to know how to fix the labelnames without touching the given family order. Could you edit the solution? – Psychic Birdy Feb 28 '18 at 12:31
• I'll wait for PLK to do a bit of research and decide what to do. – moewe Feb 28 '18 at 13:01

## 2 Answers

You have identified two deviations from the APA publication manual in biblatex-apa. Both "bugs" have been reported to the developer following your question here (https://github.com/plk/biblatex-apa/issues/48, https://github.com/plk/biblatex-apa/issues/31) and both have already received fixes (https://github.com/plk/biblatex-apa/pull/49, https://github.com/plk/biblatex-apa/pull/50).

An updated version of biblatex-apa (v7.6) was released along with biblatex 3.11 and Biber 2.11.

The Oxford comma issue was a bit tricky, since the comma should only appear in name lists with family-given order, while given-family name lists should follow the 'normal' Oxford comma rules (comma before 'and' only if there are three or more names in the list). The solution used in the package was to define a new finalnamedelim:apa:family-given for family-given names that always gets a comma before the 'and'.

The German dates were indeed only missing the \addcomma as gusbrs explains. But there were some other issues with compact date ranges for German, since the date format differs in order from American dates, so the fix also takes care of that.

• In the future, please report deviation from APA style (after you have double-checked with your style guide and made sure your input is reasonable) directly to the developer at github.com/plk/biblatex-apa/issues. TeX.SX is not a place to report bugs. Even though many package developers are active here and read questions it is always possible that a bug remains unnoticed, bugs reported via the proper channels will almost certainly reach the developer. – moewe Mar 1 '18 at 10:41
• Thanks a lot for your help! This takes care of it. By the way, I wouldn't call this an Oxford comma issue. It's a bracketing comma, in my opinion. The initials are subunits to the family names. Only if they were units of meaning equal to the family names, this would be a listing and also an Oxford comma. – Psychic Birdy Mar 1 '18 at 22:22

For the comma before the ampersand in your two-author reference, you can redefine finalnamedelim in the bib context with:

\DeclareDelimFormat[bib]{finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\finalandcomma\addspace\&\space}}


However, I must add that this comma is not "missing". The Oxford comma is usually set for lists of three of more items. You will notice that this definition doesn't change the citation command, but consistency would suggest you also do so. But it would be strange for a \textcite to render "Herbst-Damm, and Kulik (2005)" imho.

For the comma in the date from the ngerman entry, you can redefine the date formats with \DefineBibliographyExtras:

\DefineBibliographyExtras{ngerman}{%
\protected\def\mkbibdateapalong#1#2#3{%
\iffieldundef{#1}%
{}%
{\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\thefield{#1}}}%
\iffieldundef{#3}%
{}%
{\iffieldundef{#1}%
{}
{\addcomma\addspace}%
\stripzeros{\thefield{#3}}}%
\iffieldundef{#2}%
{}%
{\iffieldundef{#3}
{\iffieldundef{#1}
{}
{\addcomma\space}}%  <- change here
{\adddot\addspace}%
\mkbibmonth{\thefield{#2}}}}%
\protected\def\mkbibdateapalongextra#1#2#3{%
\iffieldundef{#1}%
{}%
{\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\thefield{#1}}\printfield{extradate}}%
\iffieldundef{#3}%
{}%
{\iffieldundef{#1}%
{}
{\addcomma\addspace}%
\stripzeros{\thefield{#3}}}%
\iffieldundef{#2}%
{}%
{\iffieldundef{#3}
{\iffieldundef{#1}
{}
{\addcomma\space}}%  <- change here
{\adddot\addspace}%
\mkbibmonth{\thefield{#2}}}}}


However, if you are worried with format consistency between languages in your bibliography you might want to consider using autolang=hyphen instead of setting autolang=other and redefining your date formats like this.

A full MWE:

\documentclass[]{scrbook}
\usepackage[ngerman,american]{babel}
\usepackage{csquotes}

\begin{filecontents*}{\jobname.bib}
@ARTICLE{7.01:1,
AUTHOR         = {K. L. Herbst-Damm and J. A. Kulik},
TITLE          = {Volunteer Support, Marital Status, and the Survival Times of Terminally Ill Patients},
JOURNALTITLE   = {Health Psychology},
VOLUME         = {24},
PAGES          = {225--229},
DATE           = {2005},
DOI            = {10.1037/0278-6133.24.2.225},
URL            = {http://some.url},
langid         = {american},
}
@ARTICLE{7.01:8,
AUTHOR         = {Richard Clay},
TITLE          = {Science vs. Ideology},
SUBTITLE       = {Psychologists Fight Back About the Misuse of Research},
JOURNALTITLE   = {Monitor on Psychology},
VOLUME         = {39},
NUMBER         = {6},
DATE           = {2008-06},
URL            = {http://www.apa.org/monitor/},
langid         = {american},
}
@ARTICLE{7.01:8de,
AUTHOR         = {Richard Clay},
TITLE          = {Science vs. Ideology},
SUBTITLE       = {Psychologists Fight Back About the Misuse of Research},
JOURNALTITLE   = {Monitor on Psychology},
VOLUME         = {39},
NUMBER         = {6},
DATE           = {2008-06},
URL            = {http://www.apa.org/monitor/},
langid         = {ngerman},
}
\end{filecontents*}

\usepackage[backend=biber,style=apa,autolang=other]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}

\DeclareDelimFormat[bib]{finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\finalandcomma\addspace\&\space}}

\DefineBibliographyExtras{ngerman}{%
\protected\def\mkbibdateapalong#1#2#3{%
\iffieldundef{#1}%
{}%
{\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\thefield{#1}}}%
\iffieldundef{#3}%
{}%
{\iffieldundef{#1}%
{}
{\addcomma\addspace}%
\stripzeros{\thefield{#3}}}%
\iffieldundef{#2}%
{}%
{\iffieldundef{#3}
{\iffieldundef{#1}
{}
{\addcomma\space}}%  <- change here
{\adddot\addspace}%
\mkbibmonth{\thefield{#2}}}}%
\protected\def\mkbibdateapalongextra#1#2#3{%
\iffieldundef{#1}%
{}%
{\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\thefield{#1}}\printfield{extradate}}%
\iffieldundef{#3}%
{}%
{\iffieldundef{#1}%
{}
{\addcomma\addspace}%
\stripzeros{\thefield{#3}}}%
\iffieldundef{#2}%
{}%
{\iffieldundef{#3}
{\iffieldundef{#1}
{}
{\addcomma\space}}%  <- change here
{\adddot\addspace}%
\mkbibmonth{\thefield{#2}}}}}

\begin{document}
\textcite{7.01:1}
\textcite{7.01:8}
\textcite{7.01:8de}
\printbibliography
\end{document}


• Thanks a lot. This works for the date field. I agree the Oxford comma is usually set for lists of 3 or more items. However, this comma is asked for by the APA Manual because initials following surname are an insertion that needs to be set off by bracketing commas. I added a 4th reference to my MWE (7.02:25). In this case, a comma is now added even though there shouldn't be one because it's 2 authors and the sequence here is initials followed by surname. Could you fix your solution and change the citation command, only adding a comma when authors are mentioned at the beginning of the reference? – Psychic Birdy Feb 28 '18 at 1:39
• I'd say this is a different question. One thing is the positioning of the Oxford comma. Another is that you want the comma on the labelnames, which are in the format family, giveninits but not one for the editors names, which are in the format given family. Notice that, irrespective of the changes in the answer, if you had three editors in your new entry, you would get a comma there. So, I suggest you ask a follow up question to deal with this particular issue. – gusbrs Feb 28 '18 at 1:49
• I'd say it's a concretization of my question. I'm not looking for a change of the Oxford comma because it works fine in biblatex-apa as is. I only want for the labelnames a comma after all the giveninits (except when there is a final dot), which are bracketing commas, no matter how many authors, because the APA Manual demands it (see, e.g., here: blog.apastyle.org/apastyle/2017/03/…). Labelnames is what I actually meant by "at the beginning of a reference". Sorry my bad English. – Psychic Birdy Feb 28 '18 at 2:15
• Sorry for causing confusion. I wrote "Could you fix your solution and change the citation command ..." I'm neither would like to change the Oxford comma anywhere nor the citation command, I'd only like to add the missing comma on the labelnames in the references. The sentences should read: "Could you fix your solution and change the reference command ...". – Psychic Birdy Feb 28 '18 at 2:32
• finalnamedelim is always called in a context where liststop>1, so the test can be gotten rid of. – moewe Feb 28 '18 at 13:32