9

This is a follow-up question to emphasizing "et al.", with the new requirement being specific to biblatex.

Consider the following minimal example:

enter image description here

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\addbibresource{biblatex-examples.bib}  

\begin{document}

\citeauthor{companion}

\printbibliography

\end{document}

maxcitenames = 2 introduces "et al." when 3 or more authors are present. How can I format "et al." to suit my needs (italics, or bold, or ...)?

Werner
  • 603,163

2 Answers2

12

Probably the simplest way is to define:

\DefineBibliographyStrings{english}{%
  andothers = {\textbf{et al}\adddot}
}

MWE:

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\DefineBibliographyStrings{english}{%
  andothers = {\textbf{et al}\adddot}
}

\addbibresource{biblatex-examples.bib}

\begin{document}

\citeauthor{companion}

\printbibliography

\end{document} 

Output:

enter image description here

karlkoeller
  • 124,410
  • In general I would not recommend shoehorning formatting into the localisation files (though I can see that this would make sense if this is a language-specific requirement). But Joseph Wright's bibilatex-ieee uses this method: https://github.com/josephwright/biblatex-ieee/issues/5, https://github.com/josephwright/biblatex-ieee/commit/fa108ae83adc657373c454687cad953f40201ccb – moewe Feb 05 '17 at 08:46
  • 1
    @moewe The issue is that it's not necessarily clear if the formatting is part of the style, the language, etc. Here, 'et al.' is used in English but one can't be sure that applies to other languages, so the italic formatting (a choice of the publisher for non-English phrases) may or may not apply ... – Joseph Wright Feb 05 '17 at 09:41
  • @JosephWright Exactly, that is what I meant to hint at with my parenthetical remark. If this is a localisation feature and not a general one, I can see the merits of putting the formatting into the .lbx file. And of course it might be hard to tell if it is a general or localisation-dependent feature. – moewe Feb 05 '17 at 09:44
7

Update

With a current version of biblatex, you can use bibstring sets. See https://tex.stackexchange.com/a/644877/35864.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear]{biblatex}

\DefineBibliographyExtras{british}{% \DeclareBibstringSet{latin}{andothers,ibidem}% \DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}% } \UndefineBibliographyExtras{british}{% \UndeclareBibstringSet{latin}% }

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{aksin}

\printbibliography \end{document}


It should be enough the redefine the name:andothers macro.

\renewbibmacro*{name:andothers}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\mkandothers]{andothers}}
    {}}

The only change to the default is that we have \bibstring[\mkandothers]{andothers}, so that the 'andothers' bibstring is wrapped in \mkandothers, that can be defined as

\newcommand*{\mkandothers}{\mkbibemph}

In total

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\addbibresource{biblatex-examples.bib}

\newcommand{\mkandothers}{\mkbibemph} \renewbibmacro{name:andothers}{% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} and test \ifmorenames } {\ifnumgreater{\value{liststop}}{1} {\finalandcomma} {}% \andothersdelim\bibstring[\mkandothers]{andothers}} {}}

\begin{document} \citeauthor{companion}

\printbibliography \end{document}

Goossens et al.

moewe
  • 175,683
  • 1
    Wouldn't t be better if this was done directly instead of having user interaction? biblatex provides fieldformats for nearly everything. renewable delims etc. For a regular user, this is nearly witchcraft. – Johannes_B Feb 05 '17 at 09:06
  • @Johannes_B Mhh, yes I am a fan of new options, especially seeing that we have \mkibid that works in exactly the same way for 'ibid' already. On the other question I linked to above, Audrey said: 'You can submit feature requests here, though I have my doubts such an option would be incorporated. This is a style issue and the existing style can easily be adapted to meet your needs.' – moewe Feb 05 '17 at 09:11