4

The problem description is in the title: AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editors. I'm not sure if it's OK to report such bugs here, but I have done so successfully in the past, so hopefully this is OK, too. Here's a MWE (or maybe not really M, but hopefully acceptably brief):

\documentclass{article}
\usepackage{amsrefs}
\begin{document}
\begin{bibdiv}
\begin{biblist}
\bib{SGA-3.1}{book}{
        editor={Demazure, Michel},
        editor={Grothendieck, Alexander},
   title={Sch\'emas en groupes. I: Propri\'et\'es g\'en\'erales des sch\'emas en groupes},
}

\bib{SGA-3.2}{book}{
        editor={Demazure, Michel},
        editor={Grothendieck, Alexander},
   title={Sch\'emas en groupes. II: Groupes de type multiplicatif, et structure des sch\'emas en groupes g\'en\'eraux},
}
\end{biblist}
\end{bibdiv}
\end{document}

The expected outcome is that the first entry is listed with "Michel Demazure and Alexander Grothendieck (eds.)", and the second entry is listed with "————— (eds.)". Actually the second entry is listed with "————— (ed.)".

1 Answer 1

6

You can save the count from the previous time and if this one tests equal, base the plural switch on the saved number

\documentclass{article}
\usepackage{amsrefs}

\makeatletter
  \catcode`\'=11

\def\PrintSeries@a#1#2#3#4{%
        \get@numberof\@tempcnta#1{#3}%
        \chardef\series@total=\@tempcnta
        \global\chardef\last@series@total=\@tempcnta
        \ifnum\series@total=\@ne
            \let\SingularPlural\@firstoftwo
        \else
            \let\SingularPlural\@secondoftwo
        \fi
        \series@index=\z@
        \let#1\series@add
        #2#3#4\relax
    \endgroup
  }
  \renewcommand{\PrintEditorsA}[1]{%
  \ifx\previous@primary\current@primary
        \ifnum\last@series@total=\@ne
            \let\SingularPlural\@firstoftwo
        \else
            \let\SingularPlural\@secondoftwo
        \fi
        \sameauthors{(ed\Plural{s}.)}%
    \else
        \def\current@bibfield{\bib'editor}%
        \PrintNames{}{ (ed\Plural{s}.)}{#1}%
    \fi
    \erase@field\bib'editor
}
  \catcode`\'=12
\makeatother
\begin{document}
\begin{bibdiv}
\begin{biblist}
\bib{SGA-3.1}{book}{
        editor={Demazure, Michel},
        editor={Grothendieck, Alexander},
   title={Sch\'emas en groupes. I: Propri\'et\'es g\'en\'erales des sch\'emas en groupes},
}

\bib{SGA-3.2}{book}{
        editor={Demazure, Michel},
        editor={Grothendieck, Alexander},
   title={Sch\'emas en groupes. II: Groupes de type multiplicatif, et structure des sch\'emas en groupes g\'en\'eraux},
}
\end{biblist}
\end{bibdiv}
\end{document}

only tested on this one example:-)

3
  • Thank you! In addition to getting a fix, I had hoped to bring this to the attention of a maintainer. The current maintainer listed on CTAN is David Jones, or "the American Mathematical Society" as a whole, with no clear avenue for how (and, in the latter case, whom) to contact. Do you know if there's any better general procedure for filing a bug report than putting it here and hoping someone notices? Commented Dec 1 at 21:24
  • 1
    @LSpice email [email protected] you could reference this post Commented Dec 1 at 21:33
  • Re, thanks! Commented Dec 1 at 21:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.