[Tex/LaTex] amsart option titlepage puts the address on the last page

affiliationamsartformattingtitles

The following code produces a title page with the title, authors, and abstract, but the addresses appear at the end of the article. Every variation I can think of produces the same problem. Putting \usepackage{amsaddr} puts the addresses on the title page, but deletes the author names! (edit: amsaddr needs to be loaded before the author information to avoid the aforementioned error; see answer to question)

I don't know what to do, short of hacking together the title manually, as in the answer to Authors in amsart.

\documentclass[titlepage]{amsart}
\title{The title}%

\author{Author 1}
\author{Author 2}
\address{Addresses of Author 1 and 2}
\email{emails of Authors 1 and 2}

\author{Author 3}
\author{Author 4}
\address{Addresses of Author 3 and 4}
\email{emails of Authors 3 and 4}

\usepackage{lipsum}
\begin{document}

\begin{abstract}
  An abstract
\end{abstract}

\maketitle

\lipsum[1]

\end{document}

The appears on the title page
enter image description here

This appears on the next page
enter image description here

Best Answer

The amsaddr package does not delete the author names. There are two ways to use it, straight it will print the address below each author name (but put the email addresses a footnote), with the foot option it will put the addresses in a footnote. Here are the two outputs.

For amsaddr in the foot case you can give an optional argument to \address

\address[A1,A2]{Address of author 1 and 2}

which will print (A1,A2) before that address, if you need that labelling. This doesn't work with the email addresses. However, you can add the following to your preamble to get such functionality:

\makeatletter
\renewcommand{\email}[2][]{%
  \ifx\emails\@empty\relax\else{\g@addto@macro\emails{,\space}}\fi%
  \@ifnotempty{#1}{\g@addto@macro\emails{\textrm{(#1)}\space}}%
  \g@addto@macro\emails{#2}%
}
\makeatother

Address under author

 \documentclass[titlepage]{amsart}
 \usepackage{amsaddr}
 Author info....

Sample on titlepage

Address in foot

 \documentclass[titlepage]{amsart}
 \usepackage[foot]{amsaddr}
 Author info....

Sample in foot

Address in foot with labels

Sample with labels

Full code

\documentclass[titlepage]{amsart}

\usepackage[foot]{amsaddr}

\makeatletter
\renewcommand{\email}[2][]{%
  \ifx\emails\@empty\relax\else{\g@addto@macro\emails{,\space}}\fi%
  \@ifnotempty{#1}{\g@addto@macro\emails{\textrm{(#1)}\space}}%
  \g@addto@macro\emails{#2}%
}
\makeatother

\tracingmacros=1
\title{The title}%

\author{Author 1}
\author{Author 2}
\address[A1,A2]{Addresses of Author 1 and 2}
\email[A1,A2]{emails of Authors 1 and 2}

\author{Author 3}
\author{Author 4}
\address[A3,A4]{Addresses of Author 3 and 4}
\email[A3,A4]{emails of Authors 3 and 4}

\usepackage{lipsum}
\begin{document}

\begin{abstract}
  An abstract
\end{abstract}


\maketitle

\lipsum[1]

\end{document}