按作者编号的参考书目(以及作者年份排序)

按作者编号的参考书目(以及作者年份排序)

我正在编写一本书的新版本,该书使用了一种非常不寻常的书目样式:条目按作者年份排序,然后按作者或作者组编号,例如:

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).

引用格式为 Milnor [3],等等。

有没有 bibtex 风格来处理这种奇怪的事情?或者可以用 biblatex 创建这种类型的参考书目而不需要太多的编码吗?

答案1

这是使用 BibLaTeX 的概念证明(粗略的)(生成参考书目后,文档需要编译两次)。

\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}

在此处输入图片描述

相关内容