source: docs/ASPLOS09/sigplanconf.cls @ 4490

Last change on this file since 4490 was 223, checked in by cameron, 11 years ago

File import.

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