# Cite only the first author for ibidem citations

When using the authoryear-icomp style of BibLaTeX, I would like to cite only the first author of a multi-author work, even if that is not unique, when the citation is a repeated (e.g. ibidem) one. My reasoning is that the ibidem makes it possible to uniquely identify the reference anyway.

I have not been able to find a way to do so, but suspect that it is possible given the incredible flexibility of BibLaTeX (I have recently started using it and love it so far). Is it possible to achieve the above?

Consider the following MWE:

\documentclass{article}

\usepackage{filecontents}

\usepackage{csquotes}
\usepackage[%
backend = biber,
style = authoryear-icomp,
giveninits = true,
ibidpage = true,
maxbibnames = 99,
maxcitenames = 2,
uniquename = init,
useprefix = true
]{biblatex}
% always have first name, last name in bibliography
\DeclareNameAlias{sortname}{given-family}

\begin{filecontents}{references.bib}
@misc{keyA,
title = {Title A},
author = {First, Author and Second, Author and Third, Author},
year = 2019,
}

@misc{keyB,
title = {Title B},
author = {First, Author and Fourth, Author and Fifth, Author},
year = 2019,
}
\end{filecontents}

\begin{document}

We first note that~\textcite{keyA} and~\textcite{keyB} did a lot of work.
The latter wrote \enquote{important stuff}, so we quote~\textcite{keyB} again.

\printbibliography

\end{document}


Which renders something like:

Instead of rendering First, Fourth, et al. (ibid.) for the last citation, I would like it to render First et al. (ibid.). The reader would then just find the previous citation and be able to uniquely identify the right reference. Is this possible using BibLaTeX? Thanks in advance for any pointers and help.

• What is you stance on the uniquelist option in general? Do you want to retain uniqueness of lists in non-"ibid." labels? (Note that this issue is only relevant with \textcite, all other cite commands just write "ibid." for "ibid"-citations, but \textcite can't do that due to the assumptions about the grammatical context of the passage.) – moewe Apr 11 at 8:29
• If at all possible, I would like to be able to do that, @moewe. The "ibid." helps to uniquely identify a reference, but without it it is ambiguous. I would be okay with a solution that locally modifies that counter value. (In other words, if I have to manually do some extra work for "ibid." citations that would be a workable solution for me. I would of course prefer a fully automatic solution.) – Just a student Apr 11 at 8:33
• And I am aware of only \textcite exhibiting this issue, unfortunately I have to use that way of referencing in a text I am writing currently. – Just a student Apr 11 at 8:34

It isn't particularly pretty, but it is possible.

We can obtain the desired effect by replacing

\printnames{labelname}


in the textcite bibmacro with

\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\printnames[][1-1]{labelname}}
{\printnames{labelname}}%


Since the textcite macro for authoryear-icomp is quite long, the result might look a bit daunting.

Unfortunately, it is not enough to simply inject a different value for maxnames into the citation with \AtEveryCitekey as I initially hoped, since maxname values can be overridden by the uniquelist-maxname value calculated by the backend (for the unqiuelist option), this happens at a very late stage so that the standard hooks offer no way to interfere.

\documentclass{article}

\usepackage{filecontents}

\usepackage{csquotes}
\usepackage[%
backend = biber,
style = authoryear-icomp,
giveninits = true,
ibidpage = true,
maxbibnames = 99,
maxcitenames = 2,
uniquename = init,
useprefix = true
]{biblatex}

\DeclareNameAlias{sortname}{given-family}

\makeatletter
\renewbibmacro*{textcite}{%
\iffieldequals{namehash}{\cbx@lasthash}
{\iffieldundef{shorthand}
{\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
$$\value{multicitecount}=0\OR\iffieldundef{postnote}$$}
{\setunit{\compcitedelim}%
\savefield{labelyear}{\cbx@lastyear}}}
{\setunit{\compcitedelim}%
\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}}
{\ifnameundef{labelname}
{\iffieldundef{shorthand}
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nonameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{cite:ibid}}
{\usebibmacro{cite:shorthand}}}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\printnames[][1-1]{labelname}}
{\printnames{labelname}}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{cite:ibid}}
\savefield{labelyear}{\cbx@lastyear}}
{\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}}%
\stepcounter{textcitecount}%
\savefield{namehash}{\cbx@lasthash}}%
\setunit{%
\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}%
\textcitedelim}}
\makeatother

\begin{filecontents}{\jobname.bib}
@misc{keyA,
title  = {Title A},
author = {First, Author and Second, Author and Third, Author},
year   = 2019,
}
@misc{keyB,
title  = {Title B},
author = {First, Author and Fourth, Author and Fifth, Author},
year   = 2019,
}
\end{filecontents}

\begin{document}
We first note that~\textcite{keyA} and~\textcite{keyB} did a lot of work.
The latter wrote \enquote{important stuff}, so we quote~\textcite{keyB} again.

\printbibliography
\end{document}


If you don't like long redefinitions, you can of course use xpatch to patch the macro instead

\usepackage{xpatch}
\xpatchbibmacro{textcite}
{\printnames{labelname}}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\printnames[][1-1]{labelname}}
{\printnames{labelname}}}
{}{}


The pros and cons of patching vs. redefining are discussed at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?.

• Thank you so much! I was hoping it would be possible to do this with a small patch somewhere, but had no idea where to look. I'll definitely read up on the patching vs. redefining discussion you linked to, thanks for that as well. – Just a student Apr 11 at 8:47
• I will use the patch approach, for completeness. Thanks again for the quick and thorough answer. – Just a student Apr 11 at 8:54