blob: d983917210f4cdec349925d3cf37875cc7b110aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
%%%%%% example of use:
% \input model
% \totalpages=5 % if you want the total number of pages to appear in the heading
% \centerline{title}
% \centerline{authors names}
% \endoftitle
% rest of paper
% \endofpaper\end
\newdimen\fullhsize \fullhsize=42truepc
\newdimen\fullvsize \fullvsize=52truepc
\newdimen\colhsize \colhsize=20truepc
\newdimen\topvsize \topvsize=10truepc % this number can be changed
\newdimen\shortvsize
\newif\iftitlepage \titlepagetrue
\newbox\leftcolumn \newbox\rightcolumn \newbox\topcolumn
\newcount\totalpages \totalpages=0 % specify this if you want page numbers
\output{
\iftitlepage
\if T\column
\global\shortvsize=\fullvsize
\global\advance\shortvsize by -\topvsize
\global\hsize\colhsize \global\vsize\shortvsize
\global\setbox\topcolumn=\columnbox
\global\let\column=L
\else \if L\column
\global\setbox\leftcolumn=\columnbox
\global\let\column=R
\else \shipout\vbox to \fullvsize{\pagenumberbox
\box\topcolumn
\vss
\hbox to \fullhsize{\box\leftcolumn
\hfill\columnbox}}
\advancepageno
\global\let\column=L
\global\titlepagefalse
\global\vsize=\fullvsize
\fi
\fi
\else \if L\column
\global\setbox\leftcolumn=\columnbox
\global\let\column=R
\else \shipout\vbox to \fullvsize{\pagenumberbox
\hbox to\fullhsize{\box\leftcolumn
\hfill\columnbox}}
\advancepageno
\global\let\column=L
\fi
\fi}
\def\columnbox{\leftline{\pagebody}}
\def\pagenumberbox{\baselineskip0pt\lineskip0pt
\vbox to 0pt{\vss\hbox to \fullhsize{\hfil\tenrm
Page \folio\ifnum\totalpages>0\ of \number\totalpages.\fi\hfil}
\vskip1pc}}
\let\column=T
\vsize=\topvsize \hsize=\fullhsize
\def\endoftitle{\par\vfill\eject}
\def\endofpaper{\par\vfill\supereject\if R\column \null\vfill\eject\fi}
% 8 point footnotes
\catcode`@=11 % allow at signs in following entry
\def\vfootnote#1{\insert\footins\bgroup
\eightpoint
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox \floatingpenalty\@MM
\leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
\textindent{#1}\footstrut\futurelet\next\fo@t}
\catcode`@=12 % at signs are no longer letters
\def\eightpoint{\let\rm=\eightrm
\setbox\strutbox=\hbox{\vrule height7pt depth2pt width0pt}%
\rm\baselineskip=9pt}
\font\eightrm=cmr8
\def\eatone#1{}
% \unnumberedfootnote{...text...} gives an unnumbered footnote
% \footnote{symbol/number}{...text...} gives a labelled footnote
\def\unnumberedfootnote{\footnote{\eatone}}
% \acmpermission puts the ACM permission text in a unnumbered footnote
\def\acmpermission{\unnumberedfootnote{Permission to copy without fee all or
part of this material is granted provided that the copies are not made
or distributed for direct commercial advantage, the ACM copyright notice
and the title of the publication and its date appear, and notice is
given that copying is by permission of the Association of Computing
Machinery.
To copy otherwise, or to republish, requires a fee and/or
specific permission.}}
|