summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-17 21:17:06 +0000
committerKarl Berry <karl@freefriends.org>2018-07-17 21:17:06 +0000
commit7bc9aae28b9ca51b001a7a2b2241797a2201c560 (patch)
tree253374bff05ecd11aef070750740b0f865d994de /Master/texmf-dist/source
parent4511ffaeee5e1c7abe1520ad9797f24933cb8fcb (diff)
acmart (17jul18)
git-svn-id: svn://tug.org/texlive/trunk@48214 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/acmart/acmart.dtx431
1 files changed, 301 insertions, 130 deletions
diff --git a/Master/texmf-dist/source/latex/acmart/acmart.dtx b/Master/texmf-dist/source/latex/acmart/acmart.dtx
index de4661b94dd..f553598dd0e 100644
--- a/Master/texmf-dist/source/latex/acmart/acmart.dtx
+++ b/Master/texmf-dist/source/latex/acmart/acmart.dtx
@@ -123,6 +123,7 @@
% Craig Rodkin,
% Bernard Rous,
% David Shamma,
+% Gabriel Scherer,
% Stephen Spencer,
% Daniel Thomas,
% Zack Weinberg,
@@ -360,6 +361,9 @@
% authorversion & false & Whether to generate a special
% version for the authors' personal use or posting (see
% Section~\ref{sec:ug_topmatter})\\
+% nonacm & false & Use the class typesetting options for
+% a non-ACM document, which will not include the conference/journal
+% header and footers or permission statements\\
% timestamp & false & Whether to put a time stamp in the
% footer of each page\\
% authordraft & false & Whether author's-draft mode is enabled\\
@@ -1459,7 +1463,26 @@
% }
% \end{verbatim}
%
-%
+% A note about sorting. The current ACM bibliography styles always
+% sort the entries according to authors names and publication year.
+% There is a controversy about sorting names with ``von'' or ``van''
+% part: should Ludwig van Beethoven be sorted under ``V'' or under
+% ``B''? The American practice is to use ``van'' in sorting, i.e. to
+% file van Beethoven under ``V''. However, some authorities recommend
+% to sort Dutch persons according to their last names (see
+% e.g. \url{https://www.ifla.org/files/assets/cataloguing/pubs/names-of-persons_1996.pdf}).
+% While I do not want to take a part in this dispute, I would like to
+% point to the old ``noopsort'' trick by Oren Patashnik. Add to the
+% \texttt{.bib} file the line
+% \begin{verbatim}
+% @PREAMBLE{"\providecommand{\noopsort}[1]{}"}
+% \end{verbatim}
+% and then encode the author as
+% \begin{verbatim}
+% author = {Ludwig {\noopsort{Beethoven}}van Beethoven},
+% \end{verbatim}
+% This will make the author to be sorted as ``Beethoven'' rather than
+% ``van Beethoven''.
%
%\subsection{Colors}
%\label{sec:ug_colors}
@@ -1690,7 +1713,7 @@
\ProvidesFile{acmart.dtx}
%</gobble>
%<class>\ProvidesClass{acmart}
-[2018/04/14 v1.53 Typesetting articles for the Association for
+[2018/07/16 v1.54 Typesetting articles for the Association for
Computing Machinery]
% \end{macrocode}
%
@@ -1772,6 +1795,8 @@ Computing Machinery]
% \changes{1.49}{2018/01/24}{New journal: DTRAP}
% \changes{1.53}{2018/04/14}{New journals: PACMCGIT, TIOT, TDSCI}
% \changes{1.53}{2018/04/14}{Rearranged docs}
+% \changes{1.54}{2018/06/17}{Moved footnote stuff before hyperref call
+% (Ross Moore)}
%
% And the driver code:
% \begin{macrocode}
@@ -1913,6 +1938,26 @@ Computing Machinery]
%
% \end{macro}
%
+% \begin{macro}{\if@ACM@nonacm}
+% \changes{v1.54}{2018/05/08}{Added macro}
+% Special option for non-ACM publications
+% using the ACM typesetting options.
+% \begin{macrocode}
+\define@boolkey+{acmart.cls}[@ACM@]{nonacm}[true]{%
+ \if@ACM@nonacm
+ \PackageInfo{\@classname}{Using nonacm mode}%
+ \AtBeginDocument{\@ACM@printacmreffalse}%
+ % in 'nonacm' mode we disable the "ACM Reference Format"
+ % printing by default, but this can be re-enabled by the
+ % user using \settopmatter{printacmref=true}
+ \else
+ \PackageInfo{\@classname}{Not using nonacm mode}%
+ \fi}{\PackageError{\@classname}{The option nonacm can be either true or
+ false}}
+\ExecuteOptionsX{nonacm=false}
+% \end{macrocode}
+%
+% \end{macro}
%
% \begin{macro}{\if@ACM@natbib@override}
% \changes{v1.12}{2016/05/30}{Added macro}
@@ -2433,7 +2478,67 @@ Computing Machinery]
%
% \end{macro}
%
-% And |hyperref|
+% We need to define foonote-related stuff before the call to hyperref
+% (Ross Moore)
+% \begin{macro}{\@makefntext}
+% We do not use indentation for footnotes
+% \begin{macrocode}
+\def\@makefntext{\noindent\@makefnmark}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\@footnotetext}
+% In |sigchi-a| mode our footnotes are in the margin!
+% \begin{macrocode}
+\if@ACM@sigchiamode
+\long\def\@footnotetext#1{\marginpar{%
+ \reset@font\small
+ \interlinepenalty\interfootnotelinepenalty
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+\fi
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\@mpfootnotetext}
+% \changes{v1.13}{2016/06/06}{Made minipage footnotes centered}
+% We want the footnotes in minipages centered:
+% \begin{macrocode}
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup\centering
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% \changes{v1.17}{2016/067/09}{Redefined}
+% AMS classes use a buggy definition of \cs{makefnmark}. We revert
+% to the standard one.
+% \begin{macrocode}
+\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+% And now, |hyperref|
% \changes{v1.28}{2017/01/07}{Got rid of warnings in pdf keywords}
% \changes{v1.46}{2017/08/25}{Delayed hypersetup since journal options
% may change screen mode}
@@ -2470,7 +2575,9 @@ Computing Machinery]
filecolor=ACMDarkBlue}
\else
\hypersetup{hidelinks}
- \fi}
+ \fi
+ \hypersetup{pdflang={English},
+ pdfdisplaydoctitle}}
% \end{macrocode}
%
% Bibliography mangling.
@@ -2721,63 +2828,6 @@ Computing Machinery]
%
% \end{macro}
%
-% \begin{macro}{\@makefntext}
-% We do not use indentation for footnotes
-% \begin{macrocode}
-\def\@makefntext{\noindent\@makefnmark}
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \begin{macro}{\@footnotetext}
-% In |sigchi-a| mode our footnotes are in the margin!
-% \begin{macrocode}
-\if@ACM@sigchiamode
-\long\def\@footnotetext#1{\marginpar{%
- \reset@font\small
- \interlinepenalty\interfootnotelinepenalty
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
- \color@endgroup}}%
-\fi
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \begin{macro}{\@mpfootnotetext}
-% \changes{v1.13}{2016/06/06}{Made minipage footnotes centered}
-% We want the footnotes in minipages centered:
-% \begin{macrocode}
-\long\def\@mpfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup\centering
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
- \color@endgroup}}
-% \end{macrocode}
-%
-% \end{macro}
-%
-% \begin{macro}{\@makefnmark}
-% \changes{v1.17}{2016/067/09}{Redefined}
-% AMS classes use a buggy definition of \cs{makefnmark}. We revert
-% to the standard one.
-% \begin{macrocode}
-\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
-% \end{macrocode}
-%
-% \end{macro}
-%
%
% \begin{macro}{\@textbottom}
% \changes{v1.31}{2017/03/04}{Redefined}
@@ -2809,9 +2859,9 @@ Computing Machinery]
\pdfglyphtounicode{f_f_i}{FB03}
\pdfglyphtounicode{f_f_l}{FB04}
\pdfglyphtounicode{f_i}{FB01}
-\pdfglyphtounicode{t_t}{00740074}
-\pdfglyphtounicode{f_t}{00660074}
-\pdfglyphtounicode{T_h}{00540068}
+\pdfglyphtounicode{t_t}{0074 0074}
+\pdfglyphtounicode{f_t}{0066 0074}
+\pdfglyphtounicode{T_h}{0054 0068}
\pdfgentounicode=1
\fi
\RequirePackage{cmap}
@@ -2841,10 +2891,13 @@ Computing Machinery]
% problems with \cs{l} in OT1}%
% \changes{v1.33}{2017/03/12}{Switched to Type~1 fonts for libertine
% even if OTF-capable engine is used (Kai Mindermann)}
-% \changes{v1.51}{2018/04/05}{XeTeX now uses OTF fonts (Joachim Breitner)}
+% \changes{v1.51}{2018/04/05}{XeTeX now uses OTF fonts (Joachim
+% Breitner)}
+% \changes{v1.54}{2018/07/16}{XeTeX now uses T1 encoding}
% We use Libertine throughout.
% \begin{macrocode}
\if@ACM@newfonts
+ \RequirePackage[T1]{fontenc}
\ifxetex
\RequirePackage[tt=false]{libertine}
\else
@@ -2852,9 +2905,6 @@ Computing Machinery]
\fi
\RequirePackage[varqu]{zi4}
\RequirePackage[libertine]{newtxmath}
-\ifxetex\else
- \RequirePackage[T1]{fontenc}
-\fi
\fi
% \end{macrocode}
%
@@ -3563,6 +3613,7 @@ Computing Machinery]
% \begin{macro}{\author}
% \changes{v1.15}{2016/06/25}{Added code for author groups}
% \changes{v1.46}{2017/08/27}{Started counting authors}
+% \changes{v1.54}{2018/06/23}{Added submission id in anonymous mode}
% Adding an author to the list of authors and addresses
% \begin{macrocode}
\renewcommand\author[2][]{%
@@ -3573,7 +3624,9 @@ Computing Machinery]
\fi
\ifx\addresses\@empty
\if@ACM@anonymous
- \gdef\addresses{\@author{Anonymous Author(s)}}%
+ \gdef\addresses{\@author{Anonymous Author(s)%
+ \ifx\@acmSubmissionID\@empty\else\\Submission Id:
+ \@acmSubmissionID\fi}}%
\gdef\authors{Anonymous Author(s)}%
\else
\gdef\addresses{\@author{#2}}%
@@ -3587,7 +3640,9 @@ Computing Machinery]
\fi
\if@ACM@anonymous
\ifx\shortauthors\@empty
- \gdef\shortauthors{Anon.}%
+ \gdef\shortauthors{Anon.
+ \ifx\@acmSubmissionID\@empty\else Submission Id:
+ \@acmSubmissionID\fi}%
\fi
\else
\def\@tempa{#1}%
@@ -4638,7 +4693,7 @@ Computing Machinery]
\fi
\fi
\fi
- \footnotetextcopyrightpermission{%
+ \if@ACM@nonacm\else\footnotetextcopyrightpermission{%
\if@ACM@authordraft
\raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries
Unpublished working draft. Not for distribution.}}%
@@ -4656,7 +4711,7 @@ Computing Machinery]
\if@printcopyright
\copyright\ \@copyrightyear\ \@copyrightowner\\
\else
- \@copyrightyear.\
+ \@copyrightyear.\
\fi
\if@ACM@manuscript
Manuscript submitted to ACM\\
@@ -4676,17 +4731,20 @@ Computing Machinery]
, \@formatdoi{\@acmDOI}.
\fi\\
\else
- \if@ACM@journal
- \@permissionCodeOne/\@acmYear/\@acmMonth-ART\@acmArticle
- \ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\
- \@formatdoi{\@acmDOI}%
- \else % Conference
- \ifx\@acmISBN\@empty\else ACM~ISBN~\@acmISBN
- \ifx\@acmPrice\@empty.\else\dots\$\@acmPrice\fi\\\fi
- \ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi%
+ \if@ACM@nonacm\else
+ \if@ACM@journal
+ \@permissionCodeOne/\@acmYear/\@acmMonth-ART\@acmArticle
+ \ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\
+ \@formatdoi{\@acmDOI}%
+ \else % Conference
+ \ifx\@acmISBN\@empty\else ACM~ISBN~\@acmISBN
+ \ifx\@acmPrice\@empty.\else\dots\$\@acmPrice\fi\\\fi
+ \ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi%
+ \fi
\fi
\fi
\fi}
+ \fi
\endgroup
\setcounter{footnote}{0}%
\@mkabstract
@@ -4712,8 +4770,6 @@ Computing Machinery]
\@mkbibcitation
\fi
\hypersetup{%
- pdflang={English},
- pdfdisplaydoctitle,
pdfauthor={\authors},
pdftitle={\@title},
pdfsubject={\@concepts},
@@ -5517,13 +5573,14 @@ Computing Machinery]
% \changes{v1.44}{2017/07/30}{If the paper has just one page, use
% `page' instead of `pages'}
% \changes{v1.46}{2017/08/25}{Added subtitle}
+% \changes{v1.54}{2018/06/10}{Bug corrected (Ross Moore)}
% Print the |bibcitation| format
% \begin{macrocode}
\def\@mkbibcitation{\bgroup
\def\@pages@word{\ifnum\getrefnumber{TotPages}=1\relax page\else pages\fi}%
\def\footnotemark{}%
- \def\\{\unskip{} \ignorespaces}%
- \def\footnote{\ClassError{\@classname}{Please do note use footnotes
+ \def\\{\unskip{}, \ignorespaces}%
+ \def\footnote{\ClassError{\@classname}{Please do not use footnotes
inside a \string\title{} or \string\author{} command! Use
\string\titlenote{} or \string\authornote{} instead!}}%
\def\@article@string{\ifx\@acmArticle\@empty{\ }\else,
@@ -5531,17 +5588,23 @@ Computing Machinery]
\par\medskip\small\noindent{\bfseries ACM Reference Format:}\par\nobreak
\noindent\authors. \@acmYear. \@title
\ifx\@subtitle\@empty. \else: \@subtitle. \fi
- \if@ACM@journal
- \textit{\@journalNameShort}
- \@acmVolume, \@acmNumber \@article@string (\@acmPubDate),
- \ref{TotPages}~\@pages@word.
- \else
- In \textit{\@acmBooktitle}%
- \ifx\@acmEditors\@empty\textit{.}\else
- \andify\@acmEditors\textit{, }\@acmEditors~\@editorsAbbrev.%
- \fi\
- ACM, New York, NY, USA%
- \@article@string\unskip, \ref{TotPages}~\@pages@word.
+ \if@ACM@nonacm\else
+ % The 'nonacm' option disables 'printacmref' by default,
+ % 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
+ \textit{\@journalNameShort}
+ \@acmVolume, \@acmNumber \@article@string (\@acmPubDate),
+ \ref{TotPages}~\@pages@word.
+ \else
+ In \textit{\@acmBooktitle}%
+ \ifx\@acmEditors\@empty\textit{.}\else
+ \andify\@acmEditors\textit{, }\@acmEditors~\@editorsAbbrev.%
+ \fi\
+ ACM, New York, NY, USA%
+ \@article@string\unskip, \ref{TotPages}~\@pages@word.
+ \fi
\fi
\ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi
\par\egroup}
@@ -5672,10 +5735,15 @@ Computing Machinery]
%
% \begin{macro}{\@shortauthors}
% \changes{v1.15}{2016/07/04}{Introduced macro}
+% \changes{v1.54}{2016/06/23}{Added submission id in anonymous mode}
% Even if the author redefined \cs{shortauthors}, we do not print
% it in the headers when in anonymous mode:
% \begin{macrocode}
-\def\@shortauthors{\if@ACM@anonymous Anon.\else\shortauthors\fi}
+\def\@shortauthors{%
+ \if@ACM@anonymous
+ Anon.
+ \ifx\@acmSubmissionID\@empty\else Submission Id: \@acmSubmissionID\fi
+ \else\shortauthors\fi}
% \end{macrocode}
%
% \end{macro}
@@ -5709,45 +5777,62 @@ Computing Machinery]
\fancyhf{}%
\renewcommand{\headrulewidth}{\z@}%
\renewcommand{\footrulewidth}{\z@}%
+ \def\@acmArticlePage{%
+ \ifx\@acmArticle\empty%
+ \if@ACM@printfolios\thepage\fi%
+ \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}%
- \fancyfoot[RO,LE]{\footnotesize Manuscript submitted to ACM}%
+ \if@ACM@nonacm\else%
+ \fancyfoot[RO,LE]{\footnotesize Manuscript submitted to ACM}
+ \fi%
\or % acmsmall
- \fancyhead[LE]{\ACM@linecountL\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}%
- \fancyhead[RO]{\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}%
+ \fancyhead[LE]{\ACM@linecountL\@headfootfont\@acmArticlePage}%
+ \fancyhead[RO]{\@headfootfont\@acmArticlePage}%
\fancyhead[RE]{\@headfootfont\@shortauthors}%
\fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}%
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
+ \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
- \@acmArticle\if@ACM@printfolios:\thepage\fi\quad\textbullet\quad\@shortauthors}%
+ \@acmArticlePage\quad\textbullet\quad\@shortauthors}%
\fancyhead[LO]{\ACM@linecountL}%
\fancyhead[RO]{\@headfootfont
- \shorttitle\quad\textbullet\quad\@acmArticle\if@ACM@printfolios:\thepage\fi}%
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
+ \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
- \@acmArticle\if@ACM@printfolios:\thepage\fi\quad\textbullet\quad\@shortauthors}%
+ \@acmArticlePage\quad\textbullet\quad\@shortauthors}%
\fancyhead[LO]{\ACM@linecountL}%
\fancyhead[RE]{\ACM@linecountR}%
\fancyhead[RO]{\@headfootfont
- \shorttitle\quad\textbullet\quad\@acmArticle\if@ACM@printfolios:\thepage\fi\ACM@linecountR}%
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
+ \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}%
- \fancyhead[LE]{\ACM@linecountL\@headfootfont\acmConference@shortname,
- \acmConference@date, \acmConference@venue}%
- \fancyhead[RO]{\@headfootfont\acmConference@shortname,
- \acmConference@date, \acmConference@venue\ACM@linecountR}%
+ \if@ACM@nonacm\else%
+ \fancyhead[LE]{\ACM@linecountL\@headfootfont\acmConference@shortname,
+ \acmConference@date, \acmConference@venue}%
+ \fancyhead[RO]{\@headfootfont\acmConference@shortname,
+ \acmConference@date, \acmConference@venue\ACM@linecountR}%
+ \fi%
\fi
\if@ACM@sigchiamode
\fancyheadoffset[L]{\dimexpr(\marginparsep+\marginparwidth)}%
@@ -5847,27 +5932,35 @@ Computing Machinery]
\relax % manuscript
\fancyhead[L]{\ACM@linecountL}%
\fancyfoot[RO,LE]{\if@ACM@printfolios\small\thepage\fi}%
- \fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}%
+ \if@ACM@nonacm\else%
+ \fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}%
+ \fi%
\or % acmsmall
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date:
- \@acmPubDate.}%
+ \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
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date:
- \@acmPubDate.}%
+ \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
- \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No.
- \@acmNumber, Article \@acmArticle. Publication date:
- \@acmPubDate.}%
+ \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
@@ -5878,7 +5971,9 @@ Computing Machinery]
\if@ACM@timestamp
\ifnum\ACM@format@nr=0\relax % Manuscript
\fancyfoot[LO,RE]{\ACM@timestamp\quad
- \footnotesize Manuscript submitted to ACM}
+ \if@ACM@nonacm\else
+ \footnotesize Manuscript submitted to ACM
+ \fi}
\else
\fancyfoot[LO,RE]{\ACM@timestamp}
\fi
@@ -5910,29 +6005,105 @@ Computing Machinery]
%\subsection{Sectioning}
%\label{sec:sectioninng}
%
+% \begin{macro}{\ACM@NRadjust}
+% \changes{v1.54}{2018/06/17}{Added macro}
+% Ross Moore's macro.
+% \begin{quotation}
+% Initially |\ACM@sect@format@| just passes through its |#1|
+% argument unchanged.
+% When a sectioning macro such as |\section| occurs, the
+% |\ACM@NRadjust| redefines |\ACM@sect@format@| to expand into the
+% styling commands; e.g., |\@secfont|.
+% Then |\Sectionformat| is temporarily redefined to produce
+% |\realSectionformat{\ACM@sect@format{#1}}{#2}|, which ultimately
+% becomes |\Sectionformat{\@secfont{#1}}{#2}|.
+% This is done to allow |\Sectionformat| to be variable, as may be
+% needed in particular circumstances. Its current expansion is saved
+% as |\realSectionformat| which is used with the modified 1st argument,
+% then |\Sectionformat| is reverted to its former expansion.
+%
+% To style the section-number, the line |#1{}| is used at the end of
+% |\ACM@NRadjust|. This imposes style-changing commands for fonts and
+% sizes, but any |\MakeUppercase| acts on just the |{}|. It's a bit hacky,
+% by essentially assuming that only numbers occur here, not letters to
+% be case-changed. (This should be acceptable in a class-file, as it
+% ought to be possible to change the case elsewhere, if that was ever
+% desired.) Also, it can result in |\@adddotafter| being called too
+% soon, so a slight adjustment is made, via |\ACM@adddotafter|, which
+% now tests whether its argument is empty. But the coding has to allow
+% for other packages to have also patched |\@adddotafter|.
+% \end{quotation}
+% \begin{macrocode}
+\def\ACM@NRadjust#1{%
+ \begingroup
+ \expandafter\ifx\csname Sectionformat\endcsname\relax
+ % do nothing when \Sectionformat is unknown
+ \def\next{\endgroup #1}%
+ \else
+ \def\next{\endgroup
+ \let\realSectionformat\Sectionformat
+ \def\ACM@sect@format@{#1}%
+ \let\Sectionformat\ACM@NR@adjustedSectionformat
+ %% next lines added 2018-06-17 to ensure section number is styled
+ \let\real@adddotafter\@adddotafter
+ \let\@adddotafter\ACM@adddotafter
+ #1{}% imposes the styles, but nullifies \MakeUppercase
+ \let\@adddotafter\real@adddotafter
+ }%
+ \fi \next
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ACM@NR@adjustedSectionformat}
+% \changes{v1.54}{2018/06/17}{Added macro}
+% \begin{macrocode}
+\def\ACM@NR@adjustedSectionformat#1#2{%
+ \realSectionformat{\ACM@sect@format{#1}}{#2}%
+ \let\Sectionformat\realSectionformat}
+\DeclareRobustCommand{\ACM@sect@format}{\ACM@sect@format@}
+\def\ACM@sect@format@null#1{#1}
+\let\ACM@sect@format@\ACM@sect@format@null
+\AtBeginDocument{%
+ \expandafter\ifx\csname LTX@adddotafter\endcsname\relax
+ \let\LTX@adddotafter\@adddotafter
+ \fi
+}
+% \end{macrocode}
+%
+% \end{macro}
+% \begin{macro}{\ACM@adddotafter}
+% \changes{v1.54}{2018/06/17}{Added macro}
+% \begin{macrocode}
+\def\ACM@adddotafter#1{\ifx\relax#1\relax\else\LTX@adddotafter{#1}\fi}
+% \end{macrocode}
+%
+% \end{macro}
%
+% \changes{v1.54}{2018/05/27}{Deleted indent for subsubsection}
+% \changes{v1.54}{2018/06/17}{Added Ross's patch for sectioning}
% Sectioning is different for different levels
% \begin{macrocode}
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{.25\baselineskip}%
- {\@secfont}}
+ {\ACM@NRadjust\@secfont}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{.25\baselineskip}%
- {\@subsecfont}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{10pt}%
+ {\ACM@NRadjust\@subsecfont}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
- {\@subsubsecfont\@adddotafter}}
+ {\ACM@NRadjust{\@subsubsecfont\@adddotafter}}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\parindent}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
- {\@parfont\@adddotafter}}
+ {\ACM@NRadjust{\@parfont\@adddotafter}}}
\renewcommand\part{\@startsection{part}{9}{\z@}%
{-10\p@ \@plus -4\p@ \@minus -2\p@}%
{4\p@}%
- {\@parfont}}
+ {\ACM@NRadjust\@parfont}}
% \end{macrocode}
%
% \begin{macro}{\section@raggedright}