blob: d26f89f5ee7590b799d023f4ebb31f195280debe [file] [log] [blame]
Mark Slee24b49d32007-03-21 01:24:00 +00001%-----------------------------------------------------------------------------
2%
3% LaTeX Class/Style File
4%
5% Name: sigplanconf.cls
6% Purpose: A LaTeX 2e class file for SIGPLAN conference proceedings.
7% This class file supercedes acm_proc_article-sp,
8% sig-alternate, and sigplan-proc.
9%
10% Author: Paul C. Anagnostopoulos
11% Windfall Software
12% 978 371-2316
13% paul@windfall.com
14%
15% Created: 12 September 2004
16%
17% Revisions: See end of file.
18%
19%-----------------------------------------------------------------------------
20
21
22\NeedsTeXFormat{LaTeX2e}[1995/12/01]
23\ProvidesClass{sigplanconf}[2007/03/13 v1.5 ACM SIGPLAN Proceedings]
24
25% The following few pages contain LaTeX programming extensions adapted
26% from the ZzTeX macro package.
27
28% Token Hackery
29% ----- -------
30
31
32\def \@expandaftertwice {\expandafter\expandafter\expandafter}
33\def \@expandafterthrice {\expandafter\expandafter\expandafter\expandafter
34 \expandafter\expandafter\expandafter}
35
36% This macro discards the next token.
37
38\def \@discardtok #1{}% token
39
40% This macro removes the `pt' following a dimension.
41
42{\catcode `\p = 12 \catcode `\t = 12
43
44\gdef \@remover #1pt{#1}
45
46} % \catcode
47
48% This macro extracts the contents of a macro and returns it as plain text.
49% Usage: \expandafter\@defof \meaning\macro\@mark
50
51\def \@defof #1:->#2\@mark{#2}
52
53% Control Sequence Names
54% ------- -------- -----
55
56
57\def \@name #1{% {\tokens}
58 \csname \expandafter\@discardtok \string#1\endcsname}
59
60\def \@withname #1#2{% {\command}{\tokens}
61 \expandafter#1\csname \expandafter\@discardtok \string#2\endcsname}
62
63% Flags (Booleans)
64% ----- ----------
65
66% The boolean literals \@true and \@false are appropriate for use with
67% the \if command, which tests the codes of the next two characters.
68
69\def \@true {TT}
70\def \@false {FL}
71
72\def \@setflag #1=#2{\edef #1{#2}}% \flag = boolean
73
74% IF and Predicates
75% -- --- ----------
76
77% A "predicate" is a macro that returns \@true or \@false as its value.
78% Such values are suitable for use with the \if conditional. For example:
79%
80% \if \@oddp{\x} <then-clause> \else <else-clause> \fi
81
82% A predicate can be used with \@setflag as follows:
83%
84% \@setflag \flag = {<predicate>}
85
86% Here are the predicates for TeX's repertoire of conditional
87% commands. These might be more appropriately interspersed with
88% other definitions in this module, but what the heck.
89% Some additional "obvious" predicates are defined.
90
91\def \@eqlp #1#2{\ifnum #1 = #2\@true \else \@false \fi}
92\def \@neqlp #1#2{\ifnum #1 = #2\@false \else \@true \fi}
93\def \@lssp #1#2{\ifnum #1 < #2\@true \else \@false \fi}
94\def \@gtrp #1#2{\ifnum #1 > #2\@true \else \@false \fi}
95\def \@zerop #1{\ifnum #1 = 0\@true \else \@false \fi}
96\def \@onep #1{\ifnum #1 = 1\@true \else \@false \fi}
97\def \@posp #1{\ifnum #1 > 0\@true \else \@false \fi}
98\def \@negp #1{\ifnum #1 < 0\@true \else \@false \fi}
99\def \@oddp #1{\ifodd #1\@true \else \@false \fi}
100\def \@evenp #1{\ifodd #1\@false \else \@true \fi}
101\def \@rangep #1#2#3{\if \@orp{\@lssp{#1}{#2}}{\@gtrp{#1}{#3}}\@false \else
102 \@true \fi}
103\def \@tensp #1{\@rangep{#1}{10}{19}}
104
105\def \@dimeqlp #1#2{\ifdim #1 = #2\@true \else \@false \fi}
106\def \@dimneqlp #1#2{\ifdim #1 = #2\@false \else \@true \fi}
107\def \@dimlssp #1#2{\ifdim #1 < #2\@true \else \@false \fi}
108\def \@dimgtrp #1#2{\ifdim #1 > #2\@true \else \@false \fi}
109\def \@dimzerop #1{\ifdim #1 = 0pt\@true \else \@false \fi}
110\def \@dimposp #1{\ifdim #1 > 0pt\@true \else \@false \fi}
111\def \@dimnegp #1{\ifdim #1 < 0pt\@true \else \@false \fi}
112
113\def \@vmodep {\ifvmode \@true \else \@false \fi}
114\def \@hmodep {\ifhmode \@true \else \@false \fi}
115\def \@mathmodep {\ifmmode \@true \else \@false \fi}
116\def \@textmodep {\ifmmode \@false \else \@true \fi}
117\def \@innermodep {\ifinner \@true \else \@false \fi}
118
119\long\def \@codeeqlp #1#2{\if #1#2\@true \else \@false \fi}
120
121\long\def \@cateqlp #1#2{\ifcat #1#2\@true \else \@false \fi}
122
123\long\def \@tokeqlp #1#2{\ifx #1#2\@true \else \@false \fi}
124\long\def \@xtokeqlp #1#2{\expandafter\ifx #1#2\@true \else \@false \fi}
125
126\long\def \@definedp #1{%
127 \expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname
128 \relax \@false \else \@true \fi}
129
130\long\def \@undefinedp #1{%
131 \expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname
132 \relax \@true \else \@false \fi}
133
134\def \@emptydefp #1{\ifx #1\@empty \@true \else \@false \fi}% {\name}
135
136\let \@emptylistp = \@emptydefp
137
138\long\def \@emptyargp #1{% {#n}
139 \@empargp #1\@empargq\@mark}
140\long\def \@empargp #1#2\@mark{%
141 \ifx #1\@empargq \@true \else \@false \fi}
142\def \@empargq {\@empargq}
143
144\def \@emptytoksp #1{% {\tokenreg}
145 \expandafter\@emptoksp \the#1\@mark}
146
147\long\def \@emptoksp #1\@mark{\@emptyargp{#1}}
148
149\def \@voidboxp #1{\ifvoid #1\@true \else \@false \fi}
150\def \@hboxp #1{\ifhbox #1\@true \else \@false \fi}
151\def \@vboxp #1{\ifvbox #1\@true \else \@false \fi}
152
153\def \@eofp #1{\ifeof #1\@true \else \@false \fi}
154
155
156% Flags can also be used as predicates, as in:
157%
158% \if \flaga <then-clause> \else <else-clause> \fi
159
160
161% Now here we have predicates for the common logical operators.
162
163\def \@notp #1{\if #1\@false \else \@true \fi}
164
165\def \@andp #1#2{\if #1%
166 \if #2\@true \else \@false \fi
167 \else
168 \@false
169 \fi}
170
171\def \@orp #1#2{\if #1%
172 \@true
173 \else
174 \if #2\@true \else \@false \fi
175 \fi}
176
177\def \@xorp #1#2{\if #1%
178 \if #2\@false \else \@true \fi
179 \else
180 \if #2\@true \else \@false \fi
181 \fi}
182
183% Arithmetic
184% ----------
185
186\def \@increment #1{\advance #1 by 1\relax}% {\count}
187
188\def \@decrement #1{\advance #1 by -1\relax}% {\count}
189
190% Options
191% -------
192
193
194\@setflag \@blockstyle = \@false
195\@setflag \@copyrightwanted = \@true
196\@setflag \@explicitsize = \@false
197\@setflag \@mathtime = \@false
198\@setflag \@ninepoint = \@true
199\newcount{\@numheaddepth} \@numheaddepth = 3
200\@setflag \@onecolumn = \@false
201\@setflag \@preprint = \@false
202\@setflag \@reprint = \@false
203\@setflag \@times = \@false
204
205% Note that all the dangerous article class options are trapped.
206
207\DeclareOption{9pt}{\@setflag \@ninepoint = \@true
208 \@setflag \@explicitsize = \@true}
209
210\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}%
211 \@setflag \@ninepoint = \@false
212 \@setflag \@explicitsize = \@true}
213
214\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}%
215 \@setflag \@ninepoint = \@false
216 \@setflag \@explicitsize = \@true}
217
218\DeclareOption{12pt}{\@unsupportedoption{12pt}}
219
220\DeclareOption{a4paper}{\@unsupportedoption{a4paper}}
221
222\DeclareOption{a5paper}{\@unsupportedoption{a5paper}}
223
224\DeclareOption{b5paper}{\@unsupportedoption{b5paper}}
225
226\DeclareOption{blockstyle}{\@setflag \@blockstyle = \@true}
227
228\DeclareOption{cm}{\@setflag \@times = \@false}
229
230\DeclareOption{computermodern}{\@setflag \@times = \@false}
231
232\DeclareOption{executivepaper}{\@unsupportedoption{executivepaper}}
233
234\DeclareOption{indentedstyle}{\@setflag \@blockstyle = \@false}
235
236\DeclareOption{landscape}{\@unsupportedoption{landscape}}
237
238\DeclareOption{legalpaper}{\@unsupportedoption{legalpaper}}
239
240\DeclareOption{letterpaper}{\@unsupportedoption{letterpaper}}
241
242\DeclareOption{mathtime}{\@setflag \@mathtime = \@true}
243
244\DeclareOption{nocopyrightspace}{\@setflag \@copyrightwanted = \@false}
245
246\DeclareOption{notitlepage}{\@unsupportedoption{notitlepage}}
247
248\DeclareOption{numberedpars}{\@numheaddepth = 4}
249
250%%%\DeclareOption{onecolumn}{\@setflag \@onecolumn = \@true}
251
252\DeclareOption{preprint}{\@setflag \@preprint = \@true}
253
254\DeclareOption{reprint}{\@setflag \@reprint = \@true}
255
256\DeclareOption{times}{\@setflag \@times = \@true}
257
258\DeclareOption{titlepage}{\@unsupportedoption{titlepage}}
259
260\DeclareOption{twocolumn}{\@setflag \@onecolumn = \@false}
261
262\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
263
264\ExecuteOptions{9pt,indentedstyle,times}
265\@setflag \@explicitsize = \@false
266\ProcessOptions
267
268\if \@onecolumn
269 \if \@notp{\@explicitsize}%
270 \@setflag \@ninepoint = \@false
271 \PassOptionsToClass{11pt}{article}%
272 \fi
273 \PassOptionsToClass{twoside,onecolumn}{article}
274\else
275 \PassOptionsToClass{twoside,twocolumn}{article}
276\fi
277\LoadClass{article}
278
279\def \@unsupportedoption #1{%
280 \ClassError{proc}{The standard '#1' option is not supported.}}
281
282% This can be used with the 'reprint' option to get the final folios.
283
284\def \setpagenumber #1{%
285 \setcounter{page}{#1}}
286
287\AtEndDocument{\label{sigplanconf@finalpage}}
288
289% Utilities
290% ---------
291
292
293\newcommand{\setvspace}[2]{%
294 #1 = #2
295 \advance #1 by -1\parskip}
296
297% Document Parameters
298% -------- ----------
299
300
301% Page:
302
303\setlength{\hoffset}{-1in}
304\setlength{\voffset}{-1in}
305
306\setlength{\topmargin}{1in}
307\setlength{\headheight}{0pt}
308\setlength{\headsep}{0pt}
309
310\if \@onecolumn
311 \setlength{\evensidemargin}{.75in}
312 \setlength{\oddsidemargin}{.75in}
313\else
314 \setlength{\evensidemargin}{.75in}
315 \setlength{\oddsidemargin}{.75in}
316\fi
317
318% Text area:
319
320\newdimen{\standardtextwidth}
321\setlength{\standardtextwidth}{42pc}
322
323\if \@onecolumn
324 \setlength{\textwidth}{40.5pc}
325\else
326 \setlength{\textwidth}{\standardtextwidth}
327\fi
328
329\setlength{\topskip}{8pt}
330\setlength{\columnsep}{2pc}
331\setlength{\textheight}{54.5pc}
332
333% Running foot:
334
335\setlength{\footskip}{30pt}
336
337% Paragraphs:
338
339\if \@blockstyle
340 \setlength{\parskip}{5pt plus .1pt minus .5pt}
341 \setlength{\parindent}{0pt}
342\else
343 \setlength{\parskip}{0pt}
344 \setlength{\parindent}{12pt}
345\fi
346
347\setlength{\lineskip}{.5pt}
348\setlength{\lineskiplimit}{\lineskip}
349
350\frenchspacing
351\pretolerance = 400
352\tolerance = \pretolerance
353\setlength{\emergencystretch}{5pt}
354\clubpenalty = 10000
355\widowpenalty = 10000
356\setlength{\hfuzz}{.5pt}
357
358% Standard vertical spaces:
359
360\newskip{\standardvspace}
361\setvspace{\standardvspace}{5pt plus 1pt minus .5pt}
362
363% Margin paragraphs:
364
365\setlength{\marginparwidth}{36pt}
366\setlength{\marginparsep}{2pt}
367\setlength{\marginparpush}{8pt}
368
369
370\setlength{\skip\footins}{8pt plus 3pt minus 1pt}
371\setlength{\footnotesep}{9pt}
372
373\renewcommand{\footnoterule}{%
374 \hrule width .5\columnwidth height .33pt depth 0pt}
375
376\renewcommand{\@makefntext}[1]{%
377 \noindent \@makefnmark \hspace{1pt}#1}
378
379% Floats:
380
381\setcounter{topnumber}{4}
382\setcounter{bottomnumber}{1}
383\setcounter{totalnumber}{4}
384
385\renewcommand{\fps@figure}{tp}
386\renewcommand{\fps@table}{tp}
387\renewcommand{\topfraction}{0.90}
388\renewcommand{\bottomfraction}{0.30}
389\renewcommand{\textfraction}{0.10}
390\renewcommand{\floatpagefraction}{0.75}
391
392\setcounter{dbltopnumber}{4}
393
394\renewcommand{\dbltopfraction}{\topfraction}
395\renewcommand{\dblfloatpagefraction}{\floatpagefraction}
396
397\setlength{\floatsep}{18pt plus 4pt minus 2pt}
398\setlength{\textfloatsep}{18pt plus 4pt minus 3pt}
399\setlength{\intextsep}{10pt plus 4pt minus 3pt}
400
401\setlength{\dblfloatsep}{18pt plus 4pt minus 2pt}
402\setlength{\dbltextfloatsep}{20pt plus 4pt minus 3pt}
403
404% Miscellaneous:
405
406\errorcontextlines = 5
407
408% Fonts
409% -----
410
411
412\if \@times
413 \renewcommand{\rmdefault}{ptm}%
414 \if \@mathtime
415 \usepackage[mtbold,noTS1]{mathtime}%
416 \else
417%%% \usepackage{mathptm}%
418 \fi
419\else
420 \relax
421\fi
422
423\if \@ninepoint
424
425\renewcommand{\normalsize}{%
426 \@setfontsize{\normalsize}{9pt}{10pt}%
427 \setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}%
428 \setlength{\belowdisplayskip}{\abovedisplayskip}%
429 \setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}%
430 \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
431
432\renewcommand{\tiny}{\@setfontsize{\tiny}{5pt}{6pt}}
433
434\renewcommand{\scriptsize}{\@setfontsize{\scriptsize}{7pt}{8pt}}
435
436\renewcommand{\small}{%
437 \@setfontsize{\small}{8pt}{9pt}%
438 \setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}%
439 \setlength{\belowdisplayskip}{\abovedisplayskip}%
440 \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
441 \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
442
443\renewcommand{\footnotesize}{%
444 \@setfontsize{\footnotesize}{8pt}{9pt}%
445 \setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}%
446 \setlength{\belowdisplayskip}{\abovedisplayskip}%
447 \setlength{\abovedisplayshortskip}{2pt plus 1pt}%
448 \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}}
449
450\renewcommand{\large}{\@setfontsize{\large}{11pt}{13pt}}
451
452\renewcommand{\Large}{\@setfontsize{\Large}{14pt}{18pt}}
453
454\renewcommand{\LARGE}{\@setfontsize{\LARGE}{18pt}{20pt}}
455
456\renewcommand{\huge}{\@setfontsize{\huge}{20pt}{25pt}}
457
458\renewcommand{\Huge}{\@setfontsize{\Huge}{25pt}{30pt}}
459
460\fi
461
462% Abstract
463% --------
464
465
466\renewenvironment{abstract}{%
467 \section*{Abstract}%
468 \normalsize}{%
469 }
470
471% Bibliography
472% ------------
473
474
475\renewenvironment{thebibliography}[1]
476 {\section*{\refname
477 \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
478 \list{\@biblabel{\@arabic\c@enumiv}}%
479 {\settowidth\labelwidth{\@biblabel{#1}}%
480 \leftmargin\labelwidth
481 \advance\leftmargin\labelsep
482 \@openbib@code
483 \usecounter{enumiv}%
484 \let\p@enumiv\@empty
485 \renewcommand\theenumiv{\@arabic\c@enumiv}}%
486 \small
487 \softraggedright%%%\sloppy
488 \clubpenalty4000
489 \@clubpenalty \clubpenalty
490 \widowpenalty4000%
491 \sfcode`\.\@m}
492 {\def\@noitemerr
493 {\@latex@warning{Empty `thebibliography' environment}}%
494 \endlist}
495
496% Categories
497% ----------
498
499
500\@setflag \@firstcategory = \@true
501
502\newcommand{\category}[3]{%
503 \if \@firstcategory
504 \paragraph*{Categories and Subject Descriptors}%
505 \@setflag \@firstcategory = \@false
506 \else
507 \unskip ;\hspace{.75em}%
508 \fi
509 \@ifnextchar [{\@category{#1}{#2}{#3}}{\@category{#1}{#2}{#3}[]}}
510
511\def \@category #1#2#3[#4]{%
512 {\let \and = \relax
513 #1 [\textit{#2}]%
514 \if \@emptyargp{#4}%
515 \if \@notp{\@emptyargp{#3}}: #3\fi
516 \else
517 :\space
518 \if \@notp{\@emptyargp{#3}}#3---\fi
519 \textrm{#4}%
520 \fi}}
521
522% Copyright Notice
523% --------- ------
524
525
526\def \ftype@copyrightbox {8}
527\def \@toappear {}
528\def \@permission {}
529
530
531\def \@copyrightspace {%
532 \@float{copyrightbox}[b]%
533 \vbox to 1in{%
534 \vfill
535 \parbox[b]{20pc}{%
536 \scriptsize
537 \if \@preprint
538 [Copyright notice will appear here
539 once 'preprint' option is removed.]\par
540 \else
541 \@toappear
542 \fi
543 \if \@reprint
544 \noindent Reprinted from \@conferencename,
545 \@proceedings,
546 \@conferenceinfo,
547 pp.~\number\thepage--\pageref{sigplanconf@finalpage}.\par
548 \fi}}%
549 \end@float}
550
551\long\def \toappear #1{%
552 \def \@toappear {#1}}
553
554\toappear{%
555 \noindent \@permission \par
556 \vspace{2pt}
557 \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
558 \noindent Copyright \copyright\ \@copyrightyear\ ACM \@copyrightdata
559 \dots \$5.00\par}
560
561\newcommand{\permission}[1]{%
562 \gdef \@permission {#1}}
563
564\permission{%
565 Permission to make digital or hard copies of all or
566 part of this work for personal or classroom use is granted without
567 fee provided that copies are not made or distributed for profit or
568 commercial advantage and that copies bear this notice and the full
569 citation on the first page. To copy otherwise, to republish, to
570 post on servers or to redistribute to lists, requires prior specific
571 permission and/or a fee.}
572
573% Here we have some alternate permission statements and copyright lines:
574
575\newcommand{\ACMCanadapermission}{%
576 \permission{%
577 Copyright \@copyrightyear\ Association for Computing Machinery.
578 ACM acknowledges that
579 this contribution was authored or co-authored by an affiliate of the
580 National Research Council of Canada (NRC).
581 As such, the Crown in Right of
582 Canada retains an equal interest in the copyright, however granting
583 nonexclusive, royalty-free right to publish or reproduce this article,
584 or to allow others to do so, provided that clear attribution
585 is also given to the authors and the NRC.}}
586
587\newcommand{\ACMUSpermission}{%
588 \permission{%
589 Copyright \@copyrightyear\ Association for
590 Computing Machinery. ACM acknowledges that
591 this contribution was authored or co-authored
592 by a contractor or affiliate
593 of the U.S. Government. As such, the Government retains a nonexclusive,
594 royalty-free right to publish or reproduce this article,
595 or to allow others to do so, for Government purposes only.}}
596
597\newcommand{\authorpermission}{%
598 \permission{%
599 Copyright is held by the author/owner(s).}
600 \toappear{%
601 \noindent \@permission \par
602 \vspace{2pt}
603 \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
604 ACM \@copyrightdata.}}
605
606\newcommand{\Sunpermission}{%
607 \permission{%
608 Copyright is held by Sun Microsystems, Inc.}%
609 \toappear{%
610 \noindent \@permission \par
611 \vspace{2pt}
612 \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
613 ACM \@copyrightdata.}}
614
615\newcommand{\USpublicpermission}{%
616 \permission{%
617 This paper is authored by an employee(s) of the United States
618 Government and is in the public domain.}%
619 \toappear{%
620 \noindent \@permission \par
621 \vspace{2pt}
622 \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par
623 ACM \@copyrightdata.}}
624
625% Enunciations
626% ------------
627
628
629\def \@begintheorem #1#2{% {name}{number}
630 \trivlist
631 \item[\hskip \labelsep \textsc{#1 #2.}]%
632 \itshape\selectfont
633 \ignorespaces}
634
635\def \@opargbegintheorem #1#2#3{% {name}{number}{title}
636 \trivlist
637 \item[%
638 \hskip\labelsep \textsc{#1\ #2}%
639 \if \@notp{\@emptyargp{#3}}\nut (#3).\fi]%
640 \itshape\selectfont
641 \ignorespaces}
642
643% Figures
644% -------
645
646
647\@setflag \@caprule = \@true
648
649\long\def \@makecaption #1#2{%
650 \addvspace{4pt}
651 \if \@caprule
652 \hrule width \hsize height .33pt
653 \vspace{4pt}
654 \fi
655 \setbox \@tempboxa = \hbox{\@setfigurenumber{#1.}\nut #2}%
656 \if \@dimgtrp{\wd\@tempboxa}{\hsize}%
657 \noindent \@setfigurenumber{#1.}\nut #2\par
658 \else
659 \centerline{\box\@tempboxa}%
660 \fi}
661
662\newcommand{\nocaptionrule}{%
663 \@setflag \@caprule = \@false}
664
665\def \@setfigurenumber #1{%
666 {\rmfamily \bfseries \selectfont #1}}
667
668% Hierarchy
669% ---------
670
671
672\setcounter{secnumdepth}{\@numheaddepth}
673
674\newskip{\@sectionaboveskip}
675\setvspace{\@sectionaboveskip}{10pt plus 3pt minus 2pt}
676
677\newskip{\@sectionbelowskip}
678\if \@blockstyle
679 \setlength{\@sectionbelowskip}{0.1pt}%
680\else
681 \setlength{\@sectionbelowskip}{4pt}%
682\fi
683
684\renewcommand{\section}{%
685 \@startsection
686 {section}%
687 {1}%
688 {0pt}%
689 {-\@sectionaboveskip}%
690 {\@sectionbelowskip}%
691 {\large \bfseries \raggedright}}
692
693\newskip{\@subsectionaboveskip}
694\setvspace{\@subsectionaboveskip}{8pt plus 2pt minus 2pt}
695
696\newskip{\@subsectionbelowskip}
697\if \@blockstyle
698 \setlength{\@subsectionbelowskip}{0.1pt}%
699\else
700 \setlength{\@subsectionbelowskip}{4pt}%
701\fi
702
703\renewcommand{\subsection}{%
704 \@startsection%
705 {subsection}%
706 {2}%
707 {0pt}%
708 {-\@subsectionaboveskip}%
709 {\@subsectionbelowskip}%
710 {\normalsize \bfseries \raggedright}}
711
712\renewcommand{\subsubsection}{%
713 \@startsection%
714 {subsubsection}%
715 {3}%
716 {0pt}%
717 {-\@subsectionaboveskip}
718 {\@subsectionbelowskip}%
719 {\normalsize \bfseries \raggedright}}
720
721\newskip{\@paragraphaboveskip}
722\setvspace{\@paragraphaboveskip}{6pt plus 2pt minus 2pt}
723
724\renewcommand{\paragraph}{%
725 \@startsection%
726 {paragraph}%
727 {4}%
728 {0pt}%
729 {\@paragraphaboveskip}
730 {-1em}%
731 {\normalsize \bfseries \if \@times \itshape \fi}}
732
733\renewcommand{\subparagraph}{%
734 \@startsection%
735 {subparagraph}%
736 {4}%
737 {0pt}%
738 {\@paragraphaboveskip}
739 {-1em}%
740 {\normalsize \itshape}}
741
742% Standard headings:
743
744\newcommand{\acks}{\section*{Acknowledgments}}
745
746\newcommand{\keywords}{\paragraph*{Keywords}}
747
748\newcommand{\terms}{\paragraph*{General Terms}}
749
750% Identification
751% --------------
752
753
754\def \@conferencename {}
755\def \@conferenceinfo {}
756\def \@copyrightyear {}
757\def \@copyrightdata {[to be supplied]}
758\def \@proceedings {[Unknown Proceedings]}
759
760
761\newcommand{\conferenceinfo}[2]{%
762 \gdef \@conferencename {#1}%
763 \gdef \@conferenceinfo {#2}}
764
765\newcommand{\copyrightyear}[1]{%
766 \gdef \@copyrightyear {#1}}
767
768\let \CopyrightYear = \copyrightyear
769
770\newcommand{\copyrightdata}[1]{%
771 \gdef \@copyrightdata {#1}}
772
773\let \crdata = \copyrightdata
774
775\newcommand{\proceedings}[1]{%
776 \gdef \@proceedings {#1}}
777
778% Lists
779% -----
780
781
782\setlength{\leftmargini}{13pt}
783\setlength\leftmarginii{13pt}
784\setlength\leftmarginiii{13pt}
785\setlength\leftmarginiv{13pt}
786\setlength{\labelsep}{3.5pt}
787
788\setlength{\topsep}{\standardvspace}
789\if \@blockstyle
790 \setlength{\itemsep}{1pt}
791 \setlength{\parsep}{3pt}
792\else
793 \setlength{\itemsep}{1pt}
794 \setlength{\parsep}{3pt}
795\fi
796
797\renewcommand{\labelitemi}{{\small \centeroncapheight{\textbullet}}}
798\renewcommand{\labelitemii}{\centeroncapheight{\rule{2.5pt}{2.5pt}}}
799\renewcommand{\labelitemiii}{$-$}
800\renewcommand{\labelitemiv}{{\Large \textperiodcentered}}
801
802\renewcommand{\@listi}{%
803 \leftmargin = \leftmargini
804 \listparindent = 0pt}
805%%% \itemsep = 1pt
806%%% \parsep = 3pt}
807%%% \listparindent = \parindent}
808
809\let \@listI = \@listi
810
811\renewcommand{\@listii}{%
812 \leftmargin = \leftmarginii
813 \topsep = 1pt
814 \labelwidth = \leftmarginii
815 \advance \labelwidth by -\labelsep
816 \listparindent = \parindent}
817
818\renewcommand{\@listiii}{%
819 \leftmargin = \leftmarginiii
820 \labelwidth = \leftmarginiii
821 \advance \labelwidth by -\labelsep
822 \listparindent = \parindent}
823
824\renewcommand{\@listiv}{%
825 \leftmargin = \leftmarginiv
826 \labelwidth = \leftmarginiv
827 \advance \labelwidth by -\labelsep
828 \listparindent = \parindent}
829
830% Mathematics
831% -----------
832
833
834\def \theequation {\arabic{equation}}
835
836% Miscellaneous
837% -------------
838
839
840\newcommand{\balancecolumns}{%
841 \vfill\eject
842 \global\@colht = \textheight
843 \global\ht\@cclv = \textheight}
844
845\newcommand{\nut}{\hspace{.5em}}
846
847\newcommand{\softraggedright}{%
848 \let \\ = \@centercr
849 \leftskip = 0pt
850 \rightskip = 0pt plus 10pt}
851
852% Program Code
853% ------- ----
854
855
856\newcommand{\mono}[1]{%
857 {\@tempdima = \fontdimen2\font
858 \texttt{\spaceskip = 1.1\@tempdima #1}}}
859
860% Running Heads and Feet
861% ------- ----- --- ----
862
863
864\def \@preprintfooter {}
865
866\newcommand{\preprintfooter}[1]{%
867 \gdef \@preprintfooter {#1}}
868
869\if \@preprint
870
871\def \ps@plain {%
872 \let \@mkboth = \@gobbletwo
873 \let \@evenhead = \@empty
874 \def \@evenfoot {\scriptsize \textit{\@preprintfooter}\hfil \thepage \hfil
875 \textit{\@formatyear}}%
876 \let \@oddhead = \@empty
877 \let \@oddfoot = \@evenfoot}
878
879\else\if \@reprint
880
881\def \ps@plain {%
882 \let \@mkboth = \@gobbletwo
883 \let \@evenhead = \@empty
884 \def \@evenfoot {\scriptsize \hfil \thepage \hfil}%
885 \let \@oddhead = \@empty
886 \let \@oddfoot = \@evenfoot}
887
888\else
889
890\let \ps@plain = \ps@empty
891\let \ps@headings = \ps@empty
892\let \ps@myheadings = \ps@empty
893
894\fi\fi
895
896\def \@formatyear {%
897 \number\year/\number\month/\number\day}
898
899% Special Characters
900% ------- ----------
901
902
903\DeclareRobustCommand{\euro}{%
904 \protect{\rlap{=}}{\sf \kern .1em C}}
905
906% Title Page
907% ----- ----
908
909
910\@setflag \@addauthorsdone = \@false
911
912\def \@titletext {\@latex@error{No title was provided}{}}
913\def \@subtitletext {}
914
915\newcount{\@authorcount}
916
917\newcount{\@titlenotecount}
918\newtoks{\@titlenotetext}
919
920\def \@titlebanner {}
921
922\renewcommand{\title}[1]{%
923 \gdef \@titletext {#1}}
924
925\newcommand{\subtitle}[1]{%
926 \gdef \@subtitletext {#1}}
927
928\newcommand{\authorinfo}[3]{% {names}{affiliation}{email/URL}
929 \global\@increment \@authorcount
930 \@withname\gdef {\@authorname\romannumeral\@authorcount}{#1}%
931 \@withname\gdef {\@authoraffil\romannumeral\@authorcount}{#2}%
932 \@withname\gdef {\@authoremail\romannumeral\@authorcount}{#3}}
933
934\renewcommand{\author}[1]{%
935 \@latex@error{The \string\author\space command is obsolete;
936 use \string\authorinfo}{}}
937
938\newcommand{\titlebanner}[1]{%
939 \gdef \@titlebanner {#1}}
940
941\renewcommand{\maketitle}{%
942 \pagestyle{plain}%
943 \if \@onecolumn
944 {\hsize = \standardtextwidth
945 \@maketitle}%
946 \else
947 \twocolumn[\@maketitle]%
948 \fi
949 \@placetitlenotes
950 \if \@copyrightwanted \@copyrightspace \fi}
951
952\def \@maketitle {%
953 \begin{center}
954 \@settitlebanner
955 \let \thanks = \titlenote
956 \noindent \LARGE \bfseries \@titletext \par
957 \vskip 6pt
958 \noindent \Large \@subtitletext \par
959 \vskip 12pt
960 \ifcase \@authorcount
961 \@latex@error{No authors were specified for this paper}{}\or
962 \@titleauthors{i}{}{}\or
963 \@titleauthors{i}{ii}{}\or
964 \@titleauthors{i}{ii}{iii}\or
965 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{}{}\or
966 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{}\or
967 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}\or
968 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
969 \@titleauthors{vii}{}{}\or
970 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
971 \@titleauthors{vii}{viii}{}\or
972 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
973 \@titleauthors{vii}{viii}{ix}\or
974 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
975 \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{}{}\or
976 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
977 \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{}\or
978 \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}%
979 \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{xii}%
980 \else
981 \@latex@error{Cannot handle more than 12 authors}{}%
982 \fi
983 \vspace{1.75pc}
984 \end{center}}
985
986\def \@settitlebanner {%
987 \if \@andp{\@preprint}{\@notp{\@emptydefp{\@titlebanner}}}%
988 \vbox to 0pt{%
989 \vskip -32pt
990 \noindent \textbf{\@titlebanner}\par
991 \vss}%
992 \nointerlineskip
993 \fi}
994
995\def \@titleauthors #1#2#3{%
996 \if \@andp{\@emptyargp{#2}}{\@emptyargp{#3}}%
997 \noindent \@setauthor{40pc}{#1}{\@false}\par
998 \else\if \@emptyargp{#3}%
999 \noindent \@setauthor{17pc}{#1}{\@false}\hspace{3pc}%
1000 \@setauthor{17pc}{#2}{\@false}\par
1001 \else
1002 \noindent \@setauthor{12.5pc}{#1}{\@false}\hspace{2pc}%
1003 \@setauthor{12.5pc}{#2}{\@false}\hspace{2pc}%
1004 \@setauthor{12.5pc}{#3}{\@true}\par
1005 \relax
1006 \fi\fi
1007 \vspace{20pt}}
1008
1009\def \@setauthor #1#2#3{% {width}{text}{unused}
1010 \vtop{%
1011 \def \and {%
1012 \hspace{16pt}}
1013 \hsize = #1
1014 \normalfont
1015 \centering
1016 \large \@name{\@authorname#2}\par
1017 \vspace{5pt}
1018 \normalsize \@name{\@authoraffil#2}\par
1019 \vspace{4pt}
1020 \normalsize{\@name{\@authoremail#2}}\par}}
1021
1022\def \@maybetitlenote #1{%
1023 \if \@andp{#1}{\@gtrp{\@authorcount}{3}}%
1024 \titlenote{See page~\pageref{@addauthors} for additional authors.}%
1025 \fi}
1026
1027\newtoks{\@fnmark}
1028
1029\newcommand{\titlenote}[1]{%
1030 \global\@increment \@titlenotecount
1031 \ifcase \@titlenotecount \relax \or
1032 \@fnmark = {\ast}\or
1033 \@fnmark = {\dagger}\or
1034 \@fnmark = {\ddagger}\or
1035 \@fnmark = {\S}\or
1036 \@fnmark = {\P}\or
1037 \@fnmark = {\ast\ast}%
1038 \fi
1039 \,$^{\the\@fnmark}$%
1040 \edef \reserved@a {\noexpand\@appendtotext{%
1041 \noexpand\@titlefootnote{\the\@fnmark}}}%
1042 \reserved@a{#1}}
1043
1044\def \@appendtotext #1#2{%
1045 \global\@titlenotetext = \expandafter{\the\@titlenotetext #1{#2}}}
1046
1047\newcount{\@authori}
1048
1049\iffalse
1050\def \additionalauthors {%
1051 \if \@gtrp{\@authorcount}{3}%
1052 \section{Additional Authors}%
1053 \label{@addauthors}%
1054 \noindent
1055 \@authori = 4
1056 {\let \\ = ,%
1057 \loop
1058 \textbf{\@name{\@authorname\romannumeral\@authori}},
1059 \@name{\@authoraffil\romannumeral\@authori},
1060 email: \@name{\@authoremail\romannumeral\@authori}.%
1061 \@increment \@authori
1062 \if \@notp{\@gtrp{\@authori}{\@authorcount}} \repeat}%
1063 \par
1064 \fi
1065 \global\@setflag \@addauthorsdone = \@true}
1066\fi
1067
1068\let \addauthorsection = \additionalauthors
1069
1070\def \@placetitlenotes {
1071 \the\@titlenotetext}
1072
1073% Utilities
1074% ---------
1075
1076
1077\newcommand{\centeroncapheight}[1]{%
1078 {\setbox\@tempboxa = \hbox{#1}%
1079 \@measurecapheight{\@tempdima}% % Calculate ht(CAP) - ht(text)
1080 \advance \@tempdima by -\ht\@tempboxa % ------------------
1081 \divide \@tempdima by 2 % 2
1082 \raise \@tempdima \box\@tempboxa}}
1083
1084\newbox{\@measbox}
1085
1086\def \@measurecapheight #1{% {\dimen}
1087 \setbox\@measbox = \hbox{ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
1088 #1 = \ht\@measbox}
1089
1090\long\def \@titlefootnote #1#2{%
1091 \insert\footins{%
1092 \reset@font\footnotesize
1093 \interlinepenalty\interfootnotelinepenalty
1094 \splittopskip\footnotesep
1095 \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
1096 \hsize\columnwidth \@parboxrestore
1097%%% \protected@edef\@currentlabel{%
1098%%% \csname p@footnote\endcsname\@thefnmark}%
1099 \color@begingroup
1100 \def \@makefnmark {$^{#1}$}%
1101 \@makefntext{%
1102 \rule\z@\footnotesep\ignorespaces#2\@finalstrut\strutbox}%
1103 \color@endgroup}}
1104
1105% LaTeX Modifications
1106% ----- -------------
1107
1108\def \@seccntformat #1{%
1109 \@name{\the#1}%
1110 \@expandaftertwice\@seccntformata \csname the#1\endcsname.\@mark
1111 \quad}
1112
1113\def \@seccntformata #1.#2\@mark{%
1114 \if \@emptyargp{#2}.\fi}
1115
1116% Revision History
1117% -------- -------
1118
1119
1120% Date Person Ver. Change
1121% ---- ------ ---- ------
1122
1123% 2004.09.12 PCA 0.1--5 Preliminary development.
1124
1125% 2004.11.18 PCA 0.5 Start beta testing.
1126
1127% 2004.11.19 PCA 0.6 Obsolete \author and replace with
1128% \authorinfo.
1129% Add 'nocopyrightspace' option.
1130% Compress article opener spacing.
1131% Add 'mathtime' option.
1132% Increase text height by 6 points.
1133
1134% 2004.11.28 PCA 0.7 Add 'cm/computermodern' options.
1135% Change default to Times text.
1136
1137% 2004.12.14 PCA 0.8 Remove use of mathptm.sty; it cannot
1138% coexist with latexsym or amssymb.
1139
1140% 2005.01.20 PCA 0.9 Rename class file to sigplanconf.cls.
1141
1142% 2005.03.05 PCA 0.91 Change default copyright data.
1143
1144% 2005.03.06 PCA 0.92 Add at-signs to some macro names.
1145
1146% 2005.03.07 PCA 0.93 The 'onecolumn' option defaults to '11pt',
1147% and it uses the full type width.
1148
1149% 2005.03.15 PCA 0.94 Add at-signs to more macro names.
1150% Allow margin paragraphs during review.
1151
1152% 2005.03.22 PCA 0.95 Implement \euro.
1153% Remove proof and newdef environments.
1154
1155% 2005.05.06 PCA 1.0 Eliminate 'onecolumn' option.
1156% Change footer to small italic and eliminate
1157% left portion if no \preprintfooter.
1158% Eliminate copyright notice if preprint.
1159% Clean up and shrink copyright box.
1160
1161% 2005.05.30 PCA 1.1 Add alternate permission statements.
1162
1163% 2005.06.29 PCA 1.1 Publish final first edition of guide.
1164
1165% 2005.07.14 PCA 1.2 Add \subparagraph.
1166% Use block paragraphs in lists, and adjust
1167% spacing between items and paragraphs.
1168
1169% 2006.06.22 PCA 1.3 Add 'reprint' option and associated
1170% commands.
1171
1172% 2006.08.24 PCA 1.4 Fix bug in \maketitle case command.
1173
1174% 2007.03.13 PCA 1.5 The title banner only display with the
1175% 'preprint' option.