Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
@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 '12 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 '12 at 8:57
add comment

1 Answer 1

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.