1 % UCI Dissertation Style for AmSTeX.
2 % @(#)$Id: diss.sty,v 1.3 1990/04/05 15:20:23 sources Exp $
4 % Tim Morgan with many suggestions, bug fixes, etc, from Marshall Rose
5 % Based originally on Michael Spivak's AMSPPT.STY.
7 % When edits are made to this file, the version number should be incremented.
9 \let\fmtversion=\version % These two control sequences are defined
10 \def\fmtname{dissertation} % in plain.tex, so we do it here too.
12 % Assumes the following hidden definitions from plain.tex:
13 % \z@ is defined from plain.tex as 0pt (and magically can
14 % be used as the integer constant 0 also).
15 % \p@ is the same, but 1pt
22 % And the following scratch register definitions:
23 % \dimen@ is \dimendef'd to be \dimen0
24 % \skip@ is \skipdef'd to be \skip0
25 % \count@ is \count255
27 \catcode`\@=11 % So we can use a special character
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 % PARAMETERS DIFFERENT THAN IN PLAIN %
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 % These are words which TeX doesn't hyphenate perfectly.
35 % Unfortunately, the plural forms must be included also.
36 \hyphenation{com-put-er com-mun ap-pen-dix cart-wheel data-base Dijk-stra}
37 \hyphenation{in-fra-struc-ture man-u-script mi-cro-fiche para-mil-i-tary}
38 \hyphenation{post-am-ble pre-am-ble sub-scrib-er wave-guide sub-scrib-ers}
39 \hyphenation{com-put-ers cart-wheels data-bases in-fra-struc-tures}
40 \hyphenation{man-u-scripts mi-cro-fiches post-am-bles pre-am-bles}
41 \hyphenation{buf-fer buf-fers des-ig-na-ted par-a-graph par-a-graphs}
42 \hyphenation{key-stroke key-strokes usu-al-ly}
45 \def\normal@topskip{0.48cm}
46 \topskip=\normal@topskip % For correct page positioning, do NOT
47 \hoffset=0.5in % change any of these values!!!
52 \normallineskiplimit=\p@ % Min. dist. btw. lines.
53 \parindent=1cm % Normal indentation.
54 \hfuzz=0.115\p@ % So we hear fewer complaints. Good up to
55 \vfuzz=0.115\p@ % 300 dpi.
57 \pretolerance=200 % At 12pt, these margins are kind of narrow
58 \tolerance=300 % so we have to be more tolerant.
59 \clubpenalty=\@M % Never allow these.
61 \newlinechar=`\^^J % For writing output to tty.
62 \uchyph=\z@ % Don't take any chances.
63 \brokenpenalty=\@M % Never hyphenate last line on a page.
64 \newcount\defaultinterlinepenalty % This probably won't make any
65 \defaultinterlinepenalty=\thr@@ % difference, so why not??
66 \interlinepenalty=\defaultinterlinepenalty
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 % PARAMETERS DIFFERENT from AmSTeX %
71 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 \TagsOnRight % Set tags like a sane person does
76 %%%%%%%%%%%%%%%%%%%%%%%%
77 % EXTRA FONTS NEEDED %
78 %%%%%%%%%%%%%%%%%%%%%%%%
81 \olddigitsfalse % Allow use of amcscod10 for citations
84 \oktell{Old Digits Mode}%
87 \font\sixrm=cmr6 \font\sixbf=cmbx6
88 \font\sixi=cmmi6 \skewchar\sixi='177
89 \font\sixsy=cmsy6 \skewchar\sixsy='60
91 \font\eightrm=cmr8 \font\eightsl=cmsl8 \font\eightit=cmti8
92 \font\eightsy=cmsy8 \skewchar\eightsy='60
93 \skewchar\eightsy='60 \font\eightbf=cmbx8
94 \font\eightex=cmex10 at 8\p@
95 \font\eighti=cmmi8 \skewchar\eighti='177
97 \font\ninerm=cmr9 \font\nineit=cmti9
98 \font\ninei=cmmi9 \skewchar\ninei='177
99 \font\ninesy=cmsy9 \skewchar\ninesy='60
100 \font\ninesl=cmsl9 \font\ninebf=cmbx9
102 \font\twelvecsc=cmcsc10 scaled \magstep1
104 \font\eightcsc=cmcsc10 at 8\p@
105 \font\elevencsc=cmcsc10 scaled \magstephalf
106 \font\ninecsc=cmcsc10 at 9\p@
108 \let\tencscod=\tencsc
109 \let\eightcscod=\eightcsc
111 \font\eightsf=cmss10 at 8\p@
113 \font\twelvesf=cmss10 at 12\p@
115 \font\twelvett=cmtt10 scaled \magstep1
116 \font\eighttt=cmtt10 at 8\p@ % \tentt is predefined in plain.tex
118 \font\twelvebti=cmbti at 12\p@
120 \font\eightbti=cmbti at 8\p@
122 \font\twelveex=cmex10 scaled \magstep1 \font\twelverm=cmr10 scaled \magstep1
123 \font\twelvesl=cmsl10 scaled \magstep1 \font\twelvebf=cmbx10 scaled \magstep1
124 \font\twelvei=cmmi10 scaled \magstep1 \skewchar\twelvei='177
125 \font\twelvesy=cmsy10 scaled \magstep1 \skewchar\twelvesy='60
126 \font\twelveit=cmti10 scaled \magstep1
128 \font\twelvechap@font=cmssbx10 at 14\p@
129 \font\twelvesec@font=cmss10 at 13\p@
130 \font\twelvesubsec@font=cmssi10 scaled \magstep1
132 \font\tenchap@font=cmssbx10 scaled \magstep1
133 \font\tensec@font=cmssbx10 scaled \magstephalf
134 \font\tensubsec@font=cmssi10
136 \font\eightchap@font=cmssbx10
137 \font\eightsec@font=cmss10 at 9\p@
138 \font\eightsubsec@font=cmssqi8
142 \def\curfont{\ifcase\font@no\rm\or\it\or\sl\or\bf\or\tt\or\csc\or\bti\or\sf
143 \else\errmessage{Internal font confusion}\fi}
145 %%%%%%%%%%%%%%%%%%%%%
147 %%%%%%%%%%%%%%%%%%%%%
149 \newskip\normalabovedisplayskip
150 \newskip\normalbelowdisplayskip
151 \newskip\normalabovedisplayshortskip
152 \newskip\normalbelowdisplayshortskip
153 \newdimen\normalparskip \normalparskip=22.5\p@
154 \newdimen\parstretch \parstretch=8\p@
156 \newif\ifsinglespacing % Tells if we are currently in single space mode
157 \newif\ifhalfspacing % Special version of singlespacing, a little bigger.
159 % Actually tell TeX what spacing is wanted
161 \baselineskip=\normalbaselineskip
162 \abovedisplayskip=\normalabovedisplayskip
163 \belowdisplayskip=\normalbelowdisplayskip
164 \abovedisplayshortskip=\normalabovedisplayshortskip
165 \belowdisplayshortskip=\normalbelowdisplayshortskip
166 % Compute \parskip for even paragraph spacing at all pt sizes
167 \dimen@=\normalparskip
168 \advance\dimen@ by -\normalbaselineskip
169 \parskip=\dimen@ plus\parstretch
172 % Go from double to single spacing
174 \normalbaselineskip=0.64\normalbaselineskip
175 \normalabovedisplayskip=0.64\normalabovedisplayskip
176 \normalbelowdisplayskip=0.64\normalbelowdisplayskip
177 \normalabovedisplayshortskip=0.64\normalabovedisplayshortskip
178 \normalbelowdisplayshortskip=0.64\normalbelowdisplayshortskip
181 % Set halfspacing baseline etc starting from singlespacing mode
182 \def\sethalfspacing{%
183 \normalbaselineskip=1.28125\normalbaselineskip
184 \abovedisplayskip=1.28125\abovedisplayskip
185 \belowdisplayskip=1.28125\belowdisplayskip
186 \abovedisplayshortskip=1.28125\abovedisplayshortskip
187 \belowdisplayshortskip=1.28125\belowdisplayshortskip
190 % Go to single spacing if we're not there already
192 \normalspacing \reducespacing
193 \halfspacingfalse \singlespacingtrue
197 % Go to 1-1/2 spacing.
199 \normalspacing \reducespacing \sethalfspacing
200 \singlespacingtrue \halfspacingtrue
204 % Go to normal, doublespacing mode
207 \singlespacingfalse \halfspacingfalse
211 % Make sure we're doing the spacing we're supposed to be.
216 \ifhalfspacing \sethalfspacing \fi
222 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
223 % FOUR DIFFERENT POINT SIZES %
224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
227 \def\big@@AmS{10.2\p@}%
228 \def\Big@@AmS{13.8\p@}%
229 \def\bigg@@AmS{17.4\p@}%
230 \def\Bigg@@AmS{21.0\p@}%
231 \let\smallertype=\tenpoint
232 \let\curtype=\twelvepoint
233 \def\biggertype{\errmessage{No larger point size available}}%
235 \normalbaselineskip=22.8\p@
236 \normalabovedisplayskip=14.5\p@ plus 3\p@ minus 9\p@
237 \normalbelowdisplayskip=14.5\p@ plus 3\p@ minus 9\p@
238 \normalabovedisplayshortskip=\z@ plus 4\p@
239 \normalbelowdisplayshortskip=9\p@ plus 4\p@ minus 5\p@
241 \def\rm{\font@no=0\fam\z@\twelverm}%
242 \def\it{\font@no=1\fam\itfam\twelveit}%
243 \def\sl{\font@no=2\fam\slfam\twelvesl}%
244 \def\bf{\font@no=3\fam\bffam\twelvebf}%
245 \def\tt{\font@no=4\fam\ttfam\twelvett \spaceskip.5em plus.25em
247 \def\csc{\font@no=5\twelvecsc}%
248 \def\bti{\font@no=6\twelvebti}%
249 \def\sf{\font@no=7\twelvesf}%
252 \let\cite@font=\tencscod
254 \let\cite@font=\elevencsc
256 \textfont\z@=\twelverm \scriptfont\z@=\ninerm \scriptscriptfont\z@=\sixrm
257 \textfont\@ne=\twelvei \scriptfont\@ne=\ninei \scriptscriptfont\@ne=\sixi
258 \textfont\tw@=\twelvesy \scriptfont\tw@=\ninesy \scriptscriptfont\tw@=\sixsy
259 \textfont\thr@@=\twelveex \scriptfont\thr@@=\twelveex
260 \scriptscriptfont\thr@@=\twelveex
261 \textfont\itfam=\twelveit
262 \textfont\slfam=\twelvesl
263 \textfont\ttfam=\twelvett
264 \textfont\bffam=\twelvebf \scriptfont\bffam=\ninebf
265 \scriptscriptfont\bffam=\sixbf
266 \let\chap@font=\twelvechap@font
267 \let\sec@font=\twelvesec@font
268 \let\subsec@font=\twelvesubsec@font
269 \let\subsubsec@font=\twelvebf
270 \def\oldstyle{\fam1\twelvei}%
273 \ifundefined{everypointsize}\else\everypointsize{twelve}{12}\fi
277 \def\big@@AmS{8.5\p@}%
278 \def\Big@@AmS{11.5\p@}%
279 \def\bigg@@AmS{14.5\p@}%
280 \def\Bigg@@AmS{17.5\p@}%
281 \let\smallertype=\eightpoint
282 \let\curtype=\tenpoint
283 \let\biggertype=\twelvepoint
285 \normalbaselineskip=18.9\p@
286 \normalabovedisplayskip=12\p@ plus 3\p@ minus 9\p@
287 \normalbelowdisplayskip=12\p@ plus 3\p@ minus 9\p@
288 \normalabovedisplayshortskip=\z@ plus 3\p@
289 \normalbelowdisplayshortskip=7\p@ plus 3\p@ minus 4\p@
291 \def\rm{\font@no=0\fam\z@\tenrm}%
292 \def\it{\font@no=1\fam\itfam\tenit}%
293 \def\sl{\font@no=2\fam\slfam\tensl}%
294 \def\bf{\font@no=3\fam\bffam\tenbf}%
295 \def\tt{\font@no=4\fam\ttfam\tentt \spaceskip.5em plus.25em
297 \def\csc{\font@no=5\tencsc}
298 \def\bti{\font@no=6\tenbti}%
299 \def\sf{\font@no=7\tensf}%
302 \let\cite@font=\eightcscod
304 \let\cite@font=\ninecsc
306 \textfont\z@=\tenrm \scriptfont\z@=\sevenrm \scriptscriptfont\z@=\fiverm
307 \textfont\@ne=\teni \scriptfont\@ne=\seveni \scriptscriptfont\@ne=\fivei
308 \textfont\tw@=\tensy \scriptfont\tw@=\sevensy \scriptscriptfont\tw@=\fivesy
309 \textfont\thr@@=\tenex \scriptfont\thr@@=\tenex
310 \scriptscriptfont\thr@@=\tenex
311 \textfont\itfam=\tenit
312 \textfont\slfam=\tensl
313 \textfont\ttfam=\tentt
314 \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
315 \scriptscriptfont\bffam=\fivebf
316 \let\chap@font=\tenchap@font
317 \let\sec@font=\tensec@font
318 \let\subsec@font=\tensubsec@font
319 \let\subsubsec@font=\tenbf
320 \def\oldstyle{\fam1\teni}%
323 \ifundefined{everypointsize}\else\everypointsize{ten}{10}\fi
327 \def\big@@AmS{6.8\p@}%
328 \def\Big@@AmS{9.2\p@}%
329 \def\bigg@@AmS{11.6\p@}%
330 \def\Bigg@@AmS{14.0\p@}%
331 \def\smallertype{\errmessage{No smaller point size available}}%
332 \let\curtype=\eightpoint
333 \let\biggertype=\tenpoint
335 \normalbaselineskip=15\p@
336 \normalabovedisplayskip=10\p@ plus 2.4\p@ minus 7.2\p@
337 \normalbelowdisplayskip=10\p@ plus 2.4\p@ minus 7.2\p@
338 \normalabovedisplayshortskip=\z@ plus 2.4\p@
339 \normalbelowdisplayshortskip=55.6\p@ plus 2.4\p@ minus 3.2\p@
341 \def\rm{\font@no=0\fam\z@\eightrm}%
342 \def\it{\font@no=1\fam\itfam\eightit}%
343 \def\sl{\font@no=2\fam\slfam\eightsl}%
344 \def\bf{\font@no=3\fam\bffam\eightbf}%
345 \def\tt{\font@no=4\fam\ttfam\eighttt \spaceskip.5em plus.25em
347 \def\csc{\font@no=5\eightcsc}%
348 \def\bti{\font@no=6\eightbti}%
349 \def\sf{\font@no=7\eightsf}%
351 \def\cite@font{\errmessage{You may not do citations in 8 point}}
352 \textfont\z@=\eightrm \scriptfont\z@=\sixrm \scriptscriptfont\z@=\fiverm
353 \textfont\@ne=\eighti \scriptfont\@ne=\sixi \scriptscriptfont\@ne=\fivei
354 \textfont\tw@=\eightsy \scriptfont\tw@=\sixsy \scriptscriptfont\tw@=\fivesy
355 \textfont\thr@@=\eightex \scriptfont\thr@@=\eightex
356 \scriptscriptfont\thr@@=\eightex
357 \textfont\itfam=\eightit
358 \textfont\slfam=\eightsl
359 \textfont\ttfam=\eighttt
360 \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
361 \scriptscriptfont\bffam=\fivebf
362 \let\chap@font=\eightchap@font
363 \let\sec@font=\eightsec@font
364 \let\subsec@font=\eightsubsec@font
365 \let\subsubsec@font=\eightbf
366 \def\oldstyle{\fam1\eighti}%
369 \ifundefined{everypointsize}\else\everypointsize{eight}{10}\fi
373 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374 % TABLE of CONTENTS Macros %
375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
377 % This set of macros allows you to build a table of contents for a document
378 % automatically in TeX. There are only three control sequences which you
379 % will need to use. The first is \inicont, which initializes the macros.
380 % This package works by writing the appropriate lines into a file called
381 % \jobname.toc in your account. This file is read by \printcontents or
382 % by \printcont in PRINT-PRELIM.TEX.
384 \newwrite\cont@file % Get a free channel to write to
386 \cont@closedtrue % Haven't opened contents file yet
390 \fig@closedtrue % Or the list of figures file
392 \tab@closedtrue % Or the tables file
394 \def\contitle{\jobname.toc} % Default name of contents file
395 \def\figtitle{\jobname.lof} % ditto for figures file
396 \def\tabtitle{\jobname.lot} % ditto for tables file
398 % Make sure the contents file is open before writing to it
401 \immediate\openout\cont@file=\contitle
407 % This control sequence adds its argument to the table of contents.
412 \write\cont@file{\string\Z{#1}{\the\pageno}}%
416 % This control sequence is the same as \content except that the first
417 % box written will have two leading spaces to indent it.
422 \write\cont@file{\string\Z{\string\hskip \parindent{}#1}{\the\pageno}}%
425 % And the same thing for sub-sections
426 \def\subsubcontent#1{%
429 \write\cont@file{\string\Z{\string\hskip 2\parindent{}#1}{\the\pageno}}%
432 % And the same thing for sub-sub-sections
433 \def\subsubsubcontent#1{%
436 \write\cont@file{\string\Z{\string\hskip 3\parindent{}#1}{\the\pageno}}%
439 % Simple table-of-contents printer for \articlestyle.
440 % For dissertations, use the one in print-prelim.tex.
441 % Use this macro as the last thing in your report, since it makes
442 % the page numbers be in romannumerals at the bottom of the page.
445 \null\vfill\supereject % Close output, end last page
446 \twelvepoint\rm % Make sure we're in normal mode
447 \pageno=\m@ne % Contents get roman numerals.
448 \plain@page@numbers % Put page #s at bottom only
449 \oktell{Table of Contents}
450 \null \vskip .8in minus\baselineskip
451 \centerline{\chap@font Contents}
452 \vskip \tw@\baselineskip
454 \begingroup % Temporarily change \baselineskip to avoid
455 % underfull \vbox's during output errors.
456 \baselineskip=\@ne\baselineskip plus .05\baselineskip
457 \def\Z##1##2{\line{\ignorespaces##1\leaders
458 \hbox to.7em{.\hfil}\hfil\hbox to2em{\hss##2}}}
461 \input\contitle \relax
462 \endgroup % Also undoes the \catcode change
466 %%%%%%%%%%%%%%%%%%%%%%%%
467 % NUMBERED FOOTNOTES %
468 %%%%%%%%%%%%%%%%%%%%%%%%
470 % First, modify \vfootnote from Plain to use smallertype and singlespace
472 \insert\footins\bgroup\tenpoint\singlespace
473 \interlinepenalty\interfootnotelinepenalty
474 \splittopskip\ht\strutbox % top baseline for broken footnotes
475 \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
476 \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
478 \textindent{#1}\footstrut\futurelet\next\fo@t
481 % Allocate a counter for the numbered footnotes
482 \newcount\note@count \note@count=\@ne
485 \unskip\footnote{$^{\number\note@count}$}{#1}%
486 \global\advance\note@count by\@ne
489 % Same except that trailing period or comma is ``tucked'' under
490 % the note mark. \ntucknote provides auto numbering.
491 \def\ntucknote#1#2{\nfootnote{#1}\llap{#2}}
492 \def\tucknote#1#2#3{\footnote{#1}{#2}\llap{#3}}
499 % Insert a discretionary hyphen. For use in restricted
500 % horizontal mode, as in the bibliography.
501 \def\hyphenbreak{\discretionary{-}{}{-}}
503 % Check if a macro name is currently undefined (from The TeXbook)
504 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
506 % Terminal input and output routines and auxilary stuff
507 \newwrite\undef@out@chan % Allocate a channel for the tty
508 \def\tell#1{{\let\\=\space\immediate\write\undef@out@chan{#1}}}
509 \def\ask#1{\read-16 to #1} % Read from tty w/o prompt
511 % Sanitize a string before \write'ing it.
512 % Call with \unexpanded{op}{msg}
513 % Modified from version in The TeXbook, originally by Todd Allen
514 \long\def\unexpanded#1#2{%
516 {\aftergroup\finwrite\aftergroup{\sanitize@uci#2\endsanity@uci}}%
518 \def\sanitize@uci{\futurelet\next@uci\sanswitch@uci}
519 \def\sanswitch@uci{\ifx\next@uci\endsanity@uci
520 \else\ifx\next@uci\\\aftergroup\space\let\next@uci=\eat@uci
521 \else\ifcat\noexpand\next@uci\space\aftergroup\space\let\next@uci=\eat@uci
522 \else\ifcat\noexpand\next@uci\bgroup\aftergroup{\let\next@uci=\eat@uci
523 \else\ifcat\noexpand\next@uci\egroup\aftergroup}\let\next@uci=\eat@uci
524 \else\let\next@uci=\copytoken@uci\fi\fi\fi\fi\fi \next@uci
526 \def\eat@uci{\afterassignment\sanitize@uci \let\next@uci= }
527 \long\def\copytoken@uci#1{%
528 \ifcat\noexpand#1\relax\aftergroup\noexpand
529 \else\ifcat\noexpand#1\noexpand~\aftergroup\noexpand
532 \aftergroup#1\sanitize@uci
534 \def\endsanity@uci\endsanity@uci{}
536 % Now use the sanity stuff to make a sane tell command. This macro
537 % actually takes one argument, but since it's the last for \unexpanded,
538 % we avoid scanning it twice by not picking it up here.
539 \def\sanetell{\unexpanded{\immediate\write\undef@out@chan}}
541 % Produce verbatim listings of various sorts
543 \def\uncatcodespecials{\def\do##1{\catcode`##1=12 } \dospecials}
545 \par \tt \spaceskip=\z@ % Want fixed tt spacing now
546 \obeylines \uncatcodespecials \obeyspaces \verbatimdefs
549 % This macro turns on verbatim mode until ?endverbatim is seen.
551 \begingroup \setupverbatim
552 \parskip=\z@ plus .05\baselineskip \parindent=\z@
553 \catcode`\ =13 \catcode`\^^M=13 \catcode`\?=\z@
556 {\catcode`\^^M=13{\catcode`\ =13\gdef\verbatimdefs{\def^^M{\ \par}\let =\ }}
557 \gdef\verbatimgobble#1^^M{}%
560 % This defines ?endverbatim to end the group which begins with \verbatim
561 \let\endverbatim=\endgroup
563 % Input a file in verbatim mode. Sometimes useful for including
564 % real-life examples into a paper.
566 \begingroup\setupverbatim
567 \parskip=\z@ plus .05\baselineskip \parindent=\z@
571 % This is the same as the above, but it adds line numbers to each
572 % line of the file printed. \lineno@uci has the obvious use.
576 \begingroup\setupverbatim
577 \parskip=\z@ plus .05\baselineskip \parindent=20\p@
578 \everypar{\advance\lineno@uci by\@ne \llap{\the\lineno@uci\ \ }}%
583 % Draw a little qed symbol (black box)
584 \def\qed{\hbox{\hskip\p@ \vrule width4\p@ height6\p@ depth1.5\p@ \hskip\p@}}
586 % Conditions -- from AmSppt
589 \let\runin=\runin@AmStrue
591 \newdimen\condindent % Amount each nested condition is indented
592 \condindent=.5in % Default indentation amount
594 % This is used in \conditions
595 \def\firstcon@AmS#1:{%
597 {\rm\ignorespaces#1\unskip}\ignorespaces
601 \ifdim\lastskip<\smallskipamount
602 \removelastskip \penalty55 \smallskip
608 % Do one item of the conditions. This is really \\ in disguise.
611 \hbox to \cond@dimen{\hfil\rm\ignorespaces#1\unskip\quad}%
613 \hangindent\cond@dimen\ignorespaces
616 \cond@dimen=\z@ % Value for outermost block
617 % Do the main stuff for \conditions.
622 \advance\cond@dimen by\condindent
626 % Exit special stuff for \conditions.
628 \par\smallbreak\endgroup
629 \ifdim\cond@dimen>\z@ \cond@item \fi % If ending an inner condition
632 % Automatically numbered items
634 \newdimen\item@dimen \item@dimen=\z@
638 \advance \parindent by\item@dimen
639 \ifnum\item@dimen>\z@
640 \edef\item@prefix{\item@prefix\number\item@count.}
644 \item@count=\z@ \singlespace \interlinepenalty=200
646 \def\enditems{\par\endgroup}
647 \def\nitem{\advance\item@count by\@ne \item{\item@prefix\number\item@count.}}
649 % Turn back on the \+ construct of plain TeX.
650 \def\tabalign{\us@true\m@ketabbox}
651 \outer\def\+{\tabalign}
653 % Fix AmSTeX's definition used in its definition of ~ (tie).
654 \def\s@AmS{\penalty\@M\ifx\tok@AmS\Space@AmS\else\ \fi}
656 % And make \/ work the way it does in plain.tex
659 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
660 % PAGE CONTROL and OBJECT MANIPULATION %
661 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
663 % This definition doesn't blow up if you're in vertical mode already
664 \def\pagebreak{\ifhmode\vadjust{\break}\else\break\relax}
666 % This definition clears out all previous inserts etc to
667 % guarantee that the following stuff is at the top of a page.
668 \def\clearpage{\vfill\supereject}
670 % This macro keeps the stuff in the argument on the same page, leaving
671 % blank space on this page if necessary
672 \def\keep{\par\setbox\z@=\vbox\bgroup}
676 \advance\dimen@ by\dp\z@
677 \vskip\z@ plus\dimen@
679 \vskip\z@ plus-\dimen@
692 % List macros from the TeXbook
694 \toksdef\ta=\z@ \toksdef\tb=\tw@
697 % usage: \newlist\list
698 \def\newlist#1{\let#1=\empty}
700 % usage: \append{item}\to\list
701 \def\append#1\to#2{\ta={\\{#1}}\tb=\expandafter{#2}\edef#2{\the\tb\the\ta}}
702 \def\gappend#1\to#2{\ta={\\{#1}}\tb=\expandafter{#2}\xdef#2{\the\tb\the\ta}}
704 % usage: \cardinality\list\to\counter
705 \def\cardinality#1\to#2{#2=\z@ \long\def\\##1{\advance#2 by\@ne }#1}
707 % usage: \ifismember{item}\of\list ... \else ... \fi
708 \def\ifismember#1\of#2{%
713 \ifx\next@uci\given@uci \result@ucitrue\fi
719 % usage: \ifwasmember{item}\of\list ... \else ... \fi
720 % side effect: removes {item} from \list if present
721 \def\ifwasmember#1\of#2{%
727 \ifx\next@uci\given@uci
730 \append ##1\to\ref@mtr
738 % Append #1 to list #2 if #1 is not already in #2
739 \def\addtolist#1\to#2{%
745 % Same thing, but do it \global'ly
746 \def\gaddtolist#1\to#2{%
754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
755 % STUFF for BIBLIOGRAPHY and APPENDICES %
756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
758 % Bibliography Package:
759 % Original version by Michal Spivak
760 % Updated for JACM format and automated by Tim Morgan
761 % Final cleanup, and much-improved automation, by Marshall Rose
762 % Additional work and IEEE support by TM.
764 % Simple appendix entry builder
769 \ifodd\pageno \else \null\vfill\eject\fi
773 \setbox\z@=\hbox{#1}%
775 \content{Appendix #1: #2}%
776 \oktell{Appendix #1: #2}%
777 \def\title{Appendix #1\\#2}%
779 \content{Appendix: #2}%
780 \oktell{Appendix: #2}%
781 \def\title{Appendix\\#2}%
783 \let\\=\cr \tabskip=\z@ \chap@font
784 \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\title\cr}%
787 \vskip 1.0in minus 0.15in
792 % We keep a running list, \ref@set, which is
793 % all the things which were \cite'd throughout the paper, with
794 % only one entry for each different key.
796 % There are three versions of each of the citation
798 % 1. The \def'd version is the normal one used throughout the paper.
799 % 2. Within a figure, table, etc,'s caption, because of the use of
800 % \def and \edef, a special version which just produces the
801 % citation without the \gaddtolist command is used. These
802 % definitions are predefined, and are \let to be \cite etc with
803 % \no@cites, for speed.
805 % When the user requests a citation with key, we first look it up
806 % in a translation table called \key@table, organized as a list of
807 % <key, printed-key> pairs, to see if it really should be
808 % printed differently. The user can specify this translation table using
809 % the \printkey command. If a key is not in the table, it is printed
812 % We keep the dimension \key@size as the largest printed key so far.
813 % This value can then be used to print the keys in the bibliography
814 % optimally, rather than just trying to guess. Each time we print a
815 % (in \use@key), we see if it's longer than \key@size, and if so then
816 % we set \key@size = its width.
818 \key@size=\z@ % Init. value so \key@size is made as small as possible
820 % Invisible citation. usage: \icite{key}
822 \gaddtolist#1\to\ref@set
825 % Management of \key@table stuff. This table is formatted as
826 % \\{real-key}{printed-key}...
829 % Add a pair of items to the list. This should be done before any
830 % citations are made, for obvious reasons.
831 % #1=real key (the one you use in the paper and bibliography)
832 % #2=the key that gets printed in the output
835 \tb=\expandafter{\key@table}%
836 \xdef\key@table{\the\tb\the\ta}%
839 % Print a key, looking it up in the table. #1 is \whatever which
840 % expands to the key used by the user. The definition of \\ here
841 % makes use of the format of the \key@table, so that the table is
842 % actually EXECUTED, hence making lookup relatively fast.
843 \newif\if@not@printed@
851 \setbox\z@=\hbox{[##2]\enspace}%
852 \ifdim\wd\z@>\key@size \global\key@size=\wd\z@ \fi
859 \setbox\z@=\hbox{\cite@font[\ignorespaces#1\unskip]\enspace}%
860 \ifdim\wd\z@>\key@size \global\key@size=\wd\z@ \fi
865 % This macro moves forward until it hits \end, skipping spaces.
866 % Each time it hits a comma, or when it hits and \end, it
867 % adds whatever has been collected so far (in \@total) to
868 % \ref@set and to the output list. It is assumed that \@total
869 % has been set to \empty before this routine is called (this is done
870 % by \@@cite, below).
873 \expandafter\gaddtolist\@total\to\ref@set
875 \let\@next=\relax % Exit loop after this time
877 \if#1,% % We have a complete key now.
878 \expandafter\gaddtolist\@total\to\ref@set
879 \use@key\@total,\space
880 \global\let\@total=\empty
882 \xdef\@total{\@total#1}% Add new char to total
884 \let\@next=\@icite % Continue looping until done
889 % Initialize and call \@icite. Used in \cite, \citep, \citepp
890 \def\@@cite#1{\global\let\@total=\empty\@icite#1\end}
892 % usage: \cite{key [, key...]}
894 {\cite@font[\@@cite{#1}]}%
897 % usage: \citep{key}{page}
899 {\cite@font[\@@cite{#1}, \hbox{\rm p \ignorespaces#2\unskip}]}%
902 % usage: \citepp{key}{pages}
904 {\cite@font[\@@cite{#1}, \hbox{\rm pp \ignorespaces#2\unskip}]}%
907 % These three definitions are used in \no@cites, below. They
908 % don't handle extraneous spaces as well as the normal
909 % definition, but they should be sufficient for most people.
910 \def\i@cite#1{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1}]}}
912 \def\i@citep#1#2{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1},\space
913 \hbox{\noexpand\noexpand\noexpand\rm p \ignorespaces#2\unskip}]}%
916 \def\i@citepp#1#2{{\cite@font[\noexpand\noexpand\noexpand\@@cite{#1},\space
917 \hbox{\noexpand\noexpand\noexpand\rm pp \ignorespaces#2\unskip}]}%
920 % Turn off adding citations to \ref@set. This is needed when
921 % using \cite etc inside a caption for tables, figures, etc.
922 % \no@cites is undone by exiting an enclosing group.
924 \let\citepp=\i@citepp
929 %%%%%%%%%%%%%%%%%%%%%%
930 % References Section %
931 %%%%%%%%%%%%%%%%%%%%%%
933 % The basic strategy is as follows. We read the bib. file, which is
934 % assumed to be in sorted order of keys/author names. Each
935 % entry is of the form \ref{key}. We see if that key is in the table
936 % \ref@set, which is a table of all the keys we've \cite'd. If the key
937 % isn't in the list, we print it in parens and go on to the next entry.
938 % Otherwise, we print the key in square brackets, and format the
939 % bibliography entry according to the format (JACM or IEEE). We print a
940 % warning if the key is in the \ref@seen list. We add the key to
941 % the \ref@seen list. The key is removed from the \ref@set list if it
942 % was there. At the end of the references (\endreferences), we check
943 % if there are any keys left in \ref@set. If so, the bib. file was
944 % deficient, and we print a warning message (it should probably be a
945 % fatal error message).
948 \newif\ifinclude@annos % Should annotations be printed?
949 \include@annosfalse % By default, no
950 \def\annotate{% % ``official'' command
952 \oktell{Annotating bibliography}%
955 \newif\ifin@anno % True while doing an annotation
958 \def\refi@AmS{F} % This starts as False
960 % Begin an annotation -- must be in vertical mode. Just gather
961 % text into box0 for use by \endanno. We do a couple of consistency
962 % checks at the beginning.
965 \message{You forgot the \noexpand\endref command!}
966 \message{I've inserted one for you.}
970 \errmessage{No \noexpand\ref command before first \noexpand\anno}
974 \setbox\z@=\vbox\bgroup
977 % End of an annotation. Decide if it should be typeset or skipped.
979 \egroup % End the group for box0
980 \in@annofalse % No longer doing an annotation
981 \if T\refed@uci % If previous reference was used,
982 \ifinclude@annos {% And if we're producing an annotated bib.,
984 \interlinepenalty=\defaultinterlinepenalty
985 \unvbox\z@ % Then include annotation as normal paragraph(s)
991 \global\newlist\ref@set % list of all references cited
992 \global\newlist\ref@seen % list of all references defined
994 \def\reftitle{References} % Default title for bibliography
996 % usage: \references (begin the References section)
998 \vfill\supereject % Begin new page, clear out everything
999 \ifoddpages % Make sure start on even page.
1000 \ifodd\pageno \relax \else \null\vfill\eject \fi
1002 \begingroup % Following changes are local to bib.
1004 \twelvepoint % Get good appearance
1006 \no@cites % \cite's just produce [key]
1007 \parskip=0.6\baselineskip plus5\p@ minus4\p@
1008 \tolerance=5000 % Must be extremely tolerant!
1010 \interlinepenalty=400 % To discourage breaking a reference
1011 % across page boundaries
1012 \uchyph=\@ne % Needed to try hyphenating title words
1013 \sfcode`.=\@m % Like \frenchspacing, but only for
1016 % Now we output the title and so forth.
1017 \centerline{\csc \reftitle}%
1020 \content\reftitle % Tell user and TOC.
1022 \pageno@foot % Put page # in special place
1024 % Special definitions within reference mode
1029 % usage: \endreferences (end the References section)
1030 \def\endreferences{%
1031 \par % Make sure last printed reference is finished up.
1032 \cardinality\ref@set\to\count@
1036 \message{Warning: \number\count@\space undefined citations: \ref@set}
1038 \message{Warning: One undefined citation: \ref@set}
1041 \endgroup % End of \references group
1045 % References Database
1048 \newbox\bybox@AmS \newbox\bysamebox@AmS
1049 \newbox\paperbox@AmS \newbox\paperinfobox@AmS
1050 \newbox\jourbox@AmS \newbox\jourinfobox@AmS
1051 \newbox\volbox@AmS \newbox\issuebox@AmS
1052 \newbox\monbox@AmS \newbox\yrbox@AmS
1053 \newbox\pagesbox@AmS \newbox\editorbox@AmS
1054 \newbox\bookbox@AmS \newbox\bookinfobox@AmS
1055 \newbox\publbox@AmS \newbox\publaddrbox@AmS
1056 \newbox\finalinfobox@AmS\newbox\wastebox@uci
1057 \newbox\talkbox@AmS \newbox\keybox@AmS
1058 \newbox\editorsbox@AmS
1060 \def\using@IEEE{F} % By default, not using IEEE format
1062 % reset a \keyword to the ``not used'' condition
1064 \expandafter\gdef\csname is\expandafter\eat@AmS
1065 \string#1@AmS\endcsname{F}\expandafter
1066 \setbox\csname\expandafter\eat@AmS\string#1box@AmS\endcsname=\null
1071 \refset@AmS\key \refset@AmS\finalinfo
1072 \refset@AmS\by \gdef\isbysame@AmS{F}%
1073 \refset@AmS\paper \refset@AmS\paperinfo
1074 \refset@AmS\jour \refset@AmS\jourinfo
1075 \refset@AmS\vol \refset@AmS\issue
1076 \refset@AmS\mon \refset@AmS\yr
1077 \refset@AmS\pages \gdef\ispage@AmS{F}%
1078 \refset@AmS\book \refset@AmS\bookinfo
1079 \refset@AmS\publ \refset@AmS\publaddr
1080 \refset@AmS\editor \refset@AmS\talk
1082 \gdef\istoappear@AmS{F}%
1083 \gdef\isinbook@AmS{F}%
1088 % usage: \ref{citation} \keywords arguments ... \endref. We make sure
1089 % we aren't still doing an \anno first.
1092 \message{You forgot an \noexpand\endanno command,}
1093 \message{but I forgive you this time.}
1097 \ifwasmember#1\of\ref@set
1104 \ifismember#1\of\ref@seen
1105 \sanetell{multiply defined: [#1]}%
1107 \append#1\to\ref@seen
1110 \def\\{\egroup\endref@AmS\gdef\refi@AmS{F}\ref@AmS}%
1113 \key \if T\refed@uci
1115 \fi\egroup\setbox\wastebox@uci=\hbox\bgroup\ignorespaces
1118 % End of a reference.
1120 % Note that \endref@AmS is \let to be whichever \endref@xxx command
1121 % is being used; default is \endref@JACM for JACM format.
1123 % If we printed the reference, \endref@AmS will
1124 % have set \bysamebox@AmS to be a box containing a box
1125 % containing a rule and a period. This is unboxed if a subsequent
1126 % reference which gets printed uses \bysame. Otherwise, we here
1127 % save the \by field (if given) so that if a subsequent reference
1128 % using \bysame gets used, we'll know who the author was, even though
1129 % the reference which gave the author(s) wasn't printed. Tricky, huh?
1131 \egroup\gdef\refl@AmS{T}%
1136 \setbox\bysamebox@AmS=\box\bybox@AmS
1142 % define a \keyword. #1=keyword, #2=font to use, or {}
1143 \def\refdef@AmS#1#2{%
1147 \csname is\expandafter\eat@AmS\string#1@AmS\endcsname{T}%
1149 \csname\expandafter\eat@AmS\string#1box@AmS\endcsname
1150 =\hbox\bgroup#2\ignorespaces
1154 % define the keywords
1156 \refdef@AmS\by\by@font \refdef@AmS\paper{}
1157 \refdef@AmS\paperinfo{} \refdef@AmS\jour\book@font
1158 \refdef@AmS\vol\book@font \refdef@AmS\issue{}
1159 \refdef@AmS\mon{} \refdef@AmS\yr{}
1160 \refdef@AmS\pages{} \refdef@AmS\talk{}
1161 \refdef@AmS\book\book@font \refdef@AmS\bookinfo{}
1162 \refdef@AmS\publ{} \refdef@AmS\publaddr{}
1163 \refdef@AmS\finalinfo{} \refdef@AmS\editor{}
1164 \refdef@AmS\jourinfo{} \refdef@AmS\key\cite@font
1165 \refdef@AmS\editors{}
1167 % These don't fit the normal pattern.
1168 \def\bysame{\egroup\gdef\isbysame@AmS{T}\bgroup}
1169 \def\page{\egroup\gdef\ispage@AmS{T}\setbox\pagesbox@AmS=\hbox\bgroup
1171 \def\toappear{\egroup\gdef\istoappear@AmS{T}\bgroup}
1172 \def\inbook{\egroup\gdef\isinbook@AmS{T}\setbox\bookbox@AmS=\hbox\bgroup
1173 \book@font\ignorespaces
1176 % This is the font we normally print book and journal titles in, but we
1177 % use \twelveit for IEEE format.
1178 \let\book@font=\twelvesl
1180 % Similarly, this is the font to use for the author's name(s).
1181 % Optionally, the user can ask for the cite font instead (this is
1182 % not necessarily related to use of the IEEE format).
1183 \let\by@font=\twelverm
1185 % As an option, the user can have the author's name(s) in caps-small-caps.
1187 \let\by@font=\elevencsc
1188 \oktell{Authors in CSC mode}%
1191 % Define some aliases for some of the above, for user convenience.
1200 \let\ieee@editors=\editors % Save it in case we use IEEE format
1201 \let\editors=\editor % If using default JACM format
1205 % Helpers to \endref@AmS, which speed things up a lot, and/or
1206 % make the code more compact.
1207 \def\a@comma{, } % Used in next routine. Predefined for speed of \let.
1208 \def\setpunct@AmS{\let\prepunct@AmS=\a@comma}
1209 \def\ppunbox@AmS#1{\prepunct@AmS\unhbox#1\unskip}
1212 % Actually do some typesetting (finally). As mentioned above,
1213 % \endref@AmS is called to print a reference if we want it. It
1214 % is \let to be either \endref@JACM or \endref@IEEE (or possibly
1215 % some other format in the future) depending on the desired
1218 % For some reason, the ~'s don't see to tie things, so some
1219 % \hbox's were introduced.
1221 % There is unfortunately a lot of common code between the
1222 % different formats. Here are some sections which were easy to
1224 \def\endref@startup{%
1225 % Test to see if there is anything in the wastebox
1226 \setbox\wastebox@uci=\hbox{\unhbox\wastebox@uci\unskip}%
1227 \ifdim\wd\wastebox@uci>\z@
1228 \errmessage{Keyword omitted after \noexpand\ref}%
1230 \let\prepunct@AmS=\empty
1232 \noindent \hangafter=\@ne
1235 % This is the text printed for the JACM format for papers
1236 % appearing in a book.
1237 \def\appearing@in{Appearing in }
1239 % Common code at the end of \endref@JACM and \endref@IEEE.
1240 % The argument is the date routine to use.
1241 \def\endref@finishup#1{%
1243 \dimen@=\wd\talkbox@AmS
1245 \ppunbox@AmS\talkbox@AmS\setpunct@AmS
1249 \ppunbox@AmS\bookbox@AmS \setpunct@AmS
1253 \prepunct@AmS\appearing@in\unhbox\bookbox@AmS\unskip \setpunct@AmS
1254 \editor@ref \gdef\isbook@AmS{T}%
1256 \if T\isbookinfo@AmS
1257 \ppunbox@AmS\bookinfobox@AmS\setpunct@AmS
1260 \if T\ispubladdr@AmS
1261 \ppunbox@AmS\publaddrbox@AmS
1262 \if T\ispubl@AmS \def\prepunct@AmS{: }\else\setpunct@AmS\fi
1265 \ppunbox@AmS\publbox@AmS\setpunct@AmS
1269 \ppunbox@AmS\publbox@AmS\setpunct@AmS
1271 \if T\ispubladdr@AmS
1272 \ppunbox@AmS\publaddrbox@AmS\setpunct@AmS
1277 \prepunct@AmS Vol.~\unhbox\volbox@AmS\unskip\setpunct@AmS
1280 \ppunbox@AmS\yrbox@AmS\setpunct@AmS
1282 \if T\istoappear@AmS
1283 \ (to appear)\setpunct@AmS
1286 \prepunct@AmS pp.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS
1289 \prepunct@AmS p.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS
1293 #1% This is the date routine to use.
1295 \if T\isfinalinfo@AmS
1296 \period\unhbox\finalinfobox@AmS
1304 % Print editor(s) if and as appropriate.
1308 \ppunbox@AmS\editorbox@AmS, Ed.\setpunct@AmS
1311 \ppunbox@AmS\editorsbox@AmS, Eds.\setpunct@AmS
1315 \ppunbox@AmS\editorbox@AmS\ (ed.)\setpunct@AmS
1320 % This routine prints the date in the JACM format
1325 \unhbox\monbox@AmS\unskip,
1327 \unhbox\yrbox@AmS\unskip)\setpunct@AmS
1330 \ppunbox@AmS\monbox@AmS\setpunct@AmS
1335 % This prints the date in the IEEE format.
1340 \unhbox\monbox@AmS\unskip\a@comma
1342 \unhbox\yrbox@AmS\unskip\setpunct@AmS
1345 \ppunbox@AmS\monbox@AmS\setpunct@AmS
1351 % This version produces JACM format references.
1355 \hbox to \key@size{\cite@font [\unhbox\keybox@AmS\unskip]\hfil}%
1356 \hangindent=\key@size
1358 \unhcopy\bybox@AmS\unskip
1359 \def\prepunct@AmS{\hskip7\p@ plus5\p@\relax}%
1360 \setbox\z@=\hbox{\unhbox\bybox@AmS\unskip}%
1361 \dimen@=\wd\z@ % We want \dimen0=max(\wd0, 2in)
1362 \ifdim\dimen@>2in \dimen@=2in \fi
1363 \setbox\bysamebox@AmS=\hbox{\hbox to\dimen@{\leaders\hrule\hfill.}}%
1366 \unhcopy\bysamebox@AmS\unskip
1367 \def\prepunct@AmS{\hskip7\p@ plus5\p@\relax}%
1372 \ppunbox@AmS\paperbox@AmS\def\prepunct@AmS{. }%
1374 \if T\ispaperinfo@AmS
1375 \ppunbox@AmS\paperinfobox@AmS\def\prepunct@AmS{. }%
1378 \ppunbox@AmS\jourbox@AmS\setpunct@AmS
1380 \if T\isjourinfo@AmS
1381 \ppunbox@AmS\jourinfobox@AmS\setpunct@AmS
1384 \ \unhbox\volbox@AmS\unskip
1387 \ppunbox@AmS\issuebox@AmS\setpunct@AmS
1390 \if T\istoappear@AmS
1391 \ (to appear)\setpunct@AmS
1394 \ppunbox@AmS\pagesbox@AmS\setpunct@AmS
1397 \prepunct@AmS p.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS
1400 \endref@finishup\date@JACM
1404 % This version produces IEEE format references.
1408 \hbox to \key@size{\cite@font [\unhbox\keybox@AmS\unskip]\hfil}%
1409 \hangindent=\key@size
1410 \if T\isby@AmS \unhcopy\bybox@AmS\unskip\setpunct@AmS
1411 \setbox\z@=\hbox{\unhbox\bybox@AmS\unskip}%
1412 \dimen@=\wd\z@ % We want \dimen0=max(\wd0, 2in)
1413 \ifdim\dimen@>2in \dimen@=2in \fi
1414 \setbox\bysamebox@AmS=\hbox{\hbox to\dimen@{\leaders\hrule\hfill}}%
1417 \unhcopy\bysamebox@AmS\unskip\setpunct@AmS
1422 \prepunct@AmS``\unhbox\paperbox@AmS\unskip,''
1423 \let\prepunct@AmS=\empty
1425 \if T\ispaperinfo@AmS
1426 \ppunbox@AmS\paperinfobox@AmS\def\prepunct@AmS{, }%
1429 \ppunbox@AmS\jourbox@AmS\setpunct@AmS
1431 \if T\isjourinfo@AmS
1432 \ppunbox@AmS\jourinfobox@AmS\setpunct@AmS
1435 \prepunct@AmS vol.~\unhbox\volbox@AmS\unskip\setpunct@AmS
1438 \prepunct@AmS no.~\unhbox\issuebox@AmS\unskip\setpunct@AmS
1440 \if T\istoappear@AmS
1441 \ (to appear)\setpunct@AmS
1444 \prepunct@AmS pp.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS
1447 \prepunct@AmS p.~\unhbox\pagesbox@AmS\unskip\setpunct@AmS
1449 \if T\ispubladdr@AmS
1450 \ppunbox@AmS\publaddrbox@AmS
1451 \if T\ispubl@AmS \def\prepunct@AmS{: }\else\setpunct@AmS\fi
1454 \ppunbox@AmS\publbox@AmS\setpunct@AmS
1456 \let\ispubl@AmS=F\let\ispubladdr@AmS=F% For finishup routine
1459 \endref@finishup\date@IEEE
1463 % By default, we use JACM format references
1464 \let\endref@AmS=\endref@JACM
1466 % But it's possible to get the other format
1468 \gdef\using@IEEE{T}% Now we're using IEEE format.
1469 \let\editors=\ieee@editors
1470 \let\endref@AmS=\endref@IEEE
1471 \refdef@AmS\vol{}% Vol not printed in slanted any more.
1472 \global\let\appearing@in=\empty % Don't say that in IEEE format.
1474 \let\book@font=\twelveit % Book and journal titles in this font.
1475 \oktell{IEEE Bibliography Style}%
1483 \catcode`\{=12 \catcode`\}=12 \catcode`\%=12 \catcode`\[=1 \catcode`\]=2
1487 \catcode`\{=1 \catcode`\}=2 \catcode`\%=14 \catcode`\[=12 \catcode`\]=12
1493 \tell{Dumping \reftitle\space to refdump.tex}%
1494 \immediate\openout\dump@file=refdump
1495 \immediate\write\dump@file{%
1496 \noexpand\catcode`\noexpand\@=11 ^^J%
1497 \noexpand\let\noexpand\content=\noexpand\eat@AmS^^J%
1498 \noexpand\pageno=\the\pageno^^J%
1499 \noexpand\def\noexpand\ref@set\ref@open\ref@comment
1501 \def\\##1{\immediate\write\dump@file{ \noexpand\\{##1}\ref@comment}}%
1503 \immediate\write\dump@file{%
1506 \immediate\closeout\dump@file
1511 %%%%%%%%%%%%%%%%%%%%
1513 %%%%%%%%%%%%%%%%%%%%
1515 % Control for informational messages. Default is \verbose mode.
1517 \let\verbose=\tell@alltrue
1518 \let\quiet=\tell@allfalse
1520 \def\oktell#1{\iftell@all\tell{#1}\fi}
1521 \def\okmessage#1{\iftell@all\message{#1}\fi}
1523 % Chapter macro parameters
1525 \chapterno=\z@ % Number of current chapter
1526 \newif\ifnumber@chapters
1527 \number@chapterstrue % By default, number the chapters
1528 \def\nochapternumbers{%
1529 \number@chaptersfalse
1530 \oktell{No Chapter Numbers mode}%
1533 % Same thing for sections, subsections, etc
1534 \newcount\sectno \sectno=\@ne
1535 \newcount\subsectno \subsectno=\@ne
1536 \newcount\subsubsectno \subsubsectno=\@ne
1537 \newif\ifnumber@sections
1538 \def\numbersections{%
1539 \number@sectionstrue
1540 \oktell{Section Numbers mode}%
1544 %%%%%%%%%%%%%%%%%%%%%%%%%%%
1545 % OUTPUT CONTROL MACROS %
1546 %%%%%%%%%%%%%%%%%%%%%%%%%%%
1549 % Center, left justify, right justify -- avoid exceeding margins
1550 \def\centerline#1{\line{\hfill#1\hfill}}
1551 \def\leftline#1{\line{#1\hfill}}
1552 \def\rightline#1{\line{\hfill#1}}
1553 \def\threepart#1#2#3{\line{\hskip\leftskip\rlap{#1}\hfill#2\hfill
1554 \llap{#3}\hskip\rightskip}}
1556 % End of the main body of the document
1559 % Summary Information
1560 \outer\def\showsummary{%
1562 \def\note##1##2##3##4{%
1564 \advance\count@ by##3
1566 \message{No ##2s##4}\or
1567 \message{1 ##2##4}\else
1568 \message{\the\count@\space ##2s##4}\fi
1570 \note\fignumber{figure}{-1}{,}%
1571 \note\tablenumber{table}{-1}{,}%
1572 \note\note@count{footnote}{-1}{,}%
1573 \cardinality\ref@set\to\count@
1574 \note\count@{citation}{0}{.}%
1579 % Real version of ragged right margins
1581 \rightskip=\z@ plus 2em
1582 \oktell{Raggedright mode}%
1585 % Disallow hyphenation -- a very dangerous thing
1587 \hyphenpenalty=\@M\tolerance=500\pretolerance=\@M
1588 \oktell{Nohyphens mode}%
1591 % Allow capitalized words to be hyphenated
1594 \oktell{Hyphenating all words}%
1597 % Handle a long quotation in a standard way
1598 \def\bigquote#1\endbigquote{%
1600 \vskip \baselineskip \vskip -\parskip
1601 { \advance\rightskip by30\p@
1602 \advance\leftskip by30\p@
1606 \noindent\llap{``}\ignorespaces#1\unskip''\par
1607 }% End of singlespacing and special indentation
1608 \vskip \baselineskip \vskip -\parskip
1612 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1613 % CHAPTERS, SECTIONS, FIGURES, TABLES %
1614 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1616 % What to do at the beginning of a chapter
1617 \def\chapter#1\endchapter{
1618 \chapter@base #1\endchapter
1619 \oktell{Chapter \number\chapterno: #1}
1620 \content{Chapter \number\chapterno: #1}
1624 % This boolean controls whether chapters are made to start only on
1628 \def\twosided{% This is the ``official'' command
1630 \oktell{Twosided mode}%
1633 % The guts of the \chapter command. \chapter==\chapter@base when
1635 \def\chapter@base#1\endchapter{
1637 \clearpage % Clean up from prev chapter
1638 \ifoddpages % Make sure start on even page.
1639 \ifodd\pageno \relax \else \null\vfill\eject \fi
1641 \pageno@foot % Page #ing special for chap pages
1642 \advance\chapterno by\@ne
1644 \centerline{\chap@font CHAPTER \number\chapterno}% Do heading
1649 {\let\\=\cr \tabskip=\z@ \chap@font % Center the chapter title
1650 \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr#1\cr}
1652 \nobreak % Shouldn't happen anyway
1653 \vskip 1.0in minus 0.15in
1656 % What to do at the beginning of a section
1657 \outer\def\section{\dosection}
1659 \skip@=\lastskip % \par resets \lastskip, apparently
1661 % This junk trys to provide consistent spacing
1662 \dimen@=\baselineskip
1663 \ifdim\skip@<\dimen@
1667 \vskip \dimen@ plus .5\baselineskip
1670 \advance\sectno by\@ne
1673 \leftline{\sec@font\number\sectno. #1}
1675 \leftline{\sec@font#1}
1678 \sanetell{ Section: #1}
1680 \vskip \z@ plus .15\baselineskip
1684 % And for sub-sections
1685 \outer\def\subsection{\dosubsection}
1686 \def\dosubsection#1{%
1689 \dimen@=.6\baselineskip
1690 \ifdim\skip@<\dimen@
1694 \vskip \dimen@ plus .3\baselineskip
1697 \advance\subsectno by\@ne
1699 \leftline{\subsec@font\number\sectno.\number\subsectno. #1}
1701 \leftline{\subsec@font#1}
1704 \sanetell{ \\Subsection: #1}
1706 \vskip \z@ plus .1\baselineskip
1710 % And for sub-sub-sections
1711 \outer\def\subsubsection{\dosubsubsection}
1712 \def\dosubsubsection#1{%
1715 \dimen@=.5\baselineskip
1716 \ifdim\skip@<\dimen@
1720 \vskip \dimen@ plus .3\baselineskip
1723 \advance\subsubsectno by\@ne
1724 \leftline{\subsubsec@font\number\sectno.\number\subsectno
1725 .\number\subsubsectno. #1}
1727 \leftline{\subsubsec@font#1}
1729 \subsubsubcontent{#1}
1730 \sanetell{ \\\\Subsubsection: #1}
1735 % This is an alternate definition for plain TeX's \@ins,
1736 % omitting the \par. It is for use during \figure etc. Reason:
1737 % If you use \figure right after \section, it would otherwise
1738 % become a legal place for a page break.
1739 \def\@ins@uci{\begingroup\setbox\z@\vbox\bgroup}
1741 % This is \endinsert from plain.tex, but \midinsert's are not converted
1742 % to \topinsert's, since that can lead to figures getting out of order.
1743 % This can lead to excessive blank space at the bottom of the page, but
1744 % that's life. Makes use of \keep...\endkeep type stuff.
1745 \def\endinsert{\egroup % finish the \vbox
1746 \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@
1747 \advance\dimen@12\p@
1748 \vskip\z@ plus\dimen@
1750 \vskip\z@ plus-\dimen@
1751 \bigskip\box\z@\bigbreak
1752 \else\insert\topins{\penalty100 % floating insertion
1753 \splittopskip\z@skip
1754 \splitmaxdepth\maxdimen \floatingpenalty\z@
1755 \ifp@ge \dimen@\dp\z@
1756 \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero
1757 \else \box\z@\nobreak\bigskip\fi}\fi\endgroup}
1760 % This macro provides rudamentary support for figures. The
1761 % argument to \figure is the name of the file containing the tpic (or whatever)
1762 % output. The second argument is the caption for the picture.
1763 % As usual, TeX's delayed paging and midinserting causes expansion-timing
1764 % problems which have to be kludged around.
1765 \newif\iftopfigs \topfigstrue
1768 \oktell{Midfigs mode}%
1771 % Counters for figures/diagrams/examples and tables
1772 \newcount\fignumber \fignumber=\@ne
1773 \newcount\tablenumber \tablenumber=\@ne
1775 % Helper for \figure, \example, and \diagram. Define \lastfigure and
1776 % \this@insert, increment the figure number for next time, and make sure
1777 % the figures list file is open for writing.
1778 % #1=the caption, to be written to the figures list file
1779 \def\advance@figno#1{%
1780 \xdef\lastfigure{\the\fignumber}% Remember the current figure number
1781 \begingroup\no@cites
1783 \xdef\this@insert{\write\noexpand\fig@file{\noexpand\noexpand
1784 \noexpand\listfig{\lastfigure}{#1}%
1785 {\noexpand\number\noexpand\pageno}%
1789 \global\advance\fignumber by\@ne
1790 \iffig@closed % Open figures file if not already
1791 \immediate\openout\fig@file=\figtitle
1792 \global\fig@closedfalse
1796 % Bump the table number after defining \lasttable. Prepare \this@insert.
1797 % Define \table@caption.
1798 \def\advance@tablenumber#1{%
1799 \xdef\lasttable{\the\tablenumber}% Remember the current figure number
1800 \begingroup \no@cites \let\\=\space
1801 \xdef\this@insert{\write\noexpand\tab@file{\noexpand\noexpand
1802 \noexpand\listfig{\lasttable}{#1}%
1803 {\noexpand\number\noexpand\pageno}%
1807 \global\advance\tablenumber by\@ne
1808 \gdef\table@caption{#1}%
1811 \newif\ifpage@figs \page@figsfalse
1813 % Special mode to put figures/diagrams/examples on separate pages
1815 \oktell{Page Figures mode}%
1819 % Usage: \figure{filename}{caption with \\'s}
1821 \begingroup % Hide anything that crazy user does!
1823 % Now do mid or top insert as appropriate
1826 \shipout\vbox to\vsize\bgroup
1827 {\smallertype\rm\input #1\relax\centerline{\box\graph}}%
1829 \centerline{Figure \lastfigure}\this@insert
1831 \else \iftopfigs \topinsert \else \midinsert \fi
1833 \vskip .5\baselineskip
1834 {\smallertype\rm\input #1\relax\centerline{\box\graph}}%
1835 \vskip .5\baselineskip plus .5\baselineskip
1836 \centerline{\twelvebf Figure \lastfigure}%
1838 \let\\=\cr \tabskip=\z@
1839 \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}%
1848 % Allow user to specify arbitrary diagrams. The arguments are:
1849 % #1=name of the file containing the commands to form the diagram,
1850 % #2=caption for the figure, possibly containing \\'s.
1854 % Do mid or top insert as appropriate
1857 \shipout\vbox to\vsize\bgroup
1858 {\smallertype\rm\input #1\relax}%
1860 \centerline{\twelverm Figure \lastfigure}\this@insert
1862 \else \iftopfigs \topinsert \else \midinsert \fi
1864 \vskip .5\baselineskip
1865 {\smallertype\rm\input #1\relax}%
1866 \vskip .5\baselineskip plus .5\baselineskip
1867 \centerline{\twelvebf Figure \lastfigure}%
1869 \let\\=\cr \tabskip=\z@
1870 \halign to \hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}%
1879 % Allow user to include verbatim examples from files. The arguments are:
1880 % #1=name of the file containing the text of the example,
1881 % #2=caption for the figure, possibly containing \\'s.
1885 % Do mid or top insert as appropriate
1888 \shipout\vbox to\vsize\bgroup
1889 \vbox{\smallertype\singlespace\verbfile{#1}}%
1891 \centerline{\twelverm Figure \lastfigure}\this@insert
1893 \else \iftopfigs \topinsert \else \midinsert \fi
1895 \vskip .5\baselineskip
1896 \vbox{\smallertype\singlespace\verbfile{#1}}%
1897 \vskip .5\baselineskip plus .5\baselineskip
1898 \centerline{\twelvebf Figure \lastfigure}%
1900 \let\\=\cr \tabskip=\z@
1901 \halign to \hsize{\centerline{\ignorespaces##\unskip}\cr#2\cr}%
1910 % Similar thing for tables
1911 % usage: \table{caption} ...text... \endtable
1913 \begingroup % Hide user zingers
1914 \advance@tablenumber{#1}%
1915 \setbox\z@=\vbox\bgroup
1919 % End of the table body specification.
1921 \egroup % End the definition of \box0.
1922 % Now do top or mid insert
1924 \iftab@closed % Open output file if necessary
1925 \immediate\openout\tab@file=\tabtitle
1926 \global\tab@closedfalse
1929 \shipout\vbox to\vsize\bgroup
1932 \centerline{\twelverm Table \lasttable}\this@insert
1934 \else \iftopfigs \topinsert \else \midinsert \fi
1936 \vskip .5\baselineskip
1937 \box\z@ % Insert the material here.
1938 \vskip .5\baselineskip plus .5\baselineskip
1939 \centerline{\twelvebf Table \lasttable}%
1941 \let\\=\cr \tabskip=\z@
1942 \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\table@caption
1952 % End of the table body specification for a full-page table.
1954 \egroup % End the definition of \box0.
1955 % Now do top or mid insert
1957 \iftab@closed % Open output file if necessary
1958 \immediate\openout\tab@file=\tabtitle
1959 \global\tab@closedfalse
1962 \shipout\vbox to\vsize\bgroup
1965 \centerline{\twelverm Table \lasttable}\this@insert
1969 \vskip .5\baselineskip
1970 \box\z@ % Insert the material here.
1971 \vskip .5\baselineskip plus .5\baselineskip
1972 \centerline{\twelvebf Table \lasttable}%
1974 \let\\=\cr \tabskip=\z@
1975 \halign to\hsize{\centerline{\ignorespaces##\unskip}\cr\table@caption
1984 % Environment for report generation -- use only at the beginning!
1985 % Since sections are the biggest division, the table of contents
1986 % stuff is redefined, and chapter numbering is turned off so that
1987 % \chapter can be used for the first-page title. The title page
1988 % gets no page number (page # 0). The user can get to the
1989 % normal chapter font as \titlefont, and the section font as
1993 \let\subsubsubcontent=\subsubcontent
1994 \let\subsubcontent=\subcontent
1995 \let\subcontent=\content
1996 \let\chapter=\chapter@base
1998 \let\titlefont=\chap@font
1999 \let\authorfont=\sec@font
2000 \oktell{Articlestyle mode}%
2004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2005 % PAGE NUMBERING and OUTPUT ROUTINES %
2006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2008 % This macro produces a blank, numbered page of output
2009 \def\blankpage{\pageinsert \null\vfill \endinsert}
2011 % This defintion of \folio differs from Plain's in that (a) page
2012 % numbers are printed in 12pt, and (b) roman numeral ones are
2013 % printed in italics. It makes use of a trick, that
2014 % \romannumeral0 produces no output, which we need for title
2015 % pages and things, so we make their page numbers be 0.
2016 \def\folio{\ifnum\pageno>\z@
2017 {\twelverm\number\pageno}\else
2018 {\twelveit\romannumeral-\pageno}\fi
2021 % Permanent definitions of macros which get switched in and out
2022 % with \let's. Do not change any of these !!!
2023 \def\uci@headpage{\hfill\folio}
2024 \def\uci@footpage{\hfill\folio\hfill}
2025 \headline={\uci@headline}
2026 \footline={\uci@footline}
2028 % If this is used as the footline, it causes a page number to be
2029 % printed, but with the side-effect of making the headline blank
2030 % and the footline a page number again. This is used on pages
2031 % like the first of a chapter.
2034 \global\let\uci@footline=\hfil
2035 \global\let\uci@headline=\uci@headpage
2038 % This macro causes the page number to be at the bottom of the current
2039 % page, and after it has been used there once, it moves to the
2040 % top right of each page. It also sets \dimen\topins=0pt so that
2041 % any material \topinsert'd on these pages will get carried over
2042 % to subsequent pages.
2045 \let\uci@headline=\hfil
2046 \let\uci@footline=\no@foot
2049 % Executing this causes page numbers to be at the bottom only, as
2050 % with the plain TeX format.
2051 \def\plain@page@numbers{%
2052 \let\uci@headline=\hfil % Initial values similar to plain's
2053 \let\uci@footline=\uci@footpage
2056 % Change plain's \makeheadline and \makefootline to position page
2057 % numbers as required.
2059 \vbox to\z@{\vskip-22.65\p@
2060 \line{\vbox to8.5\p@{}\the\headline}\vss}\nointerlineskip
2062 \def\makefootline{\baselineskip=1.6cm\line{\the\footline}}
2064 % Define an output routine which will restore \dimen\topins
2065 % after \chapter, \references, etc, title pages, which have
2067 \def\dissoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}%
2068 \advancepageno \global\dimen\topins=\vsize
2069 \ifnum\outputpenalty>-\@MM \else\dosupereject\fi
2071 \let\output@AmS=\dissoutput
2072 \dimen\topins=\vsize % Don't insert more than will fit on one page
2074 % Output Routines: We adjust the \raggedbottom command of plain
2075 % TeX so that the extra space is no more than 1in, and so that
2076 % the space is put above footnotes instead of below. NOTE: Since
2077 % we put a \vfil below the page contents, the topskip glue will
2078 % never actually be stretched. Its stretchability is just to
2079 % let TeX know about the raggedness in computing when to make a
2080 % page break. Since it's 1in, the \vfil will never be stretched to
2081 % more than that amount.
2083 \def\raggedbottom{\topskip=\normal@topskip plus1in \r@ggedbottomtrue
2084 \oktell{Ragged bottom mode}}
2085 \def\normalbottom{\topskip=\normal@topskip\r@ggedbottomfalse
2086 \oktell{Normal bottom mode}}
2089 \ifvoid\topins\else\unvbox\topins\fi
2090 \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
2091 \ifr@ggedbottom \kern-\dimen@ \vfil\fi
2092 \ifvoid\footins \else % footnote info is present
2100 %%%%%%%%%%%%%%%%%%%%
2102 %%%%%%%%%%%%%%%%%%%%
2104 \font@no=0 % Default font=\rm,
2105 \twelvepoint % point size,
2106 \doublespace % and spacing
2107 \plain@page@numbers % Page nos like plain's
2109 % Note that normally in AmSTeX, the @ character may not be used.
2110 % But in the dissertation style, @ may be used as a normal character,
2111 % As it can in plain TeX.
2114 % Eat any further \documentstyle commands
2115 \def\documentstyle#1{}
2117 % This prints out our welcome message, and it computes the time
2118 % and date string once per run, which saves time if they're used
2119 % more than once. Since \catcode`@=12 at the time this is
2120 % executed, it can't contain any @-type macros.
2139 \fi\space\the\day, \the\year
2145 \multiply\count0by60
2146 \advance\count1by-\count0
2148 \ifnum\count2>12 \advance\count2by-12\fi
2151 \ifnum\count2=0 \advance\count2by12\fi
2155 \ifnum\count2<10 0\fi \the\count2:%
2156 \ifnum\count1<10 0\fi \the\count1
2160 \tell{AmSTeX Dissertation Style, version \version}%
2163 \edef\temp@uci{\the\everyjob}