文章末尾显示作者所属机构和文章类别

文章末尾显示作者所属机构和文章类别

我正在寻找一种好方法,如何使用文档类将隶属关系放在最后一页的所有文本之后article。例如,在文档类中,amsart此选项是默认实现的。

文档类的最小工作示例article如下:

\documentclass{article}
\usepackage{authblk}

\title{The title}

\author{Author A\thanks{[email protected]}}
\affil{Addresses of Author A}

\usepackage{lipsum}
\begin{document}
\maketitle
\lipsum[1]
\end{document}

它会产生类似这样的结果:

在此处输入图片描述

文档类的最小工作示例amsart如下:

\documentclass{amsart}

\title{The title}

\author{Author A}
\address{Addresses of Author A}
\email{[email protected]}

\usepackage{lipsum}
\begin{document}
\maketitle
\lipsum[1]
\end{document}

它产生了我想要的东西:

在此处输入图片描述

答案1

这是一个稍微不同的方法:

\documentclass{article}
\usepackage{url}
\makeatletter
\newcommand{\address}[1]{\gdef\@address{#1}}
\newcommand{\email}[1]{\gdef\@email{\url{#1}}}
\newcommand{\@endstuff}{\par\vspace{\baselineskip}\noindent\small
\begin{tabular}{@{}l}\scshape\@address\\\textit{E-mail address:} \@email\end{tabular}}
\AtEndDocument{\@endstuff}
\makeatother
\title{A title}
\author{Author A}
\address{Addresses of Author A}
\email{[email protected]}
\usepackage{lipsum}
\begin{document}
\maketitle
\lipsum[1]
\end{document}

代码输出

答案2

如果您可以手动排版,则可以使用:

\documentclass{article}
\usepackage{authblk}

\AtEndDocument{%
  \par
  \medskip
  \begin{tabular}{@{}l@{}}%
    \textsc{Addresses of Author A}\\
    \textit{E-mail address}: \texttt{[email protected]}
  \end{tabular}}

\title{The title}

\author{Author A\thanks{[email protected]}}
\affil{Addresses of Author A}

\usepackage{lipsum}
\begin{document}
\maketitle
\lipsum[1]
\end{document}

在此处输入图片描述

如果要更自动化,以下允许您使用任意数量的作者。宏\print@author控制应为单个作者打印的内容。

\documentclass{article}
\usepackage{etoolbox}
\usepackage{hyperref}

\makeatletter
\newcounter{author}
\renewcommand*\author[1]{%
  \stepcounter{author}%
  \ifnum\c@author=1
    \gdef\@author{#1}%
  \else
    \xdef\@author{\unexpanded\expandafter{\@author\and#1}}%
  \fi
  \csgdef{author@\the\c@author}{#1}}
\newcommand*\email[1]{%
  \csgdef{email@\the\c@author}{#1}}
\newcommand*\address[1]{%
  \csgdef{address@\the\c@author}{#1}}
\AtEndDocument{%
  \xdef\author@count{\the\c@author}%
  \c@author=1
  \print@authors}
\newcommand*\print@authors{%
  \ifnum\c@author>\author@count
  \else
    \print@author{\the\c@author}%
    \advance\c@author by 1
    \expandafter\print@authors
  \fi}
\newcommand*\print@author[1]{%
  \par\medskip
  \begin{tabular}{@{}l@{}}%
    \textsc{Addresses of \csuse{author@#1}}\\
    \csuse{address@#1}\\
    \textit{E-mail address}:
    \href{mailto:\csuse{email@#1}}{\csuse{email@#1}}
  \end{tabular}}
\makeatother

\title{The title}

\author{Author A}
\address{example road A\\example village}
\email{[email protected]}

\author{Author B}
\address{example road B\\example village}
\email{[email protected]}

\author{Author C}
\address{example road C\\example village}
\email{[email protected]}

\usepackage{lipsum}
\begin{document}
\maketitle
\lipsum[1]
\end{document}

在此处输入图片描述

相关内容