[Tex/LaTex] BibTeX style that groups by author

biblatexbibtex

I'm looking for a BibTeX style that formats the reference list at the end in the way shown below. The key points are:

  • The references are sorted by the (list of) authors, and then each author has a list of references keyed by year.
  • Each author has a full line for the name, and then the references for that author are listed below with no name, not even "—"

I'm not too worried about the exact punctuation; if I had any class that sorted by authors, I could hack the punctuation if I had to.

I have seen this style in various books. One modern example is Jech's Set Theory, 3rd edition. But I have never found a BibTeX style that generates this kind of output.


Example of desired output:

Jones, Sam 
[2001] "Paper", Journal, etc
[2002] "Other paper", Journal, etc

Lewis, Jo
[1999a] Some book, Publisher, etc
[1999b] "Another paper", Big Journal, etc

Best Answer

I finally managed to create a solution using biblatex. This package by default replaces recurring author or editor names with a dash, and the macros involved can be redefined to achieve "grouping by author":

  • Set the \bibnamesep length (which controls the spacing between different authors) to a positive value;
  • Redefine \bibnamedash (which is invoked to typset the "recurring" dash) to do nothing;
  • Create a new macro \authoryearpunct that a) starts a new line b) for this line, undoes the hanging indentation controlled by the \bibhang length c) capitalizes the following string (e.g. "Editor")
  • Insert this macro at the appropriate places (whenever author/editor names are actually typeset);
  • Reformat the year (brackets instead of braces, no period).

Annotations like "Editor" and "Translator" will be typeset at the start of the new line, which accounts for the possibility that the same person is author of one cited work and editor/translator of another.

EDIT: Your style example includes no works with editor instead of author. That said, it should be possible to put the "editor" annotation after the year (immediately before the title).

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\setlength{\bibnamesep}{\baselineskip}
\renewcommand*{\bibnamedash}{}
\newcommand*{\authoryearpunct}{\\\hspace*{-\bibhang}\bibsentence}
\renewcommand*{\labelnamepunct}{\addspace}

\makeatletter

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{year}
    {}
%    {\printtext[parens]{\printdateextra}}}% DELETED
    {\printtext[brackets]{\printdateextra}}}% NEW

\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \printnames{author}%
%   \iffieldundef{authortype}% DELETED
%     {\setunit{\addspace}}% DELETED
%     {\setunit{\addcomma\space}}}% DELETED
    \setunit{\authoryearpunct}}% NEW
     \iffieldundef{authortype}
       {}
       {\usebibmacro{authorstrg}%
    \setunit{\addspace}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}

\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
%   \setunit{\addcomma\space}% DELETED
    \setunit{\authoryearpunct}% NEW
    \usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}%
     \setunit{\addspace}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}

\renewbibmacro*{bbx:translator}[1]{%
  \ifboolexpr{
    test \ifusetranslator
    and
    not test {\ifnameundef{translator}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{translator}%
%   \setunit{\addcomma\space}% DELETED
    \setunit{\authoryearpunct}% NEW
    \usebibmacro{bbx:savehash}}%
     \usebibmacro{translator+othersstrg}%
     \clearname{translator}%
     \setunit{\addspace}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}

\makeatother

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{a01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{a02,
  author = {Author, A.},
  year = {2002},
  title = {A title that goes to great lengthts in expounding the matter at hand and therefore doesn't fit into one line},
}
@misc{b03,
  editor = {Buthor, B.},
  year = {2003},
  title = {Bravo},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

EDIT: Somehow this worked without the \makeatletter-\makeatother combo. Added nevertheless.

Related Question