我正在使用EPTCS LaTeX 风格。这是随附的示例(的最小部分):
\documentclass[adraft]{eptcs}
\title{Title}
\author{
% first author
Rob van Glabbeek
\institute{School of Computer Science and Engineering\\
University of New South Wales\\
Sydney, Australia}
\email{[email protected]}
\and
% two other authors (common affiliation)
Co Author \qquad\qquad Yet S. Else
\institute{Stanford Univeristy\\
California, USA}
\email{\quad [email protected] \quad\qquad [email protected]}
}
\begin{document}
\maketitle
\end{document}
结果如下:
间距是通过放置一些\quad
和来实现的\qquad
。但是,当作者较多、姓名较长、所属机构和电子邮件长度不一等时,手动居中很快就会变得很烦人……
有没有更好的(可能是自动的)方法来正确地将具有共同联系的作者(及其电子邮件)置于中心?
答案1
将以下命令添加到您的序言中:
\RequirePackage{array}
\newenvironment{authors}[1]%
{\begingroup
\newcommand\estyle{}%
\renewcommand\institute[1]%
{\\\multicolumn{#1}{@{}c@{}}{\scriptsize\begin{tabular}[t]{@{}>{\footnotesize}c@{}}##1\end{tabular}}}%
\renewcommand\email[1]%
{\gdef\estyle{\footnotesize\ttfamily}\\##1\gdef\estyle{}}
\begin{tabular}[t]{@{}*{#1}{>{\estyle}c}@{}}
}%
{\end{tabular}%
\endgroup
}
然后,您可以将具有相同隶属关系但不同电子邮件地址的多位作者添加到\author
命令中,如下所示:
\author{
% ... (insert >= 0 authors that do not share affiliations)
% then come the authors that *do* share an affiliation
\begin{authors}{NUMBER OF AUTHORS}
Name1 & Name2 & ...
\institute{Common\\Affiliation}
\email{Email1 & Email2 & ...}
\end{authors}
}
举个例子,这部分内容如下
\author{
Rob van Glabbeek
\institute{
School of Computer Science and Engineering\\
University of New South Wales\\
Sydney, Australia
}
\email{[email protected]}
\and
\begin{authors}{2}
Co Author & Yet S. Else
\institute{Stanford Univeristy\\ California, USA}
\email{[email protected] & [email protected]}
\end{authors}
}
完整代码:
\documentclass[adraft]{eptcs}
\RequirePackage{array}
\newenvironment{authors}[1]%
{\begingroup
\newcommand\estyle{}%
\renewcommand\institute[1]%
{\\\multicolumn{#1}{@{}c@{}}{\scriptsize\begin{tabular}[t]{@{}>{\footnotesize}c@{}}##1\end{tabular}}}%
\renewcommand\email[1]%
{\gdef\estyle{\footnotesize\ttfamily}\\##1\gdef\estyle{}}
\begin{tabular}[t]{@{}*{#1}{>{\estyle}c}@{}}
}%
{\end{tabular}%
\endgroup
}
\title{Title}
\author{
Rob van Glabbeek
\institute{
School of Computer Science and Engineering\\
University of New South Wales\\
Sydney, Australia
}
\email{[email protected]}
\and
\begin{authors}{2}
Co Author & Yet S. Else
\institute{Stanford Univeristy\\California, USA}
\email{[email protected] & [email protected]}
\end{authors}
}
\begin{document}
\maketitle
\end{document}
答案2
也许像堆栈这样的东西可能会有帮助......
\documentclass[adraft]{eptcs}
\usepackage[usestackEOL]{stackengine}
\title{Title}
\author{
% first author
Rob van Glabbeek
\institute{School of Computer Science and Engineering\\
University of New South Wales\\
Sydney, Australia}
\email{[email protected]}
\and
% two other authors (common affiliation)
\Longunderstack{Co Author$^*$, \\ Yet S. Else$^\dag$}\smallskip
\institute{Stanford Univeristy\\
California, USA}
\email{\Longunderstack{$^*[email protected],\\ $^\[email protected]}}
}
\begin{document}
\maketitle
\end{document}
如果希望斯坦福大学的名字和电子邮件在本地左对齐,同时保留整体居中的外观,那么可以这样做:
\documentclass[adraft]{eptcs}
\usepackage[usestackEOL]{stackengine}
\title{Title}
\author{
% first author
Rob van Glabbeek
\institute{School of Computer Science and Engineering\\
University of New South Wales\\
Sydney, Australia}
\email{[email protected]}
\and
% two other authors (common affiliation)
\Longunderstack[l]{Co Author$^*$, \\ Yet S. B. Else$^\dag$}\smallskip
\institute{Stanford Univeristy\\
California, USA}
\email{\Longunderstack[l]{$^*[email protected],\\ $^\[email protected]}}
}
\begin{document}
\maketitle
\end{document}