5

That's the question: I want to be able to use my own custom label for a particular entry in the bibliography, rather than the automatically generated [42] (numeric) or [Rez99] (alphanumeric) ones. (E.g., because amsrefs is doing a bad job picking a label automatically, or because a particular reference has a highly recognizable acronym that I would rather use.)

How do I do this?

Charles Rezk
  • 175
  • 2
  • 8

1 Answers1

7

Alphabetic / Shortalphabetic

Section 5.2 of the amsrefs documentation gives a list of fields that you can put inside the bibliographic entry. Among them you find

label: When the alphabetic or shortalphabetic options are used, amsrefs will usually try to generate the label on its own. If necessary, you can override the automatically generated label by specifying a label field.

See e.g.

\documentclass{article}
\usepackage[alphabetic]{amsrefs}
\begin{document}
Alan Sokal~\cite{Sokal96} recommends Bourbaki's
text~\cite{Bourbaki70} for a gentle introduction to set theory.
\begin{bibdiv}
\begin{biblist}
\bib{Bourbaki70}{book}{
title={Th\'eorie des ensembles},
author={Bourbaki, Nicolas},
date={1970},
publisher={Hermann},
label={SET}
}
\bib{Sokal96}{article}{
title={Trangressing the boundaries},
subtitle={Toward a transformative hermeneutics of quantum gravity},
author={Sokal, Alan},
journal={Social Text},
volume={46/47},
date={1996},
pages={217--252}
}
\end{biblist}
\end{bibdiv}
\end{document}

Numeric

The above doesn't work with the numeric option, since AMS takes the position that numeric keys should be linearly ordered from 1 to N in the bibliography.

What you need to do then is to split your bibliography into two separate biblists, one for the numeric items, and the other for the ones you want to name. Your choice of ordering the two lists influences which list is shown first in the bibliography.

Below we use the * form of the biblist environment to pass additional keys modifying the list from the default behavior, (as discussed in Section 3 of the amsrefs documentation). The first biblist is then alphabetic and so obeys the label instructions, and the second list is numeric (the default, since it was not otherwise specified when loading the package).

\documentclass{article}
\usepackage{amsrefs}
\begin{document}
Alan Sokal~\cite{Sokal96} recommends Bourbaki's
text~\cite{Bourbaki70} for a gentle introduction to set theory.
\begin{bibdiv}
\begin{biblist}*{labels={alphabetic}}
\bib{Bourbaki70}{book}{
title={Th\'eorie des ensembles},
author={Bourbaki, Nicolas},
date={1970},
publisher={Hermann},
label={SET}
}
\end{biblist}
\begin{biblist}
\bib{Sokal96}{article}{
title={Trangressing the boundaries},
subtitle={Toward a transformative hermeneutics of quantum gravity},
author={Sokal, Alan},
journal={Social Text},
volume={46/47},
date={1996},
pages={217--252}
}
\end{biblist}
\end{bibdiv}
\end{document}

enter image description here

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
  • Thanks. The only amsrefs documentation I was aware of was the technical documentation (amsrefs.pdf), which doesn't explain the "label" field. – Charles Rezk Jun 12 '21 at 21:36
  • The documentation for users is amsrdoc.pdf, a copy can be found on CTAN: https://ctan.org/pkg/amsrefs?lang=en – Willie Wong Jun 14 '21 at 12:00
  • The alphabetic option will do numbers as a label field so you can arrange your references in any order you like and construct whatever labels you want by hand should you want to mix numbers and alphanumeric labels. – Larry Taylor Aug 30 '23 at 14:30
  • @LarryTaylor: but the numbers won't be automatically generated and have to be maintained by hand. I don't think that is the intent of the original question. – Willie Wong Aug 30 '23 at 14:47