# Both et al. and full authors in the bibliography

I am currently using the following options for biblatex

\usepackage[backend=biber,style=authoryear-ibid,maxcitenames=2, maxbibnames=9, uniquelist=false, uniquename=init]{biblatex}


In particular, citations with more than 2 authors appear as Chomsky et al. (1957a). The bibliography, however, presents the relevant citation with the full authors:

Chomsky, Noam, William Labov, and Donald Knuth (1957a). B. The Hague: Mouton.

It's possible for readers to decode which reference is which, but it isn't easy. I know I can just use maxbibnames=2, but I don't want to omit the other authors in the bibliography. What I'd like is:

Chomsky et al. (1957a). Chomsky Noam, William Labov, and Donald Knuth. B. The Hague: Mouton.

MWE:

\begin{filecontents}{\jobname.bib}
@book{Chomsky1957a,
Author = {Noam Chomsky and William Labov and Donald Knuth},
Publisher = {Mouton},
Title = {Syntactic Structures},
Year = {1957},
}

@book{Chomsky1957b,
Author = {Noam Chomsky and William Labov and Donald Knuth},
Publisher = {Mouton},
Title = {B},
Year = {1957},
}

@book{Chomsky1957c,
Author = {Noam Chomsky and William Labov and Leslie Lamport},
Publisher = {Mouton},
Title = {C},
Year = {1957},
}
\end{filecontents}
\documentclass{scrreprt}
\usepackage[backend=biber,style=authoryear-ibid,maxcitenames=2, maxbibnames=2, uniquelist=false, uniquename=init]{biblatex}

\begin{document}
A.\footcite{Chomsky1957a}

B\footcite{Chomsky1957b}

C\footcite{Chomsky1957c}

\printbibliography
\end{document}

• What exactly is the issue with the current system, which lists all authors? Is it that the "1957a" part is not sufficiently visible or that it comes too late, in some sense? – Mico Nov 10 '16 at 5:18
• How is it not easy to 'decode'? You are using an 'authoryear' style: all you need to do is look at the year. – jon Nov 10 '16 at 5:18
• Readers complain that they can't see the 1957a quickly enough -- it's not in a clear position (possibly on the next line if there are many authors) – Hugh Nov 10 '16 at 5:20
• Why don't you go all in as in Adding an AuthorYear block at the beginning of bibliography entries – moewe Nov 10 '16 at 7:47
• That will make your style inconsistent though, is that really what you want? – moewe Nov 10 '16 at 15:14

The general idea is inspired by Adding an [AuthorYear] block at the beginning of bibliography entries.

We, however, only want the introduction if we have an "et al." in the citation, in order to be able to check for that we need

\newtoggle{bbx:dowehavemorenames}
\DeclareNameFormat{dowehavemorenames}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\global\toggletrue{bbx:dowehavemorenames}}
{\global\togglefalse{bbx:dowehavemorenames}}}


And then

\newcounter{mymaxcitenames}
\AtBeginDocument{%
\setcounter{mymaxcitenames}{\value{maxnames}}%
}

\renewbibmacro*{begentry}{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames[dowehavemorenames]{labelname}%
\iftoggle{bbx:dowehavemorenames}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}%
\usebibmacro{date+extrayear}%
\newunit\newblock}
{}%
\endgroup
}


where we only print the block if the toggle bbx:dowehavemorenames is true.

MWE

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear-ibid, maxcitenames=2, maxbibnames=999, dashed=false, uniquelist=false, uniquename=init]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Chomsky1957a,
Author = {Noam Chomsky and William Labov and Donald Knuth},
Publisher = {Mouton},
Title = {Syntactic Structures},
Year = {1957},
}

@book{Chomsky1957b,
Author = {Noam Chomsky and William Labov and Donald Knuth},
Publisher = {Mouton},
Title = {B},
Year = {1957},
}

@book{Chomsky1957c,
Author = {Noam Chomsky and William Labov and Leslie Lamport},
Publisher = {Mouton},
Title = {C},
Year = {1957},
}
\end{filecontents}

\newtoggle{bbx:dowehavemorenames}
\DeclareNameFormat{dowehavemorenames}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\global\toggletrue{bbx:dowehavemorenames}}
{\global\togglefalse{bbx:dowehavemorenames}}}

\newcounter{mymaxcitenames}
\AtBeginDocument{%
\setcounter{mymaxcitenames}{\value{maxnames}}%
}

\renewbibmacro*{begentry}{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames[dowehavemorenames]{labelname}%
\iftoggle{bbx:dowehavemorenames}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}%
\usebibmacro{date+extrayear}%
\newunit\newblock}
{}%
\endgroup
}

\begin{document}
\cite{Chomsky1957a,Chomsky1957b,Chomsky1957c,knuth:ct:b,knuth:ct:a,sigfridsson}

\printbibliography
\end{document}


To omit repeated years, try

\renewbibmacro*{begentry}{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames[dowehavemorenames]{labelname}%
\iftoggle{bbx:dowehavemorenames}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}%
\usebibmacro{date+extrayear}%
\newunit\newblock}
{}%
\endgroup
\iftoggle{bbx:dowehavemorenames}{\renewbibmacro*{date+extrayear}{}}{}%
}

• Is it possible to omit the (repeated) year field in such cases? i.e. Chomsky et al. (1957a). Chomsky Noam, William Labov, and Donald Knuth. B. The Hague: Mouton. not Chomsky et al. (1957a). Chomsky Noam, William Labov, and Donald Knuth. (1957a) B. The Hague: Mouton. – Hugh Nov 14 '16 at 6:00
• @Hugh Check the edit and let me know if it works for you. – moewe Nov 14 '16 at 7:32