Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

1175 lines (882 sloc) 32.998 kb
% LaTeX Class/Style File
% Name: sigplanconf.cls
% Purpose: A LaTeX 2e class file for SIGPLAN conference proceedings.
% This class file supercedes acm_proc_article-sp,
% sig-alternate, and sigplan-proc.
% Author: Paul C. Anagnostopoulos
% Windfall Software
% 978 371-2316
% Created: 12 September 2004
% Revisions: See end of file.
\ProvidesClass{sigplanconf}[2007/03/13 v1.5 ACM SIGPLAN Proceedings]
% The following few pages contain LaTeX programming extensions adapted
% from the ZzTeX macro package.
% Token Hackery
% ----- -------
\def \@expandaftertwice {\expandafter\expandafter\expandafter}
\def \@expandafterthrice {\expandafter\expandafter\expandafter\expandafter
% This macro discards the next token.
\def \@discardtok #1{}% token
% This macro removes the `pt' following a dimension.
{\catcode `\p = 12 \catcode `\t = 12
\gdef \@remover #1pt{#1}
} % \catcode
% This macro extracts the contents of a macro and returns it as plain text.
% Usage: \expandafter\@defof \meaning\macro\@mark
\def \@defof #1:->#2\@mark{#2}
% Control Sequence Names
% ------- -------- -----
\def \@name #1{% {\tokens}
\csname \expandafter\@discardtok \string#1\endcsname}
\def \@withname #1#2{% {\command}{\tokens}
\expandafter#1\csname \expandafter\@discardtok \string#2\endcsname}
% Flags (Booleans)
% ----- ----------
% The boolean literals \@true and \@false are appropriate for use with
% the \if command, which tests the codes of the next two characters.
\def \@true {TT}
\def \@false {FL}
\def \@setflag #1=#2{\edef #1{#2}}% \flag = boolean
% IF and Predicates
% -- --- ----------
% A "predicate" is a macro that returns \@true or \@false as its value.
% Such values are suitable for use with the \if conditional. For example:
% \if \@oddp{\x} <then-clause> \else <else-clause> \fi
% A predicate can be used with \@setflag as follows:
% \@setflag \flag = {<predicate>}
% Here are the predicates for TeX's repertoire of conditional
% commands. These might be more appropriately interspersed with
% other definitions in this module, but what the heck.
% Some additional "obvious" predicates are defined.
\def \@eqlp #1#2{\ifnum #1 = #2\@true \else \@false \fi}
\def \@neqlp #1#2{\ifnum #1 = #2\@false \else \@true \fi}
\def \@lssp #1#2{\ifnum #1 < #2\@true \else \@false \fi}
\def \@gtrp #1#2{\ifnum #1 > #2\@true \else \@false \fi}
\def \@zerop #1{\ifnum #1 = 0\@true \else \@false \fi}
\def \@onep #1{\ifnum #1 = 1\@true \else \@false \fi}
\def \@posp #1{\ifnum #1 > 0\@true \else \@false \fi}
\def \@negp #1{\ifnum #1 < 0\@true \else \@false \fi}
\def \@oddp #1{\ifodd #1\@true \else \@false \fi}
\def \@evenp #1{\ifodd #1\@false \else \@true \fi}
\def \@rangep #1#2#3{\if \@orp{\@lssp{#1}{#2}}{\@gtrp{#1}{#3}}\@false \else
\@true \fi}
\def \@tensp #1{\@rangep{#1}{10}{19}}
\def \@dimeqlp #1#2{\ifdim #1 = #2\@true \else \@false \fi}
\def \@dimneqlp #1#2{\ifdim #1 = #2\@false \else \@true \fi}
\def \@dimlssp #1#2{\ifdim #1 < #2\@true \else \@false \fi}
\def \@dimgtrp #1#2{\ifdim #1 > #2\@true \else \@false \fi}
\def \@dimzerop #1{\ifdim #1 = 0pt\@true \else \@false \fi}
\def \@dimposp #1{\ifdim #1 > 0pt\@true \else \@false \fi}
\def \@dimnegp #1{\ifdim #1 < 0pt\@true \else \@false \fi}
\def \@vmodep {\ifvmode \@true \else \@false \fi}
\def \@hmodep {\ifhmode \@true \else \@false \fi}
\def \@mathmodep {\ifmmode \@true \else \@false \fi}
\def \@textmodep {\ifmmode \@false \else \@true \fi}
\def \@innermodep {\ifinner \@true \else \@false \fi}
\long\def \@codeeqlp #1#2{\if #1#2\@true \else \@false \fi}
\long\def \@cateqlp #1#2{\ifcat #1#2\@true \else \@false \fi}
\long\def \@tokeqlp #1#2{\ifx #1#2\@true \else \@false \fi}
\long\def \@xtokeqlp #1#2{\expandafter\ifx #1#2\@true \else \@false \fi}
\long\def \@definedp #1{%
\expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname
\relax \@false \else \@true \fi}
\long\def \@undefinedp #1{%
\expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname
\relax \@true \else \@false \fi}
\def \@emptydefp #1{\ifx #1\@empty \@true \else \@false \fi}% {\name}
\let \@emptylistp = \@emptydefp
\long\def \@emptyargp #1{% {#n}
\@empargp #1\@empargq\@mark}
\long\def \@empargp #1#2\@mark{%
\ifx #1\@empargq \@true \else \@false \fi}
\def \@empargq {\@empargq}
\def \@emptytoksp #1{% {\tokenreg}
\expandafter\@emptoksp \the#1\@mark}
\long\def \@emptoksp #1\@mark{\@emptyargp{#1}}
\def \@voidboxp #1{\ifvoid #1\@true \else \@false \fi}
\def \@hboxp #1{\ifhbox #1\@true \else \@false \fi}
\def \@vboxp #1{\ifvbox #1\@true \else \@false \fi}
\def \@eofp #1{\ifeof #1\@true \else \@false \fi}
% Flags can also be used as predicates, as in:
% \if \flaga <then-clause> \else <else-clause> \fi
% Now here we have predicates for the common logical operators.
\def \@notp #1{\if #1\@false \else \@true \fi}
\def \@andp #1#2{\if #1%
\if #2\@true \else \@false \fi
\def \@orp #1#2{\if #1%
\if #2\@true \else \@false \fi
\def \@xorp #1#2{\if #1%
\if #2\@false \else \@true \fi
\if #2\@true \else \@false \fi
% Arithmetic
% ----------
\def \@increment #1{\advance #1 by 1\relax}% {\count}
\def \@decrement #1{\advance #1 by -1\relax}% {\count}
% Options
% -------
\@setflag \@blockstyle = \@false
\@setflag \@copyrightwanted = \@true
\@setflag \@explicitsize = \@false
\@setflag \@mathtime = \@false
\@setflag \@ninepoint = \@true
\newcount{\@numheaddepth} \@numheaddepth = 3
\@setflag \@onecolumn = \@false
\@setflag \@preprint = \@false
\@setflag \@reprint = \@false
\@setflag \@times = \@false
% Note that all the dangerous article class options are trapped.
\DeclareOption{9pt}{\@setflag \@ninepoint = \@true
\@setflag \@explicitsize = \@true}
\@setflag \@ninepoint = \@false
\@setflag \@explicitsize = \@true}
\@setflag \@ninepoint = \@false
\@setflag \@explicitsize = \@true}
\DeclareOption{blockstyle}{\@setflag \@blockstyle = \@true}
\DeclareOption{cm}{\@setflag \@times = \@false}
\DeclareOption{computermodern}{\@setflag \@times = \@false}
\DeclareOption{indentedstyle}{\@setflag \@blockstyle = \@false}
\DeclareOption{mathtime}{\@setflag \@mathtime = \@true}
\DeclareOption{nocopyrightspace}{\@setflag \@copyrightwanted = \@false}
\DeclareOption{numberedpars}{\@numheaddepth = 4}
%%%\DeclareOption{onecolumn}{\@setflag \@onecolumn = \@true}
\DeclareOption{preprint}{\@setflag \@preprint = \@true}
\DeclareOption{reprint}{\@setflag \@reprint = \@true}
\DeclareOption{times}{\@setflag \@times = \@true}
\DeclareOption{twocolumn}{\@setflag \@onecolumn = \@false}
\@setflag \@explicitsize = \@false
\if \@onecolumn
\if \@notp{\@explicitsize}%
\@setflag \@ninepoint = \@false
\def \@unsupportedoption #1{%
\ClassError{proc}{The standard '#1' option is not supported.}}
% This can be used with the 'reprint' option to get the final folios.
\def \setpagenumber #1{%
% Utilities
% ---------
#1 = #2
\advance #1 by -1\parskip}
% Document Parameters
% -------- ----------
% Page:
\if \@onecolumn
% Text area:
\if \@onecolumn
% Running foot:
% Paragraphs:
\if \@blockstyle
\setlength{\parskip}{5pt plus .1pt minus .5pt}
\pretolerance = 400
\tolerance = \pretolerance
\clubpenalty = 10000
\widowpenalty = 10000
% Standard vertical spaces:
\setvspace{\standardvspace}{5pt plus 1pt minus .5pt}
% Margin paragraphs:
\setlength{\skip\footins}{8pt plus 3pt minus 1pt}
\hrule width .5\columnwidth height .33pt depth 0pt}
\noindent \@makefnmark \hspace{1pt}#1}
% Floats:
\setlength{\floatsep}{18pt plus 4pt minus 2pt}
\setlength{\textfloatsep}{18pt plus 4pt minus 3pt}
\setlength{\intextsep}{10pt plus 4pt minus 3pt}
\setlength{\dblfloatsep}{18pt plus 4pt minus 2pt}
\setlength{\dbltextfloatsep}{20pt plus 4pt minus 3pt}
% Miscellaneous:
\errorcontextlines = 5
% Fonts
% -----
\if \@times
\if \@mathtime
%%% \usepackage{mathptm}%
\if \@ninepoint
\setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}%
\setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}%
\setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}%
\setlength{\abovedisplayshortskip}{2pt plus 1pt}%
\setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}%
\setlength{\abovedisplayshortskip}{2pt plus 1pt}%
% Abstract
% --------
% Bibliography
% ------------
\@clubpenalty \clubpenalty
{\@latex@warning{Empty `thebibliography' environment}}%
% Categories
% ----------
\@setflag \@firstcategory = \@true
\if \@firstcategory
\paragraph*{Categories and Subject Descriptors}%
\@setflag \@firstcategory = \@false
\unskip ;\hspace{.75em}%
\@ifnextchar [{\@category{#1}{#2}{#3}}{\@category{#1}{#2}{#3}[]}}
\def \@category #1#2#3[#4]{%
{\let \and = \relax
#1 [\textit{#2}]%
\if \@emptyargp{#4}%
\if \@notp{\@emptyargp{#3}}: #3\fi
\if \@notp{\@emptyargp{#3}}#3---\fi
% Copyright Notice
% --------- ------
\def \ftype@copyrightbox {8}
\def \@toappear {}
\def \@permission {}
\def \@copyrightspace {%
\vbox to 1in{%
\if \@preprint
[Copyright notice will appear here
once 'preprint' option is removed.]\par
\if \@reprint
\noindent Reprinted from \@conferencename,
\long\def \toappear #1{%
\def \@toappear {#1}}
\noindent \@permission \par
\noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
\noindent Copyright \copyright\ \@copyrightyear\ ACM \@copyrightdata
\dots \$5.00\par}
\gdef \@permission {#1}}
Permission to make digital or hard copies of all or
part of this work for personal or classroom use is granted without
fee provided that copies are not made or distributed for profit or
commercial advantage and that copies bear this notice and the full
citation on the first page. To copy otherwise, to republish, to
post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.}
% Here we have some alternate permission statements and copyright lines:
Copyright \@copyrightyear\ Association for Computing Machinery.
ACM acknowledges that
this contribution was authored or co-authored by an affiliate of the
National Research Council of Canada (NRC).
As such, the Crown in Right of
Canada retains an equal interest in the copyright, however granting
nonexclusive, royalty-free right to publish or reproduce this article,
or to allow others to do so, provided that clear attribution
is also given to the authors and the NRC.}}
Copyright \@copyrightyear\ Association for
Computing Machinery. ACM acknowledges that
this contribution was authored or co-authored
by a contractor or affiliate
of the U.S. Government. As such, the Government retains a nonexclusive,
royalty-free right to publish or reproduce this article,
or to allow others to do so, for Government purposes only.}}
Copyright is held by the author/owner(s).}
\noindent \@permission \par
\noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
ACM \@copyrightdata.}}
Copyright is held by Sun Microsystems, Inc.}%
\noindent \@permission \par
\noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
ACM \@copyrightdata.}}
This paper is authored by an employee(s) of the United States
Government and is in the public domain.}%
\noindent \@permission \par
\noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
ACM \@copyrightdata.}}
% Enunciations
% ------------
\def \@begintheorem #1#2{% {name}{number}
\item[\hskip \labelsep \textsc{#1 #2.}]%
\def \@opargbegintheorem #1#2#3{% {name}{number}{title}
\hskip\labelsep \textsc{#1\ #2}%
\if \@notp{\@emptyargp{#3}}\nut (#3).\fi]%
% Figures
% -------
\@setflag \@caprule = \@true
\long\def \@makecaption #1#2{%
\if \@caprule
\hrule width \hsize height .33pt
\setbox \@tempboxa = \hbox{\@setfigurenumber{#1.}\nut #2}%
\if \@dimgtrp{\wd\@tempboxa}{\hsize}%
\noindent \@setfigurenumber{#1.}\nut #2\par
\@setflag \@caprule = \@false}
\def \@setfigurenumber #1{%
{\rmfamily \bfseries \selectfont #1}}
% Hierarchy
% ---------
\setvspace{\@sectionaboveskip}{10pt plus 3pt minus 2pt}
\if \@blockstyle
{\large \bfseries \raggedright}}
\setvspace{\@subsectionaboveskip}{8pt plus 2pt minus 2pt}
\if \@blockstyle
{\normalsize \bfseries \raggedright}}
{\normalsize \bfseries \raggedright}}
\setvspace{\@paragraphaboveskip}{6pt plus 2pt minus 2pt}
{\normalsize \bfseries \if \@times \itshape \fi}}
{\normalsize \itshape}}
% Standard headings:
\newcommand{\terms}{\paragraph*{General Terms}}
% Identification
% --------------
\def \@conferencename {}
\def \@conferenceinfo {}
\def \@copyrightyear {}
\def \@copyrightdata {[to be supplied]}
\def \@proceedings {[Unknown Proceedings]}
\gdef \@conferencename {#1}%
\gdef \@conferenceinfo {#2}}
\gdef \@copyrightyear {#1}}
\let \CopyrightYear = \copyrightyear
\gdef \@copyrightdata {#1}}
\let \crdata = \copyrightdata
\gdef \@proceedings {#1}}
% Lists
% -----
\if \@blockstyle
\renewcommand{\labelitemi}{{\small \centeroncapheight{\textbullet}}}
\renewcommand{\labelitemiv}{{\Large \textperiodcentered}}
\leftmargin = \leftmargini
\listparindent = 0pt}
%%% \itemsep = 1pt
%%% \parsep = 3pt}
%%% \listparindent = \parindent}
\let \@listI = \@listi
\leftmargin = \leftmarginii
\topsep = 1pt
\labelwidth = \leftmarginii
\advance \labelwidth by -\labelsep
\listparindent = \parindent}
\leftmargin = \leftmarginiii
\labelwidth = \leftmarginiii
\advance \labelwidth by -\labelsep
\listparindent = \parindent}
\leftmargin = \leftmarginiv
\labelwidth = \leftmarginiv
\advance \labelwidth by -\labelsep
\listparindent = \parindent}
% Mathematics
% -----------
\def \theequation {\arabic{equation}}
% Miscellaneous
% -------------
\global\@colht = \textheight
\global\ht\@cclv = \textheight}
\let \\ = \@centercr
\leftskip = 0pt
\rightskip = 0pt plus 10pt}
% Program Code
% ------- ----
{\@tempdima = \fontdimen2\font
\texttt{\spaceskip = 1.1\@tempdima #1}}}
% Running Heads and Feet
% ------- ----- --- ----
\def \@preprintfooter {}
\gdef \@preprintfooter {#1}}
\if \@preprint
\def \ps@plain {%
\let \@mkboth = \@gobbletwo
\let \@evenhead = \@empty
\def \@evenfoot {\scriptsize \textit{\@preprintfooter}\hfil \thepage \hfil
\let \@oddhead = \@empty
\let \@oddfoot = \@evenfoot}
\else\if \@reprint
\def \ps@plain {%
\let \@mkboth = \@gobbletwo
\let \@evenhead = \@empty
\def \@evenfoot {\scriptsize \hfil \thepage \hfil}%
\let \@oddhead = \@empty
\let \@oddfoot = \@evenfoot}
\let \ps@plain = \ps@empty
\let \ps@headings = \ps@empty
\let \ps@myheadings = \ps@empty
\def \@formatyear {%
% Special Characters
% ------- ----------
\protect{\rlap{=}}{\sf \kern .1em C}}
% Title Page
% ----- ----
\@setflag \@addauthorsdone = \@false
\def \@titletext {\@latex@error{No title was provided}{}}
\def \@subtitletext {}
\def \@titlebanner {}
\gdef \@titletext {#1}}
\gdef \@subtitletext {#1}}
\newcommand{\authorinfo}[3]{% {names}{affiliation}{email/URL}
\global\@increment \@authorcount
\@withname\gdef {\@authorname\romannumeral\@authorcount}{#1}%
\@withname\gdef {\@authoraffil\romannumeral\@authorcount}{#2}%
\@withname\gdef {\@authoremail\romannumeral\@authorcount}{#3}}
\@latex@error{The \string\author\space command is obsolete;
use \string\authorinfo}{}}
\gdef \@titlebanner {#1}}
\if \@onecolumn
{\hsize = \standardtextwidth
\if \@copyrightwanted \@copyrightspace \fi}
\def \@maketitle {%
\let \thanks = \titlenote
\noindent \LARGE \bfseries \@titletext \par
\vskip 6pt
\noindent \Large \@subtitletext \par
\vskip 12pt
\ifcase \@authorcount
\@latex@error{No authors were specified for this paper}{}\or
\@latex@error{Cannot handle more than 12 authors}{}%
\def \@settitlebanner {%
\if \@andp{\@preprint}{\@notp{\@emptydefp{\@titlebanner}}}%
\vbox to 0pt{%
\vskip -32pt
\noindent \textbf{\@titlebanner}\par
\def \@titleauthors #1#2#3{%
\if \@andp{\@emptyargp{#2}}{\@emptyargp{#3}}%
\noindent \@setauthor{40pc}{#1}{\@false}\par
\else\if \@emptyargp{#3}%
\noindent \@setauthor{17pc}{#1}{\@false}\hspace{3pc}%
\noindent \@setauthor{12.5pc}{#1}{\@false}\hspace{2pc}%
\def \@setauthor #1#2#3{% {width}{text}{unused}
\def \and {%
\hsize = #1
\large \@name{\@authorname#2}\par
\normalsize \@name{\@authoraffil#2}\par
\def \@maybetitlenote #1{%
\if \@andp{#1}{\@gtrp{\@authorcount}{3}}%
\titlenote{See page~\pageref{@addauthors} for additional authors.}%
\global\@increment \@titlenotecount
\ifcase \@titlenotecount \relax \or
\@fnmark = {\ast}\or
\@fnmark = {\dagger}\or
\@fnmark = {\ddagger}\or
\@fnmark = {\S}\or
\@fnmark = {\P}\or
\@fnmark = {\ast\ast}%
\edef \reserved@a {\noexpand\@appendtotext{%
\def \@appendtotext #1#2{%
\global\@titlenotetext = \expandafter{\the\@titlenotetext #1{#2}}}
\def \additionalauthors {%
\if \@gtrp{\@authorcount}{3}%
\section{Additional Authors}%
\@authori = 4
{\let \\ = ,%
email: \@name{\@authoremail\romannumeral\@authori}.%
\@increment \@authori
\if \@notp{\@gtrp{\@authori}{\@authorcount}} \repeat}%
\global\@setflag \@addauthorsdone = \@true}
\let \addauthorsection = \additionalauthors
\def \@placetitlenotes {
% Utilities
% ---------
{\setbox\@tempboxa = \hbox{#1}%
\@measurecapheight{\@tempdima}% % Calculate ht(CAP) - ht(text)
\advance \@tempdima by -\ht\@tempboxa % ------------------
\divide \@tempdima by 2 % 2
\raise \@tempdima \box\@tempboxa}}
\def \@measurecapheight #1{% {\dimen}
\setbox\@measbox = \hbox{ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
#1 = \ht\@measbox}
\long\def \@titlefootnote #1#2{%
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@parboxrestore
%%% \protected@edef\@currentlabel{%
%%% \csname p@footnote\endcsname\@thefnmark}%
\def \@makefnmark {$^{#1}$}%
% LaTeX Modifications
% ----- -------------
\def \@seccntformat #1{%
\@expandaftertwice\@seccntformata \csname the#1\endcsname.\@mark
\def \@seccntformata #1.#2\@mark{%
\if \@emptyargp{#2}.\fi}
% Revision History
% -------- -------
% Date Person Ver. Change
% ---- ------ ---- ------
% 2004.09.12 PCA 0.1--5 Preliminary development.
% 2004.11.18 PCA 0.5 Start beta testing.
% 2004.11.19 PCA 0.6 Obsolete \author and replace with
% \authorinfo.
% Add 'nocopyrightspace' option.
% Compress article opener spacing.
% Add 'mathtime' option.
% Increase text height by 6 points.
% 2004.11.28 PCA 0.7 Add 'cm/computermodern' options.
% Change default to Times text.
% 2004.12.14 PCA 0.8 Remove use of mathptm.sty; it cannot
% coexist with latexsym or amssymb.
% 2005.01.20 PCA 0.9 Rename class file to sigplanconf.cls.
% 2005.03.05 PCA 0.91 Change default copyright data.
% 2005.03.06 PCA 0.92 Add at-signs to some macro names.
% 2005.03.07 PCA 0.93 The 'onecolumn' option defaults to '11pt',
% and it uses the full type width.
% 2005.03.15 PCA 0.94 Add at-signs to more macro names.
% Allow margin paragraphs during review.
% 2005.03.22 PCA 0.95 Implement \euro.
% Remove proof and newdef environments.
% 2005.05.06 PCA 1.0 Eliminate 'onecolumn' option.
% Change footer to small italic and eliminate
% left portion if no \preprintfooter.
% Eliminate copyright notice if preprint.
% Clean up and shrink copyright box.
% 2005.05.30 PCA 1.1 Add alternate permission statements.
% 2005.06.29 PCA 1.1 Publish final first edition of guide.
% 2005.07.14 PCA 1.2 Add \subparagraph.
% Use block paragraphs in lists, and adjust
% spacing between items and paragraphs.
% 2006.06.22 PCA 1.3 Add 'reprint' option and associated
% commands.
% 2006.08.24 PCA 1.4 Fix bug in \maketitle case command.
% 2007.03.13 PCA 1.5 The title banner only display with the
% 'preprint' option.
Jump to Line
Something went wrong with that request. Please try again.