7

I'm working on a new edition of a book which uses a very unusual style of bibliography: Entries are sorted in author-year fashion, but then numbered per author or group of authors, e.g.:

Milnor, J.:
   1. Construction of universal bundles: I, Ann. Math., (2)63:272-284 (1956).
   2. Construction of universal bundles: II, Ann. Math., (2)63: 430-436 (1956).
   3. On manifolds homeomorphic to the 7-sphere, Ann. Math., (2)64: 399-405
      (1956).
   4. The theory of characteristic classes, mimeographed, Princeton University,
      Princeton, N.J., 1957.
Milnor, J., and M. A. Kervaire:
   1. Bernoulli numbers, homotopy groups, and a theorem of Rohlin, Proc. Intern.
      Congr. Math., 1958.
Milnor, J., and E. Spanier:
   1. Two remarks on fibre homotopy type, Pacific J. Math., 10: 585-590 (1960).

Citations are formatted as Milnor [3], and so on.

Is there any bibtex style for something strange as this? Or can this type of bibliography be created with biblatex without too much coding?

2
  • @lockstep why not bibliographies or bibtex as tags for this question? The OP originally requested whether a bibtex for something like this is possible, and the OP requests a bibliography styles (and citation) which is no longer usual.
    – Guido
    Nov 23, 2012 at 8:51
  • @Guido bibliographies has developed into a "general" tag that is only used if specific package tags do not apply (similar to diagrams vs. tikz-pgf). The bibtex tag would apply if the question is about the .bib format or specifically about compiling with BibTeX.
    – lockstep
    Nov 23, 2012 at 8:57

1 Answer 1

7

Here is (rough) proof of concept using BibLaTeX (the documents requires to be compiled twice after the generation of the bibliography).

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@book{fruits,
  title = {The apple and the banana},
  publisher = {Tomatopress},
  editor = {Straw Berry},
  author = {Annoying Orange},
  year = {1970}
}
@book{fruits2,
  title = {The pineapple and the banana},
  publisher = {Tomatopress},
  editor = {Straw Berry},
  author = {Annoying Orange},
  year = {1971}
}
@book{fruits3,
  title = {The mangos and the banana and other tropical fruits},
  publisher = {Tomatopress},
  editor = {Straw Berry},
  author = {Annoying Orange and Peachy Pear},
  year = {1970}
}
\end{filecontents*}


\usepackage[utf8]{inputenc}
\usepackage[firstinits]{biblatex}

\addbibresource{\jobname.bib}

\makeatletter
\newcommand{\@currentauthor}{}
\newcommand{\@current}{}
\newcounter{@mybibcounter}
\setcounter{@mybibcounter}{0}

\AtEveryBibitem{%
  \savename{labelname}{\@current}%
  \ifdefstrequal{\@currentauthor}{\@current}
    {\par}
    {\setcounter{@mybibcounter}{0}\item[]%
      \printnames[last-first/first-last]{labelname}]\par}%
    \usedriver{}{special}%
    \refstepcounter{@mybibcounter}\expandafter\label{\thefield{entrykey}}%
    \makebox[0em][r]{\the@mybibcounter.\ }%
}

\DeclareBibliographyDriver{special}{%
\savename{labelname}{\@currentauthor}%
}
\makeatother

\renewbibmacro{editor+others}{}
\renewbibmacro{author/translator+others}{}
\renewbibmacro{author/editor+others/translator+others}{}

\defbibenvironment{bibliography}
  {\list
    {}
    {\setlength{\itemindent}{-3em}%
      \setlength{\leftmargin}{3em}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {}

\DeclareCiteCommand{\cite}
  {}
  {\printnames{labelname}~\mkbibbrackets{\ref{\thefield{entrykey}}}}
  {\addcomma\addspace}
  {}

\begin{document}
Hello world \cite{fruits,fruits2,fruits3}.

\printbibliography

\end{document}

enter image description here

1
  • Is it possible to put the entries by year and not by a counter?
    – Jopie
    Mar 11, 2015 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .