ACM Sigplan 格式 authorinfo

ACM Sigplan 格式 authorinfo

ACM Sigplan 提供\authorinfo作者信息。目前,我有 4 位作者。我想将其格式化为两行,每行包含两位作者。但是,默认情况下,它会格式化为两行,第 1 行包含三位作者,第 2 行包含中间一位作者。我该如何更改此设置?

\authorinfo{Author 1}
{Aff 1}
{email 1}
\authorinfo{Author 2}
{Aff 2}
{email 2}
\authorinfo{Author 3}
{Aff 3}
{email 3}
\authorinfo{Author 4}
{Aff 4}
{email 4}

答案1

\@maketitle如果有四位作者,您可以重新定义以提供所需的格式:

\documentclass[preprint,10pt]{sigplanconf}
\usepackage{amsmath}

\makeatletter
\def\@maketitle{%
  \begin{center}
  \@settitlebanner
  \let \thanks = \titlenote
  {\leftskip = 0pt plus 0.25\linewidth
   \rightskip = 0pt plus 0.25 \linewidth
   \parfillskip = 0pt
   \spaceskip = .7em
   \noindent \LARGE \bfseries \@titletext \par}
  \vskip 6pt
  \noindent \Large \@subtitletext \par
  \vskip 12pt
  \ifcase \@authorcount
    \@latex@error{No authors were specified for this paper}{}\or
    \@titleauthors{i}{}{}\or
    \@titleauthors{i}{ii}{}\or
    \@titleauthors{i}{ii}{iii}\or
    \@titleauthors{i}{ii}{}\@titleauthors{iii}{iv}{}\or% HERE
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{}{}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{viii}{}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{viii}{ix}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{}{}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{}\or
    \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
                  \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{xii}%
  \else
    \@latex@error{Cannot handle more than 12 authors}{}%
  \fi
  \vspace{1.75pc}
  \end{center}}
\makeatother

\begin{document}

\title{My Title}

\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}

\maketitle

\begin{abstract}

\end{abstract}

\end{document}

更改是在标记的行中进行的% HERE,该行最初使用以下格式格式化四个作者

\@titleauthors{i}{ii}{iii}\@titleauthors{iv}{}{}

也就是说,第一行有三个作者,第四个作者在单独的一行。可以通过将上面的行更改为来实现所需的格式

\@titleauthors{i}{ii}{}\@titleauthors{iii}{iv}{}

或者

\@titleauthors{i}{}{ii}\@titleauthors{iii}{}{iv}

为了使作者之间的距离更大(在我的代码中,我选择了第一种可能性,但你可以使用更适合你的可能性)。

在此处输入图片描述

为了节省代码,也可以通过修补来实现(使用etoolbox,例如)\@maketitle命令:

\documentclass[preprint,10pt]{sigplanconf}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@maketitle}{\@titleauthors{i}{ii}{iii}\@titleauthors{iv}{}{}}{\@titleauthors{i}{ii}{}\@titleauthors{iii}{iv}{}}{}{}
\makeatother

\begin{document}

\title{My Title}

\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}
\authorinfo{Fname Lname}
           {school}
           {email@edu}

\maketitle

\begin{abstract}

\end{abstract}

\end{document}

为了获得更大的分离,可以使用

\makeatletter
\patchcmd{\@maketitle}{\@titleauthors{i}{ii}{iii}\@titleauthors{iv}{}{}}{\@titleauthors{i}{}{ii}\@titleauthors{iii}{}{iv}}{}{}
\makeatother

相关内容