# How do I define a \DefineSeries command similar to \DefineJournal when using AMSRefs?

In Section 8.4 Abbreviations: \DefineName, \DefineJournal, and \DefinePublisher of the AMSRefs package documentation, the following is mentioned:

After writing

\DefineName{dmj}{Jones, David M.}

\DefinePublisher{ams}{AMS}{American Mathematical Society}{Providence}

\DefineJournal{jams}{0894-0347}
{J. Amer. Math. Soc.}
{Journal of the American Mathematical Society}


you can use these abbrevations as follows:

author={dmj} (or editor={dmj} or translator={dmj})

journal={jams}

publisher={ams}


The second argument of \DefinePublisher is the abbreviated form of the publisher’s name, the third argument is the full name, and the fourth will be used as the address. If the short-publishers option is requested, then the abbreviation will be used; otherwise the full name will be used.

Similarly, the third argument of \DefineJournal will be used if the short-journals option is requested; otherwise the fourth argument will be used. (The second argument is the ISSN of the journal, which is not currently used, but is included for future use.)

I find these to be quite handy, and would like to add another option called \DefineSeries to keep track of series like the London Mathematical Society Lecture Note Series. For instance, here is a book entry that uses the series entry:

\documentclass{amsart}

\usepackage{amsrefs}

\DefineName{wal-k}{Walker, Keith}

\DefinePublisher{cup-c}{Cambridge Univ. Press}{Cambridge University Press}{Cambridge}

\begin{document}

\begin{bibdiv}
\begin{biblist}

\raggedright

\bib{Wal93}{book}{
editor={wal-k},
title={Surveys in combinatorics, 1993},
series={London Math Soc. Lecture Note Ser.},
ISSN={0076-0552, 2634-3681/e},
publisher={cup-c},
date={1993},
volume={187},
ISBN={978-0-511-66208-9/e},
doi={10.1017/CBO9780511662089},
}

\end{biblist}
\end{bibdiv}

\end{document}


Looking at the documented source for how \DefineJournal is defined, I tried inserting the following into my preamble:

\newcommand{\DefineSeries}[4]{%
\bib*{#1}{periodical}{
issn={#2},
series={#4}
}%
}

\DefineSeries{lmslns}{0076-0552, 2634-3681/e}
{London Math. Soc. Lecture Note Ser.}
{London Mathematical Society Lecture Note Series}


and then I replaced the series entry in the \bib item with {lmslns}. However, this does not work: I get "lmslns" as the series. What do I need to do here?

• why do you use amsrefs instead of biblatex? Jul 3, 2021 at 11:43
• @UlrikeFischer I'm willing to drop amsrefs and shift to biblatex if it's recommended! So far, I've been sticking to amsrefs because (1) I like the amsrefs style; (2) it seemed to be more flexible than using plain BibTeX, which was what I was using earlier; (3) I heard (not sure) that journals/arXiv.org still don't accept submissions that use biblatex, and I'm not sure how easy it is to make the necessary adjustments in my final manuscript before shipping it off to such journals. Jul 3, 2021 at 11:55
• I think I figured out what I need to do: adding \xref@check@b\bib'series to the list of other cross-references that have to be resolved, inside \def\bib@resolve@xrefs{...} (these are lines 829–836 in the Subsubsection 6.12.3 Resolving cross-references of the documented source), produces the series entry as I require. Jul 3, 2021 at 17:19

Turning my comment into an answer to remove this from the unanswered list.

One needs to add the field series to the list of fields whose cross-references are to be resolved, so the following goes in the preamble:

\makeatletter
\catcode\'=11
\def\bib@resolve@xrefs{%
\xref@check@c\bib'xref
\xref@check@a\bib'author
\xref@check@a\bib'editor
\xref@check@a\bib'translator
\xref@check@b\bib'journal
\xref@check@b\bib'publisher
\xref@check@b\bib'series        % <--- added this line
}
\catcode\'=12

\newcommand{\DefineSeries}[4]{%
\bib*{#1}{periodical}{
issn={#2},
series={#4}
}%
}

\@ifpackagewith{amsrefs}{short-journals}{%
\renewcommand{\DefineSeries}[4]{%
\bib*{#1}{periodical}{
issn={#2},
series={#3},
}%
}
}{}
\makeatother


Then, I am able to use the \DefineSeries command as mentioned in the OP. This will also use the short version of the series when the short-journals option or abbrev option is passed to the amsrefs package.