Merge tag 'v6.10' into my-changes-rebased

This commit is contained in:
Suzanne Soy 2021-07-06 02:28:59 +01:00
commit 8f15b78615
16 changed files with 641 additions and 235 deletions

View File

@ -13,6 +13,17 @@ LaTeX style defaults to use the @hyperlink[acmart-url]{@tt{acmart}}
class for typesetting publications for the Association of Computing
Machinery.}
@bold{Note:} a @racketmodname[scribble/acmart] document must include a
@racket[title] and @racket[author].
Example:
@verbatim[#:indent 2]|{
#lang scribble/acmart
@title{Surreal Numbers}
@author{Ursula N. Owens}
}|
@deftogether[(
@defidform[manuscript]
@defidform[acmsmall]
@ -146,7 +157,7 @@ screen version of the image links to the badge authority.
@defproc[(affiliation
[#:position position (or/c pre-content? #f) #f]
[#:institution institution (or/c pre-content? institution? #f) #f]
[#:institution institution (listof (or/c pre-content? institution?)) '()]
[#:street-address street-address (or/c pre-content? #f) #f]
[#:city city (or/c pre-content? #f) #f]
[#:state state (or/c pre-content? #f) #f]

View File

@ -260,6 +260,7 @@ used for a new cell. A @racket['cont] must not appear as the first
cell in a row.
The @racket[style] argument is handled the same as @racket[para].
See @racket[table] for a list of recognized @tech{style names} and @tech{style properties}.
If @racket[sep] is not @racket[#f], it is inserted as a new column
between every column in the table; note that any

View File

@ -282,13 +282,13 @@ an evaluator (e.g., because it is defined in a module body).}
@defparam[scribble-eval-handler handler
((any/c . -> . any) any/c boolean? . -> . any)]{
((any/c . -> . any) boolean? any/c . -> . any)]{
A parameter that serves as a hook for evaluation. The evaluator to use
is supplied as the first argument to the parameter's value, and the
second argument is the form to evaluate. The last argument is
@racket[#t] if exceptions are being captured (to display exception
results), @racket[#f] otherwise.}
is supplied as the first argument to the parameter's value.
The second argument is @racket[#t] if exceptions are being captured (to display
exception results), @racket[#f] otherwise.
The third argument is the form to evaluate.}
@defparam[scribble-exn->string handler (-> (or/c exn? any/c) string?)]{
A parameter that controls how exceptions are rendered by

View File

@ -55,16 +55,19 @@ includes a citation to section 8 of the Racket reference.
(code:line #:render-date-in-bib render-date-expr)
(code:line #:render-date-in-cite render-date-expr)
(code:line #:date<? date-compare-expr)
(code:line #:date=? date-compare-expr)])
(code:line #:date=? date-compare-expr)
(code:line #:cite-author cite-author-id)
(code:line #:cite-year cite-year-id)])
#:contracts ([style-expr (or/c author+date-style number-style)]
[spaces-expr number]
[spaces-expr number?]
[disambiguator-expr (or/c #f (-> exact-nonnegative-integer? element?))]
[render-date-expr (or/c #f (-> date? element?))]
[date-compare-expr (or/c #f (-> date? date? boolean?))])]{
Binds @racket[~cite-id], @racket[citet-id], and
@racket[generate-bibliography-id], which share state to accumulate and
render citations.
Binds @racket[~cite-id], @racket[citet-id],
@racket[generate-bibliography-id], (optionally)
@racket[cite-author-id], and (optionally) @racket[cite-year-id] which
share state to accumulate and render citations.
The function bound to @racket[~cite-id] produces a citation referring
to one or more bibliography entries with a preceding non-breaking
@ -90,6 +93,30 @@ section for the bibliography. It has the contract
(->* () (#:tag string? #:sec-title string?) part?)
]
If provided, the function bound to @racket[cite-author-id]
generates an element containing the authors of a paper.
@racketblock[
(->* (bib?) element?)
]
If provided, the function bound to @racket[cite-year-id]
generates an element containing the year the paper was
published in, or possibly multiple years if multiple papers
are provided.
@racketblock[
(->* (bib?) #:rest (listof? bib?) element?)
]
The functions bound to @racket[cite-author-id] and
@racket[cite-year-id] make it possible to create possessive textual citations.
@codeblock[#:keep-lang-line? #f]|{
#lang scribble/base
@citeauthor[scribble-cite]'s (@citeyear[scribble-cite]) autobib library is pretty nifty.
}|
The default value for the @racket[#:tag] argument is @racket["doc-bibliography"]
and for @racket[#:sec-title] is @racket["Bibliography"].
@ -110,7 +137,10 @@ to add an extra element after the date; the default disambiguator adds
ambiguous raises an exception. Date comparison is controlled by
@racket[date-compare-expr]s. Dates in citations and dates in the
bibliography may be rendered differently, as specified by the
optionally given @racket[render-date-expr] functions.}
optionally given @racket[render-date-expr] functions.
@history[#:changed "1.22" "Add optional ids for author-name and author-year"]
}
@deftogether[(
@defthing[author+date-style any/c]
@ -182,9 +212,10 @@ describing a paper's location within a journal.}
element?]{
Combines elements to generate an element that is suitable for
describing a book's location.}
describing a book's location.
Both arguments are optional, but at least one must be supplied.}
@defproc[(techrpt-location [#:institution institution edition any/c]
@defproc[(techrpt-location [#:institution institution any/c]
[#:number number any/c])
element?]{

View File

@ -23,4 +23,4 @@
(define pkg-authors '(mflatt eli))
(define version "1.21")
(define version "1.22")

View File

@ -80,6 +80,8 @@
[CCSXML
(->* () () #:rest (listof pre-content?)
any/c)])
(provide
invisible-element-to-collect-for-acmart-extras)
(define-syntax-rule (defopts name ...)
(begin (define-syntax (name stx)
@ -136,6 +138,9 @@
(make-css-addition (abs "acmart.css"))
(make-tex-addition (abs "acmart.tex")))))
(define invisible-element-to-collect-for-acmart-extras
(make-element (make-style "invisible-element-to-collect-for-acmart-extras" acmart-extras) '()))
;; ----------------------------------------
;; Abstracts:
@ -289,7 +294,6 @@
(define (mk-inst name
#:department? [department? department?]
#:level [level level])
(displayln department?)
(case department?
[(#f) (make-element (make-style "institution" command-props)
(decode-content name))]

View File

@ -35,13 +35,17 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{acmart}
[2016/12/03 v1.25 Typesetting articles for Association of
[2017/05/14 v1.39 Typesetting articles for Association of
Computing Machinery]
\def\@classname{acmart}
\InputIfFileExists{acmart-preload-hook.tex}{%
\ClassWarning{\@classname}{%
I am loading acmart-preload-hook.tex. You are fully responsible
for any problems from now on.}}{}
\RequirePackage{xkeyval}
\RequirePackage{xstring}
\define@choicekey*+{acmart.cls}{format}[\ACM@format\ACM@format@nr]{%
manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph,
sigplan, sigchi, sigchi-a}[manuscript]{}{%
@ -83,16 +87,14 @@ Computing Machinery]
\fi}{\PackageError{\@classname}{Option authorversion can be either true or
false}}
\ExecuteOptionsX{authorversion=false}
\newif\if@ACM@natbib@override
\@ACM@natbib@overridefalse
\define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{%
\@ACM@natbib@overridetrue
\if@ACM@natbib
\PackageInfo{\@classname}{Explicitly selecting natbib mode}%
\else
\PackageInfo{\@classname}{Explicitly deselecting natbib mode}%
\fi}{\PackageError{\@classname}{Option natbib can be either true or
false}}
\ExecuteOptionsX{natbib=true}
\define@boolkey+{acmart.cls}[@ACM@]{anonymous}[true]{%
\if@ACM@anonymous
\PackageInfo{\@classname}{Using anonymous mode}%
@ -101,6 +103,24 @@ Computing Machinery]
\fi}{\PackageError{\@classname}{Option anonymous can be either true or
false}}
\ExecuteOptionsX{anonymous=false}
\define@boolkey+{acmart.cls}[@ACM@]{timestamp}[true]{%
\if@ACM@timestamp
\PackageInfo{\@classname}{Using timestamp mode}%
\else
\PackageInfo{\@classname}{Not using timestamp mode}%
\fi}{\PackageError{\@classname}{Option timestamp can be either true or
false}}
\ExecuteOptionsX{timestamp=false}
\define@boolkey+{acmart.cls}[@ACM@]{authordraft}[true]{%
\if@ACM@authordraft
\PackageInfo{\@classname}{Using authordraft mode}%
\@ACM@timestamptrue
\@ACM@reviewtrue
\else
\PackageInfo{\@classname}{Not using authordraft mode}%
\fi}{\PackageError{\@classname}{Option authordraft can be either true or
false}}
\ExecuteOptionsX{authordraft=false}
\def\ACM@fontsize{}
\DeclareOptionX{9pt}{\edef\ACM@fontsize{\CurrentOption}}
\DeclareOptionX{10pt}{\edef\ACM@fontsize{\CurrentOption}}
@ -113,6 +133,11 @@ Computing Machinery]
\newif\if@ACM@manuscript
\newif\if@ACM@journal
\newif\if@ACM@sigchiamode
\ifnum\ACM@format@nr=5\relax % siggraph
\ClassWarning{\@classname}{The format `siggraph' is now obsolete.
I am switching to sigconf.}
\setkeys{acmart.cls}{format=sigconf}
\fi
\ifnum\ACM@format@nr=0\relax
\@ACM@manuscripttrue
\else
@ -140,9 +165,6 @@ Computing Machinery]
\@ACM@journalfalse
\@ACM@sigchiamodetrue
\fi
\if@ACM@natbib@override\else
\@ACM@natbibtrue
\fi
\ifx\ACM@fontsize\@empty
\ifcase\ACM@format@nr
\relax % manuscript
@ -158,7 +180,7 @@ Computing Machinery]
\or % siggraph
\def\ACM@fontsize{9pt}%
\or % sigplan
\def\ACM@fontsize{9pt}%
\def\ACM@fontsize{10pt}%
\or % sigchi
\def\ACM@fontsize{10pt}%
\or % sigchi-a
@ -257,7 +279,7 @@ Computing Machinery]
\newcommand{\bibstyle@acmauthoryear}{%
\setcitestyle{%
authoryear,%
open={(},close={)},citesep={;},%
open={[},close={]},citesep={;},%
aysep={},yysep={,},%
notesep={, }}}
\newcommand{\bibstyle@acmnumeric}{%
@ -265,7 +287,9 @@ Computing Machinery]
numbers,sort&compress,%
open={[},close={]},citesep={,},%
notesep={, }}}
\if@ACM@natbib
\citestyle{acmnumeric}
\fi
\def\@startsection#1#2#3#4#5#6{%
\if@noskipsec \leavevmode \fi
\par
@ -283,6 +307,7 @@ Computing Machinery]
{\@ssect{#3}{#4}{#5}{#6}}%
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
@ -297,6 +322,9 @@ Computing Machinery]
\interlinepenalty \@M #8\@@par}%
\endgroup
\csname #1mark\endcsname{#7}%
\ifnum #2>\c@secnumdepth \else
\@tochangmeasure{\csname the#1\endcsname}%
\fi
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
@ -307,6 +335,9 @@ Computing Machinery]
#6{\hskip #3\relax
\@svsec #8}%
\csname #1mark\endcsname{#7}%
\ifnum #2>\c@secnumdepth \else
\@tochangmeasure{\csname the#1\endcsname\space}%
\fi
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
@ -351,9 +382,30 @@ Computing Machinery]
\def\@svsechd{#4{\hskip #1\relax #5}}%
\fi
\@xsect{#3}}
\def\@starttoc#1#2{\begingroup
\setTrue{#1}%
\par\removelastskip\vskip\z@skip
\@startsection{section}\@M\z@{\linespacing\@plus\linespacing}%
{.5\linespacing}{\centering\contentsnamefont}{#2}%
\@input{\jobname.#1}%
\if@filesw
\@xp\newwrite\csname tf@#1\endcsname
\immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax
\fi
\global\@nobreakfalse \endgroup
\addvspace{32\p@\@plus14\p@}%
}
\def\l@subsection{\@tocline{2}{0pt}{1pc}{3pc}{}}
\def\l@subsubsection{\@tocline{2}{0pt}{1pc}{5pc}{}}
\let\@footnotemark@nolink\@footnotemark
\let\@footnotetext@nolink\@footnotetext
\RequirePackage[bookmarksnumbered]{hyperref}
\RequirePackage[bookmarksnumbered,unicode]{hyperref}
\pdfstringdefDisableCommands{%
\def\unskip{}%
\def\textbullet{- }%
\def\textrightarrow{ -> }%
\def\footnotemark{}%
}
\urlstyle{rm}
\ifcase\ACM@format@nr
\relax % manuscript
@ -385,14 +437,17 @@ Computing Machinery]
\let\citeyearNP\citeyear
\let\citeyear\citeyearpar
\let\citeNP\citealt
\def\shortcite#1{\citeyear{#1}}
\DeclareRobustCommand\citeA
{\begingroup\NAT@swafalse
\let\NAT@ctype\@ne\NAT@partrue\NAT@fullfalse\NAT@open\NAT@citetp}%
\providecommand\newblock{}%
\else
\providecommand\citename[1]{#1}
\AtBeginDocument{%
\let\shortcite\cite%
\providecommand\citename[1]{#1}}
\fi
\newcommand\shortcite[2][]{%
\ifNAT@numbers\cite[#1]{#2}\else\citeyear[#1]{#2}\fi}
\def\bibliographystyle#1{%
\ifx\@begindocumenthook\@undefined\else
\expandafter\AtBeginDocument
@ -409,54 +464,70 @@ Computing Machinery]
\definecolor[named]{ACMGreen}{cmyk}{0.20,0,1,0.19}
\definecolor[named]{ACMPurple}{cmyk}{0.55,1,0,0.15}
\definecolor[named]{ACMDarkBlue}{cmyk}{1,0.58,0,0.21}
\if@ACM@authordraft
\RequirePackage{draftwatermark}
\SetWatermarkFontSize{0.5in}
\SetWatermarkColor[gray]{.9}
\SetWatermarkText{\parbox{12em}{\centering
Unpublished working draft\\
Not for distribution}}
\fi
\RequirePackage{geometry}
\ifcase\ACM@format@nr
\relax % manuscript
\geometry{letterpaper,head=1pc}%
\geometry{letterpaper,head=13pt,
marginparwidth=6pc}%
\or % acmsmall
\geometry{twoside=true,
includeheadfoot, head=1pc, foot=2pc,
includeheadfoot, head=13pt, foot=2pc,
paperwidth=6.75in, paperheight=10in,
top=58pt, bottom=44pt, inner=46pt, outer=46pt
top=58pt, bottom=44pt, inner=46pt, outer=46pt,
marginparwidth=2pc
}%
\or % acmlarge
\geometry{twoside=true, head=1pc, foot=2pc,
\geometry{twoside=true, head=13pt, foot=2pc,
paperwidth=8.5in, paperheight=11in,
includeheadfoot,
top=78pt, bottom=114pt, inner=81pt, outer=81pt
top=78pt, bottom=114pt, inner=81pt, outer=81pt,
marginparwidth=4pc
}%
\or % acmtog
\geometry{twoside=true, head=1pc, foot=2pc,
\geometry{twoside=true, head=13pt, foot=2pc,
paperwidth=8.5in, paperheight=11in,
includeheadfoot, columnsep=24pt,
top=52pt, bottom=75pt, inner=52pt, outer=52pt
top=52pt, bottom=75pt, inner=52pt, outer=52pt,
marginparwidth=2pc
}%
\or % sigconf
\geometry{twoside=true, head=1pc,
\geometry{twoside=true, head=13pt,
paperwidth=8.5in, paperheight=11in,
includeheadfoot, columnsep=2pc,
top=57pt, bottom=73pt, inner=54pt, outer=54pt
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
marginparwidth=2pc
}%
\or % siggraph
\geometry{twoside=true, head=1pc,
\geometry{twoside=true, head=13pt,
paperwidth=8.5in, paperheight=11in,
includeheadfoot, columnsep=2pc,
top=57pt, bottom=73pt, inner=54pt, outer=54pt
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
marginparwidth=2pc
}%
\or % sigplan
\geometry{twoside=true, head=1pc,
\geometry{twoside=true, head=13pt,
paperwidth=8.5in, paperheight=11in,
includeheadfoot=false, columnsep=2pc,
top=1in, bottom=1in, inner=0.75in, outer=0.75in
top=1in, bottom=1in, inner=0.75in, outer=0.75in,
marginparwidth=2pc
}%
\or % sigchi
\geometry{twoside=true, head=1pc,
\geometry{twoside=true, head=13pt,
paperwidth=8.5in, paperheight=11in,
includeheadfoot, columnsep=2pc,
top=66pt, bottom=73pt, inner=54pt, outer=54pt
top=66pt, bottom=73pt, inner=54pt, outer=54pt,
marginparwidth=2pc
}%
\or % sigchi-a
\geometry{twoside=false, head=1pc,
\geometry{twoside=false, head=13pt,
paperwidth=11in, paperheight=8.5in,
includeheadfoot, marginparsep=72pt,
marginparwidth=170pt, columnsep=20pt,
@ -479,6 +550,7 @@ Computing Machinery]
\or % sigchi
\or % sigchi-a
\fi
\setlength\normalparindent{\parindent}
\def\copyrightpermissionfootnoterule{\kern-3\p@
\hrule \@width \columnwidth \kern 2.6\p@}
\RequirePackage{manyfoot}
@ -524,6 +596,14 @@ Computing Machinery]
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}
\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
\def\@textbottom{\vskip \z@ \@plus 1pt}
\let\@texttop\relax
\RequirePackage{iftex}
\ifPDFTeX
\input{glyphtounicode}
\pdfgentounicode=1
\fi
\RequirePackage{cmap}
\newif\if@ACM@newfonts
\@ACM@newfontstrue
\IfFileExists{libertine.sty}{}{\ClassWarning{\@classname}{You do not
@ -535,11 +615,10 @@ Computing Machinery]
have newtxmath package installed. Please upgrade your
TeX}\@ACM@newfontsfalse}
\if@ACM@newfonts
\RequirePackage[tt=false]{libertine}
\RequirePackage[tt=false, type1=true]{libertine}
\RequirePackage[varqu]{zi4}
\RequirePackage[libertine]{newtxmath}
\else
\RequirePackage{textcomp}
\RequirePackage[T1]{fontenc}
\fi
\if@ACM@sigchiamode
\renewcommand{\familydefault}{\sfdefault}
@ -620,10 +699,50 @@ Computing Machinery]
\or % sigchi
\or % sigchi-a
\fi
\renewcommand{\descriptionlabel}[1]{\hspace\labelsep \upshape\bfseries #1}
\newdimen\@ACM@labelwidth
\AtBeginDocument{%
\setlength\labelsep{4pt}
\setlength{\@ACM@labelwidth}{6.5pt}
%% First-level list: when beginning after the first line of an
%% indented paragraph or ending before an indented paragraph, labels
%% should not hang to the left of the preceding/following text.
\setlength\leftmargini{\z@}
\addtolength\leftmargini{\parindent}
\addtolength\leftmargini{2\labelsep}
\addtolength\leftmargini{\@ACM@labelwidth}
%% Second-level and higher lists.
\setlength\leftmarginii{\z@}
\addtolength\leftmarginii{0.5\labelsep}
\addtolength\leftmarginii{\@ACM@labelwidth}
\setlength\leftmarginiii{\leftmarginii}
\setlength\leftmarginiv{\leftmarginiii}
\setlength\leftmarginv{\leftmarginiv}
\setlength\leftmarginvi{\leftmarginv}
\@listi}
\newskip\listisep
\listisep\smallskipamount
\def\@listI{\leftmargin\leftmargini
\labelwidth\leftmargini \advance\labelwidth-\labelsep
\listparindent\z@
\topsep\listisep}
\let\@listi\@listI
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii \advance\labelwidth-\labelsep
\topsep\z@skip}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii \advance\labelwidth-\labelsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv \advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv \advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi \advance\labelwidth-\labelsep}
\renewcommand{\descriptionlabel}[1]{\upshape\bfseries #1}
\renewenvironment{description}{\list{}{%
\itemindent-12\p@
\labelwidth\z@ \let\makelabel\descriptionlabel}%
\labelwidth\@ACM@labelwidth
\let\makelabel\descriptionlabel}%
}{
\endlist
}
@ -638,7 +757,9 @@ Computing Machinery]
JERIC,%
JETC,%
JOCCH,%
PACMHCI,%
PACMPL,%
POMACS,%
TAAS,%
TACCESS,%
TACO,%
@ -689,9 +810,9 @@ Computing Machinery]
\def\@journalNameShort{ACM Comput. Surv.}%
\def\@permissionCodeOne{0360-0300}%
\or % IMWUT
\def\@journalName{PACM on Interactive, Mobile, Wearable and
Ubiquitous Technologies}%
\def\@journalNameShort{PACM Interact. Mob. Wearable Ubiquitous Technol.}%
\def\@journalName{Proceedings of the ACM on Interactive, Mobile,
Wearable and Ubiquitous Technologies}%
\def\@journalNameShort{Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.}%
\def\@permissionCodeOne{2474-9567}%
\or % JACM
\def\@journalName{Journal of the ACM}%
@ -716,10 +837,18 @@ Computing Machinery]
\or % JOCCH
\def\@journalName{ACM Journal on Computing and Cultural Heritage}%
\def\@journalName{ACM J. Comput. Cult. Herit.}%
\or % PACMHCI
\def\@journalName{Proceedings of the ACM on Human-Computer Interaction}%
\def\@journalName{Proc. ACM Hum.-Comput. Interact.}%
\def\@permissionCodeOne{2573-0142}%
\or % PACMPL
\def\@journalName{PACM on Programming Languages}%
\def\@journalName{PACM Progr. Lang.}%
\def\@journalName{Proceedings of the ACM on Programming Languages}%
\def\@journalName{Proc. ACM Program. Lang.}%
\def\@permissionCodeOne{2475-1421}%
\or % POMACS
\def\@journalName{Proceedings of the ACM on Measurement and Analysis of Computing Systems}%
\def\@journalName{Proc. ACM Meas. Anal. Comput. Syst.}%
\def\@permissionCodeOne{2476-1249}%
\or % TAAS
\def\@journalName{ACM Transactions on Autonomous and Adaptive Systems}%
\def\@journalNameShort{ACM Trans. Autonom. Adapt. Syst.}%
@ -940,6 +1069,20 @@ Computing Machinery]
\if@ACM@anonymous\else
\g@addto@macro\addresses{\affiliation{#1}{#2}}%
\fi}
\define@boolkey+{@ACM@affiliation@}[@ACM@affiliation@]{obeypunctuation}%
[true]{}{\ClassError{\@classname}{obeypunctuation must be true or false}}
\def\additionalaffiliation#1{\authornote{\@additionalaffiliation{#1}}}
\def\@additionalaffiliation#1{\bgroup
\def\position##1{\ignorespaces}%
\def\institution##1{##1\ignorespaces}%
\def\department{\@ifnextchar[{\@department}{\@department[]}}%
\def\@department[##1]##2{\unskip, ##2\ignorespaces}%
\let\streetaddress\position
\let\city\position
\let\state\position
\let\postcode\position
\let\country\position
Also with #1\unskip.\egroup}
\renewcommand{\email}[2][]{%
\if@ACM@anonymous\else
\g@addto@macro\addresses{\email{#1}{#2}}%
@ -967,10 +1110,16 @@ Computing Machinery]
\def\@authornotes{}
\def\authornote#1{%
\if@ACM@anonymous\else
\g@addto@macro\addresses{\@authornotemark}
\g@addto@macro\addresses{\@authornotemark}%
\g@addto@macro\@authornotes{%
\stepcounter{footnote}\footnotetext{#1}}%
\fi}
\newcommand\authornotemark[1][\relax]{%
\ifx#1\relax\relax\relax
\g@addto@macro\addresses{\@authornotemark}%
\else
\g@addto@macro\addresses{\@@authornotemark{#1}}%
\fi}
\def\acmVolume#1{\def\@acmVolume{#1}}
\acmVolume{1}
\def\acmNumber#1{\def\@acmNumber{#1}}
@ -980,15 +1129,17 @@ Computing Machinery]
\def\acmArticleSeq#1{\def\@acmArticleSeq{#1}}
\acmArticleSeq{\@acmArticle}
\def\acmYear#1{\def\@acmYear{#1}}
\acmYear{2016}
\acmYear{\the\year}
\def\acmMonth#1{\def\@acmMonth{#1}}
\acmMonth{1}
\acmMonth{\the\month}
\def\@acmPubDate{\ifcase\@acmMonth\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or
December\fi~\@acmYear}
\def\acmPrice#1{\def\@acmPrice{#1}}
\acmPrice{15.00}
\def\acmSubmissionID#1{\def\@acmSubmissionID{#1}}
\acmSubmissionID{}
\def\acmISBN#1{\def\@acmISBN{#1}}
\acmISBN{978-x-xxxx-xxxx-x/YY/MM}
\def\acmDOI#1{\def\@acmDOI{#1}}
@ -1012,20 +1163,20 @@ Computing Machinery]
\def\@acmBadgeL@image{}
\def\startPage#1{\def\@startPage{#1}}
\startPage{}
\def\terms#1{\def\@terms{#1}}
\terms{}
\def\terms#1{\ClassWarning{\@classname}{The command \string\terms{} is
obsolete. I am going to ignore it}}
\def\keywords#1{\def\@keywords{#1}}
\keywords{}
\renewenvironment{abstract}{\Collect@Body\@saveabstract}{}
\long\def\@saveabstract#1{\long\gdef\@abstract{#1}}
\@saveabstract{}
\long\def\@lempty{}
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printcss}[true]{%
\if@ACM@printcss
\ClassInfo{\@classname}{Printing CSS}%
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printccs}[true]{%
\if@ACM@printccs
\ClassInfo{\@classname}{Printing CCS}%
\else
\ClassInfo{\@classname}{Suppressing CSS}%
\fi}{\ClassError{\@classname}{printcss must be true or false}}
\ClassInfo{\@classname}{Suppressing CCS}%
\fi}{\ClassError{\@classname}{printccs must be true or false}}
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printacmref}[true]{%
\if@ACM@printacmref
\ClassInfo{\@classname}{Printing bibformat}%
@ -1038,8 +1189,12 @@ Computing Machinery]
\else
\ClassInfo{\@classname}{Suppressing folios}%
\fi}{\ClassError{\@classname}{printfolios must be true or false}}
\define@cmdkey{@ACM@topmatter@}[@ACM@]{authorsperrow}[0]{%
\IfInteger{#1}{\ClassInfo{\@classname}{Setting authorsperrow to
#1}}{\ClassWarning{\@classname}{Parameter authorsperrow must be
numerical. Ignoring the input #1}\gdef\@ACM@authorsperrow{0}}}
\def\settopmatter#1{\setkeys{@ACM@topmatter@}{#1}}
\settopmatter{printcss=true, printacmref=true}
\settopmatter{printccs=true, printacmref=true}
\if@ACM@manuscript
\settopmatter{printfolios=true}
\else
@ -1049,6 +1204,7 @@ Computing Machinery]
\settopmatter{printfolios=false}
\fi
\fi
\settopmatter{authorsperrow=0}
\def\@received{}
\newcommand\received[2][]{\def\@tempa{#1}%
\ifx\@tempa\@empty
@ -1073,13 +1229,14 @@ Computing Machinery]
\let\@concepts\@empty
\newcommand\ccsdesc[2][100]{%
\ccsdesc@parse#1~#2~}
\RequirePackage{textcomp}
\def\ccsdesc@parse#1~#2~#3~{%
\expandafter\ifx\csname CCS@#2\endcsname\relax
\expandafter\gdef\csname CCS@#2\endcsname{\textbullet\textbf{#2} $\to$ }%
\expandafter\gdef\csname CCS@#2\endcsname{\textbullet\ \textbf{#2} \textrightarrow\ }%
\g@addto@macro{\@concepts}{\csname CCS@#2\endcsname}\fi
\expandafter\g@addto@macro\expandafter{\csname CCS@#2\endcsname}{%
\ifnum#1>499\textbf{#3; }\else
\ifnum#1>299\textit{#3; }\else
\ifnum#1>499\textbf{#3}; \else
\ifnum#1>299\textit{#3}; \else
#3; \fi\fi}}
\newif\if@printcopyright
\@printcopyrighttrue
@ -1104,11 +1261,13 @@ Computing Machinery]
\fi
\ifnum\acm@copyrightmode=3\relax % rightsretained
\@acmownedfalse
\acmPrice{}%
\fi
\ifnum\acm@copyrightmode=4\relax % usgov
\@printpermissiontrue
\@printcopyrightfalse
\@acmownedfalse
\acmPrice{}%
\fi
\ifnum\acm@copyrightmode=6\relax % cagov
\@acmownedfalse
@ -1130,32 +1289,32 @@ Computing Machinery]
\def\@copyrightowner{%
\ifcase\acm@copyrightmode\relax % none
\or % acmcopyright
ACM\@.
Association for Computing Machinery.
\or % acmlicensed
Copyright held by the owner/author(s). Publication rights licensed to
ACM\@.
Association for Computing Machinery.
\or % rightsretained
Copyright held by the owner/author(s).
\or % usgov
\or % usgovmixed
ACM\@.
Association for Computing Machinery.
\or % cagov
Crown in Right of Canada.
\or %cagovmixed
ACM\@.
Association for Computing Machinery.
\or %licensedusgovmixed
Copyright held by the owner/author(s). Publication rights licensed to
ACM\@.
Association for Computing Machinery.
\or %licensedcagovmixed
Copyright held by the owner/author(s). Publication rights licensed to
ACM\@.
Association for Computing Machinery.
\or % othergov
ACM\@.
Association for Computing Machinery.
\or % licensedothergov
Copyright held by the owner/author(s). Publication rights licensed to
ACM\@.
Association for Computing Machinery.
\fi}
\def\@formatdoi#1{\url{http://dx.doi.org/#1}}
\def\@formatdoi#1{\url{https://doi.org/#1}}
\def\@copyrightpermission{%
\ifcase\acm@copyrightmode\relax % none
\or % acmcopyright
@ -1282,8 +1441,9 @@ Computing Machinery]
\let\@footnotemark\@footnotemark@nolink
\let\@footnotetext\@footnotetext@nolink
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\@topnum\z@ % this prevents figures from falling at the top of page
% 1
\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 bottom either
\hsize=\textwidth
\def\@makefnmark{\hbox{\@textsuperscript{\@thefnmark}}}%
\@mktitle\if@ACM@sigchiamode\else\@mkauthors\fi\@mkteasers
@ -1300,17 +1460,24 @@ Computing Machinery]
\footnotetextcopyrightpermission{%
\def\par{\let\par\@par}\parindent\z@\@setthanks}%
\fi
\footnotetextcopyrightpermission{\parindent\z@\parskip0.1\baselineskip
\footnotetextcopyrightpermission{%
\if@ACM@authordraft
\raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries
Unpublished
working draft. Not for distribution}}%
\color[gray]{0.9}%
\fi
\parindent\z@\parskip0.1\baselineskip
\if@ACM@authorversion\else
\if@printpermission\@copyrightpermission\par\fi
\fi
\if@ACM@manuscript\else
\if@ACM@journal\else % Print the conference short name
{\itshape \acmConference@shortname, \acmConference@venue}\par
\if@ACM@journal\else % Print the conference information
{\itshape \acmConference@shortname, \acmConference@date, \acmConference@venue}\par
\fi
\fi
\if@printcopyright
\copyright\ \@copyrightyear\ \@copyrightowner\
\copyright\ \@copyrightyear\ \@copyrightowner\\
\else
\@copyrightyear.\
\fi
@ -1333,29 +1500,25 @@ Computing Machinery]
\fi\\
\else
\if@ACM@journal
\@permissionCodeOne/\@acmYear/\@acmMonth-ART\@acmArticle\
\$\@acmPrice\\
DOI: \nolinkurl{\@acmDOI}%
\@permissionCodeOne/\@acmYear/\@acmMonth-ART\@acmArticle
\ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\
\@formatdoi{\@acmDOI}%
\else % Conference
\@acmISBN
ACM~ISBN~\@acmISBN
\ifx\@acmPrice\@empty.\else\dots\$\@acmPrice\fi\\
DOI: \nolinkurl{\@acmDOI}%
\@formatdoi{\@acmDOI}%
\fi
\fi
\fi}%
\fi}
\endgroup
\setcounter{footnote}{0}%
\@mkabstract
\if@ACM@printcss
\if@ACM@printccs
\ifx\@concepts\@empty\else\bgroup
{\@specialsection{CCS Concepts}%
\@concepts\par}\egroup
\fi
\fi
\if\@terms\@empty\else\bgroup
{\@specialsection{General Terms}%
\@terms\par}\egroup
\fi
\ifx\@keywords\@empty\else\bgroup
{\if@ACM@journal
\@specialsection{Additional Key Words and Phrases}%
@ -1485,7 +1648,7 @@ Computing Machinery]
\or % sigchi-a
\Huge\bfseries
\fi}
\def\@subtitlefont{%
\def\@subtitlefont{\normalsize
\ifcase\ACM@format@nr
\relax % manuscript
\mdseries
@ -1573,27 +1736,29 @@ Computing Machinery]
\newbox\@ACM@commabox
\def\@ACM@addtoaddress#1{%
\ifvmode\else
\if@ACM@affiliation@obeypunctuation\else
\setbox\@ACM@commabox=\hbox{, }%
\unskip\cleaders\copy\@ACM@commabox\hskip\wd\@ACM@commabox
\fi
\fi\fi
#1}
\if@ACM@journal
\let\position\@gobble
\def\institution#1{#1\ignorespaces}%
\let\department\@gobble
\newcommand\department[2][0]{}%
\let\streetaddress\@gobble
\let\city\@gobble
\let\state\@gobble
\let\postcode\@gobble
\let\country\@gobble
\else
\def\position#1{#1\par}%
\def\institution#1{#1\par}%
\def\department#1{#1\par}%
\def\streetaddress#1{#1\par}%
\def\position#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
\def\institution#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
\newcommand\department[2][0]{\if@ACM@affiliation@obeypunctuation
#2\else#2\par\fi}%
\def\streetaddress#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
\let\city\@ACM@addtoaddress
\let\state\@ACM@addtoaddress
\def\postcode#1{\unskip\space#1}%
\def\postcode#1{\if@ACM@affiliation@obeypunctuation#1\else\unskip\space#1\fi}%
\let\country\@ACM@addtoaddress
\fi
\def\@mkauthors{\begingroup
@ -1670,12 +1835,17 @@ Computing Machinery]
\def\affiliation##1##2{%
\def\@tempa{##2}\ifx\@tempa\@empty\else
\ifx\@currentaffiliations\@empty
\gdef\@currentaffiliations{\@affiliationfont##2}%
\gdef\@currentaffiliations{%
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}%
\@affiliationfont##2}%
\else
\g@addto@macro{\@currentaffiliations}{\and##2}%
\g@addto@macro{\@currentaffiliations}{\and
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}##2}%
\fi
\fi
\global\let\and\@typeset@author@line}
\global\let\and\@typeset@author@line}%
\global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par\medskip
\noindent\addresses\@typeset@author@line
\par\medskip}%
@ -1694,6 +1864,9 @@ Computing Machinery]
\def\@mkauthors@iii{%
\author@bx@wd=\textwidth\relax
\advance\author@bx@wd by -\author@bx@sep\relax
\ifnum\@ACM@authorsperrow>0\relax
\divide\author@bx@wd by \@ACM@authorsperrow\relax
\else
\ifcase\num@authorgroups
\relax % 0?
\or % 1=one author per row
@ -1706,6 +1879,7 @@ Computing Machinery]
\else % three authors per row
\divide\author@bx@wd by 3\relax
\fi
\fi
\advance\author@bx@wd by -\author@bx@sep\relax
\gdef\@currentauthors{}%
\gdef\@currentaffiliation{}%
@ -1721,9 +1895,13 @@ Computing Machinery]
\g@addto@macro\@currentaffiliation{\par\nolinkurl{##2}}%
\fi}%
\def\affiliation##1##2{\ifx\@currentaffiliation\@empty
\gdef\@currentaffiliation{##2}%
\gdef\@currentaffiliation{%
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}##2}%
\else
\g@addto@macro\@currentaffiliation{\par##2}%
\g@addto@macro\@currentaffiliation{\par
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}##2}%
\fi
\global\let\and\@typeset@author@bx
}%
@ -1735,12 +1913,16 @@ Computing Machinery]
\def\@mkauthors@iv{%
\author@bx@wd=\columnwidth\relax
\advance\author@bx@wd by -\author@bx@sep\relax
\ifnum\@ACM@authorsperrow>0\relax
\divide\author@bx@wd by \@ACM@authorsperrow\relax
\else
\ifcase\num@authorgroups
\relax % 0?
\or % 1=one author per row
\else % 2=two authors per row
\divide\author@bx@wd by 2\relax
\fi
\fi
\advance\author@bx@wd by -\author@bx@sep\relax
\gdef\@currentauthors{}%
\gdef\@currentaffiliation{}%
@ -1756,16 +1938,21 @@ Computing Machinery]
\g@addto@macro\@currentaffiliation{\par\nolinkurl{##2}}%
\fi}%
\def\affiliation##1##2{\ifx\@currentaffiliation\@empty
\gdef\@currentaffiliation{##2}%
\gdef\@currentaffiliation{%
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}##2}%
\else
\g@addto@macro\@currentaffiliation{\par##2}%
\g@addto@macro\@currentaffiliation{\par
\setkeys{@ACM@affiliation@}{obeypunctuation=false}%
\setkeys{@ACM@affiliation@}{##1}##2}%
\fi
\global\let\and\@typeset@author@bx}%
\bgroup\hsize=\columnwidth
\par\raggedright\leftskip=\z@
\lineskip=1pc\noindent
\addresses\let\and\@typeset@author@bx\and\par\bigskip\egroup}
\def\@authornotemark{\g@addto@macro\@currentauthors{\footnotemark}}
\def\@authornotemark{\g@addto@macro\@currentauthors{\footnotemark\relax}}
\def\@@authornotemark#1{\g@addto@macro\@currentauthors{\footnotemark[#1]}}
\def\@mkteasers{%
\ifx\@teaserfigures\@empty\else
\def\@teaser##1{\par\bigskip\bgroup
@ -1776,16 +1963,20 @@ Computing Machinery]
\def\@setaddresses{}
\def\@mkabstract{\bgroup
\ifx\@abstract\@lempty\else
{\if@ACM@journal
{\phantomsection\addcontentsline{toc}{section}{Abstract}%
\if@ACM@journal
\small\noindent
\else
\section*{Abstract}%
\fi
\phantomsection\addcontentsline{toc}{section}{Abstract}%
\ignorespaces\@abstract\par}%
\fi\egroup}
\def\@mkbibcitation{\bgroup
\def\footnotemark{}%
\def\\{\unskip{} \ignorespaces}%
\def\footnote{\ClassError{\@classname}{Please do note use footnotes
inside \string\title{} or \string\author{} command! Use
\string\titlenote{} or \string\authornote{} instead!}}%
\par\medskip\small\noindent{\bfseries ACM Reference format:}\par\nobreak
\noindent\authors. \@acmYear. \@title.
\if@ACM@journal
@ -1799,7 +1990,7 @@ Computing Machinery]
\ (\acmConference@shortname)\fi
,} \ref{TotPages}~pages.
\fi\par
\noindent DOI: \nolinkurl{\@acmDOI}
\noindent\@formatdoi{\@acmDOI}
\par\egroup}
\def\@printendtopmatter{\par\medskip
\ifcase\ACM@format@nr
@ -1826,20 +2017,48 @@ Computing Machinery]
\RequirePackage{fancyhdr}
\if@ACM@review
\newsavebox{\ACM@linecount@bx}
\newlength\ACM@linecount@bxht
\newcount\ACM@linecount
\ACM@linecount\@ne\relax
\def\ACM@mk@linecount{%
\savebox{\ACM@linecount@bx}[4em][t]{\parbox[t]{4em}{%
\newlength\ACM@linecount@bxht\setlength{\ACM@linecount@bxht}{-\baselineskip}
\@tempcnta\@ne\relax
\loop{\color{ACMRed}\scriptsize\the\@tempcnta}\\
\advance\@tempcnta by \@ne
\addtolength{\ACM@linecount@bxht}{\baselineskip}
\ifdim\ACM@linecount@bxht<\textheight\repeat}}
\setlength{\ACM@linecount@bxht}{-\baselineskip}%
\loop{\color{ACMRed}\scriptsize\the\ACM@linecount}\\
\global\advance\ACM@linecount by \@ne
\addtolength{\ACM@linecount@bxht}{\baselineskip}%
\ifdim\ACM@linecount@bxht<\textheight\repeat}}}
\fi
\def\ACM@linecount{%
\def\ACM@linecountL{%
\if@ACM@review
\ACM@mk@linecount
\begin{picture}(0,0)%
\put(-26,-22){\usebox{\ACM@linecount@bx}}%
\end{picture}%
\fi}
\def\ACM@linecountR{%
\if@ACM@review
\ACM@mk@linecount
\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
% \numexpr rounding to nearest
\newcounter{ACM@time@hours}
\setcounter{ACM@time@hours}{\numexpr (\time - 30) / 60 \relax}
\newcounter{ACM@time@minutes}
\setcounter{ACM@time@minutes}{\numexpr \time - \theACM@time@hours * 60 \relax}
\newcommand\ACM@timestamp{%
\footnotesize%
\the\year-\two@digits{\the\month}-\two@digits{\the\day}{ }%
\two@digits{\theACM@time@hours}:\two@digits{\theACM@time@minutes}{ }%
page~\thepage\ (pp. \@startPage-\pageref*{TotPages})%
\ifx\@acmSubmissionID\@empty\relax\else
~Submission~ID: \@acmSubmissionID
\fi
}
\fi
\def\@shortauthors{\if@ACM@anonymous Anon.\else\shortauthors\fi}
\def\@headfootfont{%
\ifcase\ACM@format@nr
@ -1868,46 +2087,50 @@ Computing Machinery]
\renewcommand{\footrulewidth}{\z@}%
\ifcase\ACM@format@nr
\relax % manuscript
\fancyhead[LE]{\ACM@linecount\if@ACM@printfolios\thepage\fi}%
\fancyhead[LE]{\ACM@linecountL\if@ACM@printfolios\thepage\fi}%
\fancyhead[RO]{\if@ACM@printfolios\thepage\fi}%
\fancyhead[RE]{\@shortauthors}%
\fancyhead[LO]{\ACM@linecount\shorttitle}%
\fancyhead[LO]{\ACM@linecountL\shorttitle}%
\fancyfoot[RO,LE]{\footnotesize Manuscript submitted to ACM}%
\or % acmsmall
\fancyhead[LE]{\ACM@linecount\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}%
\fancyhead[LE]{\ACM@linecountL\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}%
\fancyhead[RO]{\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}%
\fancyhead[RE]{\@headfootfont\@shortauthors}%
\fancyhead[LO]{\ACM@linecount\@headfootfont\shorttitle}%
\fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}%
\fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No.
\@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
\or % acmlarge
\fancyhead[LE]{\ACM@linecount\@headfootfont
\@acmArticle:\if@ACM@printfolios\thepage\quad\textbullet\quad\fi\@shortauthors}%
\fancyhead[LO]{\ACM@linecount}%
\fancyhead[LE]{\ACM@linecountL\@headfootfont
\@acmArticle\if@ACM@printfolios:\thepage\fi\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 \@journalName, Vol. \@acmVolume, No.
\@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
\or % acmtog
\fancyhead[LE]{\ACM@linecount\@headfootfont
\@acmArticle:\if@ACM@printfolios\thepage\quad\textbullet\quad\fi\@shortauthors}%
\fancyhead[LO]{\ACM@linecount}%
\fancyhead[LE]{\ACM@linecountL\@headfootfont
\@acmArticle\if@ACM@printfolios:\thepage\fi\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}%
\shorttitle\quad\textbullet\quad\@acmArticle\if@ACM@printfolios:\thepage\fi\ACM@linecountR}%
\fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No.
\@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}%
\else % Proceedings
\fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}%
\fancyhead[LO]{\ACM@linecount\@headfootfont\shorttitle}%
\fancyhead[RE]{\@headfootfont\@shortauthors}%
\fancyhead[LE]{\ACM@linecount\@headfootfont\acmConference@shortname,
\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}%
\acmConference@date, \acmConference@venue\ACM@linecountR}%
\fi
\if@ACM@sigchiamode
\fancyheadoffset[L]{\dimexpr(\marginparsep+\marginparwidth)}%
\fi
\if@ACM@timestamp
\fancyfoot[LO,RE]{\ACM@timestamp}
\fi
}
\pagestyle{standardpagestyle}
\newdimen\@folio@wd
@ -1955,15 +2178,15 @@ Computing Machinery]
\renewcommand{\footrulewidth}{\z@}%
\ifcase\ACM@format@nr
\relax % manuscript
\fancyhead[L]{\ACM@linecount}%
\fancyhead[L]{\ACM@linecountL}%
\fancyfoot[RO,LE]{\if@ACM@printfolios\small\thepage\fi}%
\fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}%
\or % acmsmall
\fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No.
\@acmNumber, Article \@acmArticle. Publication date:
\@acmPubDate.}%
\fancyhead[LE]{\ACM@linecount\@folioblob}%
\fancyhead[LO]{\ACM@linecount}%
\fancyhead[LE]{\ACM@linecountL\@folioblob}%
\fancyhead[LO]{\ACM@linecountL}%
\fancyhead[RO]{\@folioblob}%
\fancyheadoffset[RO,LE]{0.6\@folio@wd}%
\or % acmlarge
@ -1971,18 +2194,28 @@ Computing Machinery]
\@acmNumber, Article \@acmArticle. Publication date:
\@acmPubDate.}%
\fancyhead[RO]{\@folioblob}%
\fancyhead[LE]{\ACM@linecount\@folioblob}%
\fancyhead[LO]{\ACM@linecount}%
\fancyhead[LE]{\ACM@linecountL\@folioblob}%
\fancyhead[LO]{\ACM@linecountL}%
\fancyheadoffset[RO,LE]{1.4\@folio@wd}%
\or % acmtog
\fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No.
\@acmNumber, Article \@acmArticle. Publication date:
\@acmPubDate.}%
\fancyhead[L]{\ACM@linecount}%
\fancyhead[L]{\ACM@linecountL}%
\fancyhead[R]{\ACM@linecountR}%
\else % Conference proceedings
\fancyhead[L]{\ACM@linecount}%
\fancyhead[L]{\ACM@linecountL}%
\fancyhead[R]{\ACM@linecountR}%
\fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}%
\fi
\if@ACM@timestamp
\ifnum\ACM@format@nr=0\relax % Manuscript
\fancyfoot[LO,RE]{\ACM@timestamp\quad
\footnotesize Manuscript submitted to ACM}
\else
\fancyfoot[LO,RE]{\ACM@timestamp}
\fi
\fi
}
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
@ -2057,6 +2290,7 @@ Computing Machinery]
\fi
\def\@adddotafter#1{#1\@addpunct{.}}
\def\@addspaceafter#1{#1\@addpunct{\enspace}}
\providecommand*\@dotsep{4.5}
\def\@acmplainbodyfont{\itshape}
\def\@acmplainindent{\parindent}
\def\@acmplainheadfont{\scshape}
@ -2181,7 +2415,7 @@ Computing Machinery]
\ifx\@tempa\@tempb
arXiv:\href{http://arxiv.org/abs/#2}{#2}\else arXiv:#2%
\fi}
\normalsize\normalfont
\normalsize\normalfont\frenchspacing
\endinput
%%
%% End of file `acmart.cls'.

View File

@ -145,5 +145,5 @@
;; Ensure that "acmart.tex" is used, since "style.tex"
;; re-defines commands.
(struct-copy part doc [to-collect
(cons (terms) ; FIXME
(cons invisible-element-to-collect-for-acmart-extras
(part-to-collect doc))]))

View File

@ -1,20 +1,11 @@
% Define \SXtitle to lift \SSubtitle out:
\newcommand{\SXtitle}[2][]{\title#1{\let\SSubtitle\SSubtitleDrop#2}\SExtractSubtitle#2\SExtractSubtitleDone}
\def\SSubtitleDrop#1{}
\def\SExtractSubtitleDone {}
\def\SExtractSubtitle{\futurelet\next\SExtractSubtitleX}
\def\SExtractSubtitleX#1{\ifx{#1}\SSubtitle \let\Snext\SWithSubtitle \else \let\Snext\SExtractSubtitleY \fi \Snext}
\def\SExtractSubtitleY{\ifx\next\SExtractSubtitleDone \let\Snext\relax \else \let\Snext\SExtractSubtitle \fi \Snext}
\def\SWithSubtitle#1{\subtitle{#1}\SExtractSubtitle}
\renewcommand{\titleAndVersionAndAuthors}[3]{\SXtitle{#1}#3\maketitle}
\renewcommand{\titleAndVersionAndAuthors}[3]{\title{#1}#3\maketitle}
\renewcommand{\titleAndEmptyVersionAndAuthors}[3]{\titleAndVersionAndAuthors{#1}{#2}{#3}}
\renewcommand{\titleAndVersionAndEmptyAuthors}[3]{\SXtitle{#1}\author{Anonymous Author(s)}\maketitle}
\renewcommand{\titleAndVersionAndEmptyAuthors}[3]{\title{#1}\author{Anonymous Author(s)}\maketitle}
\renewcommand{\titleAndEmptyVersionAndEmptyAuthors}[3]{\titleAndVersionAndEmptyAuthors{#1}{#2}{#3}}
\renewcommand{\titleAndVersionAndAuthorsAndShort}[4]{\SXtitle[[#4]]{#1}#3\maketitle}
\renewcommand{\titleAndVersionAndAuthorsAndShort}[4]{\title[#4]{#1}#3\maketitle}
\renewcommand{\titleAndEmptyVersionAndAuthorsAndShort}[4]{\titleAndVersionAndAuthorsAndShort{#1}{#2}{#3}{#4}}
\renewcommand{\titleAndVersionAndEmptyAuthorsAndShort}[4]{\SXtitle[[#4]]{#1}\author{Anonymous Author(s)}\maketitle}
\renewcommand{\titleAndVersionAndEmptyAuthorsAndShort}[4]{\title[#4]{#1}\author{Anonymous Author(s)}\maketitle}
\renewcommand{\titleAndEmptyVersionAndEmptyAuthorsAndShort}[4]{\titleAndVersionAndEmptyAuthorsAndShort{#1}{#2}{#3}{#4}}
% Support plain `author' while enabling `authorinfo': for each

View File

@ -33,18 +33,30 @@
defexamples*
as-examples
make-base-eval
make-base-eval-factory
make-eval-factory
close-eval
(contract-out
[make-base-eval
(->* [] [#:pretty-print? any/c #:lang lang-option/c] #:rest any/c any)]
[make-base-eval-factory
eval-factory/c]
[make-eval-factory
eval-factory/c]
[close-eval
(-> any/c any)]
[scribble-exn->string
(-> any/c string?)]
[scribble-eval-handler
(parameter/c (-> (-> any/c any) boolean? any/c any))]
[make-log-based-eval
(-> path-string? (or/c 'record 'replay) any)])
scribble-exn->string
scribble-eval-handler
with-eval-preserve-source-locations)
(provide/contract
[make-log-based-eval
(-> path-string? (or/c 'record 'replay) (-> any/c any))])
(define lang-option/c
(or/c module-path? (list/c 'special symbol?) (cons/c 'begin list?)))
(define eval-factory/c
(->* [(listof module-path?)] [#:pretty-print? any/c #:lang lang-option/c] any))
(define scribble-eval-handler
(make-parameter (lambda (ev c? x) (ev x))))

View File

@ -8,12 +8,12 @@
(provide examples
;; Re-exports:
make-base-eval
make-base-eval-factory
make-eval-factory
close-eval
make-log-based-eval
scribble-exn->string
scribble-eval-handler
make-log-based-eval)

View File

@ -1085,6 +1085,9 @@
[(#\↕) "$\\updownarrow$"]
[(#\↔) "$\\leftrightarrow$"]
[(#\↗) "$\\nearrow$"]
[(#\↝) "$\\leadsto$"]
[(#\↱) "$\\Lsh$"]
[(#\↰) "$\\Rsh$"]
[(#\⇕) "$\\Updownarrow$"]
[(#\א) "$\\aleph$"]
[(#\) "$\\prime$"]
@ -1159,6 +1162,7 @@
[(#\) "$\\vee$"]
[(#\∧) "$\\wedge$"]
[(#\◃) "$\\triangleright$"]
[(#\◊) "$\\Diamond$"]
[(#\⊙) "$\\odot$"]
[(#\★) "$\\star$"]
[(#\†) "$\\dagger$"]

View File

@ -49,8 +49,7 @@
(define vers (history-entry-vers e))
(list (if (zero? i)
null
(list null ; needed to avoid " " dropped as whitespace
" "))
(list (linebreak)))
(history-entry-what e)
" in version "
vers

View File

@ -16,11 +16,19 @@
(provide define-cite
author+date-style number-style
make-bib in-bib (rename-out [auto-bib? bib?])
proceedings-location journal-location book-location
techrpt-location dissertation-location
author-name org-author-name
(contract-out
[authors (->* (content?) #:rest (listof content?) element?)])
[authors (->* (content?) #:rest (listof content?) element?)]
[proceedings-location
(->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:series any/c #:volume any/c] element?)]
[journal-location
(->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:number any/c #:volume any/c] element?)]
[book-location
(->* [] [#:edition any/c #:publisher any/c] element?)]
[techrpt-location
(-> #:institution any/c #:number any/c element?)]
[dissertation-location
(->* [#:institution any/c] [#:degree any/c] element?)])
other-authors
editor
abbreviate-given-names)
@ -365,15 +373,17 @@
(define-syntax (define-cite stx)
(syntax-parse stx
[(_ (~var ~cite) citet generate-bibliography
[(_ (~var ~cite id) citet:id generate-bibliography:id
(~or (~optional (~seq #:style style) #:defaults ([style #'author+date-style]))
(~optional (~seq #:disambiguate fn) #:defaults ([fn #'#f]))
(~optional (~seq #:render-date-in-bib render-date-bib) #:defaults ([render-date-bib #'#f]))
(~optional (~seq #:spaces spaces) #:defaults ([spaces #'1]))
(~optional (~seq #:render-date-in-cite render-date-cite) #:defaults ([render-date-cite #'#f]))
(~optional (~seq #:date<? date<?) #:defaults ([date<? #'#f]))
(~optional (~seq #:date=? date=?) #:defaults ([date=? #'#f]))) ...)
(syntax/loc stx
(~optional (~seq #:date=? date=?) #:defaults ([date=? #'#f]))
(~optional (~seq #:cite-author cite-author:id) #:defaults ([cite-author #'#f]))
(~optional (~seq #:cite-year cite-year:id) #:defaults ([cite-year #'#f]))) ...)
(quasisyntax/loc stx
(begin
(define group (make-bib-group (make-hasheq)))
(define the-style style)
@ -382,7 +392,15 @@
(define (citet bib-entry . bib-entries)
(add-inline-cite group (cons bib-entry bib-entries) the-style date<? date=?))
(define (generate-bibliography #:tag [tag "doc-bibliography"] #:sec-title [sec-title "Bibliography"])
(gen-bib tag group sec-title the-style fn render-date-bib render-date-cite date<? date=? spaces))))]))
(gen-bib tag group sec-title the-style fn render-date-bib render-date-cite date<? date=? spaces))
#,(when (identifier? #'cite-author)
#'(define (cite-author bib-entry)
(add-cite group bib-entry 'autobib-author #f #f the-style)))
#,(when (identifier? #'cite-year)
#'(define (cite-year bib-entry . bib-entries)
(add-date-cites group (cons bib-entry bib-entries)
(send the-style get-group-sep)
the-style #t date<? date=?)))))]))
(define (ends-in-punc? e)
(regexp-match? #rx"[.!?,]$" (content->string e)))
@ -475,12 +493,12 @@
#:pages [pages #f]
#:series [series #f]
#:volume [volume #f])
(let* ([s @elem{In @italic{@elem{Proc. @|location|}}}]
(let* ([s @elem{In @italic{@elem{Proc. @to-string[location]}}}]
[s (if series
@elem{@|s|, @(format "~a" series)}
@elem{@|s|, @to-string[series]}
s)]
[s (if volume
@elem{@|s| volume @(format "~a" volume)}
@elem{@|s| volume @to-string[volume]}
s)]
[s (if pages
@elem{@|s|, pp. @(to-string (car pages))--@(to-string (cadr pages))}
@ -492,7 +510,7 @@
#:pages [pages #f]
#:number [number #f]
#:volume [volume #f])
(let* ([s @italic{@|location|}]
(let* ([s @italic{@to-string[location]}]
[s (if volume
@elem{@|s| @(to-string volume)}
s)]
@ -508,12 +526,12 @@
#:edition [edition #f]
#:publisher [publisher #f])
(let* ([s (if edition
@elem{@(string-titlecase edition) edition}
@elem{@(string-titlecase (to-string edition)) edition}
#f)]
[s (if publisher
(if s
@elem{@|s|. @|publisher|}
publisher)
@elem{@|s|. @to-string[publisher]}
@elem{@to-string[publisher]})
s)])
(unless s
(error 'book-location "no arguments"))
@ -522,12 +540,12 @@
(define (techrpt-location
#:institution org
#:number num)
@elem{@|org|, @|num|})
@elem{@to-string[org], @to-string[num]})
(define (dissertation-location
#:institution org
#:degree [degree "PhD"])
@elem{@|degree| dissertation, @|org|})
@elem{@to-string[degree] dissertation, @to-string[org]})
;; ----------------------------------------

View File

@ -0,0 +1,45 @@
#lang racket/base
(require rackunit scribble/example setup/path-to-relative
(only-in racket/contract exn:fail:contract:blame?))
(test-case "scribble/example contracts"
(define blames-this-module?
(let* ([this-module
(path->relative-string/library
(variable-reference->module-source (#%variable-reference)))]
[blame-rx (regexp (string-append "blaming: " this-module))])
(λ (x)
(and (exn:fail:contract:blame? x)
(regexp-match? blame-rx (exn-message x))))))
(check-exn blames-this-module?
(λ () (make-base-eval #:lang #f '(+ 2 2))))
(check-exn blames-this-module?
(λ () (make-base-eval #:lang '(+ 2 2))))
(check-exn blames-this-module?
(λ () (make-base-eval-factory 'racket/dict)))
(check-exn blames-this-module?
(λ () (make-base-eval-factory '() #:lang #f '(+ 2 2))))
(check-exn blames-this-module?
(λ () (make-base-eval-factory '() #:lang '(+ 2 2))))
(check-exn blames-this-module?
;; https://github.com/racket/scribble/issues/117
(λ () (make-eval-factory 'racket/dict)))
(check-exn blames-this-module?
(λ () (make-eval-factory '() #:lang #f '(+ 2 2))))
(check-exn blames-this-module?
(λ () (make-eval-factory '() #:lang '(+ 2 2))))
(check-exn blames-this-module?
(λ () (scribble-eval-handler #f)))
(check-exn blames-this-module?
(λ () (scribble-eval-handler (λ (ev t) t))))
(check-exn blames-this-module?
(λ () (make-log-based-eval #f 'record)))
(check-exn blames-this-module?
(λ () (make-log-based-eval "foo.rkt" 'bad-mode)))
)

View File

@ -0,0 +1,56 @@
#lang racket/base
(require rackunit scriblib/autobib)
(test-case "define-cite"
;; Check that `define-cite` binds the expected identifiers
(let ()
(define-cite cite citet gen-bib)
(check-pred values (void cite citet gen-bib)))
(let ()
(define-cite cite citet gen-bib
#:cite-author cite-author
#:cite-year cite-year)
(check-pred values (void cite citet gen-bib cite-author cite-year))))
(test-case "proceedings-location"
(check-not-exn
(λ () (proceedings-location "RacketCon" #:pages '(1 2) #:series 3 #:volume 4)))
(check-not-exn
(λ () (proceedings-location 'PLDI)))
(check-exn exn:fail:contract?
(λ () (proceedings-location "USENIX" #:pages "4--5"))))
(test-case "journal-location"
(check-not-exn
(λ () (journal-location "CACM" #:pages '(1 2) #:number 3 #:volume 4)))
(check-not-exn
(λ () (journal-location 'JFP)))
(check-exn exn:fail:contract?
(λ () (journal-location "Journal of Chromatography" #:pages 30))))
(test-case "book-location"
(check-not-exn
(λ () (book-location #:edition 1 #:publisher "A.C. Clayton")))
(check-not-exn
(λ () (book-location #:edition 'B #:publisher 'Elsiver)))
(check-exn exn:fail?
(λ () (book-location))))
(test-case "techrpt-location"
(check-not-exn
(λ () (techrpt-location #:institution "MIT" #:number 'AIM-353)))
(check-exn exn:fail:contract?
(λ () (techrpt-location #:institution 'UCB))))
(test-case "dissertation-location"
(check-not-exn
(λ () (dissertation-location #:institution "New College")))
(check-not-exn
(λ () (dissertation-location #:institution 'Oberlin)))
(check-not-exn
(λ () (dissertation-location #:institution "Georgetown University" #:degree "BS")))
(check-exn exn:fail:contract?
(λ () (dissertation-location #:degree "PhD"))))