8

The following bib entry hat three authors but the last one is separated with , and instead of just and. Is it possible to remove that comma?

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,maxnames=10]{biblatex}
\addbibresource{references.bib}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{key,
  author = {Baur, S and Schmid, A and Schur, B.},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}
Mico
  • 506,678
Valerie D.
  • 159
  • 2
  • 6
  • 4
    That is known as the Oxford comma. If you write this for yourself you can omit it, but if this is a paper or thesis or something like that you should talk with your advisor whether to omit it or not. – Skillmon Feb 18 '18 at 14:01
  • 2
    offtopic: you miss . after S and A. – Sigur Feb 18 '18 at 14:04
  • See also https://tex.stackexchange.com/q/283078/35864, https://tex.stackexchange.com/q/168591/35864 – moewe Feb 18 '18 at 14:28
  • The fact that such a grammar mistake has ended up in Biblatex is quite interesting. – Andrea Lazzarotto Feb 18 '18 at 18:04
  • 3
    As far as I have understood it is not a grammar mistake at all. Both variants should be correct, should't they? – Valerie D. Feb 18 '18 at 18:05
  • 1
    @ValerieD. Certainly. There is no grammatical error here. Optional punctuation within a phrase can't cause grammatical errors. But I see no Oxford comma here, only two 'and's where there should be one. – user207421 Feb 18 '18 at 23:34
  • 1
    @EJP There is a confusion here, because the given code is not not BibTeX output, but the input. BibTeX splits the names at the "ands" and applies its own rules (under the given circumstances "S. Baur, A. Schmid, and B. Schur") – koalo Feb 19 '18 at 11:02
  • @EJP And indeed author = {Baur, S and Schmid, A and Schur, B.}, with two ands is the only correct way to give a list of three names. The output will usually not contain several 'and's. – moewe Feb 19 '18 at 13:03

2 Answers2

15

Use

\DefineBibliographyExtras{english}{%
  \let\finalandcomma\empty
  \let\finalandsemicolon\empty
}

to get rid of Oxford commas (and semicolons) in general. Since the definitions live in the .lbx files you can't simply change them in your preamble, you need a language-specific \DefineBibliographyExtras. Many other languages including british don't use the Oxford comma by default, so you could consider switching if you don't write in American English.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,maxnames=10]{biblatex}
\addbibresource{biblatex-examples.bib}

\DefineBibliographyExtras{english}{%
  \let\finalandcomma\empty
  \let\finalandsemicolon\empty
}

\begin{document}
\nocite{companion}
\printbibliography
\end{document}

enter image description here

moewe
  • 175,683
8

To remove it change the definition of \finalnamedelim.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,maxnames=10]{biblatex}
\addbibresource{references.bib}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{key,
  author = {Baur, S. and Schmid, A. and Schur, B.},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}
\DeclareDelimFormat{finalnamedelim}{\addspace\bibstring{and}\space}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}

enter image description here

Skillmon
  • 60,462
  • Do you know why S.\ produces error? – Sigur Feb 18 '18 at 14:08
  • 1
    @Sigur because some parsing of biblatex doesn't work with it :) Why use it? – Skillmon Feb 18 '18 at 14:10
  • 5
    I prefer the solution where one redefines \finalandcomma direcrtly. If you want to redefine \finalnamedelim I strongly recommend to retain \bibstring{and} instead of a hard-coded and and also to use \addspace for the first \space. Since finalnamedelim is now a context-sensitive delimiter I would also use \DeclareDelimFormat instead of \renewcommand: \DeclareDelimFormat{finalnamedelim}{\addspace\bibstring{and}\space} – moewe Feb 18 '18 at 14:17
  • @Skillmon, to change spacing after it, since it is not end of sentence punctuation. – Sigur Feb 18 '18 at 17:55
  • @Sigur it doesn't change anything, but {.\ } works. – Skillmon Feb 18 '18 at 18:31
  • 1
    @Sigur You don't need to tell TeX that the dot in S. is not a sentence-ending full stop. biblatex handles the punctuation and knows about this. It has never been necessary to mark up the . in .bib files specially and biblatex is no exception. In fact as you saw, messing about with the punctuation can even do harm. Names are always given as First Last, F. Last, Last, First or Last, F. nothing more is required (no ~, no .\, no \@.) – moewe Feb 18 '18 at 18:34
  • @Sigur In fact the dot after a capital letter will normally be considered an abbreviation dot anyway and the .\ is not needed at all. See https://tex.stackexchange.com/a/2230/35864 This holds for all of LaTeX and is not specific to biblatex. – moewe Feb 19 '18 at 09:37
  • @Skillmon If you want to incorporate the suggestion from my first comment into your answer that would be appreciated. I still feel that my solution to get rid of the Oxford comma is the conceptually nicer one, but I would upvote your answer if it did not completely destroy the localisation (by using and instead of \bibstring{and}) and inhibit the punctuation tracker (by using \space for the first space instead of \addspace) and the context-sensitive punctuation interface (by using \renewcommand instead of \DeclareDelimFormat). – moewe Feb 19 '18 at 09:41
  • @moewe I did not update because your answer is in every aspect better than mine. That's why I upvoted it. Don't know why I did get so many upvotes, honestly. – Skillmon Feb 19 '18 at 11:49
  • Well, it works, is short, the OP accepted it, that's quite some reasons to upvote. – moewe Feb 19 '18 at 12:51