From 9e35bd7917dd043a03a995a70b8d0b42482d4c7d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 14 Apr 2021 03:00:47 +0000 Subject: CTAN sync 202104140300 --- macros/latex/contrib/acmart/acmart.dtx | 132 +++++++++++++++++++++++++++------ 1 file changed, 108 insertions(+), 24 deletions(-) (limited to 'macros/latex/contrib/acmart/acmart.dtx') diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx index f895373409..e8089a3910 100644 --- a/macros/latex/contrib/acmart/acmart.dtx +++ b/macros/latex/contrib/acmart/acmart.dtx @@ -1,6 +1,6 @@ % \iffalse % -% Copyright 2016-2020, Association for Computing Machinery +% Copyright 2016-2021, Association for Computing Machinery % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any @@ -57,7 +57,7 @@ % \ifx\currentjob\guide\OnlyDescription\fi % \GetFileInfo{acmart.dtx} % \title{\LaTeX{} Class for the \emph{Association for Computing -% Machinery}\thanks{\copyright 2016--2020, Association for Computing Machinery}} +% Machinery}\thanks{\copyright 2016--2021, Association for Computing Machinery}} % \author{Boris Veytsman\thanks{% % \href{mailto:borisv@lk.net}{\texttt{borisv@lk.net}}, % \href{mailto:boris@varphi.com}{\texttt{boris@varphi.com}}}} @@ -112,6 +112,7 @@ % Ben Greenman, % Enrico Gregorio, % Jamie Davis, +% Ulrike Fischer, % Jason Hemann, % Peter Kemp, % Luis Leiva, @@ -374,7 +375,9 @@ % column mode has balanced columns. By default it is |true|; however, % it may lead to problems for some documents. Set it to |false| if % you encounter compilation errors. Note that for one page documents -% \cs{balance} command might cause problems. +% \cs{balance} command might cause problems. An alternative is the +% (experimental) option |pbalance|, which uses the new package +% |pbalance| for this end. % % The option |urlbreakonhyphens| determines whether URLs can be split % between lines after hyphens. By default it is true. Set it to @@ -408,6 +411,8 @@ % Section~\ref{sec:ug_theorems}\\ % balance & true & Whether to balance the last page in two column % mode\\ +% pbalance & false & Whether to balance the last page in two column +% mode using pbalance package\\ % urlbreakonhyphens & true & Whether to break urls on hyphens\\ % \bottomrule % \end{tabularx} @@ -1458,7 +1463,7 @@ % eprint = "960935712", % primaryclass = "cs", % \end{verbatim} -% See the examples at \url{http://arxiv.org/hypertex/bibstyles/}. +% See the examples at \url{https://arxiv.org/help/hypertex/bibstyles}. % % There are several special entry types. Types \path{online} and % \path{game} are used for Web pages and games, for example, @@ -1587,6 +1592,12 @@ % This will make the author to be sorted as ``Beethoven'' rather than % ``van Beethoven''. % +% The current bst style defines a number of macros for common journal +% names. In particular, all journals listed in Table~\ref{tab:pubs} +% are includes, so you can use strings like |journal = taccess| for +% \emph{ACM Transactions on Accessible Computing}. +% +% %\subsection{Colors} %\label{sec:ug_colors} % @@ -1895,7 +1906,7 @@ \ProvidesFile{acmart.dtx} % %\ProvidesClass{acmart} -[2020/11/15 v1.75 Typesetting articles for the Association for Computing Machinery] +[2021/02/21 v1.76 Typesetting articles for the Association for Computing Machinery] % \end{macrocode} % % \changes{v1.00}{2016/04/14}{First released version} @@ -2196,6 +2207,19 @@ % \end{macro} % % +% \begin{macro}{\if@ACM@pbalance} +% \changes{v1.76}{2021/03/16}{Added macro} +% Whether to balance the last page +% \begin{macrocode} +\define@boolkey+{acmart.cls}[@ACM@]{pbalance}[true]{}{% + \PackageError{\@classname}{The option pbalance can be either true or + false}} +\ExecuteOptionsX{pbalance=false} +% \end{macrocode} +% +% \end{macro} +% +% % \begin{macro}{\if@ACM@natbib@override} % \changes{v1.12}{2016/05/30}{Added macro} % \changes{v1.33}{2017/03/28}{Deleted macro} @@ -2818,6 +2842,14 @@ % % \end{macro} % +% Adding |hyperxmp| +% \changes{v1.72}{2020/06/14}{Added hyperxmp} +% \changes{v1.76}{2021/02/21}{Moved before hyperref, see +% https://github.com/borisveytsman/acmart/issues/425} +% \begin{macrocode} +\RequirePackage{hyperxmp} +% \end{macrocode} +% % % And now, |hyperref| % \changes{v1.28}{2017/01/07}{Got rid of warnings in pdf keywords} @@ -2868,12 +2900,6 @@ pdfdisplaydoctitle}} % \end{macrocode} % -% And |hyperxmp| -% \changes{v1.72}{2020/06/14}{Added hyperxmp} -% \begin{macrocode} -\RequirePackage{hyperxmp} -% \end{macrocode} -% % % Bibliography mangling. % \changes{v1.33}{2017/03/23}{Moved \cs{citename} definition for @@ -4016,9 +4042,12 @@ % The book title of the conference: % \begin{macrocode} \def\acmBooktitle#1{\gdef\@acmBooktitle{#1}} +\acmBooktitle{} +\ifx\acmConference@name\@undefined\else \acmBooktitle{Proceedings of \acmConference@name \ifx\acmConference@name\acmConference@shortname\else - \ (\acmConference@shortname)\fi} + \ (\acmConference@shortname)\fi} +\fi % \end{macrocode} % % \end{macro} @@ -4106,7 +4135,15 @@ % \changes{v1.54}{2018/06/23}{Added submission id in anonymous mode} % \changes{v1.57}{2018/12/09}{Added warning if \cs{author} has comma} % \changes{v1.72}{2020/05/04}{Added \cs{detokenize} (Kuldeep S. Meel)} -% Adding an author to the list of authors and addresses +% \changes{v1.76}{2021/03/15}{Added code for orcid links} +% Adding an author to the list of authors and addresses. +% +% Note that we want to typeset the link to the author's orcid if +% known. The problem is, we know the orcid only after the author is +% entered. The trick is based on the idea that |\csname...\endcsname| +% is \cs{relax} unless defined. Therefore we typeset authors by the +% special macro |\csname typeset@author\the\num@authors\endcsname|, +% which is defined by \cs{orcid} command. % \begin{macrocode} \renewcommand\author[2][]{% \IfSubStr{\detokenize{#2}}{,}{\ClassWarning{\@classname}{Do not put several @@ -4123,12 +4160,16 @@ \@acmSubmissionID\fi}}% \gdef\authors{Anonymous Author(s)}% \else - \gdef\addresses{\@author{#2}}% + \expandafter\gdef\expandafter\addresses\expandafter{% + \expandafter\@author\expandafter{% + \csname typeset@author\the\num@authors\endcsname{#2}}}% \gdef\authors{#2}% \fi \else \if@ACM@anonymous\else - \g@addto@macro\addresses{\and\@author{#2}}% + \expandafter\g@addto@macro\expandafter\addresses\expandafter{% + \expandafter\and\expandafter\@author\expandafter{% + \csname typeset@author\the\num@authors\endcsname{#2}}}% \g@addto@macro\authors{\and#2}% \fi \fi @@ -4232,9 +4273,17 @@ % % \begin{macro}{\orcid} % \changes{v1.15}{2016/06/25}{Introduced macro} -% Right now we do not typeset ORCIDs +% \changes{v1.76}{2021/03/15}{Added code for orcid links} +% We rededine the command to typeset the current author % \begin{macrocode} -\def\orcid#1{\unskip\ignorespaces} +\def\orcid#1{\unskip\ignorespaces% + \IfBeginWith{#1}{http}{% + \expandafter\gdef\csname + typeset@author\the\num@authors\endcsname##1{% + \href{#1}{##1}}}{% + \expandafter\gdef\csname + typeset@author\the\num@authors\endcsname##1{% + \href{https://orcid.org/#1}{##1}}}} % \end{macrocode} % % \end{macro} @@ -5215,7 +5264,8 @@ % (Scott Pakin)} % \changes{v1.73}{2020/09/07}{Do not check again the presense of % address fields} -% \changes{v1.75}{2020/11/15}{Added \cs{@beginmaketitlehook}} +% \changes{v1.75}{2020/11/15}{Added \cs{@beginmaketitlehook}} +% \changes{v1.76}{2021/04/05}{Put \cs{par} inside group for keywords} % The (in)famous \cs{maketitle}. Note that in |sigchi-a| mode, authors % are \emph{not} in the title box. % @@ -5328,7 +5378,7 @@ \else \@specialsection{Keywords}% \fi - \noindent\@keywords}\par\egroup + \noindent\@keywords\par}\egroup \fi \let\metadata@authors=\authors \nxandlist{, }{, }{, }\metadata@authors @@ -6517,6 +6567,7 @@ % \changes{v1.59}{2019/04/20}{Added logic for conference papers using % journal format} % \changes{v1.59}{2019/04/20}{Moved page styles to \cs{AtBeginDocument}} +% \changes{v1.76}{2021/02/21}{Fixed bug with no line numbers for nonacm} % The page style for all pages but the first one % \begin{macrocode} \AtBeginDocument{% @@ -6575,7 +6626,10 @@ \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% \fancyhead[RE]{\@headfootfont\@shortauthors\ACM@linecountR}% - \if@ACM@nonacm\else% + \if@ACM@nonacm + \fancyhead[LE]{\ACM@linecountL}% + \fancyhead[RO]{\ACM@linecountR}% + \else% \fancyhead[LE]{\ACM@linecountL\@headfootfont\footnotesize \acmConference@shortname, \acmConference@date, \acmConference@venue}% @@ -6588,7 +6642,10 @@ \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% \fancyhead[RE]{\@headfootfont\@shortauthors\ACM@linecountR}% - \if@ACM@nonacm\else% + \if@ACM@nonacm + \fancyhead[LE]{\ACM@linecountL}% + \fancyhead[RO]{\ACM@linecountR}% + \else% \fancyhead[LE]{\ACM@linecountL\@headfootfont \acmConference@shortname, \acmConference@date, \acmConference@venue}% @@ -7212,9 +7269,29 @@ %\label{sec:balancing} % % We need balancing only if the user did not disable it, and we use a -% two column format +% two column format. Note that |pbalance| uses a different +% mechanism. % \begin{macrocode} \AtEndPreamble{% + \if@ACM@pbalance + \global\@ACM@balancefalse + \ifcase\ACM@format@nr + \relax % manuscript + \or % acmsmall + \or % acmlarge + \or % acmtog + \RequirePackage{pbalance}% + \or % sigconf + \RequirePackage{pbalance}% + \or % siggraph + \RequirePackage{pbalance}% + \or % sigplan + \RequirePackage{pbalance}% + \or % sigchi + \RequirePackage{pbalance}% + \or % sigchi-a + \fi + \fi \if@ACM@balance \ifcase\ACM@format@nr \relax % manuscript @@ -7330,8 +7407,15 @@ \def\@tempa{#1}% \ifx\@tempa\@empty\def\@tempa{arxiv}\fi \def\@tempb{arxiv}% - \ifx\@tempa\@tempb - arXiv:\href{https://arxiv.org/abs/#2}{#2}\else arXiv:#2% + \ifx\@tempa\@tempb\relax + arXiv:\href{https://arxiv.org/abs/#2}{#2}% + \else + \def\@tempb{arXiv}% + \ifx\@tempa\@tempb\relax + arXiv:\href{https://arxiv.org/abs/#2}{#2}% + \else + arXiv:#2% + \fi \fi} % \end{macrocode} % -- cgit v1.2.3