BibTeX, biblatex and biberRemoving comma after author and before et al.

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Tosulli
Posts: 1
Joined: Sun Jan 09, 2022 11:03 pm

Removing comma after author and before et al.

Post by Tosulli »

Hello!
I'm having some trouble trying to remove the comma from before "et al" in my in-text citations using \parencite.
Currently, my citations look like (Smith, et al., 1980) but I would like them to read (Smith et al., 1980).

Many thanks!

My LaTeX looks something like:

\usepackage[
backend=biber,
style=ext-authoryear-comp, giveninits, uniquename=init, maxbibnames=999,
urldate=long,
innamebeforetitle, articlein=false,
]{biblatex}


\DeclareDelimFormat*{nameyeardelim}{\addcomma\space}
\DeclareDelimFormat[textcite]{nameyeardelim}{\addcomma\addspace}
\DefineBibliographyStrings{english}{%
andothers ={et\addabbrvspace al\adddot},
andmore ={et\addabbrvspace al\adddot},
}



\DeclareDelimFormat{andothersdelim}{\addcomma\space}


\renewcommand*{\compcitedelim}{\multicitedelim}


\makeatletter
\AtEveryCitekey{\global\undef\cbx@lastyear}
\makeatother

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Removing comma after author and before et al.

Post by Bartman »

Please try to create a Infominimal working example and mark multiline code with the appropriate tags.

If the comma is only to be removed from the citation, then you have to limit the change of andothersdelim to the bib context.

In addition, the second adaption of nameyeardelim is not needed, since its purpose is already fulfilled by the first.

The assignments to the localisation keys andothers and andmore are the default setting of the selected language. It can be found in the english.lbx file.

The change you are looking for as code:

Code: Select all

\DeclareDelimFormat*{nameyeardelim}{\addcomma\space}
%\DeclareDelimFormat[textcite]{nameyeardelim}{\addcomma\addspace}
\DeclareDelimFormat[bib]{andothersdelim}{\addcomma\space}
By the way, \space after \addcomma would be enough. See e.g. the default code of nametitledelim in section 3.12.2 "Context-sensitive Delimiters" of the biblatex manual.
Post Reply