# Changing biblatex reference printing style to make it similar to amsrefs

Third question in my series of questions on TeX.SE for an annotated bibliography (1, 2). This one has the same MWE but another issue. At the moment, the reference formatting for

@article{ref5,
author={Hardy, G. H. and Littlewood, J. E. },
title={{Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes}},
year={1916},
journal={Acta Math.},
volume={41},
number={1},
}

looks like:

But I want it to look like

This second image belongs to the old format of our project in which we used amsrefs and classic bibtex. The good thing about amsrefs is that it has a beautiful structure for each bib entry type (article/book/compilation/thesis) such as bold/italic titles and supports the field MRnumber. But we changed to the modern biblatex and a separate bib file and now we are looking for a method to mock as many amsrefs styles as possible with the least manual effort.

Specifically, we want the following changes in style:

• Add MRnumber from the MRnumber field in entries
• Remove the word "In:" before each journal title
• Instead of "VOLUME.NUMBER (YEAR)", have "VOLUME (YEAR), no. NUMBER"
• Remove "pp. "
• Omit the ISSN

(I could not make a full MWE because it would be too long if I want to include all types of reference we have in the bibliography. Here is the old version of the project with amsrefs which has the ideal formatting for us. Take a look to see different types of bib entries such as book, article, or thesis.)

There is also another issue that is more complicated: a few of the papers in our collection have something like 1961/62 (rather than 1961 or 1962) in their year field in the bib file. Thus, when ordered chronologically, the bibliography puts such entries before all other entries. One solution might be to change 1961/62 to 1961 but we aim to be loyal to the references to avoid later confusion for the readers. Here is my MWE and screenshot to reflect this issue:

