summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/acmart
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-12 22:10:14 +0000
committerKarl Berry <karl@freefriends.org>2018-11-12 22:10:14 +0000
commitaaa01e878281de6ba5f48687fc35f90f06a4cc36 (patch)
treef5f018f9367e4abbb682d4dc75653fbcc5e9cb15 /Master/texmf-dist/source/latex/acmart
parent16421eb2aea0392d27dc7ed55006cfffaed04d4c (diff)
acmart (12nov18)
git-svn-id: svn://tug.org/texlive/trunk@49137 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/acmart')
-rw-r--r--Master/texmf-dist/source/latex/acmart/acmart.dtx158
1 files changed, 145 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/acmart/acmart.dtx b/Master/texmf-dist/source/latex/acmart/acmart.dtx
index 79316ac956c..c452e635fc3 100644
--- a/Master/texmf-dist/source/latex/acmart/acmart.dtx
+++ b/Master/texmf-dist/source/latex/acmart/acmart.dtx
@@ -1,4 +1,3 @@
-
% \iffalse
%
% Copyright 2016-2018, Association for Computing Machinery
@@ -104,6 +103,7 @@
% Dirk Beyer,
% Joachim Breitner,
% Benjamin Byholm,
+% Nils Anders Danielsson,
% Michael Ekstrand,
% Matthew Fluet,
% Paolo G.~Giarrusso,
@@ -119,6 +119,7 @@
% John Owens,
% Joel Nider,
% Tobias Pape,
+% Philip Quinn,
% Mathias Rav,
% Andreas Reichinger,
% Matteo Riondato,
@@ -1189,6 +1190,35 @@
% A good way to do so is to put the contents into a
% \cs{minipage} of the width \cs{columnwidth}.
%
+%
+%\subsection{Descriptions of images}
+%\label{sec:descriptions}
+%
+% \DescribeMacro{\Description}%
+% Some readers of ACM publications might be visually challenged.
+% These readers might use a voice-over software to read aloud the
+% papers. It is important to provided them a description of each
+% image used in the paper.
+%
+% The command \cs{Description}\oarg{short description}\marg{long
+% description} should be placed inside every \texttt{figure},
+% \texttt{teaserfigure} or \texttt{marginfigure} environment to
+% provide a description of the image(s) used in the figure. Unlike
+% \cs{caption}, which is used alongside the image, \cs{Description} is
+% intended to be used instead of the image, for example,
+% \begin{verbatim}
+% \begin{figure}
+% \centering
+% \includegraphics{voltage}
+% \Description{A bell-like histogram centered at $0.5$~V with most
+% measurements between $0.2$~V and $0.8$~V}
+% \caption{Histogram of the measurements of voltage}
+% \label{fig:voltage}
+% \end{figure}
+% \end{verbatim}
+% At present the lack of descriptions generates a warning at
+% compilation.
+%
%\subsection{Theorems}
%\label{sec:ug_theorems}
%
@@ -1715,7 +1745,7 @@
\ProvidesFile{acmart.dtx}
%</gobble>
%<class>\ProvidesClass{acmart}
-[2018/10/20 v1.55 Typesetting articles for the Association for
+[2018/11/11 v1.56 Typesetting articles for the Association for
Computing Machinery]
% \end{macrocode}
%
@@ -1799,6 +1829,7 @@ Computing Machinery]
% \changes{1.53}{2018/04/14}{Rearranged docs}
% \changes{1.54}{2018/06/17}{Moved footnote stuff before hyperref call
% (Ross Moore)}
+% \changes{1.56}{2018/11/11}{Documented \cs{Description}}
%
% And the driver code:
% \begin{macrocode}
@@ -2580,7 +2611,7 @@ Computing Machinery]
\else
\hypersetup{hidelinks}
\fi
- \hypersetup{pdflang={English},
+ \hypersetup{pdflang={en},
pdfdisplaydoctitle}}
% \end{macrocode}
%
@@ -2668,6 +2699,7 @@ Computing Machinery]
% \changes{v1.17}{2016/07/07}{Slightly decreased margins for sigs}
% \changes{v1.29}{2017/01/22}{Increased head to 13pt}
% \changes{v1.40}{2017/07/15}{Added heightrounded to geometry}
+% \changes{v1.56}{2018/10/16}{Make two-column layouts flush (Philip Quinn)}
% We use |geometry| for dimensions. Note that the present margins do not
% depend on the font size option---we might need to change this.
% See \url{https://github.com/borisveytsman/acmart/issues/5#issuecomment-272881329}.
@@ -2843,6 +2875,28 @@ Computing Machinery]
% \end{macrocode}
%
% \end{macro}
+%
+% In two-column layouts, force both columns to be the same height by inserting
+% extra internal vertical space to fill out the page.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+%
%\subsection{Fonts}
%\label{sec:fonts}
%
@@ -2898,12 +2952,15 @@ Computing Machinery]
% \changes{v1.51}{2018/04/05}{XeTeX now uses OTF fonts (Joachim
% Breitner)}
% \changes{v1.54}{2018/07/16}{XeTeX now uses T1 encoding}
+% \changes{v1.56}{2018/11/11}{Looks like XeTeX requires explicit
+% monotype font delcaration}
% We use Libertine throughout.
% \begin{macrocode}
\if@ACM@newfonts
\RequirePackage[T1]{fontenc}
\ifxetex
\RequirePackage[tt=false]{libertine}
+ \setmonofont{inconsolata}
\else
\RequirePackage[tt=false, type1=true]{libertine}
\fi
@@ -2933,6 +2990,55 @@ Computing Machinery]
% \end{macrocode}
%
%
+%
+%\subsection{Image descriptions}
+%\label{sec:description}
+%
+% \begin{macro}{\if@Description@present}
+% \changes{v1.56}{2018/11/11}{Added macro}
+% A local switch: whether there is a description in the given figure
+% \begin{macrocode}
+\newif\if@Description@present
+\@Description@presenttrue
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@undescribed@images}
+% \changes{v1.56}{2018/11/11}{Added macro}
+% A global switch whether some images were \emph{not} described
+% \begin{macrocode}
+\newif\if@undescribed@images
+\@undescribed@imagesfalse
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Description}
+% \changes{v1.56}{2018/11/11}{Added macro}
+% The Description macro right now just sets switches
+% \begin{macrocode}
+\newcommand\Description[2][]{\global\@Description@presenttrue}
+% \end{macrocode}
+% \end{macro}
+%
+% The global warning
+% \begin{macrocode}
+\AtEndDocument{\if@undescribed@images
+ \ClassWarningNoLine{\@classname}{Some images may lack descriptions}\fi}
+% \end{macrocode}
+%
+% Hooks for figures
+% \begin{macrocode}
+\AtBeginEnvironment{figure}{\@Description@presentfalse}
+\AtBeginEnvironment{figure*}{\@Description@presentfalse}
+\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}
+% \end{macrocode}
+%
+%
%\subsection{Floats}
%\label{sec:floats}
%
@@ -3003,10 +3109,17 @@ Computing Machinery]
%
% \begin{macro}{\@marginfigure}
% \changes{v1.12}{2016/05/30}{Now centering by default}
+% \changes{v1.56}{2018/11/11}{Added checking for description}
% The processing of the saved text
% \begin{macrocode}
-\long\def\@marginfigure#1{\bgroup\captionsetup{type=figure}%
- \marginpar{\centering\small#1}\egroup}
+\long\def\@marginfigure#1{\bgroup
+ \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}
% \end{macrocode}
%
% \end{macro}
@@ -4212,9 +4325,10 @@ Computing Machinery]
% \end{macrocode}
%
% \begin{macro}{\@concepts}
-% This is the storage macro for concepts
+% This is the storage macro and counter for concepts
% \begin{macrocode}
\let\@concepts\@empty
+\newcounter{@concepts}
% \end{macrocode}
%
% \end{macro}
@@ -4236,11 +4350,14 @@ Computing Machinery]
% \changes{v1.29}{2017/01/22}{Add spacing after bullet and around
% rightarrow; semicolon separators no longer in bold/italic (John Wickerson)}
% \changes{v1.40}{2017/05/27}{Now we can parse |Significance~General| nodes}
+% \changes{v1.56}{2018/10/23}{End the concepts list with a period
+% (Philip Quinn)}
% The parser of the expression |Significance~General~Specific| (we need
% |textcomp| for |\textrightarrow|). Note that |Specific| can be empty!
% \begin{macrocode}
\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}}%
@@ -4254,9 +4371,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}
% \end{macrocode}
@@ -5539,14 +5657,20 @@ Computing Machinery]
% \end{macro}
%
% \begin{macro}{\@mkteasers}
-% Typesetting the teasers
+% Typesetting the teasers
+% \changes{v1.56}{2018/11/1}{Added check for description}
% \begin{macrocode}
\def\@mkteasers{%
\ifx\@teaserfigures\@empty\else
\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}
% \end{macrocode}
%
@@ -6471,6 +6595,14 @@ Computing Machinery]
%\subsection{Acknowledgments}
%\label{sec:acks}
%
+% \begin{macro}{\acksname}
+% \changes{v1.56}{2018/10/16}{Added macro (Philip Quinn)}
+% \begin{macrocode}
+\newcommand\acksname{Acknowledgments}
+% \end{macrocode}
+%
+% \end{macro}
+%
% \begin{macro}{\acks}
% \changes{v1.19}{2016/07/28}{Include 'Acknowledgements' in PDF bookmarks
% (Matthew Fluet)}
@@ -6479,8 +6611,8 @@ Computing Machinery]
% \begin{macrocode}
\specialcomment{acks}{%
\begingroup
- \section*{Acknowledgments}
- \phantomsection\addcontentsline{toc}{section}{Acknowledgments}
+ \section*{\acksname}
+ \phantomsection\addcontentsline{toc}{section}{\acksname}
}{%
\endgroup
}