# Excluding one certain author from [et al.]

Is there any possibility using biblatex or any other package to exclude the certain author from [et al.]?

This is needed for author publications list in my thesis. Now the issue is solved by simply listing all the authors for each publication, but the below mentioned format is better, I think.

First Author, ..., Needed Author [et al.]

For the following biblatex solution all you need is the name hash of the "special" name (this is a Biber-only feature), you can read more about this in Highlight an author in bibliography using biblatex allowing bibliography style to format it. You will have to use maxbibnames=999 so that all names can be processed.

The solution replaces consecutive less important names by an ellipsis and prints "[et al.]" if we omitted any names.

\newcounter{namesnotimportant}
\newtoggle{ellipsis}
\DeclareNameFormat{first-last-etal}{%
\ifnumcomp{\value{listcount}}{=}{1}
{\setcounter{namesnotimportant}{0}%
\toggletrue{ellipsis}}
{}%
\ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
{\iffieldequalstr{hash}{e06f6e5a8c1d5204dea326aa5f4f8d17}%% <----- put the correct hash here
{\toggletrue{ellipsis}%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}
{\stepcounter{namesnotimportant}%
\iftoggle{ellipsis}
{}}}%
\ifnumcomp{\value{namesnotimportant}}{>}{0}
{\toggletrue{abx@bool@more\currentname}}
{}%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\andothersdelim\bibstring[\mkbibbrackets]{andothers}}
{}}

\DeclareNameAlias{sortname}{first-last-etal}
\DeclareNameAlias{author}{first-last-etal}
\DeclareNameAlias{editor}{first-last-etal}
\DeclareNameAlias{translator}{first-last-etal}


In the example the special name is "Anne Uthor" and the corresponding hash is e06f6e5a8c1d5204dea326aa5f4f8d17

MWE

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber, maxnames=999]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{one,
author = {Anne Uthor},
title  = {One Author},
year   = {2001},
}
@book{twoa,
author = {Anne Uthor and Emma Ditor},
title  = {Two Authors -- Important First},
year   = {2002},
}
@book{twob,
author = {Emma Ditor and Anne Uthor},
title  = {Two Authors -- Important Second},
year   = {2002},
}
@book{threea,
author = {Anne Uthor and Emma Writer and William Riter},
title  = {Three Authors -- Important First},
year   = {2003},
}
@book{threeb,
author = {Emma Writer and Anne Uthor and William Riter},
title  = {Three Authors -- Important Second},
year   = {2003},
}
@book{threec,
author = {Emma Writer and William Riter and Anne Uthor},
title  = {Three Authors -- Important Third},
year   = {2003},
}
@book{foura,
author = {Anne Uthor and Emma Writer and William Riter and Catherine T. Ranslator},
title  = {Four Authors -- Important First},
year   = {2004},
}
@book{fourb,
author = {Emma Writer and Anne Uthor and William Riter and Catherine T. Ranslator},
title  = {Four Authors -- Important Second},
year   = {2004},
}
@book{fourc,
author = {Emma Writer and William Riter and Anne Uthor and Catherine T. Ranslator},
title  = {Four Authors -- Important Third},
year   = {2004},
}
@book{fourd,
author = {Emma Writer and William Riter and Catherine T. Ranslator and Anne Uthor},
title  = {Four Authors -- Important Fourth},
year   = {2004},
}
\end{filecontents*}

\newcounter{namesnotimportant}
\newtoggle{ellipsis}
\DeclareNameFormat{first-last-etal}{%
\ifnumcomp{\value{listcount}}{=}{1}
{\setcounter{namesnotimportant}{0}%
\toggletrue{ellipsis}}
{}%
\ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
{\iffieldequalstr{hash}{e06f6e5a8c1d5204dea326aa5f4f8d17}%% <----- put the correct hash here
{\toggletrue{ellipsis}%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}
{\stepcounter{namesnotimportant}%
\iftoggle{ellipsis}
{}}}%
\ifnumcomp{\value{namesnotimportant}}{>}{0}
{\toggletrue{abx@bool@more\currentname}}
{}%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\andothersdelim\bibstring[\mkbibbrackets]{andothers}}
{}}

\DeclareNameAlias{sortname}{first-last-etal}
\DeclareNameAlias{author}{first-last-etal}
\DeclareNameAlias{editor}{first-last-etal}
\DeclareNameAlias{translator}{first-last-etal}

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


• Thank you, it seems that this is just what I needed. But it turned out to be much more complicated than i supposed =) Starting from that simple example with bold name showed that it doesn't work with biblatex-gost, so I'll continue asking questions. – KrogZZ Mar 7 '16 at 9:53
• @KrogZZ If the answer solves this question as posted please consider accepting it, so people can see that the issue at hand is solved. I might have a look at your other question later. – moewe Mar 7 '16 at 10:19
• Actually I can not be completely sure it works until I'll try it by myself (what I can't do so far because of biblatex-gost problem). But as it seems to be the real solution, I've accepted it =) – KrogZZ Mar 7 '16 at 10:29
• @KrogZZ It definitely works for the standard styles, to get it to work with biblatex-gost a few modifications might be necessary, those are probably along the lines the ones needed in your other question. (If you happen to use a non-standard style it can never hurt to mention that in the question - the most convenient way for helpers is an MWE - so people don't have to go back and rework their answers.) – moewe Mar 7 '16 at 10:42
• @KrogZZ You could try and replace the name:first-last in the code above by authorname:last-first. biblatex-gost uses a special format for author names (this is basically the same issue as in your other question). – moewe Mar 7 '16 at 17:12