\documentclass{amsart}
\usepackage{blindtext}
\usepackage[sorting=ynt, backend=biber, style=numeric-comp]{biblatex}
\usepackage{hyperref}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article {ref1,
AUTHOR = {Chebyshev, P.},
TITLE = {{Lettre de M. le professeur Tchebychev a M. Fuss, sur un nouveau th{e}oreme relatif aux nombres premiers contenus dans la formes $4n+1$ et $4n+3$.}},
FJOURNAL = {Bull. de la Classe phys. math. de l'Acad. Imp. des Sciences St. Petersburg},
VOLUME = {11},
YEAR = {1853},
LANGUAGE = {french},
annotation = {Chebyshev's paper which was the starting point of the subject.},
}
@article{ref2,
AUTHOR = {Phragmen, P.},
TITLE = {{Sur le logarithme integral et la fonction $f(x)$ de Riemann}},
YEAR  = {1891},
FJOURNAL = {\"{O}fversigt af Kongl. Vetenskaps--Akademiens F\"{o}handlingar.},
LANGUAGE = {French},
VOLUME = {48},
}
@article{ref3,
AUTHOR = {Landau, E.},
TITLE = {{U}ber einen {S}atz von {T}schebyschef},
JOURNAL = {Math. Ann.},
FJOURNAL = {Mathematische Annalen},
VOLUME = {61},
YEAR = {1906},
NUMBER = {4},
}
@article{ref4,
author={Littlewood, J. E. },
title={{Sur la distribution des nombres premiers}},
year={1961/62},
volume={158},
journal={Comptes Rendus de l'Acad. Sci. Paris},
language={French},
}
@article{ref5,
author={Hardy, G. H. and Littlewood, J. E. },
title={{Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes}},
year={1916},
journal={Acta Math.},
volume={41},
number={1},
}
\end{filecontents}

\begin{document}
\nocite{*}

\section{Chronological bibliography}

\end{document}

PS. In the end, if we can cover all the criteria, it might even be possible to publish this as an update to the AMS formatting and maybe their referencing system in MathSciNet.

• Please note that questions about recreating entire styles are usually not a great fit for this site. It can be quite some work to do that. It would be better if you could split up the required changes into separate sub-questions about one specific issue. Then people can answer the requests separately and other people with a similar problem can benefit from the questions. – moewe Jul 18 at 5:26
• @moewe I think those I mentioned specifically are most important. I might be able to do similar editions for other reference types once I see a few examples. – Amir Hossein Jul 18 at 5:36
• For the MR number thingy have a look at tex.stackexchange.com/q/306908/35864 – moewe Jul 18 at 5:43
• For the "in:" see tex.stackexchange.com/q/10682/35864 – moewe Jul 18 at 5:43
• The ISSN can be disabled with the isbn switch (which controls both the ISSN and the ISBN): tex.stackexchange.com/q/23117/35864. If you want independent control over ISBN and ISSN have a look at tex.stackexchange.com/q/40097/35864 and tex.stackexchange.com/q/440251/35864 – moewe Jul 18 at 5:47

I will focus on the desired format

VOLUME (YEAR), no. NUMBER

To get this format we need to redefine the macro journal+issuetitle

\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\printfield{volume}%
\usebibmacro{issue+date}%
\usebibmacro{issue}%
\printfield{number}%
\printfield{eid}%
\newunit}

In full with a few more tweaks

\documentclass{amsart}

\usepackage{filecontents}

\begin{filecontents*}{mrnumber.dbx}
\DeclareDatamodelFields[type=field,datatype=verbatim]{mrnumber}
\DeclareDatamodelEntryfields{mrnumber}
\end{filecontents*}

\usepackage[backend=biber, style=numeric-comp, sorting=ynt, datamodel=mrnumber,
isbn=false]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}

\renewbibmacro{in:}{%
\ifentrytype{article}
{}
{\printtext{\bibstring{in}\intitlepunct}}}

\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\printfield{volume}%
\usebibmacro{issue+date}%
\usebibmacro{issue}%
\printfield{number}%
\printfield{eid}%
\newunit}

\DeclareFieldFormat[article,periodical]{pages}{#1}

\DeclareFieldFormat{mrnumber}{%
\ifhyperref

\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\printfield{mrnumber}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}

\begin{filecontents}{\jobname.bib}
@article {ref1,
AUTHOR = {Chebyshev, P.},
TITLE = {{Lettre de M. le professeur Tchebychev a M. Fuss, sur un nouveau th{e}oreme relatif aux nombres premiers contenus dans la formes $4n+1$ et $4n+3$.}},
FJOURNAL = {Bull. de la Classe phys. math. de l'Acad. Imp. des Sciences St. Petersburg},
VOLUME = {11},
YEAR = {1853},
LANGUAGE = {french},
annotation = {Chebyshev's paper which was the starting point of the subject.},
}
@article{ref2,
AUTHOR = {Phragmen, P.},
TITLE = {{Sur le logarithme integral et la fonction $f(x)$ de Riemann}},
YEAR  = {1891},
FJOURNAL = {\"{O}fversigt af Kongl. Vetenskaps--Akademiens F\"{o}handlingar.},
LANGUAGE = {French},
VOLUME = {48},
}
@article{ref3,
AUTHOR = {Landau, E.},
TITLE = {{U}ber einen {S}atz von {T}schebyschef},
JOURNAL = {Math. Ann.},
FJOURNAL = {Mathematische Annalen},
VOLUME = {61},
YEAR = {1906},
NUMBER = {4},
}
@article{ref4,
author={Littlewood, J. E. },
title={{Sur la distribution des nombres premiers}},
year={1961/62},
volume={158},
journal={Comptes Rendus de l'Acad. Sci. Paris},
language={French},
}
@article{ref5,
author={Hardy, G. H. and Littlewood, J. E. },
title={{Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes}},
year={1916},
journal={Acta Math.},
volume={41},
number={1},
}
@article{grabiner,
author    = {David J. Grabiner},
title     = {Brownian motion in a Weyl chamber, non-colliding particles, and random matrices},
journal   = {Annales de l'Institut Henri Poincare (B) Probability and Statistics},
volume    = {35},
number    = {2},
pages     = {177-204},
year      = {1999},
doi       = {10.1016/S0246-0203(99)80010-7},
mrnumber  = {1678525},
}
\end{filecontents}