summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siam/ptexproc.sty
blob: 6848b8f42f8c21bf86c745c6b89ac3144cced0ea (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CUT HERE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This is ptexproc.sty
% This file may be freely distributed but may not be altered in any way. 
% Any comments or questions regarding these macros should be directed to: 
 
%                 Corey Gray 
%                 SIAM 
%                 3600 University City Science Center 
%                 Philadelphia, PA 19104-2688 
%                 USA 
%                 Telephone: (215) 382-9800 
%                 Fax: (215) 386-7999 
%                 e-mail: gray@siam.org 
 
% 
%       This is a file of macros and definitions for creating a chapter 
%       for publication in the SIAM Proceedings Series using Plain TeX. 
 
%    Report the version. 
\message{*** SIAM Plain TeX Proceedings Series macro package, version 1.0, 
November 6, 1992.***} 
 
% Make the @ sign a letter for internal control sequences. 
\catcode`\@=11 
% 
% 
% 
 
\overfullrule=0pt
\baselineskip=14truept 
 
 
%%%  DIMENSIONS  %%% 
 
\hsize=36truepc 
\vsize=55truepc 
%\hoffset=.5in 
\parindent=18truept 
\def\firstpar{\parindent=0pt\global\everypar{\parindent=18truept}} 
\parskip=0pt 
 
 
%%%  FONTS  %%% 
 
\font\tenrm=cmr10 
\font\tenbf=cmbx10 
\font\tenit=cmti10                   
\font\tensmc=cmcsc10 
\def\tenpoint{% 
   \def\rm{\tenrm}\def\bf{\tenbf}% 
   \def\it{\tenit}\def\smc{\tensmc} 
        \textfont0=\tenrm \scriptfont0=\sevenrm 
        \textfont1=\teni \scriptfont1=\seveni 
        \textfont2=\tensy \scriptfont2=\sevensy 
        \textfont3=\tenex \scriptfont3=\tenex 
\baselineskip=12pt\rm}% 
 
\font\ninerm=cmr9 
\font\ninebf=cmbx9 
\font\nineit=cmti9 
\def\ninepoint{% 
   \def\rm{\ninerm}\def\bf{\ninebf}% 
   \def\it{\nineit}\baselineskip=11pt\rm}% 
 
\font\eightrm=cmr8 
\font\eightbf=cmbx8 
\font\eightit=cmti8         
\font\eighti=cmmi8 
\font\eightsy=cmsy8 
\def\eightpoint{% 
   \def\rm{\eightrm}\def\bf{\eightbf}% 
   \def\it{\eightit}\def\smc{\eightrm}\baselineskip=10pt\rm% 
        \textfont0=\eightrm \scriptfont0=\sixrm 
        \textfont1=\eighti \scriptfont1=\sixi 
        \textfont2=\eightsy \scriptfont2=\sixsy 
        \textfont3=\tenex \scriptfont3=\tenex 
} 
 
\font\sixrm=cmr6 
\font\sixbf=cmbx6 
\font\sixi=cmmi6         
\font\sixsmc=cmr5 
\font\sixsy=cmsy6 
\def\sixpoint{% 
   \def\rm{\sixrm}\def\bf{\sixbf}% 
   \def\smc{\sixsmc}\baselineskip=8pt\rm}% 
 
\fontdimen13\tensy=2.6pt 
\fontdimen14\tensy=2.6pt 
\fontdimen15\tensy=2.6pt 
\fontdimen16\tensy=1.2pt 
\fontdimen17\tensy=1.2pt 
\fontdimen18\tensy=1.2pt               
 
\font\eightrm=cmr8 
\font\ninerm=cmr9 
\font\elevenrm=cmr10 scaled\magstephalf
\font\fourteenrm=cmr10 scaled\magstep 1
\font\eighteenrm=cmr10 scaled\magstep 3
\font\twelvebf=cmbx10 scaled\magstep 1
\font\elevenbf=cmbx10 scaled\magstephalf
\font\elevenit=cmti10 scaled\magstephalf
\font\elevensc=cmcsc10 scaled\magstephalf

\def\theoremfont{\elevensc}
\def\textfont{\elevenrm}
\def\itfont{\elevenit}
\def\headfont{\twelvebf}
\def\smallheadfont{\elevenbf}
\def\titlefont{\eighteenrm} 
\def\chapterfont{\fourteenrm} 
\def\authorfont{\fourteenrm} 
\def\rheadfont{\tenrm} 
\def\abstractfont{\tenrm}
\def\smc{\tensmc} 
\font\eightsmc=cmcsc8 
 
\def\footnote#1{\baselineskip=11truept\edef\@sf{\spacefactor\the\spacefactor}#1\@sf
  \insert\footins\bgroup\ninepoint\hsize=36pc
  \interlinepenalty10000 \let\par=\endgraf
   \leftskip=0pt \rightskip=0pt
   \splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000
\smallskip   
\item{#1}\bgroup\baselineskip=10pt\strut
\aftergroup\@foot\let\next}
\skip\footins=12pt plus 2pt minus 4pt
\dimen\footins=36pc



%%%  CHAPTER OPENING MACROS  %%% 
 
\def\startchapter{\topinsert\vglue54pt\endinsert} 

\def\title#1\endtitle{\titlefont\centerline{#1}\vglue5pt}%\vskip40truept\tenrm} 
\def\lasttitle#1\endlasttitle{\titlefont\centerline{#1}\vskip1.32truepc}
\def\author#1\endauthor{\authorfont\centerline{#1}\vglue8pt\textfont} 
\def\lastauthor#1\endlastauthor{\authorfont\centerline{#1}\vglue2.56pc\textfont} 
\def\abstract#1\endabstract{\baselineskip=12pt\leftskip=2.25pc
     \rightskip=2.25pc\abstractfont{#1}\textfont} 

%%%  COUNTERS FOR HEADINGS  %%% 
 
\newcount\headcount 
\headcount=1 
\newcount\seccount 
\seccount=1 
\newcount\subseccount 
\subseccount=1 
\def\secreset{\global\seccount=1} 
 \def\subsecreset{\global\subseccount=1}
 
%%%  HEADINGS  %%% 
 
\def\headone#1{\baselineskip=14pt\leftskip=0pt\rightskip=0pt\vskip17truept\parindent=0pt
{\headfont\the\headcount\hskip14truept #1}
\par\nobreak\firstpar\global\advance\headcount by 0 
   \global\advance\headcount by 1\secreset\vskip2truept\textfont} 

\def\headtwo#1{\advance\headcount by -1% 
   \vskip17truept\parindent=0pt{\headfont\the\headcount.% 
   \the\seccount\hskip14truept #1}%\enspace\ignorespaces\firstpar 
   \global\advance\headcount by 1\global\advance\seccount by 1 
   \global\advance\subseccount by 1\subsecreset\vskip2pt\textfont} 
 
 \def\headthree#1{\advance\headcount by -1\advance\seccount by -1
%   \advance\subseccount by -1% 
   \vskip17truept\parindent=0pt{\smallheadfont\the\headcount.% 
   \the\seccount.\the\subseccount\hskip11truept #1}\hskip6pt\ignorespaces 
   \firstpar\global\advance\headcount by 1\global\advance\seccount by 1 
   \global\advance\subseccount by 1\textfont} 
 
%%%  THEOREMS, PROOFS, DEFINITIONS, etc.  %%% 
 
\def\thm#1{{\theoremfont 
#1\enspace} 
\hskip-5pt\begingroup\itfont\ignorespaces} 
 
\let\lem=\thm 
\let\cor=\thm 
\let\prop=\thm 
 
\def\endthm{\endgroup\textfont} 
\let\endlem=\endthm 
\let\endcor=\endthm 
\let\endprop=\endthm 
 
\def\prf#1{{\itfont #1.}\textfont\enspace\ignorespaces} 
\let\rem=\prf 
\let\case=\prf 
 
\def\endprf{\textfont} 
\let\endrem=\endprf 
\let\endcase=\endprf 

\def\qed{{\qquad \vbox{\hrule\hbox{%
   \vrule height1.3ex\hskip0.8ex\vrule}\hrule
  }}\par}  
 
\def\dfn#1{{\theoremfont
#1\enspace} 
\textfont\ignorespaces} 
 
\let\fact=\dfn 
 
\def\enddfn{\textfont} 
 
\let\endfact=\enddfn 

%%%  FIGURES AND CAPTIONS  %%% 


\newcount\figcount
\figcount=1


%\newcount\tablenumber
%\tablenumber=1

\def\\{\hfill\break}

\newbox\TestBox
\newdimen\setwd
\newskip\belowcaptionskip
\belowcaptionskip=6pt plus 1pt

\def\endinsert{\egroup % finish the \vbox
  \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@
    \advance\dimen@12\p@ \advance\dimen@\pagetotal
    \ifdim\dimen@>\pagegoal\@midfalse\p@gefalse\fi\fi
   \if@mid\vskip\belowcaptionskip\box\z@\par \penalty-200\vskip\belowcaptionskip
  \else\insert\topins{\penalty100 % floating insertion
    \splittopskip\z@skip
    \splitmaxdepth\maxdimen \floatingpenalty\z@
    \ifp@ge \dimen@\dp\z@
    \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero
    \else \box\z@\nobreak\vskip\belowcaptionskip\fi}\fi\endgroup}




\def\fig#1#2#3{%
       \setbox\TestBox=\hbox{\tenpoint #3.}\setwd=\wd\TestBox
        \topinsert
       \vskip #1
                \vskip 12pt
        \ifdim\setwd > 23pc
          {\tenit{\smc #2.}\ \ #3}
        \else
         \centerline{\tenit\noindent 
                {\smc #2.}\ \  #3}\fi%
               % \global\advance\figcount by 1
        \endinsert}


 
%%%  REFERENCES  %%% 
 
\newdimen\refindent@ 
\newdimen\refhangindent@ 
\newbox\refbox@ 
\setbox\refbox@=\hbox{\tenrm\baselineskip=11pt [00]}%   Default 2 digits 
\refindent@=\wd\refbox@ 
 
\def\resetrefindent#1{% 
        \setbox\refbox@=\hbox{\tenrm\baselineskip=11pt [#1]}% 
        \refindent@=\wd\refbox@} 
 
\def\Refs{% 
        \unskip\vskip1pc 
        \leftline{\noindent\headfont References}% 
        \penalty10000 
        \vskip4pt 
        \penalty10000 
        \refhangindent@=\refindent@ 
        \global\advance\refhangindent@ by .5em 
        \global\everypar{\hangindent\refhangindent@}% 
        \parindent=0pt\baselineskip=12pt\tenrm} 
                                       
\def\sameauthor{\leavevmode\vbox to 1ex{\vskip 0pt plus 100pt 
    \hbox to 2em{\leaders\hrule\hfil}\vskip 0pt plus 300pt}} 
     
\def\ref#1\\#2\endref{\leavevmode\hbox to \refindent@{\hfil[#1]}\enspace #2\par} 
 
 
%%%  OUTPUT  %%% 
 
\def\rightheadline{\hfill\tensmc\rightrh\hskip2pc\tenrm\folio} 
\def\leftheadline{\tenrm\folio\hskip2pc\tensmc\leftrh\hfill} 
 
\global\footline={\hss\tenrm\folio\hss}% first page 
 
\output{\plainoutput} 
\def\plainoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}% 
  \advancepageno 
  \ifnum\pageno>1 
        \global\footline={\hfill}% 
  \fi      
  \ifodd\pageno 
        \global\headline={\rightheadline}% 
  \else 
        \global\headline={\leftheadline}% 
  \fi 
  \ifnum\outputpenalty>-\@MM \else\dosupereject\fi} 
\def\pagebody{\vbox to\vsize{\boxmaxdepth\maxdepth \pagecontents}} 
\def\makeheadline{\vbox to\z@{\vskip-22.5\p@ 
  \line{\vbox to8.5\p@{}\rheadfont\the\headline}\vss}% 
    \nointerlineskip} 
\def\makefootline{\baselineskip24\p@\vskip-6\p@\line{\the\footline}} 
\def\dosupereject{\ifnum\insertpenalties>\z@ % something is being held over 
  \line{}\kern-\topskip\nobreak\vfill\supereject\fi} 

\def\footnoterule{\vskip11pt\kern -4\p@\hrule width 3pc \kern 3.6\p@ } % rule = .4 pt high 

%       Turn off @ as being a letter. 
% 
\catcode`\@=13 
 
%end of style file