如何在首页上定位论文作者的地址(maketitle)?

如何在首页上定位论文作者的地址(maketitle)?

当我使用以下代码作为论文的标题页时(请参见下文),作者的地址和电子邮件会出现在论文的最后一页。但是我需要它们出现在第一页标题页上(在作者姓名之后,摘要之前)。我该怎么做?

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

\title[paper]{Nice paper}

\author{Me}
\address{University}
\email{[email protected]}
\thanks{.}
\author{my friend}
\address{Institute}
\email{[email protected]}
\thanks{.}

\date{\today}
\keywords{XXX }

\begin{abstract}
Lalala
\end{abstract}

\maketitle

答案1

改变地址的定位amsart并不是一件简单的事情。

在这里,我调整了用于现有期刊的代码,该期刊的风格与所要求的风格相似。结果并不完美;对于一位作者,地址放在单独的行上,但对于多位作者,地址则排在相关作者姓名后面。我还没有充分分析这一点,以确定需要多长时间才能进行稳健的更改,但我已经没有时间了。

我希望这有用。

\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{[email protected]}
\thanks{.}
\author{my friend}
\address{Institute}
\email{[email protected]}
\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}

示例代码的输出

相关内容