3

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,
    Address = {The Hague},
    Author = {Noam Chomsky and William Labov and Donald Knuth},
    Publisher = {Mouton},
    Title = {Syntactic Structures},
    Year = {1957},
}

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

@book{Chomsky1957c,
    Address = {The Hague},
    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}



\addbibresource{\jobname.bib}

\addbibresource{biblatex-examples.bib}

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

B\footcite{Chomsky1957b}

C\footcite{Chomsky1957c}

\printbibliography
\end{document}
Hugh
  • 2,374
  • 17
  • 30

1 Answers1

3

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,
    Address = {The Hague},
    Author = {Noam Chomsky and William Labov and Donald Knuth},
    Publisher = {Mouton},
    Title = {Syntactic Structures},
    Year = {1957},
}

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

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

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}



\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}{}}{}%
}
moewe
  • 175,683
  • 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 06:00
  • @Hugh Check the edit and let me know if it works for you. – moewe Nov 14 '16 at 07:32