From d9b6f0eab2d154eea5bf31282c0f3efc5e9033a8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 20 Jun 2019 10:28:01 -0600 Subject: [PATCH] upgrade to latest acmart.cls --- scribble-lib/scribble/acmart/acmart.cls | 422 +++++++++++++++++------- 1 file changed, 300 insertions(+), 122 deletions(-) diff --git a/scribble-lib/scribble/acmart/acmart.cls b/scribble-lib/scribble/acmart/acmart.cls index eb1f7e5a..59820d82 100644 --- a/scribble-lib/scribble/acmart/acmart.cls +++ b/scribble-lib/scribble/acmart/acmart.cls @@ -37,7 +37,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{acmart} -[2018/08/12 v1.55 Typesetting articles for the Association for +[2019/04/22 v1.60 Typesetting articles for the Association for Computing Machinery] \def\@classname{acmart} \InputIfFileExists{acmart-preload-hook.tex}{% @@ -71,6 +71,14 @@ Computing Machinery] \fi}{\PackageError{\@classname}{The option screen can be either true or false}} \ExecuteOptionsX{screen=false} +\define@boolkey+{acmart.cls}[@ACM@]{urlbreakonhyphens}[true]{% + \if@ACM@urlbreakonhyphens + \PackageInfo{\@classname}{Using breaking urls on hyphens}% + \else + \PackageInfo{\@classname}{Not breaking urls on hyphens}% + \fi}{\PackageError{\@classname}{The option urlbreakonhyphens can be either true or + false}} +\ExecuteOptionsX{urlbreakonhyphens=true} \define@boolkey+{acmart.cls}[@ACM@]{acmthm}[true]{% \if@ACM@acmthm \PackageInfo{\@classname}{Requiring acmthm}% @@ -108,6 +116,10 @@ Computing Machinery] \fi}{\PackageError{\@classname}{The option nonacm can be either true or false}} \ExecuteOptionsX{nonacm=false} +\define@boolkey+{acmart.cls}[@ACM@]{balance}[true]{}{% + \PackageError{\@classname}{The option balance can be either true or + false}} +\ExecuteOptionsX{balance} \define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{% \if@ACM@natbib \PackageInfo{\@classname}{Explicitly selecting natbib mode}% @@ -153,6 +165,7 @@ Computing Machinery] \ClassInfo{\@classname}{Using format \ACM@format, number \ACM@format@nr} \newif\if@ACM@manuscript \newif\if@ACM@journal +\newif\if@ACM@journal@bibstrip \newif\if@ACM@sigchiamode \ifnum\ACM@format@nr=5\relax % siggraph \ClassWarning{\@classname}{The format siggraph is now obsolete. @@ -186,6 +199,11 @@ Computing Machinery] \@ACM@journalfalse \@ACM@sigchiamodetrue \fi +\if@ACM@journal + \@ACM@journal@bibstriptrue +\else + \@ACM@journal@bibstripfalse +\fi \ifx\ACM@fontsize\@empty \ifcase\ACM@format@nr \relax % manuscript @@ -212,6 +230,7 @@ Computing Machinery] \LoadClass[\ACM@fontsize, reqno]{amsart} \RequirePackage{microtype} \RequirePackage{etoolbox} +\RequirePackage{booktabs} \RequirePackage{refcount} \RequirePackage{totpages} \RequirePackage{environ} @@ -452,6 +471,7 @@ Computing Machinery] \let\@footnotetext@nolink\@footnotetext \RequirePackage[bookmarksnumbered,unicode]{hyperref} \pdfstringdefDisableCommands{% + \def\addtocounter#1#2{}% \def\unskip{}% \def\textbullet{- }% \def\textrightarrow{ -> }% @@ -472,16 +492,19 @@ Computing Machinery] \urlstyle{sf} \fi \AtEndPreamble{% + \if@ACM@urlbreakonhyphens + \def\do@url@hyp{\do\-}% + \fi \if@ACM@screen \hypersetup{colorlinks, - linkcolor=ACMRed, + linkcolor=ACMPurple, citecolor=ACMPurple, urlcolor=ACMDarkBlue, filecolor=ACMDarkBlue} \else \hypersetup{hidelinks} \fi - \hypersetup{pdflang={English}, + \hypersetup{pdflang={en}, pdfdisplaydoctitle}} \if@ACM@natbib \let\citeN\cite @@ -628,6 +651,22 @@ Computing Machinery] \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}} \def\@textbottom{\vskip \z@ \@plus 1pt} \let\@texttop\relax +\ifcase\ACM@format@nr +\relax % manuscript +\or % acmsmall +\or % acmlarge +\or % acmtog + \flushbottom +\or % sigconf + \flushbottom +\or % siggraph + \flushbottom +\or % sigplan + \flushbottom +\or % sigchi + \flushbottom +\or % sigchi-a +\fi \RequirePackage{iftex} \ifPDFTeX \input{glyphtounicode} @@ -656,6 +695,7 @@ Computing Machinery] \RequirePackage[T1]{fontenc} \ifxetex \RequirePackage[tt=false]{libertine} + \setmonofont{inconsolata} \else \RequirePackage[tt=false, type1=true]{libertine} \fi @@ -668,6 +708,29 @@ Computing Machinery] \if@ACM@sigchiamode \renewcommand{\familydefault}{\sfdefault} \fi +\newif\if@Description@present +\@Description@presenttrue +\newif\if@undescribed@images +\@undescribed@imagesfalse +\newcommand\Description[2][]{\global\@Description@presenttrue\ignorespaces} +\AtEndDocument{\if@undescribed@images + \ClassWarningNoLine{\@classname}{Some images may lack descriptions}\fi} +\AtBeginEnvironment{figure}{\@Description@presentfalse + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig} +\AtBeginEnvironment{figure*}{\@Description@presentfalse + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig} +\AtEndEnvironment{figure}{\if@Description@present\else + \global\@undescribed@imagestrue + \ClassWarning{\@classname}{A possible image without description}\fi} +\AtEndEnvironment{figure*}{\if@Description@present\else + \global\@undescribed@imagestrue + \ClassWarning{\@classname}{A possible image without description}\fi} +\AtBeginEnvironment{table}{\let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig} +\AtBeginEnvironment{table*}{\let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig} \RequirePackage{caption, float} \captionsetup[table]{position=top} \if@ACM@journal @@ -691,26 +754,41 @@ Computing Machinery] \or % sigchi \captionsetup[figure]{labelfont={bf, small}, textfont={bf, small}} + \captionsetup[table]{labelfont={bf, small}, + textfont={bf, small}} \or % sigchi-a \captionsetup[figure]{labelfont={bf, small}, textfont={bf, small}} + \captionsetup[table]{labelfont={bf, small}, + textfont={bf, small}} \fi \fi \newfloat{sidebar}{}{sbar} \floatname{sidebar}{Sidebar} \renewenvironment{sidebar}{\Collect@Body\@sidebar}{} -\long\def\@sidebar#1{\bgroup\captionsetup{type=sidebar}% +\long\def\@sidebar#1{\bgroup\let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig\captionsetup{type=sidebar}% \marginpar{\small#1}\egroup} \newenvironment{marginfigure}{\Collect@Body\@marginfigure}{} -\long\def\@marginfigure#1{\bgroup\captionsetup{type=figure}% - \marginpar{\centering\small#1}\egroup} +\long\def\@marginfigure#1{\bgroup + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig + \captionsetup{type=figure}% + \marginpar{\@Description@presentfalse\centering + \small#1\if@Description@present\else + \global\@undescribed@imagestrue + \ClassWarning{\@classname}{A possible image without description} + \fi}% + \egroup} \newenvironment{margintable}{\Collect@Body\@margintable}{} -\long\def\@margintable#1{\bgroup\captionsetup{type=table}% +\long\def\@margintable#1{\bgroup\let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig\captionsetup{type=table}% \marginpar{\centering\small#1}\egroup} \newdimen\fulltextwidth \fulltextwidth=\dimexpr(\textwidth+\marginparwidth+\marginparsep) \if@ACM@sigchiamode -\def\@dblfloat{\bgroup\columnwidth=\fulltextwidth +\def\@dblfloat{\bgroup\let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig\columnwidth=\fulltextwidth \let\@endfloatbox\@endwidefloatbox \def\@fpsadddefault{\def\@fps{tp}}% \@float} @@ -796,6 +874,7 @@ Computing Machinery] CIE,% CSUR,% DTRAP,% + HEALTH,% IMWUT,% JACM,% JDIQ,% @@ -814,7 +893,7 @@ Computing Machinery] TALLIP,% TAP,% TCPS,% - TDSCI,% + TDS,% TEAC,% TECS,% THRI,% @@ -863,6 +942,10 @@ Computing Machinery] \def\@journalName{Digital Threats: Research and Practice}% \def\@journalNameShort{Digit. Threat. Res. Pract.}% \def\@permissionCodeOne{2576-5337}% +\or % HEALTH + \def\@journalName{ACM Transactions on Computing for Healthcare}% + \def\@journalNameShort{ACM Trans. Comput. Healthcare}% + \def\@permissionCodeOne{2637-8051}% \or % IMWUT \def\@journalName{Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies}% @@ -940,7 +1023,7 @@ Computing Machinery] \def\@journalName{ACM Transactions on Applied Perception}% \or % TCPS \def\@journalName{ACM Transactions on Cyber-Physical Systems}% -\or % TDSCI +\or % TDS \def\@journalName{ACM Transactions on Data Science}% \def\@journalNameShort{ACM Trans. Data Sci.}% \def\@permissionCodeOne{2577-3224}% @@ -1082,7 +1165,8 @@ Computing Machinery] }{% \ClassError{\@classname}{Incorrect journal #1}% }% -\def\acmJournal#1{\setkeys{ACM}{acmJournal=#1}} +\def\acmJournal#1{\setkeys{ACM}{acmJournal=#1}% + \global\@ACM@journal@bibstriptrue} \def\@journalCode@nr{0} \def\@journalName{}% \def\@journalNameShort{\@journalName}% @@ -1095,9 +1179,13 @@ Computing Machinery] \gdef\acmConference@venue{#4}% \ifx\acmConference@shortname\@empty \gdef\acmConference@shortname{#2}% - \fi} + \fi + \global\@ACM@journal@bibstripfalse +} +\if@ACM@journal\else \acmConference[Conference'17]{ACM Conference}{July 2017}{Washington, - DC, USA} + DC, USA}% +\fi \def\acmBooktitle#1{\gdef\@acmBooktitle{#1}} \acmBooktitle{Proceedings of \acmConference@name \ifx\acmConference@name\acmConference@shortname\else @@ -1119,6 +1207,8 @@ Computing Machinery] \newif\if@insideauthorgroup \@insideauthorgroupfalse \renewcommand\author[2][]{% + \IfSubStr{#2}{,}{\ClassWarning{\@classname}{Do not put several + authors in the same \string\author\space macro!}}{}% \global\advance\num@authors by 1\relax \if@insideauthorgroup\else \global\advance\num@authorgroups by 1\relax @@ -1182,6 +1272,8 @@ Computing Machinery] \let\country\position Also with #1\unskip.\egroup} \renewcommand{\email}[2][]{% + \IfSubStr{#2}{,}{\ClassWarning{\@classname}{Do not put several + addresses in the same \string\email\space macro!}}{}% \if@ACM@anonymous\else \g@addto@macro\addresses{\email{#1}{#2}}% \fi} @@ -1327,10 +1419,12 @@ Computing Machinery] \RequirePackage{comment} \excludecomment{CCSXML} \let\@concepts\@empty +\newcounter{@concepts} \newcommand\ccsdesc[2][100]{% \ccsdesc@parse#1~#2~~\ccsdesc@parse@end} \RequirePackage{textcomp} \def\ccsdesc@parse#1~#2~#3~{% + \stepcounter{@concepts}% \expandafter\ifx\csname CCS@General@#2\endcsname\relax \expandafter\gdef\csname CCS@General@#2\endcsname{\textbullet\ \textbf{#2}}% @@ -1344,9 +1438,10 @@ Computing Machinery] \expandafter\gdef\csname CCS@Punctuation@#2\endcsname{ \textrightarrow\ }% \expandafter\g@addto@macro\expandafter{\csname CCS@Specific@#2\endcsname}{% - \ifnum#1>499\textbf{#3}; \else - \ifnum#1>299\textit{#3}; \else - #3; \fi\fi}% + \addtocounter{@concepts}{-1}% + \ifnum#1>499\textbf{#3}\else + \ifnum#1>299\textit{#3}\else + #3\fi\fi\ifnum\value{@concepts}=0.\else; \fi}% \fi \ccsdesc@parse@finish} \def\ccsdesc@parse@finish#1\ccsdesc@parse@end{} @@ -1591,12 +1686,11 @@ Computing Machinery] \ifnum\num@authorgroups=0\author{}\fi \fi \begingroup + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig \let\@footnotemark\@footnotemark@nolink \let\@footnotetext\@footnotetext@nolink \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \global\@topnum\z@ % this prevents floats from falling - % at the top of page 1 - \global\@botnum\z@ % we do not want them to be on the bottom either \hsize=\textwidth \def\@makefnmark{\hbox{\@textsuperscript{\@thefnmark}}}% \@mktitle\if@ACM@sigchiamode\else\@mkauthors\fi\@mkteasers @@ -1616,7 +1710,7 @@ Computing Machinery] \fi \ifx\@empty\@authorsaddresses\else \if@ACM@anonymous\else - \if@ACM@journal + \if@ACM@journal@bibstrip \footnotetextauthorsaddresses{% \def\par{\let\par\@par}\parindent\z@\@setauthorsaddresses}% \fi @@ -1633,7 +1727,7 @@ Computing Machinery] \if@printpermission\@copyrightpermission\par\fi \fi \if@ACM@manuscript\else - \if@ACM@journal\else % Print the conference information + \if@ACM@journal@bibstrip\else % Print the conference information {\itshape \acmConference@shortname, \acmConference@date, \acmConference@venue}\par \fi \fi @@ -1649,7 +1743,7 @@ Computing Machinery] This is the author's version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in - \if@ACM@journal + \if@ACM@journal@bibstrip \emph{\@journalName}% \else \emph{\@acmBooktitle}% @@ -1661,7 +1755,7 @@ Computing Machinery] \fi\\ \else \if@ACM@nonacm\else - \if@ACM@journal + \if@ACM@journal@bibstrip \@permissionCodeOne/\@acmYear/\@acmMonth-ART\@acmArticle \ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\ \@formatdoi{\@acmDOI}% @@ -1678,7 +1772,7 @@ Computing Machinery] \setcounter{footnote}{0}% \@mkabstract \if@ACM@printccs - \ifx\@concepts\@empty\else\bgroup + \ifx\@concepts\@empty\else\bgroup {\@specialsection{CCS Concepts}% \@concepts\par}\egroup \fi @@ -1707,6 +1801,9 @@ Computing Machinery] \csname ver@acmart.cls\endcsname\space and hyperref \csname ver@hyperref.sty\endcsname}}% + \global\@topnum\z@ % this prevents floats from falling + % at the top of page 1 + \global\@botnum\z@ % we do not want them to be on the bottom either \@printendtopmatter \@afterindentfalse \@afterheading @@ -1731,7 +1828,7 @@ Computing Machinery] \section*{#1}% \or % sigchi-a \section*{#1}% - \fi} + \fi} \def\@printtopmatter{% \ifx\@startPage\@empty \gdef\@startPage{1}% @@ -2056,9 +2153,11 @@ Computing Machinery] \fi \gdef\and{}}% \def\email##1##2{\ifx\@currentaffiliation\@empty - \gdef\@currentaffiliation{\nolinkurl{##2}}% + \gdef\@currentaffiliation{\bgroup + \mathchardef\UrlBreakPenalty=10000\nolinkurl{##2}\egroup}% \else - \g@addto@macro\@currentaffiliation{\par\nolinkurl{##2}}% + \g@addto@macro\@currentaffiliation{\par\bgroup + \mathchardef\UrlBreakPenalty=10000\nolinkurl{##2}\egroup}% \fi}% \def\affiliation##1##2{\ifx\@currentaffiliation\@empty \gdef\@currentaffiliation{% @@ -2144,7 +2243,12 @@ Computing Machinery] \def\@teaser##1{\par\bigskip\bgroup \captionsetup{type=figure}##1\egroup\par} \global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par - \noindent\@teaserfigures\par\medskip}% + \noindent\@Description@presentfalse + \@teaserfigures\par\if@Description@present\else + \global\@undescribed@imagestrue + \ClassWarning{\@classname}{A possible image without + description}\fi + \medskip}% \fi} \def\@mkabstract{\bgroup \ifx\@abstract\@lempty\else @@ -2152,11 +2256,13 @@ Computing Machinery] \if@ACM@journal \everypar{\setbox\z@\lastbox\everypar{}}\small \else - \section*{Abstract}% + \section*{\abstractname}% \fi \ignorespaces\@abstract\par}% \fi\egroup} \def\@mkbibcitation{\bgroup + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig \def\@pages@word{\ifnum\getrefnumber{TotPages}=1\relax page\else pages\fi}% \def\footnotemark{}% \def\\{\unskip{} \ignorespaces}% @@ -2174,7 +2280,7 @@ Computing Machinery] % and the present \@mkbibcitation definition is never used % in this case. The conditional remains useful if the user % explicitly sets \settopmatter{printacmref=true}. - \if@ACM@journal + \if@ACM@journal@bibstrip \textit{\@journalNameShort} \@acmVolume, \@acmNumber \@article@string (\@acmPubDate), \ref{TotPages}~\@pages@word. @@ -2189,10 +2295,22 @@ Computing Machinery] \fi \ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi \par\egroup} -\def\@printendtopmatter{\par\bigskip} +\def\@printendtopmatter{\bgroup + \let\@vspace\@vspace@orig + \let\@vspacer\@vspacer@orig + \par\bigskip + \egroup} \def\@setthanks{\long\def\thanks##1{\par##1\@addpunct.}\thankses} \def\@setauthorsaddresses{\@authorsaddresses\unskip\@addpunct.} \RequirePackage{fancyhdr} +\let\ACM@ps@plain\ps@plain +\let\ACM@ps@myheadings\ps@myheadings +\let\ACM@ps@headings\ps@headings +\def\ACM@restore@pagestyle{% + \let\ps@plain\ACM@ps@plain + \let\ps@myheadings\ACM@ps@myheadings + \let\ps@headings\ACM@ps@headings} +\AtBeginDocument{\ACM@restore@pagestyle} \if@ACM@review \newsavebox{\ACM@linecount@bx} \newlength\ACM@linecount@bxht @@ -2244,7 +2362,8 @@ Computing Machinery] Anon. \ifx\@acmSubmissionID\@empty\else Submission Id: \@acmSubmissionID\fi \else\shortauthors\fi} -\def\@headfootfont{\sffamily} +\def\@headfootfont{\sffamily\footnotesize} +\AtBeginDocument{% \fancypagestyle{standardpagestyle}{% \fancyhf{}% \renewcommand{\headrulewidth}{\z@}% @@ -2255,56 +2374,72 @@ Computing Machinery] \else% \@acmArticle\if@ACM@printfolios:\thepage\fi% \fi% - } - \ifcase\ACM@format@nr - \relax % manuscript - \fancyhead[LE]{\ACM@linecountL\if@ACM@printfolios\thepage\fi}% - \fancyhead[RO]{\if@ACM@printfolios\thepage\fi}% - \fancyhead[RE]{\@shortauthors}% - \fancyhead[LO]{\ACM@linecountL\shorttitle}% - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize Manuscript submitted to ACM} - \fi% - \or % acmsmall - \fancyhead[LE]{\ACM@linecountL\@headfootfont\@acmArticlePage}% - \fancyhead[RO]{\@headfootfont\@acmArticlePage}% - \fancyhead[RE]{\@headfootfont\@shortauthors}% - \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% - \fi% - \or % acmlarge - \fancyhead[LE]{\ACM@linecountL\@headfootfont + }% + \if@ACM@journal@bibstrip + \ifcase\ACM@format@nr + \relax % manuscript + \fancyhead[LE]{\ACM@linecountL\if@ACM@printfolios\thepage\fi}% + \fancyhead[RO]{\if@ACM@printfolios\thepage\fi}% + \fancyhead[RE]{\@shortauthors}% + \fancyhead[LO]{\ACM@linecountL\shorttitle}% + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize Manuscript submitted to ACM} + \fi% + \or % acmsmall + \fancyhead[LE]{\ACM@linecountL\@headfootfont\@acmArticlePage}% + \fancyhead[RO]{\@headfootfont\@acmArticlePage}% + \fancyhead[RE]{\@headfootfont\@shortauthors}% + \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% + \fi + \or % acmlarge + \fancyhead[LE]{\ACM@linecountL\@headfootfont \@acmArticlePage\quad\textbullet\quad\@shortauthors}% - \fancyhead[LO]{\ACM@linecountL}% - \fancyhead[RO]{\@headfootfont - \shorttitle\quad\textbullet\quad\@acmArticlePage}% - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% - \fi% - \or % acmtog - \fancyhead[LE]{\ACM@linecountL\@headfootfont - \@acmArticlePage\quad\textbullet\quad\@shortauthors}% - \fancyhead[LO]{\ACM@linecountL}% - \fancyhead[RE]{\ACM@linecountR}% - \fancyhead[RO]{\@headfootfont - \shorttitle\quad\textbullet\quad\@acmArticlePage\ACM@linecountR}% - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% - \fi% + \fancyhead[LO]{\ACM@linecountL}% + \fancyhead[RO]{\@headfootfont + \shorttitle\quad\textbullet\quad\@acmArticlePage}% + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% + \fi + \or % acmtog + \fancyhead[LE]{\ACM@linecountL\@headfootfont + \@acmArticlePage\quad\textbullet\quad\@shortauthors}% + \fancyhead[LO]{\ACM@linecountL}% + \fancyhead[RE]{\ACM@linecountR}% + \fancyhead[RO]{\@headfootfont + \shorttitle\quad\textbullet\quad\@acmArticlePage\ACM@linecountR}% + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% + \fi + \else % Proceedings + \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% + \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% + \fancyhead[RE]{\@headfootfont\@shortauthors\ACM@linecountR}% + \if@ACM@nonacm\else% + \fancyhead[LE]{\ACM@linecountL\@headfootfont\footnotesize + \acmConference@shortname, + \acmConference@date, \acmConference@venue}% + \fancyhead[RO]{\@headfootfont + \acmConference@shortname, + \acmConference@date, \acmConference@venue\ACM@linecountR}% + \fi + \fi \else % Proceedings \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% \fancyhead[RE]{\@headfootfont\@shortauthors\ACM@linecountR}% \if@ACM@nonacm\else% - \fancyhead[LE]{\ACM@linecountL\@headfootfont\acmConference@shortname, + \fancyhead[LE]{\ACM@linecountL\@headfootfont + \acmConference@shortname, \acmConference@date, \acmConference@venue}% - \fancyhead[RO]{\@headfootfont\acmConference@shortname, + \fancyhead[RO]{\@headfootfont + \acmConference@shortname, \acmConference@date, \acmConference@venue\ACM@linecountR}% - \fi% + \fi \fi \if@ACM@sigchiamode \fancyheadoffset[L]{\dimexpr(\marginparsep+\marginparwidth)}% @@ -2312,8 +2447,9 @@ Computing Machinery] \if@ACM@timestamp \fancyfoot[LO,RE]{\ACM@timestamp} \fi -} +}% \pagestyle{standardpagestyle} +} \newdimen\@folio@wd \@folio@wd=\z@ \newdimen\@folio@ht @@ -2354,46 +2490,53 @@ Computing Machinery] \textcolor{white}{\LARGE\sffamily\bfseries\@acmArticle}}}} \end{picture}\fi} +\AtBeginDocument{% \fancypagestyle{firstpagestyle}{% \fancyhf{}% \renewcommand{\headrulewidth}{\z@}% \renewcommand{\footrulewidth}{\z@}% - \ifcase\ACM@format@nr - \relax % manuscript - \fancyhead[L]{\ACM@linecountL}% - \fancyfoot[RO,LE]{\if@ACM@printfolios\small\thepage\fi}% - \if@ACM@nonacm\else% - \fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}% - \fi% - \or % acmsmall - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: - \@acmPubDate.}% - \fi% - \fancyhead[LE]{\ACM@linecountL\@folioblob}% - \fancyhead[LO]{\ACM@linecountL}% - \fancyhead[RO]{\@folioblob}% - \fancyheadoffset[RO,LE]{0.6\@folio@wd}% - \or % acmlarge - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: - \@acmPubDate.}% - \fi% - \fancyhead[RO]{\@folioblob}% - \fancyhead[LE]{\ACM@linecountL\@folioblob}% - \fancyhead[LO]{\ACM@linecountL}% - \fancyheadoffset[RO,LE]{1.4\@folio@wd}% - \or % acmtog - \if@ACM@nonacm\else% - \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. - \@acmNumber, Article \@acmArticle. Publication date: - \@acmPubDate.}% - \fi% - \fancyhead[L]{\ACM@linecountL}% - \fancyhead[R]{\ACM@linecountR}% - \else % Conference proceedings + \if@ACM@journal@bibstrip + \ifcase\ACM@format@nr + \relax % manuscript + \fancyhead[L]{\ACM@linecountL}% + \fancyfoot[RO,LE]{\if@ACM@printfolios\small\thepage\fi}% + \if@ACM@nonacm\else% + \fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}% + \fi% + \or % acmsmall + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: + \@acmPubDate.}% + \fi% + \fancyhead[LE]{\ACM@linecountL\@folioblob}% + \fancyhead[LO]{\ACM@linecountL}% + \fancyhead[RO]{\@folioblob}% + \fancyheadoffset[RO,LE]{0.6\@folio@wd}% + \or % acmlarge + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: + \@acmPubDate.}% + \fi% + \fancyhead[RO]{\@folioblob}% + \fancyhead[LE]{\ACM@linecountL\@folioblob}% + \fancyhead[LO]{\ACM@linecountL}% + \fancyheadoffset[RO,LE]{1.4\@folio@wd}% + \or % acmtog + \if@ACM@nonacm\else% + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. + \@acmNumber, Article \@acmArticle. Publication date: + \@acmPubDate.}% + \fi% + \fancyhead[L]{\ACM@linecountL}% + \fancyhead[R]{\ACM@linecountR}% + \else % Conference proceedings + \fancyhead[L]{\ACM@linecountL}% + \fancyhead[R]{\ACM@linecountR}% + \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% + \fi + \else \fancyhead[L]{\ACM@linecountL}% \fancyhead[R]{\ACM@linecountR}% \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% @@ -2408,15 +2551,7 @@ Computing Machinery] \fancyfoot[LO,RE]{\ACM@timestamp} \fi \fi -} -\let\ACM@ps@plain\ps@plain -\let\ACM@ps@myheadings\ps@myheadings -\let\ACM@ps@headings\ps@headings -\def\ACM@restore@pagestyle{% - \let\ps@plain\ACM@ps@plain - \let\ps@myheadings\ACM@ps@myheadings - \let\ps@headings\ACM@ps@headings} -\AtBeginDocument{\ACM@restore@pagestyle} +}} \def\ACM@NRadjust#1{% \begingroup \expandafter\ifx\csname Sectionformat\endcsname\relax @@ -2634,10 +2769,40 @@ Computing Machinery] }{% \popQED\endtrivlist\@endpefalse } +\AtEndPreamble{% + \if@ACM@balance + \ifcase\ACM@format@nr + \relax % manuscript + \global\@ACM@balancefalse + \or % acmsmall + \global\@ACM@balancefalse + \or % acmlarge + \global\@ACM@balancefalse + \or % acmtog + \RequirePackage{balance}% + \or % sigconf + \RequirePackage{balance}% + \or % siggraph + \RequirePackage{balance}% + \or % sigplan + \RequirePackage{balance}% + \or % sigchi + \RequirePackage{balance}% + \or % sigchi-a + \global\@ACM@balancefalse + \fi + \fi +} +\AtEndDocument{% + \if@ACM@balance + \if@twocolumn + \balance + \fi\fi} +\newcommand\acksname{Acknowledgments} \specialcomment{acks}{% \begingroup - \section*{Acknowledgments} - \phantomsection\addcontentsline{toc}{section}{Acknowledgments} + \section*{\acksname} + \phantomsection\addcontentsline{toc}{section}{\acksname} }{% \endgroup } @@ -2665,6 +2830,19 @@ Computing Machinery] \ifx\@tempa\@tempb arXiv:\href{http://arxiv.org/abs/#2}{#2}\else arXiv:#2% \fi} +\let\@vspace@orig=\@vspace +\let\@vspacer@orig=\@vspacer +\apptocmd{\@vspace}{\ClassWarning{\@classname}{\string\vspace\space should + only be used to provide space above/below surrounding + objects}}{}{} +\apptocmd{\@vspacer}{\ClassWarning{\@classname}{\string\vspace\space should + only be used to provide space above/below surrounding + objects}}{}{} +\let\ACM@origbaselinestretch\baselinestretch +\AtEndDocument{\ifx\baselinestretch\ACM@origbaselinestretch\else + \ClassError{\@classname}{An attempt to redefine + \string\baselinestretch\space detected. Please do not do this for + ACM submissions!}\fi} \normalsize\normalfont\frenchspacing \endinput %%