[Tex/LaTex] How to position the paper’s authors’ addresses on the front page (maketitle)

titles

When I use the following code for the title page of a paper (please see below), the authors' addresses and emails appear on the last page of the paper. However I need them to appear on the first-title page (after the authors' names before the abstract). How can I do this?

\documentclass [reqno, 12pt ]{amsart}
...
\begin{document}

\title[paper]{Nice paper}

\author{Me}
\address{University}
\email{mmm@lala.com}
\thanks{.}
\author{my friend}
\address{Institute}
\email{kkk@lala.edu}
\thanks{.}

\date{\today}
\keywords{XXX }

\begin{abstract}
Lalala
\end{abstract}

\maketitle

Best Answer

changing the positioning of addresses in amsart is nontrivial.

here i have adapted the code used for an existing journal that has a style similar to what has been requested. the result is not perfect; for one author, the address is placed on a separate line, but for more than one author, the addresses are strung out after the associated author name. i haven't analyzed this sufficiently to determine how long it would take to change robustly, but i have run out of time.

i hope this is useful.

\documentclass[reqno,12pt]{amsart}

\makeatletter
\renewcommand{\author}[2][]{%
  \def\@tempa{#1}
  \ifx\@empty\authors
    \ifx\@tempa\@empty
      \gdef\shortauthors{#2}%
    \else
      \gdef\shortauthors{#1}%
    \fi
    \gdef\authors{\author{#2}}%
  \else
    \ifx\@tempa\@empty
      \g@addto@macro\shortauthors{\and#2}%
    \else
      \g@addto@macro\shortauthors{\and#1}%
    \fi
    \g@addto@macro\authors{\and\author{#2}}%
  \fi
}
\renewcommand{\address}[2][]{\g@addto@macro\authors{\address{#1}{#2}}}
\def\@setauthors{%
  \begin{center}%
    \footnotesize
    \vspace{20pt}
    \let\and\@empty
    \def\author##1{\advance\@tempcnta\@ne}%
    \def\address##1##2{\advance\@tempcntb\@ne}%
    \@tempcnta=\z@  \@tempcntb=\z@
    \authors
    \ifnum\@tempcnta>\@ne \ifnum\@tempcntb=\@ne
        \oneaddress
      \else
        \sepaddresses
      \fi
    \else
      \oneaddress
    \fi
  \end{center}%
}
\def\oneaddress{%
  \begingroup
  \let\author\@iden \let\address\@gobbletwo
  \renewcommand{\andify}{%
    \nxandlist{\unskip, }{\unskip{} and~}{\unskip, and~}}%
  \uppercasenonmath\authors
  \andify\authors
  \authors
  \endgroup
  \begingroup \let\and\relax \let\author\@gobble
  \def\address##1##2{\unskip\\[10pt] \itshape##2}%
  \authors
  \endgroup
}
\def\sepaddresses{%
  \begingroup
    \baselineskip10\p@\relax
    \def\address##1##2{ ({\itshape##2}\/)}
    \def\author##1{\def\temp{##1}\leavevmode\uppercasenonmath\temp\temp}%
    \nxandlist
      {,\\[\baselineskip]}
      {\\[\baselineskip] \textsc{\lowercase{and}}\\[\baselineskip]}
      {,\\[\baselineskip]\textsc{\lowercase{and}}\\[\baselineskip]}
      \authors % macro to operate on
    \authors
  \endgroup
}
\def\maketitle{\par
  \@topnum\z@
  \@setcopyright
  \thispagestyle{firstpage}%
  \uppercasenonmath\shorttitle
  \ifx\@empty\shortauthors \let\shortauthors\shorttitle
  \else
    \newcommand{\@xuppercasenonmath}[1]{\toks@\@emptytoks
      \@xp\@skipmath\@xp\@empty##1$$%
      \edef##1{\@nx\protect\@nx\@upprep\the\toks@}}%
    \@xuppercasenonmath\shortauthors
    \def\@@and{AND}
    \renewcommand{\andify}{%
      \nxandlist{\unskip, }{\unskip{ }\@@and{ }}{\unskip, \@@and{ }}}%
    \andify\shortauthors
  \fi
  \@maketitle@hook
  \begingroup
  \@maketitle
  \endgroup
  \c@footnote\z@
  \@cleartopmattertags
}
\def\@maketitle{%
  \normalfont\normalsize
  \let\@makefntext\noindent
  \@adminfootnotes
  \ifx\@empty\addresses\else \@footnotetext{\@setotheraddresses}\fi
  \global\topskip68\p@\relax
  \@settitle
  \ifx\@empty\authors \else \@setauthors \fi
  \ifx\@empty\@dedicatory
  \else
    \baselineskip26\p@
    \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}%
      \global\dimen@i\prevdepth}\prevdepth\dimen@i
  \fi
  \toks@\@xp{\shortauthors}\@temptokena\@xp{\shorttitle}%
  \edef\@tempa{\@nx\markboth{\the\toks@}{\the\@temptokena}}\@tempa
  \@setabstract
  \normalsize
  \if@titlepage
    \newpage
  \else
    \dimen@34\p@ \advance\dimen@-\baselineskip
    \vskip\dimen@\relax
  \fi
} % end \@maketitle
\renewcommand{\thanks}[1]{%
  \ifx\@empty\thankses
    \gdef\thankses{\thanks{#1}}%
  \else
    \g@addto@macro\thankses{\endgraf\thanks{#1}}%
  \fi}
\def\@setthanks{\def\thanks##1{\noindent##1\@addpunct.}\thankses}
\renewcommand{\curraddr}[2][]{%
  \ifx\@empty\addresses
    \gdef\addresses{\curraddr{#1}{#2}}%
  \else
    \g@addto@macro\addresses{\endgraf\curraddr{#1}{#2}}%
  \fi}
\renewcommand{\email}[2][]{%
  \ifx\@empty\addresses
    \gdef\addresses{\email{#1}{#2}}%
  \else
    \g@addto@macro\addresses{\endgraf\email{#1}{#2}}%
  \fi}
\renewcommand{\urladdr}[2][]{%
  \ifx\@empty\addresses
    \gdef\addresses{\urladdr{#1}{#2}}%
  \else
    \g@addto@macro\addresses{\endgraf\urladdr{#1}{#2}}%
  \fi}
\def\@setotheraddresses{%
  \def\curraddr##1##2{\noindent
    \emph{Current address\@ifnotempty{##1}{ of ##1}}:\space
      ##2\@addpunct.}%
  \def\email##1##2{\noindent
    \emph{E-mail address\@ifnotempty{##1}{ of ##1}}:\space
      \texttt{##2}}%
  \def\urladdr##1##2{\noindent
    \emph{WWW address\@ifnotempty{##1}{ of ##1}}:\space
      \texttt{##2}}%
  \addresses
}
\let\enddoc@text\relax
\makeatother

\begin{document}

\title[paper]{Nice paper}

\author{Me}
\address{University}
\email{mmm@lala.com}
\thanks{.}
\author{my friend}
\address{Institute}
\email{kkk@lala.edu}
\thanks{.}

\date{\today}
\keywords{XXX }

\begin{abstract}
Lalala
\end{abstract}

\maketitle

some text here.

\newpage

some text to force second page, to check running head

\end{document}

output of example code