# contributor in amsart cannot work

I wrote an article, and one author contributed to write an appendix. He suggested that I applied the command \contrib[With an appendix by]{sb.}. However, I don't know why it does not work. When I compile, it reads: undefined control sequence.

\documentclass{amsart}
\begin{document}
\title{title}
\author{names}
\contrib[With an appendix by]{sb}
\maketitle
content
\end{document}


Do I need to input some new packages to run the \contrib? Thanks in advance!

• Apparently adding \makeatletter\let\@wraptoccontribs\wraptoccontribs\makeatother to your preamble lets you compile. I found this here. – Max Jul 3 '18 at 8:42
• amsart does appear to have a \contrib command, as described in the documentation (page 20) – preferred_anon Jul 3 '18 at 8:48
• @MaxSnippe Yes! It works! Thanks a lot! I also observed your link, and it solved my problem! Unfortunately, there are few questions on this problem... – Higgs-Boson Jul 3 '18 at 11:58
• @DENGYa Great, I've added an answer so this question can be marked as answered. – Max Jul 3 '18 at 12:08

\makeatletter
\let\@wraptoccontribs\wraptoccontribs
\makeatother


According to this link, it is a bug in the ams classes. All credits to Enrico Gregorio at the Google forum.

• Oh, that's eleven years ago! I completely forgot about that! – egreg Jul 3 '18 at 13:06
• actually, the bug was first reported in september 2005. i've been trying to get it fixed in the ctan version ever since, and can only say i'm sorry that my pleas have been overruled. – barbara beeton Jul 4 '18 at 20:06

This is a very old bug of amsart.cls that I appear to have analyzed back in 2007 in a comp.text.tex thread.

Here are the relevant lines in amsart.cls, where the error is apparent on line 495:

480 \newcommand\contrib[2][]{%
481   \def\@tempa{#1}%
482   \ifx\@empty\@tempa
483   \else
484     \ifresetcontrib \@xcontribs
485     \else \global\resetcontribtrue
486     \fi
487   \fi
488   \ifx\@empty\contribs
489     \gdef\contribs{#1 #2}%
490   \else
492   \fi
493   \@wraptoccontribs{#1}{#2}%
494 }
495 \def\wraptoccontribs#1#2{}


The correct code should be

495 \def\@wraptoccontribs#1#2{}


The macro is just a hook, possibly used for some in-house processing if the paper is to be inserted as a contribution to some volume.

\makeatletter
\let\@wraptoccontribs\wraptoccontribs
\makeatother


to the document preamble.

\documentclass{amsart}

\makeatletter
\let\@wraptoccontribs\wraptoccontribs
\makeatother

\begin{document}
\title{title}
\author{names}
\contrib[With an appendix by]{sb}
\maketitle
content
\end{document}


• This is a lot more clear than my answer! Thanks for the clarification. – Max Jul 4 '18 at 20:14