LaTeX forum ⇒ BibTeX, biblatex and biberRemoving comma after author and before et al. Topic is solved

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

Removing comma after author and before et al.

Postby Tosulli » Sun Jan 09, 2022 11:09 pm

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 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
Bartman
Posts: 285
Joined: Fri Jan 03, 2020 2:39 pm

Removing comma after author and before et al.  Topic is solved

Postby Bartman » Mon Jan 10, 2022 12:08 am

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:

\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.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 1 guest