1

How do I use biblatex's serial comma (\finalandcomma) outside of the bibliography? The following minimal example results in an error Undefined control sequence. [ One, two\finalandcomma]

\documentclass{article}
\usepackage[american]{babel}
\usepackage{biblatex}
\begin{document}
  One, two\finalandcomma{} and three.
\end{document}

But if I disable Oxford/serial commas, then it works just fine:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{biblatex}
\DefineBibliographyExtras{american}{% Remove Oxford/serial commas
  \let\finalandcomma\empty
}
\begin{document}
  One, two\finalandcomma{} and three.
\end{document}

1 Answer 1

2

The full error message from your first MWE is

! Undefined control sequence.
\finalandcomma ->\addcomma 
                           
l.5   One, two\finalandcomma
                            {} and three.
? 

That means that it isn't \finalandcomma that is undefined. \finalandcomma is defined as \addcomma. And \addcomma is the command that is undefined here.

Indeed the biblatex documentation explains in §4.7 Punctuation and Spacing that

Note that these facilities [\addcomma and friends] are only made available locally in citations and bibliographies. They will not affect any other part of a document.

That has two reasons: For one these commands can only work properly in a certain space factor setup that is generally not used outside of citations. Secondly, biblatex keeps these macros in a private name space to avoid name clashes.

The example with the disabled \finalandcomma works because then the macro expands to an empty replacement text, which obviously cannot end up undefined.

All in all I would recommend you define your own macro with a different name and do not rely on biblatex's \finalandcomma.

\documentclass{article}
\usepackage[american]{babel}

\newcommand*{\listfinalcomma}{}

\begin{document}
  One, two\listfinalcomma{} and three.
\end{document}

If you really want to use biblatex's \finalandcomma another way to work around this problem is to define \addcomma

\documentclass{article}
\usepackage[american]{babel}
\usepackage{biblatex}

\newcommand*{\addcomma}{,}

\begin{document}
  One, two\finalandcomma{} and three.
\end{document}

biblatex's own definition of \addcomma will still be used when biblatex is in charge, but outside of biblatex's realms we have a fallback definition that should be good enough.

1
  • That was quick! Thank you! I will do as you suggest and define my own command :-)
    – Fredrik P
    Apr 7, 2021 at 21:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .