latest acmart.cls

This commit is contained in:
Matthew Flatt 2020-02-27 13:50:43 -07:00
parent 66c4c50f47
commit 9c985ca486

View File

@ -37,8 +37,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{acmart}
[2019/04/22 v1.60 Typesetting articles for the Association for
Computing Machinery]
[2020/02/22 v1.70 Typesetting articles for the Association for Computing Machinery]
\def\@classname{acmart}
\InputIfFileExists{acmart-preload-hook.tex}{%
\ClassWarning{\@classname}{%
@ -731,6 +730,15 @@ Computing Machinery]
\let\@vspacer\@vspacer@orig}
\AtBeginEnvironment{table*}{\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig}
\AtBeginEnvironment{algorithm}{\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig}
\AtBeginEnvironment{algorithm*}{\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig}
\AtBeginEnvironment{lstlisting}{\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig}
\AtBeginEnvironment{lstlisting*}{\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig}
\RequirePackage{caption, float}
\captionsetup[table]{position=top}
\if@ACM@journal
@ -870,9 +878,12 @@ Computing Machinery]
\endlist
}
\let\enddescription=\endlist % for efficiency
\newif\if@ACM@maketitle@typeset
\@ACM@maketitle@typesetfalse
\define@choicekey*+{ACM}{acmJournal}[\@journalCode\@journalCode@nr]{%
CIE,%
CSUR,%
DGOV,%
DTRAP,%
HEALTH,%
IMWUT,%
@ -896,6 +907,7 @@ Computing Machinery]
TDS,%
TEAC,%
TECS,%
TELO,%
THRI,%
TIIS,%
TIOT,%
@ -923,11 +935,13 @@ Computing Machinery]
TOS,%
TOSEM,%
TOSN,%
TQC,%
TRETS,%
TSAS,%
TSC,%
TSLP,%
TWEB%
TWEB,%
FACMP%
}{%
\ifcase\@journalCode@nr
\relax % CIE
@ -938,6 +952,10 @@ Computing Machinery]
\def\@journalName{ACM Computing Surveys}%
\def\@journalNameShort{ACM Comput. Surv.}%
\def\@permissionCodeOne{0360-0300}%
\or % DGOV
\def\@journalName{Digital Government: Research and Practice}%
\def\@journalNameShort{Digit. Gov. Res. Pract.}%
\def\@permissionCodeOne{2639-0175}%
\or % DTRAP
\def\@journalName{Digital Threats: Research and Practice}%
\def\@journalNameShort{Digit. Threat. Res. Pract.}%
@ -1024,8 +1042,8 @@ Computing Machinery]
\or % TCPS
\def\@journalName{ACM Transactions on Cyber-Physical Systems}%
\or % TDS
\def\@journalName{ACM Transactions on Data Science}%
\def\@journalNameShort{ACM Trans. Data Sci.}%
\def\@journalName{ACM/IMS Transactions on Data Science}%
\def\@journalNameShort{ACM/IMS Trans. Data Sci.}%
\def\@permissionCodeOne{2577-3224}%
\or % TEAC
\def\@journalName{ACM Transactions on Economics and Computation}%
@ -1033,6 +1051,10 @@ Computing Machinery]
\def\@journalName{ACM Transactions on Embedded Computing Systems}%
\def\@journalNameShort{ACM Trans. Embedd. Comput. Syst.}%
\def\@permissionCodeOne{1539-9087}%
\or % TELO
\def\@journalName{ACM Transactions on Evolutionary Learning}%
\def\@journalNameShort{ACM Trans. Evol. Learn.}%
\def\@permissionCodeOne{2688-3007}%
\or % THRI
\def\@journalName{ACM Transactions on Human-Robot Interaction}%
\def\@journalNameShort{ACM Trans. Hum.-Robot Interact.}%
@ -1140,6 +1162,10 @@ Computing Machinery]
\def\@journalName{ACM Transactions on Sensor Networks}%
\def\@journalNameShort{ACM Trans. Sensor Netw.}%
\def\@permissionCodeOne{1550-4859}%
\or % TQC
\def\@journalName{ACM Transactions on Quantum Computing}%
\def\@journalNameShort{ACM Trans. Quantum Comput.}%
\def\@permissionCodeOne{2643-6817}%
\or % TRETS
\def\@journalName{ACM Transactions on Reconfigurable Technology and Systems}%
\def\@journalNameShort{ACM Trans. Reconfig. Technol. Syst.}%
@ -1160,6 +1186,10 @@ Computing Machinery]
\def\@journalName{ACM Transactions on the Web}%
\def\@journalNameShort{ACM Trans. Web}%
\def\@permissionCodeOne{1559-1131}%
\else % FACMP, a dummy journal
\def\@journalName{Forthcoming ACM Publication}%
\def\@journalNameShort{ACM Forthcoming}%
\def\@permissionCodeOne{XXXX-XXXX}%
\fi
\ClassInfo{\@classname}{Using journal code \@journalCode}%
}{%
@ -1358,9 +1388,17 @@ Computing Machinery]
\def\terms#1{\ClassWarning{\@classname}{The command \string\terms{} is
obsolete. I am going to ignore it}}
\def\keywords#1{\def\@keywords{#1}}
\keywords{}
\let\@keywords\@empty
\AtEndDocument{\if@ACM@nonacm\else\ifx\@keywords\@empty
\ifnum\getrefnumber{TotPages}>2\relax
\ClassWarningNoLine{\@classname}{ACM keywords are mandatory
for papers over two pages}%
\fi\fi\fi}
\renewenvironment{abstract}{\Collect@Body\@saveabstract}{}
\long\def\@saveabstract#1{\long\gdef\@abstract{#1}}
\long\def\@saveabstract#1{\if@ACM@maketitle@typeset
\ClassError{\@classname}{Abstract must be defined before maketitle
command. Please move it!}\fi
\long\gdef\@abstract{#1}}
\@saveabstract{}
\long\def\@lempty{}
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printccs}[true]{%
@ -1375,6 +1413,11 @@ Computing Machinery]
\else
\ClassInfo{\@classname}{Suppressing bibformat}%
\fi}{\ClassError{\@classname}{The option printacmref can be either true or false}}
\AtEndDocument{\if@ACM@nonacm\else\if@ACM@printacmref\else
\ifnum\getrefnumber{TotPages}>1\relax
\ClassWarningNoLine{\@classname}{ACM reference format is mandatory
for papers over one page}%
\fi\fi\fi}
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printfolios}[true]{%
\if@ACM@printfolios
\ClassInfo{\@classname}{Printing folios}%
@ -1422,7 +1465,7 @@ Computing Machinery]
\newcounter{@concepts}
\newcommand\ccsdesc[2][100]{%
\ccsdesc@parse#1~#2~~\ccsdesc@parse@end}
\RequirePackage{textcomp}
\def\textrightarrow{$\rightarrow$}
\def\ccsdesc@parse#1~#2~#3~{%
\stepcounter{@concepts}%
\expandafter\ifx\csname CCS@General@#2\endcsname\relax
@ -1444,6 +1487,11 @@ Computing Machinery]
#3\fi\fi\ifnum\value{@concepts}=0.\else; \fi}%
\fi
\ccsdesc@parse@finish}
\AtEndDocument{\if@ACM@nonacm\else\ifx\@concepts\@empty\relax
\ifnum\getrefnumber{TotPages}>2\relax
\ClassWarningNoLine{\@classname}{CCS concepts are mandatory
for papers over two pages}%
\fi\fi\fi}
\def\ccsdesc@parse@finish#1\ccsdesc@parse@end{}
\newif\if@printcopyright
\@printcopyrighttrue
@ -1584,10 +1632,10 @@ Computing Machinery]
source.
\or % usgovmixed
ACM acknowledges that this contribution was authored or co-authored
by an employee, contractor, or affiliate of the United States government. As such,
the United States government retains a nonexclusive, royalty-free right to
publish or reproduce this article, or to allow others to do so, for
government purposes only.
by an employee, contractor, or affiliate of the United States
government. As such, the United States government retains a
nonexclusive, royalty-free right to publish or reproduce this
article, or to allow others to do so, for government purposes only.
\or % cagov
This article was authored by employees of the Government of Canada.
As such, the Canadian government retains all interest in the
@ -1681,6 +1729,7 @@ Computing Machinery]
\fi}}
\newbox\mktitle@bx
\def\maketitle{%
\@ACM@maketitle@typesettrue
\if@ACM@anonymous
% Anonymize omission of \author-s
\ifnum\num@authorgroups=0\author{}\fi
@ -1774,7 +1823,7 @@ Computing Machinery]
\if@ACM@printccs
\ifx\@concepts\@empty\else\bgroup
{\@specialsection{CCS Concepts}%
\@concepts\par}\egroup
\noindent\@concepts\par}\egroup
\fi
\fi
\ifx\@keywords\@empty\else\bgroup
@ -1783,7 +1832,7 @@ Computing Machinery]
\else
\@specialsection{Keywords}%
\fi
\@keywords}\par\egroup
\noindent\@keywords}\par\egroup
\fi
\andify\authors
\andify\shortauthors
@ -1823,12 +1872,13 @@ Computing Machinery]
\or % siggraph
\section*{#1}%
\or % sigplan
\paragraph*{#1}%
\noindentparagraph*{#1:~}%
\or % sigchi
\section*{#1}%
\or % sigchi-a
\section*{#1}%
\fi}
\fi
}
\def\@printtopmatter{%
\ifx\@startPage\@empty
\gdef\@startPage{1}%
@ -2117,7 +2167,8 @@ Computing Machinery]
\newdimen\author@bx@wd
\newskip\author@bx@sep
\author@bx@sep=1pc\relax
\def\@typeset@author@bx{\bgroup\hsize=\author@bx@wd\def\and{\par}%
\def\@typeset@author@bx{\bgroup\hsize=\author@bx@wd
\def\and{\par}\normalbaselines
\global\setbox\author@bx=\vtop{\if@ACM@sigchiamode\else\centering\fi
\@authorfont\@currentauthors\par\@affiliationfont
\@currentaffiliation}\egroup
@ -2222,19 +2273,24 @@ Computing Machinery]
\ifnum\num@authorgroups>1\relax
addresses: \else address: \fi
\bgroup
\def\streetaddress##1{\unskip\@addpunct, ##1}%
\def\postcode##1{\unskip\@addpunct, ##1}%
\def\streetaddress##1{\unskip, ##1}%
\def\postcode##1{\unskip, ##1}%
\def\position##1{\unskip\ignorespaces}%
\def\institution##1{\unskip\@addpunct, ##1}%
\def\city##1{\unskip\@addpunct, ##1}%
\def\state##1{\unskip\@addpunct, ##1}%
\def\institution##1{\unskip, ##1}%
\def\city##1{\unskip, ##1}%
\def\state##1{\unskip, ##1}%
\renewcommand\department[2][0]{\unskip\@addpunct, ##2}%
\def\country##1{\unskip\@addpunct, ##1}%
\def\and{\unskip\@addpunct; }%
\def\country##1{\unskip, ##1}%
\def\and{\unskip; }%
\def\@author##1{##1}%
\def\email##1##2{\unskip\@addpunct, \nolinkurl{##2}}%
\def\email##1##2{\unskip, \nolinkurl{##2}}%
\addresses
\egroup}
\AtEndDocument{\if@ACM@nonacm\else\if@ACM@journal
\ifx\@authorsaddresses\@empty
\ClassWarningNoLine{\@classname}{Authors'
addresses are mandatory for ACM journals}%
\fi\fi\fi}
\def\@setaddresses{}
\def\@authornotemark{\g@addto@macro\@currentauthors{\footnotemark\relax}}
\def\@@authornotemark#1{\g@addto@macro\@currentauthors{\footnotemark[#1]}}
@ -2295,11 +2351,13 @@ Computing Machinery]
\fi
\ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi
\par\egroup}
\def\@printendtopmatter{\bgroup
\def\@printendtopmatter{%
\let\@vspace\@vspace@orig
\let\@vspacer\@vspacer@orig
\par\bigskip
\egroup}
\let\@vspace\@vspace@acm
\let\@vspacer\@vspacer@acm
}
\def\@setthanks{\long\def\thanks##1{\par##1\@addpunct.}\thankses}
\def\@setauthorsaddresses{\@authorsaddresses\unskip\@addpunct.}
\RequirePackage{fancyhdr}
@ -2317,7 +2375,8 @@ Computing Machinery]
\newcount\ACM@linecount
\ACM@linecount\@ne\relax
\def\ACM@mk@linecount{%
\savebox{\ACM@linecount@bx}[4em][t]{\parbox[t]{4em}{%
\savebox{\ACM@linecount@bx}[4em][t]{\parbox[t]{4em}{\normalfont
\normalsize
\setlength{\ACM@linecount@bxht}{0pt}%
\loop{\color{red}\scriptsize\the\ACM@linecount}\\
\global\advance\ACM@linecount by \@ne
@ -2335,10 +2394,29 @@ Computing Machinery]
\fi}
\def\ACM@linecountR{%
\if@ACM@review
\ACM@mk@linecount
\begin{picture}(0,0)%
\put(20,-22){\usebox{\ACM@linecount@bx}}%
\end{picture}%
\ifcase\ACM@format@nr
\relax % manuscript
\relax
\or % acmsmall
\relax
\or % acmlarge
\relax
\or % acmtog
\ACM@mk@linecount
\or % sigconf
\ACM@mk@linecount
\or % siggraph
\ACM@mk@linecount
\or % sigplan
\ACM@mk@linecount
\or % sigchi
\ACM@mk@linecount
\or % sigchi-a
\ACM@mk@linecount
\fi
\begin{picture}(0,0)%
\put(20,-22){\usebox{\ACM@linecount@bx}}%
\end{picture}%
\fi}
\if@ACM@timestamp
% Subtracting 30 from \time gives us the effect of rounding down despite
@ -2598,6 +2676,11 @@ Computing Machinery]
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\ACM@NRadjust{\@parfont\@adddotafter}}}
\newcommand\noindentparagraph{\@startsection{paragraph}{4}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\ACM@NRadjust{\@parfont}}}
\renewcommand\part{\@startsection{part}{9}{\z@}%
{-10\p@ \@plus -4\p@ \@minus -2\p@}%
{4\p@}%
@ -2629,20 +2712,8 @@ Computing Machinery]
\or % sigplan
\def\@secfont{\bfseries\Large\section@raggedright}
\def\@subsecfont{\bfseries\section@raggedright}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{.25\baselineskip}%
{\@subsubsecfont}}
\def\@subsubsecfont{\bfseries\section@raggedright}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\@parfont\@addspaceafter}}
\def\@parfont{\bfseries\itshape}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\@subparfont\@addspaceafter}}
\def\@subparfont{\itshape}
\or % sigchi
\setcounter{secnumdepth}{1}
@ -2828,7 +2899,7 @@ Computing Machinery]
\ifx\@tempa\@empty\def\@tempa{arxiv}\fi
\def\@tempb{arxiv}%
\ifx\@tempa\@tempb
arXiv:\href{http://arxiv.org/abs/#2}{#2}\else arXiv:#2%
arXiv:\href{https://arxiv.org/abs/#2}{#2}\else arXiv:#2%
\fi}
\let\@vspace@orig=\@vspace
\let\@vspacer@orig=\@vspacer
@ -2838,6 +2909,8 @@ Computing Machinery]
\apptocmd{\@vspacer}{\ClassWarning{\@classname}{\string\vspace\space should
only be used to provide space above/below surrounding
objects}}{}{}
\let\@vspace@acm=\@vspace
\let\@vspacer@acm=\@vspacer
\let\ACM@origbaselinestretch\baselinestretch
\AtEndDocument{\ifx\baselinestretch\ACM@origbaselinestretch\else
\ClassError{\@classname}{An attempt to redefine