summaryrefslogtreecommitdiff
path: root/macros/text1/macros/txt1v409.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/text1/macros/txt1v409.tex')
-rw-r--r--macros/text1/macros/txt1v409.tex3536
1 files changed, 3536 insertions, 0 deletions
diff --git a/macros/text1/macros/txt1v409.tex b/macros/text1/macros/txt1v409.tex
new file mode 100644
index 0000000000..afc9acb6c2
--- /dev/null
+++ b/macros/text1/macros/txt1v409.tex
@@ -0,0 +1,3536 @@
+% MACROS FOR TEXT1
+%
+% This work is protected as an unpublished work under
+% U.S. copyright laws.
+% Copyright 1987, by Washington State University.
+% All rights reserved.
+%
+% Last updated on 7/24/95 (drg)
+%
+\everyjob{\immediate\write16{TEXT1 Version 4.09}
+ \titlepage\spn{1}
+}
+%
+% The following variables are used for allowing conditional compilation
+% of special code depending on which version of TeX you are using.
+% See these special notes in the next paragarph
+\catcode`* = 11
+\catcode`@ = 11
+%
+\newif\if*MAC \*MACfalse % This is not a Macintosh
+\newif\if*CMS \*CMSfalse % This is not on CMS
+\newif\if*PC \*PCfalse % This is not a PC
+\newif\if*CG \*CGfalse % This is not a Compugraphics 8600 typesetter
+%
+% Note that non CMS versions must be modified. Here are the changes
+% necessary for the IBM PC/DOS version of TEXT1, Macintosh version,
+% and other non-CMS versions.
+%
+% 1. The filetype (extension) can only be 3 characters at the most
+% for the PC/DOS version.
+% This requires the following changes:
+% toc1 => tc1
+% toc2 => tc2
+% toc3 => tc3
+% endnotes => end
+% textext => txt
+% texmath => mth
+% texmodel => mdl
+%
+% 2. The Compugraphics dependent stuff in \selectspecificfont must
+% be omitted for all but CMS versions.
+%
+% 3. The routines \nonIBM and \IBM should be set to null for all but CMS
+% versions
+%
+% 4. The Macintosh/Textures version uses a special \include
+%
+
+
+% Some temporary variables to be used throughout
+%
+\newbox\A
+\newtoks\B
+\newskip\C
+\newdimen\D
+\newdimen\*D
+\newcount\E
+\newcount\F
+\newcount\G
+\newcount\N
+\newcount\Q
+\newcount\R
+% \T \U \V \W are used throughout TEXT1 as temp definitions
+% \I \J \K \M \X \Y \Z are temporary too, be careful if you use these
+%
+% ragged rightindent on bq troublesome.
+% titleleadskip works only with titlepage command in text.
+% for doublecolumns, change hsize and line--refer to ccndbl
+% for multiple right and centerline--refer to aztex
+%
+% IBM/NONIBM character definitions, added by Dean 7/11/86
+%
+% Use this macro when not printing with IBM standard distribution fonts
+
+
+\newif\if*IBM \*IBMfalse
+
+\if*CMS
+\def\nonIBM{\if*IBM \*IBMfalse%
+ \def\aa{\accent23a}%
+ \def\AA{\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
+ \rlap{\raise.67\dimen@\hbox{\char'27}}A}%
+ \def\c##1{\setbox\z@\hbox{##1}\ifdim\ht\z@=1ex\accent24 ##1%
+ \else{\ooalign{\hidewidth\char24\hidewidth\crcr\unhbox\z@}}\fi}%
+ \def\`##1{{\accent18 ##1}}%
+ \def\'##1{{\accent19 ##1}}%
+ \def\^##1{{\accent94 ##1}}\let\^^D=\|%
+ \def\~##1{{\accent"7E ##1}}%
+ \def\"##1{{\accent"7F ##1}}%
+ \chardef\i="10 % dummy dotless lowercase i
+ \def\dag{\mathhexbox279}%
+ \def\ddag{\mathhexbox27A}%
+ \def\S{\mathhexbox278}%
+ \def\P{\mathhexbox27B}%
+ \let\}=\rbrace%
+ \let\{=\lbrace%
+ \def\cents{\hbox{\rm\rlap/c}}\fi}% end non-IBM
+%
+% Use this macro when printing with the IBM standard distribution fonts
+\def\IBM{\*IBMtrue
+ \chardef\aa="8A % a overcircle
+ \chardef\AA="8B % A overcircle
+ \chardef\c="18 % cedilla
+ \chardef\`="12 % grave
+ \chardef\'="13 % acute
+ \chardef\^="5E % circumflex
+ \chardef\~="7E % tilde
+ \chardef\"="7F % umlaut
+ \chardef\i="69 % dummy dotless lowercase i
+ \chardef\S="DC % section number sign
+ \chardef\P="DD % paragraph sign or pilcrow
+ \chardef\dag="DE % dagger or obelisk
+ \chardef\ddag="DF % double dagger or diesis
+ \chardef\{="AE % left brace
+ \chardef\}="AF % right brace
+ \chardef\cents="CD}% end IBM
+\else
+\def\nonIBM{}
+\def\IBM{}
+\fi
+%
+% Redefined from PLAIN.TEX to omit the at sign "@"
+% @ symbol will be read as begin and end math mode otherwise
+\message{redefining some plain commands, }
+\newdimen\zZ \zZ=0pt % can be used both for 0pt and 0
+\mathchardef\zmz=1000
+\mathchardef\zMz=10000
+\mathchardef\zMMz=20000
+\def~{\penalty\zMz\ } % tie
+\def\break{\penalty-\zMz}
+\def\nobreak{\penalty \zMz}
+\def\allowbreak{\penalty \zZ}
+\def\supereject{\par\penalty-\zMMz}
+\def\nopagenumbers{\rhf{\bothpages{}}\rff{\bothpages{}}}
+%
+% Redefined from PLAIN.TEX to \unskip last skip if in h mode
+%
+\message{redefining some plain commands, }
+\def\removelastskip{\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi
+ \else\unskip\unskip\unskip\unskip\fi}
+\let\rlsk=\removelastskip
+%
+% Redefined from PLAIN.TEX to 12 point topskip
+\def\raggedbottom{\topskip 12\p@ plus60\p@ \r@ggedbottomtrue}%
+\def\normalbottom{\topskip 12\p@ \r@ggedbottomfalse}%
+%
+% Redefined from PLAIN.TEX to omit extraneous skips and such surprises.
+\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 \box\z@\goodbreak
+ \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\fi}\fi\endgroup}
+%
+% Redefined from PLAIN.TEX to take mode into account
+\mathchardef\*dda="227A
+\mathchardef\*dag="2279
+\mathchardef\*neg="023A
+\def\ddagger{\relax\ifmmode\*dda\else$\*dda$\fi}%
+\def\dagger{\relax\ifmmode\*dag\else$\*dag$\fi}%
+\def\neg{\relax\ifmmode\*neg\else$\*neg$\fi}
+%
+% Redefined from PLAIN.TEX to take present font size into account
+%
+\def\strut{\relax
+ \setbox\strutbox=\hbox{\vrule height 1.8ex depth .6ex width 0pt}%
+ \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}%
+%
+%
+% Starting TEXT1 Definitions
+%
+% Use this one for Textures
+%
+\if*MAC
+ \def\include#1{\special {picture #1}}%
+ \else
+ \def\include#1{\special {IPS #1}}% added by gap 1/27/87
+\fi
+\let\incl=\include
+%
+\def\text#1{{\it\TeX T1}}% added by drg 9/26/86
+\def\bf{\bd}% added by jkw 6/30/86
+\def\cents{\hbox{\rm\rlap/c}}% added by jkw 6/30/86
+\def\fraction#1/#2 {% added by jkw 7/8/86
+ \leavevmode\kern.1em \raise.6ex\hbox{\the\scriptfont0 #1}\kern-.1em
+ /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}
+\let\frac=\fraction
+\message{bibliography, }
+% Bibliography
+%
+\newtoks\bi*f \bi*f={\goodbreak\vs{1\bl}\hp\nin} % init bibentry
+\newtoks\bi*t \bi*t={\dumpinsertseject\cl{\bd\bibtitle}
+ \vs{1\bl}}% init bibliography title format
+\newtoks\bi*r \bi*r={width 3em height .6ex depth -.5ex}
+\newcount\bi*n \bi*n=0 % counter for numbered bibliography
+\newif\if*TC*bib \*TC*bibtrue
+%
+\long\def\bibliographyformat#1{{% definition of bibliographic format
+ \def\incontents##1{\global\*TC*bibtrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*bibfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in bibliographyformat is not "yes" or "no".
+ "yes" will be assumed}
+ \fi\fi}%
+ \long\def\everybibentry##1{\global\bi*f={##1}}%
+% Remove this some day
+ \let\bibentryformat=\everybibentry%
+ \long\def\titleformat##1{\global\bi*t={##1}}% replacement format for bibliography title
+ \def\sameauthorrulesize##1{\global\bi*r={##1}}%
+ #1}}%
+\let\bif=\bibliographyformat
+%
+\def\bibtitle{}
+\def\bibliography#1{% calls bibtitle format and passes title
+ \global\bi*n=0 % set bib counter to zero each call
+ \global\def\bibtitle{#1} % collect title tokens
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\bi*t
+ \egroup
+ \D=\lastskip
+ \removelastskip
+ \if*TC*bib \putincontents1{\the\*btf}\fi % call bib title format
+ \ignorespaces
+ \vs{\D}
+}% end bibliography markup
+\let\bib=\bibliography
+%
+\def\bibnumber{\the\bi*n}%
+\def\bibentry{\par\global\advance\bi*n by1\the\bi*f}%
+\let\bie=\bibentry % abbreviation for \bibentry
+%
+\def\sameauthor{\vrule\the\bi*r}%
+\let\sau=\sameauthor
+%
+\message{misc, }
+\def\underscore#1{$\underline{\smash{\hbox{#1}}}$}%
+\let\us=\underscore
+\def\leader{\leaders\hbox to 8pt{\hss.\hss}\hfill}%
+%
+\def\hyphenoff{\pretolerance=10000\hbadness=10000}%
+\let\hof=\hyphenoff
+\def\hyphenon{\pretolerance=100\hbadness=1000}%
+\let\hon=\hyphenon
+%
+\def\today{\ifcase\month\or
+ January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi
+ \space\number\day,\space\number\year}%
+%
+%
+\def\tilde{\relax\ifmmode\mathaccent"707E % relax added to trigger math
+ \else{\sy\char'030}\fi}% mode in tabs 1/27/87
+%
+\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em}}%
+%
+\def\}{\relax\ifmmode \rbrace % relax added to trigger math mode in tabs
+ \else $\rbrace$\fi}%
+%
+\def\{{\relax\ifmmode \lbrace % relax added to trigger math mode in tabs
+ \else $\lbrace$\fi}%
+%
+\def\\{\relax\ifmmode \delimiter"26E30F % relax added to trigger math
+ \else $\delimiter"26E30F$\fi}% mode in tabs
+%
+\let\leftsquarebracket=[
+\let\rightsquarebracket=]
+\let\lsb=[
+\let\rsb=]
+\def\~#1{{\relax\ifmmode\mathaccent"707E % relax added to trigger math
+ \else \accent"7E #1\fi}}% mode in tabs
+%
+% baselineskip = interlineskip
+%
+\newskip\*isk
+\newskip\baseline
+\let\bl=\baseline
+\def\interlineskip#1{\baselineskip=#1%
+ \baseline=#1%
+ \*isk=#1\relax}%
+\let\isk=\interlineskip
+%
+\message{selectfontset, }
+\newfam\bifam \newfam\ccfam
+%
+% The \selectfontset macros are by JKW
+%
+\newtoks\naMEtok
+\newtoks\maTHtok
+\newskip\bAseSkip
+\newtoks\*sfslbl
+\if*PC
+ \*sfslbl={.txt}
+ \else
+ \*sfslbl={.textext}
+\fi
+
+\def\selectfontset#1#2#3{\naMEtok={#2}
+ \edef\T{default}%
+ \edef\U{#3}%
+ \ifx\U\T \bAseSkip=0pt
+ \else \bAseSkip=#3\fi
+ \input #1\the\*sfslbl }%
+\let\sfs=\selectfontset
+\sfs{cm12}{twelvept}{default}
+\sfs{cm10}{tenpt}{default}
+\twelvept
+%
+\newtoks\*smslbl
+\if*PC
+ \*smslbl={.mth}
+ \else
+ \*smslbl={.texmath}
+\fi
+
+\def\selectmathset#1#2{\maTHtok={#2}\input #1\the\*smslbl}%
+\let\sms=\selectmathset
+\selectmathset{cm97m}{mathdefault} %
+\mathdefault
+%
+% SELECT SPECIFIC FONT, jkw 8/26/86
+\newread\ckfnt
+\newif\ifnotcfend
+\newtoks\nUMtok
+\newtoks\nmtok
+
+\if*CMS
+\def\selectspecificfont#1#2#3{\naMEtok={#1}\nUMtok={#3}
+ \nmtok={#1\romannumeral #2}
+ \def\T{\uppercase{#1 }}%
+ \expandafter\xdef\csname I\the\nmtok\endcsname{\isk{\the\nUMtok}}
+ \openin\ckfnt=cgfonts.lclist
+ \loop\read\ckfnt to \W
+ \edef\U{\uppercase{\W}}%
+ \ifx\U\T
+ \expandafter\font\csname F\the\nmtok%
+ \endcsname=#1 at #2 pt \notcfendfalse
+ \else\ifeof\ckfnt
+ \expandafter\font\csname F\the\nmtok%
+ \endcsname=#1#2 \notcfendfalse
+ \else\notcfendtrue\fi\fi
+ \ifnotcfend \repeat
+ \closein\ckfnt
+ \expandafter\xdef\csname\the\naMEtok\endcsname ##1;{%
+ \noexpand\csname F\the\naMEtok
+ \noexpand\romannumeral\noexpand ##1\noexpand\endcsname
+ \noexpand\csname I\the\naMEtok
+ \noexpand\romannumeral\noexpand ##1\noexpand\endcsname}}%
+\else
+\def\selectspecificfont#1#2#3{\naMEtok={#1}\nUMtok={#3}
+ \nmtok={#1\romannumeral #2}
+ \def\T{\uppercase{#1 }}%
+ \expandafter\xdef\csname I\the\nmtok\endcsname{\isk{\the\nUMtok}}
+ \expandafter\xdef\csname\the\naMEtok\endcsname ##1;{%
+ \noexpand\csname F\the\naMEtok
+ \noexpand\romannumeral\noexpand ##1\noexpand\endcsname
+ \noexpand\csname I\the\naMEtok
+ \noexpand\romannumeral\noexpand ##1\noexpand\endcsname}}%
+\fi
+
+\let\ssf=\selectspecificfont
+%
+\skewchar\teni='177 \skewchar\seveni='177 \skewchar\fivei='177
+\skewchar\tensy='60 \skewchar\sevensy='60 \skewchar\fivesy='60
+%
+\setbox0=\hbox{\tenex B} \p@renwd=\wd0 % width of the big left (
+%
+%
+\message{monospace, }
+\newif\if*msp \*mspfalse
+\if*CMS
+\def\monospace{%
+ \global\*msptrue % changed to global 6/27/86 bth
+ \sfs{monofont}{defaultmono}{default}
+ \defaultmono
+ \gdef\underscore##1{{\italicfont ##1}}%
+ \global\let\us=\underscore
+ \special{fonts=10cpi}
+ \raggedbottom
+ \global\paragraphskip{0pt}
+ \global\paragraphindent{36pt}
+ \gdef\tilde{\ifmmode\mathaccent"707E%
+ \else \char'176{}\fi}%
+ \gdef\_{\char'137{}}%
+ \gdef\}{\ifmmode \rbrace
+ \else \char'175{}\fi}%
+ \gdef\{{\ifmmode \lbrace
+ \else\char'173{}\fi}%
+ \gdef\\{\ifmmode \delimiter"26E30F%
+ \else\char'134{}\fi}%
+ \gdef\neg{\char'136{}}%
+ \gdef\ellipsis##1{{\def\U{\message{<TEXT1> Error! Only 3 or 4 are valid for ellipsis. Command ignored.}}
+ \ifcase ##1\U\or\U\or\U%
+ \or .~.~.
+ \or .~.~.~.
+ \else\U\fi}}%
+
+ \tableofcontentsformat{% added 1/26/87 Guenther
+ \toctitle{\centerline{\bd Table of Contents}
+ \vs{1\bl}}
+ \figuretoctitle{\newpage
+ \centerline{\bd List of Figures}
+ \line{Figure \rt{Page}}}
+ \tabletoctitle{\newpage
+ \centerline{\bd List of Tables}
+ \line{Table \rt{Page}}}
+ }% end table of contents format
+
+ \global\let\el=\ellipsis
+ \asisformat{\skipbefore{1\bl}\everyasis{\leftindent{0pt}}\skipafter{1\bl}}
+ \blockquoteformat{\skipbefore{1\bl}\everyblockquote{\rm\leftindent{36pt}\rightindent{36pt}}\skipafter{1\bl}}
+ \figureformat{\titleformat{\bqb\bd\hp Figure \figurenumber. \figuretitle \bqe}}
+ \tableformat{\titleformat{\vs{\bl}\cl{\bd Table \tablenumber}
+ \cl{\rm\tabletitle}\vs{\bl}}}
+ \endnoteformat{\skipbefore{0\bl}\notereferencefont{\rm}\everyendnote{\rm\lin{0pt}}}
+ \footnoteformat{\textreferenceposition{down}\textreferencefont{\rm}\textreferencestyle{(1)}
+ \notereferencefont{\rm}\everyfootnote{\rm\pin{.5in}\psk{.5in}\lin{0pt}\rin{0pt}}}
+
+ \partformat{\titleformat{\dumpinsertseject\titlepage
+ \hrule height0pt depth0pt \vfil
+ \cl{\bd Part \partnumber}\cl{\bd\parttitle}\np
+ \scn{0}\ssan{0}\ssbn{0}\sscn{0}\ssdn{0}
+ \sfn{0}\stn{0}\sfnn{0}\senn{0}}}% end part format
+ \indexformat1{\everyindex{\rm}}
+ \indexformat2{\everyindex{\rm}}
+ \indexformat3{\everyindex{\rm}}
+ \chapterformat{\titleformat{\dumpinsertseject\cl{\bd Chapter \chapternumber}\cl{\bd\chaptertitle}\vs{1\bl}
+ \ssan{0}\ssbn{0}\sscn{0}\ssdn{0}}}% end chapter format
+ \prefaceformat{\titleformat{\dumpinsertseject\cl{\bd\prefacetitle}
+ \vs{1\bl}\ssan{0}\ssbn{0}\sscn{0}\ssdn{0}}}% end preface format
+ \appendixformat{\titleformat{\dumpinsertseject
+ \cl{\bd Appendix \appendixnumber}\cl{\bd\appendixtitle}\vs{1\bl}
+ \scn{0}\ssan{0}\ssbn{0}\sscn{0}\ssdn{0}\sfn{0}\stn{0}}}% end appendix format
+ \subheadaformat{\titleformat{\removelastskip\goodbreak\vs{2\bl}
+ \bd\nin\subheadatitle\par\nobreak\vs{1\bl}\nobreak
+ \ssbn{0}\sscn{0}\ssdn{0}}}% end subheadaformat markup
+ \subheadbformat{\titleformat{\removelastskip\goodbreak\vs{2\bl}
+ \it\nin\subheadbtitle\par\nobreak\vs{1\bl}\nobreak
+ \sscn{0}\ssdn{0}}}% end subheadbformat markup
+ \subheadcformat{\titleformat{\removelastskip\goodbreak\vs{2\bl}
+ \nin\subheadctitle\par\nobreak\vs{1\bl}\nobreak\ssdn{0}}}% end subheadc format markup
+ \subheaddformat{\titleformat{\goodbreak{\it \subheaddtitle.}}}% end subheadd markup
+ \runningheadformat{\bothpages{\line{\rm\lft{}\ctr{}\rt{\pagenumber}}
+ \vs{1\bl}}}% end runningheadformat markup
+}% END monospace markup definition
+\else
+ \def\monospace{\message{<TEXT1> monospace fonts are not available. Use
+ typewritter fonts instead.}}
+\fi
+\let\msp=\monospace
+%
+\def\sl{\message{<TEXT1> Warning! The slanted font is not in font sets. Only tensl is used.}\tensl}%
+\message{more misc, }
+%
+% Ellipsis command 10/22/85
+%
+\def\ellipsis#1{{\def\U{\message{<TEXT1> Error! Only 3 or 4 are valid for ellipsis. Command ignored.}}
+ \ifcase #1\U\or\U\or\U%
+ \or \ifmmode\mathinner{\ldotp\ldotp\ldotp}
+ \else$\mathinner{\ldotp\ldotp\ldotp}$\fi
+ \or \ifmmode\mathinner{\ldotp\ldotp\ldotp\ldotp}
+ \else\removelastskip$\ldotp\ldotp\ldotp\ldotp$\fi
+ \else\U\fi}}%
+\let\el=\ellipsis
+%
+% dumpinsertseject is plain.tex \dosupereject with and \else added
+%
+\def\dumpinsertseject{\ifnum\insertpenalties>\z@ % something is being held over
+ \line{}\kern-\topskip\nobreak\vfill\supereject
+ \else \newpage
+ \fi}% END dumpinsertseject markup definition
+\let\die=\dumpinsertseject
+\message{page format, }
+%
+\newif\if*tempif
+%
+% Pageformat command
+%
+\newdimen\pg*l \pg*l=11in % page length
+\newdimen\pg*t \pg*t=0in % top margin set for 1in origin
+\newdimen\pg*b \pg*b=2in % bottom margin set for 1in origin
+\newdimen\pg*w \pg*w=8.5in % page width
+\newdimen\pg*r \pg*r=2in % right margin set for 1in,
+\newdimen\*lmar \*lmar=0.2in % left margin set for 1in
+% Note: TEX origin at 1in,1in
+\newif\if*cropmarks \*cropmarksfalse
+\newdimen\pg*a \pg*a=0in
+\hsize=6.3in \hoffset=0.2in
+\vsize=9in \voffset=0in
+%
+\def\pageformat#1{{\par
+ \def\pagelength##1{\global\pg*l=##1
+ \cpt*vs}%
+ \def\topmargin##1{\global\pg*t=##1
+ \global\advance\pg*t by- 1in % set margin 1in,1in
+ \cpt*vs}%
+ \def\bottommargin##1{\global\pg*b=##1
+ \global\advance\pg*b by 1in % set margin 1in,1in
+ \cpt*vs}%
+ \def\pagewidth##1{\global\pg*w=##1\cpt*hs}%
+ \def\rightmargin##1{\global\pg*r=##1
+ \global\advance\pg*r by 1in % set margin 1in,1in
+ \cpt*hs}%
+ \def\leftmargin##1{\global\*lmar=##1
+ \global\advance\*lmar by -1in % set margin 1in,1in
+ \cpt*hs}%
+ \def\bindingadjust##1{\global\pg*a=##1\cpt*hs}%
+ \def\galleywidth##1{\global\pg*w=##1
+ \global\advance\pg*w by\*lmar
+ \global\advance\pg*w by\pg*r \cpt*hs}%
+ \def\cropmarks##1{\global\*cropmarksfalse
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U \global\*cropmarkstrue
+ \else \ifx \T\V \global\*cropmarksfalse
+ \else \message{<TEXT1> Warning, argument to cropmarks in
+ pageformat is not "yes" or "no". "no" will be assumed}
+ \*cropmarksfalse
+ \fi\fi}%
+ #1}}% End pageformat markup definition
+\let\pf=\pageformat
+%
+% set page text size, compute hsize
+%
+\def\cpt*hs{% COMPUTE HORIZONTAL SIZE
+ \global\hoffset=\*lmar
+ \global\hsize=\pg*w % added global 11/11/86 bth
+ \global\advance\hsize by-\pg*r % ""
+ \global\advance\hsize by-\*lmar % ""
+ \global\*txtw=\hsize}% added for multi column routines
+%
+% set page text size, vsize
+%
+\def\cpt*vs{% COMPUTE VERTICAL SIZE
+ \global\voffset=\pg*t
+ \global\vsize=\pg*l
+ \global\advance\vsize by-\pg*t
+ \global\advance\vsize by-\pg*b
+ \if*title \global\advance \voffset by \tp*sk % lines from titlepage
+ \global\advance \vsize by -\tp*sk % from titlepage
+ \fi
+ \global\*txth=\vsize}% added for multi column routines
+%
+% left center right
+%
+\def\lft#1{#1\hfill}
+\def\ctr#1{\hfill #1\hfill}
+\def\rt#1{\hfill #1}
+%
+\message{running heads, }
+%
+% Page numbers
+%
+\def\setpagenumber#1{\global\pageno=#1}%
+\let\spn=\setpagenumber
+\def\pagenumber{\ifnum \pageno<0 \romannumeral-\pageno
+ \else \number\pageno\fi}%
+\let\pn=\pagenumber
+%
+\def\rule{\vskip 1\baselineskip\hrule}%
+%
+% Running heads
+%
+\newif\if*title
+%
+\newtoks\rh*r \rh*r={\line{\twelvept\rt{\pagenumber}}\vs{\bl}}
+\newtoks\rh*l \rh*l={\line{\twelvept\rt{\pagenumber}}\vs{\bl}}
+\newtoks\rf*r \rf*r={}
+\newtoks\rf*l \rf*l={}
+%
+\def\runningheadformat#1{{%
+ \def\*ttitle##1{\setbox\A=\vbox{##1}%
+ \D=\ht\A
+ \advance\D by -1in
+ \ifdim \D>\pg*t
+ \global\pg*t=\D
+ \global\advance\pg*t by 12pt
+ \advance\D by 1in
+ \message{<TEXT1> Warning, the top margin you
+ have specified is less than the
+ running top title. The top margin will
+ be changed to \the\D}
+ \cpt*vs
+ \fi
+ \if*tempif \global\rh*l={\hrule width\hsize
+ height0pt depth0pt ##1}
+ \else \global\rh*r={\hrule width\hsize
+ height0pt depth0pt ##1}\fi
+ }% end *ttitle definition
+ \def\evenpages##1{\*tempiftrue\*ttitle{##1}}%
+ \def\oddpages##1{\*tempiffalse\*ttitle{##1}}%
+ \def\bothpages##1{\*tempiftrue\*ttitle{##1}
+ \*tempiffalse\*ttitle{##1}}%
+ \relax
+ #1
+ }}% END runningheadformat markup definition
+\let \rhf = \runningheadformat
+%
+\def\runningfootformat#1{{%
+ \def\*btitle##1{\setbox\A=\vbox{##1}%
+ \D=\ht\A
+ \advance\D by 1in
+ \ifdim \D>\pg*b
+ \global\pg*b=\D
+ \global\advance\pg*b by 12pt
+ \advance\D by -1in
+ \message{<TEXT1> Warning, the bottom margin
+ you have specified is less than height of the
+ running bottom title.
+ The bottom margin will be
+ changed to \the\D}
+ \cpt*vs
+ \fi
+ \if*tempif \global\rf*l={##1}
+ \else \global\rf*r={##1}\fi
+ }% end of bottomline
+ \def\evenpages##1{\*tempiftrue\*btitle{##1}}%
+ \def\oddpages##1{\*tempiffalse\*btitle{##1}}%
+ \def\bothpages##1{\*tempiftrue\*btitle{##1}
+ \*tempiffalse\*btitle{##1}}%
+ \relax
+ #1}}% END runningfootformat markup definition
+\let \rff = \runningfootformat
+%
+\newdimen\tp*sk \tp*sk=1in
+\newtoks\tp*fl \tp*fl={}
+\def\titlepageformat#1{{%
+ \def\titleleadskip##1{\global\tp*sk=##1}%
+ \def\titlefootline##1{\global\tp*fl={##1}}%
+ \relax
+ #1
+ \titlepage}} %end of titlepageformat
+\let \tpf = \titlepageformat
+%
+\def\titlepage{\global\*titletrue
+ \cpt*vs}%
+\let\tp=\titlepage
+\def\notitlepage{\global\*titlefalse
+ \cpt*vs}%
+\let\ntp=\notitlepage
+%
+\message{output, }
+%
+% Output changed to permit binding adjust
+%
+\output={\*mkpg}
+%
+\def\*mkpg{\*badj
+ \plainoutput
+ \if*title \notitlepage\fi
+ \ifnum\*pcount>0 \*blkpg\fi}% insert blank page
+%
+\def\plainoutput{\shipout\vbox{\*setcrops{\vbox{%
+ \makeheadline
+ \pagebody
+ \makefootline}}}
+ \advancepageno
+ \ifnum\outputpenalty>-\@MM
+ \else\dosupereject\fi}
+%
+\def\*setcrops#1{\setbox\A=\vbox{#1}
+ \if*cropmarks
+ \D=\wd\A
+ \advance\D by 15pt
+ \vbox{\hsize=\the\D
+ \offinterlineskip\psk{0pt}\pin{0pt}
+ \hbox to \D{\vrule width 5pt height .1pt depth 0pt
+ \hfill
+ \vrule width 5pt height .1pt depth 0pt}
+ \hbox to \D{\vrule height 5pt width .1pt depth 0pt
+ \hfill
+ \vrule height 5pt width .1pt depth 0pt}
+ \vs{\the\pg*t}
+ \vs{3pt}
+ \hbox to \D{\hfill\box\A\hfill}
+ \vs{3pt}
+ \hbox to \D{\vrule width .1pt height 5pt depth 0pt
+ \hfill
+ \vrule width .1pt height 5pt depth 0pt}
+ \hbox to \D{\vrule width 5pt height .1pt depth 0pt
+ \hfill
+ \vrule width 5pt height .1pt depth 0pt}}
+ \else \box\A\fi}
+%
+\def\makeheadline{% headline set for multiple and single column modes
+ \if*title% Do nothing if its a title page
+ \else \setbox\A=\vbox{\hsize=\the\*txtw % hsize added to allow
+ \ifodd\pageno\the\rh*r % headline to print the
+ \else\the\rh*l\fi} % full width in multi
+ \vbox to 0pt{\vskip-\ht\A\box\A\vss} % column mode
+ \fi} % This could replace the TEXT1@@ definition
+%
+\def\makefootline{\if*title
+ \if*cropmarks \vbox{\hsize=\the\*txtw\the\tp*fl\vss}
+ \else\vbox to 0pt{\hsize=\the\*txtw\the\tp*fl\vss}\fi
+ \else\if*cropmarks \vbox{\hsize=\the\*txtw\ifodd\pageno\the\rf*r
+ \else\the\rf*l\fi\vss}
+ \else\vbox to 0pt{\hsize=\the\*txtw\ifodd\pageno\the\rf*r
+ \else\the\rf*l\fi\vss}\fi % hsize added for multi column mode
+ \fi} % This could replace the TEXT1@@ definition
+%
+\def\*badj{\ifdim\pg*a=\z@ % do nothing if binding adjust absent
+ \else
+ \ifodd\pageno % Binding adjust markup (revised 2/03/87
+ \global\hoffset=\*lmar % offset equals left margin value
+ \global\advance\hoffset by\pg*a % plus binding adjust
+ \else
+ \global\hoffset=\*lmar % offset equals left margin value
+ \global\advance\hoffset by-\pg*a % plus binding adjust
+ \fi\fi}% end binding adjust markup
+\message{more misc, }
+%
+% linebreak
+%
+\def\linebreak{\null\hfil\break}
+\let\lbr=\linebreak
+\let\toclinebreak=\linebreak
+\let\toclbr=\linebreak
+%
+% Horizontal skip
+%
+\def\horizontalspace#1{\null\hskip#1\relax}%
+\let\hs=\horizontalspace
+%
+% skip down
+%
+\def\verticalspace#1{\vskip #1\relax}%
+\let\vs=\verticalspace
+%
+\def\verticalspacekeep#1{\par
+ \hbox{\vbox{\vskip #1\relax}}}%
+\let\vsk=\verticalspacekeep
+%
+% raggedright (as TeX basic)
+%
+\newdimen\r*sk \r*sk=0pt % dimension to save right skip
+\def\rightragged{\par \r*sk=\rightskip \*rrtrue
+ \if*msp \rightskip=\r*sk plus10em
+ \spaceskip=1em \xspaceskip=1em
+ \else \rightskip=\r*sk plus2em\relax
+ \spaceskip=.3333em \xspaceskip=.5em
+ \fi}
+\let\rr=\rightragged
+%
+% leftragged
+%
+\newdimen\l*sk \l*sk=0pt % dimension to save left skip
+\def\leftragged{\par %
+ \l*sk=\leftskip
+ \spaceskip=.35em
+ \xspaceskip=.55em
+ \parfillskip=0pt
+ \leftskip=\l*sk plus2em\relax}
+\let\lr=\leftragged
+%
+\newif\if*rr \*rrfalse
+\def\justify{\par
+ \rightskip=\r*sk
+ \*rrfalse
+ \leftskip=\l*sk
+ \spaceskip=0pt \xspaceskip=0pt
+ \parfillskip=0pt plus1fil\relax}
+\let\ju=\justify
+%
+% spacing
+%
+\def\singlespace{\par\baselineskip=\*isk}
+\let\ssp=\singlespace
+\def\doublespace{\par\baselineskip=2\*isk}
+\let\dsp=\doublespace
+%
+% paragraph
+%
+\let\paragraph=\par
+\def\paragraphindent#1{\parindent=#1}
+\let\pin=\paragraphindent
+\def\paragraphskip#1{\parskip=#1}
+\let\psk=\paragraphskip
+%
+% noindent
+%
+\let\nin=\noindent
+%
+% hanging paragraph macro
+%
+\newdimen\*hin \*hin=24pt
+\def\hangingindent#1{\*hin=#1}
+\let\hin=\hangingindent
+%
+\def\hangingparagraph{\par
+ \hangindent=\*hin
+ \hangafter=1
+ \noindent}
+\let\hp=\hangingparagraph
+\newif\if*mnr \*mnrfalse % left/right margin note indicator
+\newtoks\e*mn \e*mn={\tenpt\rr} % every margin note tokens
+\newtoks\*mnw \*mnw={54pt} % margin note width tokens
+\newtoks\*mngut \*mngut={6pt} % margin note gutter tokens
+\message{margin note, }
+%
+% Margin Note markup
+%
+\def\marginnoteformat#1{% MARGINAL NOTE FORMAT
+ \def\position##1{% "left" or "right" margin note check
+ \edef\T{##1}%
+ \edef\U{left}%
+ \edef\V{right}%
+ \ifx \T\U \global\*mnrfalse % left margin notes true
+ \else\ifx \T\V \global\*mnrtrue % right margin notes true
+ \else\global\*mnrfalse % default, improper entry
+ \write16{<TEXT1> You must specify "left" or "right" in %
+ the marginnoteformat markup. Left is the default.}%
+ \fi\fi}% end margin note check
+ \def\notewidth##1{\global\*mnw={##1}}% note width variable
+ \def\notegutter##1{\global\*mngut={##1}}% gutter width variable
+ \def\everymarginnote##1{\global\e*mn={##1}}% token variable
+ #1}% insert arguments, END marginnoteformat
+\let\mnf=\marginnoteformat % set marginnoteformat abbreviation
+%
+\long\def\marginnote#1{% BEGIN MARGIN NOTE MACRO
+ \if*CG
+ \special{MARGINNOTE=true} % added 6/30/87 jkw for 8600 line numbering
+ \fi
+ \ifvmode\leavevmode\fi % can't use vadjust in vertical mode
+ \bgroup % begin margin note routine
+ \def\rightragged{\r*sk=\rightskip \*rrtrue
+ \if*msp \rightskip=\r*sk plus10em %
+ \spaceskip=1em \xspaceskip=1em %
+ \else \advance\rightskip by 0pt plus1fil\relax %
+ \spaceskip=.35em \xspaceskip=.55em %
+ \fi}% par removed from TEXT1 version %
+ \let\rr=\rightragged %
+%
+ \tolerance=6000 % increase line-breaking tolerance
+ \hbadness=6000 % increase warning tolerance
+ \strut % sets line depth for vadjust
+ \D=\dp\strutbox % capture depth of current line
+ \the\e*mn % every margin note tokens
+ \strut % sets strut to margin note font
+ \parskip=0pt % cancel any paragraph skip
+ \if*mnr % right margin notes true
+ \vadjust{ % make whats'it in text
+ \rlap{\smash{ % rightlap, make note depth zero
+ \hskip\hsize % skip to right margin
+ \hskip\the\*mngut % make gutter
+ \vtop{\hsize=\the\*mnw % set reference point, new hsize
+ \kern-\D % kern depth of current text line
+ \kern-\ht\strutbox % kern height of margin note text
+ \nin#1}}}}% % input margin note text
+ \else % left margin notes true
+ \vadjust{ % make whats'it in text
+ \llap{\smash{ % leftlap, make note depth zero
+ \vtop{\hsize=\the\*mnw % gather vertical material with
+ \kern-\D % kern depth of current text line
+ \kern-\ht\strutbox % kern height of margin note text
+ \nin#1}% reference point at the top
+ \hskip\the\*mngut}}}% make margin note gutter
+ \fi %
+ \egroup % end margin notes routine
+ \ignorespaces}% END margin note macro
+\let\mn=\marginnote
+%
+\message{labels, }
+%
+% labeled definition macro
+%
+\newdimen\la*w \la*w=1in % Label width
+\newtoks\la*g \la*g={1em} % Label gutter
+\newtoks\la*s \la*s={1\bl} % Skip before label
+\newtoks\la*f \la*f={\rm} % Label font
+%
+\long\def\label#1{\par\vskip\the\la*s
+ \setbox\A=\vtop{\hsize=\la*w
+ \leftskip=0pt
+ \rightskip=0pt plus2em
+ \tolerance=1600
+ \noindent
+ \the\la*f
+ #1}%
+ \hangindent=\la*w
+ \advance \hangindent by \the\la*g
+ \hangafter=1
+ \noindent
+ \setbox0=\hbox{\rlap{\box\A}}\ht0=0pt\dp0=0pt\box0%
+ \hskip\la*w
+ \hskip\the\la*g
+ \ignorespaces}
+\let\la=\label
+%
+\def\labelformat#1{{\def\skipbefore##1{\global\la*s={##1}}%
+ \def\labelwidth##1{\global\la*w=##1}%
+ \def\gutter##1{\global\la*g={##1}}%
+ \def\everylabel##1{\global\la*f={##1}}%
+ #1}}% End labelformat
+\let\laf=\labelformat
+%
+\message{indents, }
+%
+% leftindent
+%
+\newif\if*ok
+\newif\if*zero
+\def\leftindent#1{\par
+ \*zerofalse
+ \*okfalse
+ \e*p#1\end%
+ \if*zero \leftskip 0pt \fi
+ \advance \leftskip by #1
+ \l*sk=\leftskip % l*sk used in justify reset
+ }%
+\let\lin=\leftindent
+%
+\def\rightindent#1{\par
+ \*zerofalse \*okfalse
+ \e*p#1\end%
+ \if*zero \rightskip 0pt \fi
+ \advance \rightskip by #1
+ \if*rr\rr\fi
+ \r*sk=\rightskip}% r*sk used in justify reset
+\let\rin=\rightindent
+%
+% \e*p will determine if the parm value passed to \leftindent
+% or \rightindent is to be relative to the previous indent, which means a
+% "+" or "-" will appear in front of the indent value. If no "+" or "-",
+% then the indent is to be absolute from the original left margin.
+%
+\def\e*p#1{\ifx #1\end \let \next = \relax% e*p => Evaluate Parameter
+ \else \if*ok \let \next = \e*p
+ \else \global\*oktrue
+ \ifx #1+ \let \next = \e*p
+ \else \ifx #1- \let \next = \e*p
+ \else \*zerotrue
+ \let \next = \e*p
+ \fi\fi\fi\fi \next}
+%
+\message{block quotes, }
+%
+% Blockquote
+%
+\newskip\bq*sb \bq*sb = 6pt % Default skip before
+\newskip\bq*sa \bq*sa = 6pt % Default skip after
+\newtoks\bq*f \bq*f={\tenpt\leftindent{24pt}\rightindent{24pt}}
+%
+\def\blockquoteformat#1{{%
+ \def\everyblockquote##1{\global\bq*f={##1}}%
+ \def\skipbefore##1{\global\bq*sb=##1\relax}%
+ \def\skipafter##1{\global\bq*sa=##1\relax}%
+ #1}} %end of blockquoteformat
+\let\bqf=\blockquoteformat
+%
+\def\blockquotebegin{\par\vskip\bq*sb\relax\begingroup
+ \the\bq*f }
+\let\bqb=\blockquotebegin
+\def\blockquoteend{\par\endgroup\vskip\bq*sa\relax}
+\let\bqe=\blockquoteend
+%
+\message{footnotes, }
+%
+%
+%
+% Footnote
+%
+% The "tfn" prefixed values are for the reference in the text of
+% the document.
+%
+\newif\if*tfn*dnum \*tfn*dnumfalse %"1." style
+\newif\if*tfn*unum \*tfn*unumtrue %"1" style
+\newif\if*tfn*pnum \*tfn*pnumfalse %"(1)" style
+\newif\if*tfn*dlet \*tfn*dletfalse % "a." style
+\newif\if*tfn*ulet \*tfn*uletfalse % "a" style
+\newif\if*tfn*plet \*tfn*pletfalse % "(a)" style
+\newif\if*tfn*rbe \*tfn*rbefalse % reference after word
+\newif\if*tfnupchar \*tfnupchartrue %
+\newtoks\*tfn*rfont \*tfn*rfont={\tenpt\rm}
+%
+% The "nfn" prefixed values are for the reference as it is formatted
+% at the bottom of the page.
+%
+\newif\if*nfn*dnum \*nfn*dnumtrue %"1." style
+\newif\if*nfn*unum \*nfn*unumfalse %"1" style
+\newif\if*nfn*pnum \*nfn*pnumfalse %"(1)" style
+\newif\if*nfn*dlet \*nfn*dletfalse % "a." style
+\newif\if*nfn*ulet \*nfn*uletfalse % "a" style
+\newif\if*nfn*plet \*nfn*pletfalse % "(1)" style
+\newif\if*nfnupchar \*nfnupcharfalse % reference is not superscript
+\newtoks\*nfn*rfont \*nfn*rfont={\tenpt\rm}
+\newtoks\*nfng \*nfng={1em}
+%
+\newif\if*fn*llap \*fn*llaptrue
+\newtoks\fn*f
+\newcount\fn*num
+\newdimen\fn*div \fn*div=2in
+\newskip\fn*sadiv \fn*sadiv=2.6pt %default skip after divider
+\newskip\fn*sbdiv \fn*sbdiv=6pt %default skip before divider
+%
+\def\footnotenumber{{\if*tfn*dnum \the\fn*num % "1." style
+ \else\if*tfn*unum \the\fn*num % "1" style
+ \else\if*tfn*pnum \the\fn*num % "(1)" style
+ \else\l*alphatrue \a*c{\fn*num} % "a.", "a", and "(a)"
+ \fi\fi\fi
+ \removelastskip}}
+%
+\def\setfootnotenumber#1{\fn*num=#1}
+\let\sfnn=\setfootnotenumber
+%
+\skip\footins=15pt plus 3pt minus 2pt
+\fn*f={\tenpt\pin{20pt}\lin{0in}}
+%
+\def\footnoteformat#1{{%
+ \def\everyfootnote##1{\global\fn*f{##1}}%
+ \def\textreferencestyle##1{%
+ \global\*tfn*dnumfalse
+ \global\*tfn*unumfalse
+ \global\*tfn*pnumfalse
+ \global\*tfn*dletfalse
+ \global\*tfn*uletfalse
+ \global\*tfn*pletfalse
+ \edef\T{##1}%
+ \edef\U{(1)}%
+ \edef\V{1}%
+ \edef\Y{1.}%
+ \edef\W{(a)}%
+ \edef\X{a}%
+ \edef\Z{a.}%
+ \ifx\T\U \global\*tfn*pnumtrue
+ \else\ifx\T\V \global\*tfn*unumtrue
+ \else\ifx\T\Y \global\*tfn*dnumtrue
+ \else\ifx\T\W \global\*tfn*plettrue
+ \else\ifx\T\X \global\*tfn*ulettrue
+ \else\ifx\T\Z \global\*tfn*dlettrue
+ \else \message{<TEXT1> Error! textreferencestyle ##1
+ is not a valid style. Statement ignored.}
+ \fi\fi\fi\fi\fi\fi}% end reference style
+ \def\textreferencefont##1{\global\*tfn*rfont{##1}}%
+ \def\textreferenceplacement##1{\global\*tfn*rbefalse
+ \edef\T{##1}%
+ \edef\U{before}%
+ \edef\V{after}%
+ \ifx\T\U \global\*tfn*rbetrue
+ \else\ifx\T\V \global\*tfn*rbefalse
+ \else \message{<TEXT1> Error! textreferenceplacement ##1
+ is invalid. Statement ignored.}
+ \fi\fi}
+ \def\textreferenceposition##1{\global\*tfnupcharfalse
+ \edef\T{##1}%
+ \edef\U{up}%
+ \edef\V{down}%
+ \ifx\T\U \global\*tfnupchartrue
+ \else\ifx\T\V \global\*tfnupcharfalse
+ \else \message{<TEXT1> Error! textreferenceposition ##1
+ has an invalid parameter. Statement ignored.}
+ \fi\fi}
+ \def\notereferencestyle##1{
+ \global\*nfn*dnumfalse
+ \global\*nfn*unumfalse
+ \global\*nfn*pnumfalse
+ \global\*nfn*dletfalse
+ \global\*nfn*uletfalse
+ \global\*nfn*pletfalse
+ \edef\T{##1}%
+ \edef\U{(1)}%
+ \edef\V{1}%
+ \edef\Y{1.}%
+ \edef\W{(a)}%
+ \edef\X{a}%
+ \edef\Z{a.}%
+ \ifx\T\Y \global\*nfn*dnumtrue
+ \else\ifx\T\U \global\*nfn*pnumtrue
+ \else\ifx\T\V \global\*nfn*unumtrue
+ \else\ifx\T\W \global\*nfn*plettrue
+ \else\ifx\T\X \global\*nfn*ulettrue
+ \else\ifx\T\Z \global\*nfn*dlettrue
+ \else \message{<TEXT1> Error! notereferencestyle ##1
+ is not a valid style. Statement ignored.}
+ \fi\fi\fi\fi\fi\fi}% end reference style
+ \def\notereferencefont##1{\global\*nfn*rfont{##1}}%
+ \def\notereferenceposition##1{\global\*nfnupcharfalse
+ \edef\T{##1}%
+ \edef\U{up}%
+ \edef\V{down}%
+ \ifx\T\U \global\*nfnupchartrue
+ \else\ifx\T\V \global\*nfnupcharfalse
+ \else \message{<TEXT1> Error! notereferenceposition ##1
+ has an invalid parameter. Statement ignored.}
+ \fi\fi}%
+ \def\skipbeforedivider##1{\global\fn*sbdiv=##1\relax}%
+ \def\footnotedivider##1{\global\fn*div=##1\relax}%
+ \def\notereferencegutter##1{\global\*nfng={##1}}%
+ \def\skipafterdivider##1{\global\fn*sadiv=##1\relax}%
+ #1
+ \relax
+ \skip\footins=0pt plus 3pt minus 2pt
+ \global\advance\skip\footins by \fn*sbdiv\relax%
+ \global\advance\skip\footins by \fn*sadiv\relax%
+}} % end of footnoteformat
+\let\fnf=\footnoteformat
+%
+\def\autofootnote{\global\advance\fn*num by 1
+ \l*alphatrue
+ \xdef\I{%
+ \if*tfn*unum \the\fn*num%
+ \else \if*tfn*ulet \a*c{\the\fn*num}%
+ \else \if*tfn*plet (\a*c{\the\fn*num})%
+ \else \if*tfn*pnum (\the\fn*num)%
+ \else \if*tfn*dlet \a*c{\the\fn*num}.%
+ \else \if*tfn*dnum \the\fn*num.%
+ \fi\fi\fi\fi\fi\fi}%
+ \def\K{%
+ \if*nfn*unum \the\fn*num%
+ \else \if*nfn*ulet \a*c{\the\fn*num}%
+ \else \if*nfn*plet (\a*c{\the\fn*num})%
+ \else \if*nfn*pnum (\the\fn*num)%
+ \else \if*nfn*dlet \a*c{\the\fn*num}.%
+ \else \if*nfn*dnum \the\fn*num.%
+ \fi\fi\fi\fi\fi\fi}%
+%
+ \let\@sf=\empty
+ \ifhmode\edef\@sf{\spacefactor=\the\spacefactor}\fi
+ \def\J{{\the\*tfn*rfont
+ \if*tfnupchar \raise.7ex\hbox{\the\*tfn*rfont\I}%
+ \else {\I}\fi}}%
+ \if*tfn*rbe \@sf\J\ignorespaces%
+ \else\unskip\unskip\unskip\unskip\J\@sf\fi
+ \def\M{{\the\*nfn*rfont
+ \if*nfnupchar \raise.7ex\hbox{\K}%
+ \else {\K}\fi}}%
+ \vfootnote{\M}}
+\let\afn=\autofootnote
+%
+% vfootnote redefined to include fn*f features
+% The addition of hsize=txtw in vfootnote for flexibleformat allows the
+%
+% footnote to print across the full text width at the page bottom.
+%
+% Footstrut redefined to baselineskip for consistent spacing in footnote
+%
+%
+\def\footnoterule{\vskip-\fn*sadiv\hrule width\fn*div\vskip\fn*sadiv\relax}
+%
+% redefined from PLAIN TEX to baselineskip. PLAIN TEX
+% used the height of a ten point strutbox
+%
+\def\vfootnote#1{% Vfootnote revised 11/6/86
+ \insert\footins\bgroup
+ \if*fix % if fixed mode do nothing to footnote
+ \else\hsize=\*txtw\fi % else print footnote across full width of page
+ \interlinepenalty\interfootnotelinepenalty
+ \setbox\strutbox=\hbox{\vrule height 1.8ex depth .6ex width 0pt}%
+ \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
+ \the\fn*f
+ \def\T{\parindent}% For some odd and unknown reason this def is needed
+ \ifdim\the\parindent>0pt \global\*fn*llaptrue
+ \else \ifdim\the\leftskip>0pt \global\*fn*llaptrue
+ \else \global\*fn*llapfalse\fi\fi
+ \leavevmode
+ \if*fn*llap \hbox to 0pt{\hss{#1\hskip\the\*nfng}}%
+ \else \hbox{#1\hskip\the\*nfng}\fi%
+ \ignorespaces
+ \footstrut\futurelet\next\fo@t}% END vfootnote markup definition
+%
+\def\footstrut{\vbox to\baselineskip{}}
+%
+\message{endnotes, }
+%
+% Endnote
+%
+% The "ten" prefixed values are for the reference in the text of
+% the document.
+%
+\newif\if*ten*num \*ten*numtrue % "[1]", "1" and "(1)" styles
+\newif\if*ten*let \*ten*letfalse % "a" and "(a)" styles
+\newif\if*ten*paren \*ten*parenfalse % "(1)" and "(a)" styles
+\newif\if*ten*sb \*ten*sbtrue % "[1]" style
+\newif\if*tenupchar \*tenupcharfalse % reference is not superscripted by
+\newtoks\*tenrfont \*tenrfont={\tenpt\rm}
+%
+% The "nen" prefixed values are for the reference as it is formatted
+% at the end of a chapter or the end of the document.
+%
+\newif\if*nen*num \*nen*numtrue % "[1]", "1", "1." and "(1)" styles
+\newif\if*nen*let \*nen*letfalse % "a" and "(a)" styles
+\newif\if*nenll*per \*nenll*pertrue % "1." style
+\newif\if*nen*paren \*nen*parenfalse % "(1)" and "(a)" styles
+\newif\if*nen*sb \*nen*sbfalse % "[1]" style
+\newif\if*nenupchar \*nenupcharfalse % reference isn't superscripted
+\newtoks\*nenrfont \*nenrfont={\tenpt\rm}
+\newdimen\*neng \*neng=1em
+%
+\newtoks\*enpar
+\newcount\en*n
+\newskip\en*s \en*s=4pt
+%
+%
+\def\endnotenumber{{\if*ten*num \the\en*n % all numeric styles
+ \else\l*alphatrue \a*c{\en*n} % all alpha styles
+ \fi
+ \removelastskip}}
+%
+\def\setendnotenumber#1{\en*n=#1}
+\let\senn=\setendnotenumber
+%
+\*enpar={\tenpt\pin{0in}\lin{1.2em}}
+%
+\def\endnoteformat#1{%
+ {\def\everyendnote##1{\global\*enpar{##1}}%
+ \def\textreferencestyle##1{%
+ \global\*ten*numfalse
+ \global\*ten*letfalse
+ \global\*ten*parenfalse
+ \global\*ten*sbfalse
+ \edef\T{##1}%
+ \edef\U{[1]}%
+ \edef\V{(1)}%
+ \edef\W{1}%
+ \edef\X{(a)}%
+ \edef\Y{a}%
+ \ifx\T\U \global\*ten*numtrue \global\*ten*sbtrue % st
+ \else\ifx\T\V \global\*ten*numtrue \global\*ten*parentrue % st
+ \else\ifx\T\W \global\*ten*numtrue % st
+ \else\ifx\T\X \global\*ten*lettrue \global\*ten*parentrue % st
+ \else\ifx\T\Y \global\*ten*lettrue % st
+ \else \message{<TEXT1> Error! textreferencestyle ##1
+ is not a valid style. Statement ignored.}
+ \fi\fi\fi\fi\fi}% end reference style
+ \def\textreferencefont##1{\global\*tenrfont{##1}}%
+ \def\textreferenceposition##1{\global\*tenupcharfalse
+ \edef\T{##1}%
+ \edef\U{up}%
+ \edef\V{down}%
+ \ifx\T\U \global\*tenupchartrue
+ \else\ifx\T\V \global\*tenupcharfalse
+ \else \message{<TEXT1> Error! textreferenceposition ##1
+ has an invalid parameter. Statement ignored.}
+ \fi\fi}
+ \def\notereferencestyle##1{
+ \global\*nen*numfalse
+ \global\*nen*letfalse
+ \global\*nen*parenfalse
+ \global\*nenll*perfalse
+ \global\*nen*sbfalse
+ \edef\T{##1}%
+ \edef\U{[1]}%
+ \edef\V{(1)}%
+ \edef\W{1}%
+ \edef\X{(a)}%
+ \edef\Y{a}%
+ \edef\Z{1.}%
+ \ifx\T\Z \global\*nen*numtrue \global\*nenll*pertrue % style
+ \else\ifx\T\U \global\*nen*numtrue \global\*nen*sbtrue % st
+ \else\ifx\T\V \global\*nen*numtrue \global\*nen*parentrue % st
+ \else\ifx\T\W \global\*nen*numtrue % st
+ \else\ifx\T\X \global\*nen*lettrue \global\*nen*parentrue % st
+ \else\ifx\T\Y \global\*nen*lettrue % st
+ \else \message{<TEXT1> Error! notereferencestyle ##1
+ is not a valid style. Statement ignored.}
+ \fi\fi\fi\fi\fi\fi}% end reference style
+ \def\notereferencefont##1{\global\*nenrfont{##1}}%
+ \def\notereferenceposition##1{\global\*nenupcharfalse
+ \edef\T{##1}%
+ \edef\U{up}%
+ \edef\V{down}%
+ \ifx\T\U \global\*nenupchartrue
+ \else\ifx\T\V \global\*nenupcharfalse
+ \else \message{<TEXT1> Error! notereferenceposition ##1
+ has an invalid parameter. Statement ignored.}
+ \fi\fi}%
+ \def\notereferencegutter##1{\global\*neng=##1}%
+ \def\skipbefore##1{\global\en*s=##1}%
+ \relax
+ #1}} % end of footnoteformat
+\let\enf=\endnoteformat
+%
+\newlinechar=`\^^J
+\newhelp\aenhelp{relax
+ You may continue if you wish, but I'd be surprised
+ if your job^^J
+ finished without any errors when you print the endnotes. }
+%
+\def\err@#1{\errmessage{TEXT1 error: #1}}
+\def\*aenerr{\errhelp=\aenhelp
+ \catcode`@=11
+ \errmessage{Results are unpredictable
+ when you use autoendnote with asisbegin.
+ Type h for more help}}%
+\def\autoendnote{\global\advance\en*n by 1
+ \if*aib \*aenerr \fi
+ \l*alphatrue
+ \edef\I{%
+ \if*ten*paren (\unskip\fi
+ \if*ten*sb [\unskip\fi
+ \if*ten*num \the\en*n\fi
+ \if*ten*let \a*c{\the\en*n}\fi
+ \if*ten*paren \unskip)\fi
+ \if*ten*sb \unskip]\fi}%
+ \let\@sf=\empty
+ \ifhmode \edef\@sf{\spacefactor=\the\spacefactor}%
+ \else \let\@sf=\empty\fi
+ \unskip\unskip
+ \if*tenupchar \raise.7ex\hbox{\the\*tenrfont\I}\@sf%
+ \else {\the\*tenrfont\I}\@sf\fi%
+ \edef\J{%
+ \if*nen*paren (\unskip\fi
+ \if*nen*sb [\unskip\fi
+ \if*nen*num \the\en*n\fi
+ \if*nen*let \a*c{\the\en*n}\fi
+ \if*nenll*per \unskip.\fi
+ \if*nen*paren \unskip)\fi
+ \if*nen*sb \unskip]\fi}%
+ \en*o
+ \immediate\write\en*f{\par%
+ \the\*enpar%
+ \noexpand\ENP{\the\*nenrfont\J}}%
+ \en*w}
+\let\aen=\autoendnote
+%
+%
+\def\ENP#1{\indent\en*i{%
+ \if*nenupchar \raise.7ex\hbox{\the\*nenrfont#1}%
+ \else {\the\*nenrfont#1}\fi}}%
+%
+\def\en*i#1{\hbox to 0pt{\hss{#1}\hskip\*neng}\ignorespaces}
+%
+\newwrite\en*f
+\newtoks\*endlbl
+\if*PC
+ \*endlbl={text1xx.end}
+ \else
+ \*endlbl={text1xx.endnotes}
+\fi
+
+\def\en*o{\immediate\openout\en*f=\the\*endlbl
+ \immediate\write\en*f{\the\*enpar}%
+ \edef\T{\par\vskip\the\en*s\relax}%
+ \immediate\write\en*f{\T}%
+ \global\def\en*o{}%
+ }
+%
+\long\def\en*w#1{{\def\rm{\noexpand\rm}\def\it{\noexpand\it}%
+ \def\underscore{\noexpand\us}\let\us=\underscore%
+ \def\bd{\noexpand\bd}\def\cc{\noexpand\cc}\def\tt{\noexpand\tt}%
+ \def\c{\noexpand\c}\def\L{\noexpand\L}\def\AA{\noexpand\AA}%
+ \def\d{\noexpand\d}\def\O{\noexpand\O}\def\t{\noexpand\t}%
+ \def\b{\noexpand\b}%
+ \immediate\write\en*f{#1}}%
+}% end definition of en*w
+%
+\def\printendnotes{\immediate\closeout\en*f%
+ \begingroup%
+ \input text1xx.endnotes%
+ \par%
+ \endgroup%
+ \global\def\en*o{\immediate\openout\en*f=text1xx.endnotes%
+ \immediate\write\en*f{\the\*enpar}%
+ \edef\T{\par\vskip\the\en*s\relax}%
+ \immediate\write\en*f{\T}%
+ \global\def\en*o{}}%
+ \setendnotenumber{0}}%
+\let \pen=\printendnotes
+%
+\message{set command, }
+%
+%
+\def\set#1#2{\l*alphafalse
+\ifx#2\appendixnumber
+ \edef\T{\the\*ap*num}%
+ \E=\*ap*st%
+ \else\ifx#2\chapternumber
+ \edef\T{\the\*ch*num}%
+ \E=\*ch*st%
+ \else\ifx#2\endnotenumber
+ \edef\T{\the\en*n}%
+ \if*ten*num \E=1% % all numeric styles
+ \else\l*alphatrue \E=2% % all alpha styles
+ \fi%
+ \else\ifx#2\figurenumber
+ \edef\T{\the\fi*n}%
+ \E=1%
+ \else\ifx#2\footnotenumber
+ \edef\T{\the\fn*num}%
+ \if*tfn*dnum \E=1% % "1." style
+ \else\if*tfn*unum \E=1% % "1" style
+ \else\if*tfn*pnum \E=1% % "(1)" style
+ \else\l*alphatrue \E=2% % "a.", "a", and "(a)"
+ \fi\fi\fi%
+ \else\ifx#2\partnumber
+ \edef\T{\the\*pt*num}%
+ \E=\*pt*st%
+ \else\ifx#2\pagenumber
+ \ifnum \pageno<0 \edef\T{\romannumeral-\pageno}%
+ \else \edef\T{\number\pageno}\fi%
+ \E=1%
+ \else\ifx#2\subheadanumber
+ \edef\T{\the\*sa*num}%
+ \E=\sa*st%
+ \else\ifx#2\subheadbnumber
+ \edef\T{\the\*sb*num}%
+ \E=\sb*st%
+ \else\ifx#2\subheadcnumber
+ \edef\T{\the\*sc*num}%
+ \E=\sc*st%
+ \else\ifx#2\subheaddnumber
+ \edef\T{\the\*sd*num}%
+ \E=\sd*st%
+ \else\ifx#2\tablenumber
+ \edef\T{\the\ta*n}%
+ \E=1%
+ \else\message{<TEXT1> Error! You've entered a number I know nothing
+ about. I'm going to ignore it and try to proceed.}%
+ \E=0%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\null % So, why is this needed??
+\ifcase\E % NOP
+ \or % set to a digit or lower case roman
+ \expandafter\xdef\csname#1\endcsname{\T}%
+ \or % set to a letter (upper or lower)
+ \expandafter\xdef\csname#1\endcsname{{\a*c{\T}}}%
+ \or % set to an uppercase roman numeral
+ \expandafter\xdef\csname#1\endcsname{%
+ \uppercase\expandafter{\romannumeral\T}}%
+ \fi}%
+%
+\message{centering, }
+%
+% CENTERLINE Rev. 9/6/88 drg
+%
+% Centerline with single and multiple line capabilities
+\newif\if*afn*cl
+\def\centerline#1{\par % Begin centerline markup
+ \*afn*clfalse
+ \B={}
+ \N=0
+ \bgroup
+ \parindent=\z@ \relax % zero indent
+ \parfillskip=0pt plus1fil \relax % infinite stretch
+ \everypar{\null\hskip0pt plus1fil\relax} % add infinite glue
+ \def\linebreak{\hskip0pt plus1fil\relax\break
+ \null\hskip0pt plus1fil\relax}%
+ \let\lbr=\linebreak
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \justify
+ \let\*vfn=\vfootnote
+ \let\*afn=\autofootnote
+ \def\vfootnote##1##2{\edef\T{\the\B\noexpand\vfootnote{##1}{##2}}
+ \global\B=\expandafter{\T}}
+ \def\autofootnote{\global\*afn*cltrue
+ \global\advance\N by 1 % count the notes done
+ \*afn}
+ \let\afn=\autofootnote
+ \let\*fn=\footnote
+ \def\footnote##1{\global\*afn*cltrue \*fn{##1}}
+ \setbox\A=\vbox{#1\par % added to make skip with multiple lines
+ \global\C=\baselineskip
+ \setbox0=\hbox{(}
+ \global\advance\C by-\ht0}% end vbox
+ \global\advance\fn*num by -\N %subtract the number of notes done
+ \let\autofootnote=\*afn \let\afn=\autofootnote
+ \let\footnote=\*fn
+ \let\vfootnote=\*vfn
+ \ifdim\ht\A>\baselineskip \else \C=\z@ \fi
+ \line{\hss\vbox{\vskip\C#1\par}\hss}% print centered lines
+ \egroup
+ \if*afn*cl % then there were footnotes in the \cl
+ \the\B
+ \fi
+ }% End centerline markup
+\let\cl=\centerline
+%
+% CENTER MULTIPLE LINES
+%
+\newif\if*ctrl % centerline indicator
+\*ctrlfalse
+\def\centerlinesbegin{\par\global\*ctrltrue
+ \begingroup\pin{0pt}\psk{0pt}\leftskip=0pt plus1fil
+ \parfillskip=0pt \rightskip=0pt plus1fil\obeylines\ignorespaces}%
+\let\clb=\centerlinesbegin
+\def\centerlinesend{\endgroup\par}
+\let\cle=\centerlinesend
+%
+% rightline par added to PLAIN TEX macro
+%
+\long\def\rightline#1{\par\line{\hss#1}}
+\let\rl=\rightline
+%
+% right align multiple lines
+%
+\def\rightlinesbegin{\par\begingroup\parskip=0pt\parfillskip=0pt
+ \leftskip=0pt plus1fil\obeylines}%
+\let\rlb=\rightlinesbegin
+\def\rightlinesend{\endgroup\par}%
+\let\rle=\rightlinesend
+%
+\message{asis, }
+%
+% As is or format off
+%
+\newskip\*aisb \*aisb = 6pt % Default skip before
+\newskip\*aisa \*aisa = 6pt % Default skip after
+\newtoks\*aif \*aif={\leftindent{0in}}
+\newif\if*aib \*aibfalse % centerline indicator
+%
+\def\asisformat#1{{%
+ \def\everyasis##1{\global\*aif{##1}}%
+ \def\skipbefore##1{\global\*aisb=##1\relax}%
+ \def\skipafter##1{\global\*aisa=##1\relax}%
+ \relax
+ #1}} % end of asisformat
+\let\aif=\asisformat
+%
+% As is or format off
+\def\asisbegin{\par\*aibtrue\vskip\*aisb\relax\nointerlineskip
+ \begingroup
+ \let\*afn=\autofootnote % save definition of autofootnote
+ \def\leftindent##1{%
+ \*zerofalse \*okfalse
+ \e*p##1\end%
+ \if*zero \leftskip 0pt \fi
+ \advance \leftskip by ##1}%
+ \let\lin=\leftindent
+%
+ \def\autofootnote{\endgroup % end asis format
+ \futurelet\next\ck*chr}% pick next character, then check the pick
+ \let\afn=\autofootnote % reset abbreviation for autofootnote
+ \def\ck*chr{\ifcat\bgroup % if left brace
+ \noexpand\next % do nothing
+ \let\next\gather % next equals gather
+ \else % no brace present
+ \let\next\re*group\fi % stop if no brace encountered
+ \next}%
+ \def\gather{\*afn % call normal autofootnote
+ \bgroup % furnish left brace, read group
+ \aftergroup\re*group % reset asis format
+ \let\next}% eat curly brace in text
+ % group ends at text right curly brace
+ \def\re*group{\*asisb}% restore asis group
+%
+ \def\*asisb{\begingroup
+ \def\singlespace{\baselineskip=\*isk}%
+ \let\ssp=\singlespace
+ \def\doublespace{\baselineskip=2\*isk}%
+ \let\dsp=\doublespace
+ \def\par{\leavevmode\endgraf}%
+ \parskip0pt\parindent0pt
+ \the\*aif
+ \setupverbatim}\*asisb}
+ {\obeyspaces\gdef {\ }}
+\def\obeyspaces{\@vobeyspaces}
+{\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
+\def\@xobeysp{\leavevmode\penalty10000\ }
+\def\setupverbatim{\obeylines
+ \obeyspaces }
+\let\aib=\asisbegin
+\def\asisend{\endgroup\endgroup\vskip\*aisa\relax\*aibfalse}
+\let\aie=\asisend
+%
+\message{box macros, }
+%
+% Start of boxes
+%
+\font\dtscr=dt
+%
+% Draw boxes
+%
+\newdimen\db*m \db*m=3pt % drawbox mat size
+\newdimen\db*s \db*s=.4pt % drawbox rule size
+\newdimen\db*sh \db*sh=0pt % drawbox shadow size
+\newdimen\db*om \db*om=0pt % drawbox outer mat size
+\newdimen\db*os \db*os=0pt % drawbox outer rule size
+\newcount\db*ps \db*ps=0 % drawbox percent of screen
+%
+\long\def\drawbox#1{\*box{\db*m}{\db*s}{\db*sh}{\db*om}{\db*os}{\db*ps}{#1}}
+\let\db=\drawbox
+%
+\def\drawboxformat#1{{%
+ \def\boxmat##1{\global\db*m=##1\relax}%
+ \def\boxrule##1{\global\db*s=##1\relax}%
+ \def\boxshadow##1{\global\db*sh=##1\relax}%
+ \def\outerboxmat##1{\global\db*om=##1\relax}%
+ \def\outerboxrule##1{\global\db*os=##1\relax}%
+ \def\screen##1{\ifnum##1>64
+ \message{<TEXT1> Error. Screen can only be 0 through 64}
+ \global\db*ps=0
+ \else\ifnum##1<0
+ \message{<TEXT1> Error. Screen can only be 0 through 64}
+ \global\db*ps=0
+ \else \global\db*ps=##1\relax\fi\fi}%
+ #1}} % end of drawboxformat
+\let\dbf=\drawboxformat
+%
+\def\drawboxrulesize#1{\dbf{\boxrule{#1}}
+ \message{<TEXT1> Warning: Use drawboxformat instead of drawboxrulesize}}
+\let\dbrs=\drawboxrulesize
+\def\drawboxmat#1{\dbf{\boxmat{#1}}
+ \message{<TEXT1> Warning: Use drawboxformat instead of drawboxmat}}
+\let\dbm=\drawboxmat
+%
+% Paragraph boxes
+%
+\newdimen\pb*m \pb*m=3pt % paragraphbox mat size
+\newdimen\pb*s \pb*s=.4pt % paragraphbox rule size
+\newdimen\pb*sh \pb*sh=0pt % paragraphbox shadow size
+\newdimen\pb*om \pb*om=0pt % paragraphbox outer mat size
+\newdimen\pb*os \pb*os=0pt % paragraphbox outer rule size
+\newcount\pb*ps \pb*ps=0 % paragraphbox percent of screen
+%
+\long\def\paragraphbox#1{\par\hbox{%
+ \*box{\pb*m}{\pb*s}{\pb*sh}{\pb*om}{\pb*os}{\pb*ps}{\vbox{%
+ \advance \hsize by -2\pb*m%
+ \advance \hsize by -2\pb*s%
+ \advance \hsize by -2\pb*om%
+ \advance \hsize by -2\pb*os%
+ \hrule width \hsize height 0pt depth 0pt%
+ #1}}}}
+\let\pb=\paragraphbox
+%
+\def\paragraphboxformat#1{{%
+ \def\boxmat##1{\global\pb*m=##1\relax}%
+ \def\boxrule##1{\global\pb*s=##1\relax}%
+ \def\boxshadow##1{\global\pb*sh=##1\relax}%
+ \def\outerboxmat##1{\global\pb*om=##1\relax}%
+ \def\outerboxrule##1{\global\pb*os=##1\relax}%
+ \def\screen##1{\ifnum##1>64
+ \message{<TEXT1> Error. Screen can only be 0 through 64}
+ \global\pb*ps=0
+ \else\ifnum##1<0
+ \message{<TEXT1> Error. Screen can only be 0 through 64}
+ \global\pb*ps=0
+ \else \global\pb*ps=##1\relax\fi\fi}%
+ #1}} % end of paragraphboxformat
+\let\pbf=\paragraphboxformat
+
+% parameter list for *box:
+% #1 = boxmat size #5 = outer boxrule
+% #2 = boxrule size #6 = screen percent
+% #3 = box shadow size #7 = value to be boxed
+% #4 = outer boxmat
+%
+% Uncoment these 2 lines if using the boxes outside of TEXT1
+% \newbox\A
+% \newdimen\D
+% \newcount\E
+%
+\long\def\*box#1#2#3#4#5#6#7{%
+\ifdim #5>0pt % only if doing a "framed" box
+ \setbox\A=\vbox{\*box{#1}{#2}{#3}{0pt}{0pt}{#6}{#7}}%
+ \*box{#4}{#5}{#3}{0pt}{0pt}{#6}{\box\A}%
+ \else%
+ \setbox\A=\vbox{\hrule height#2 % draw left side
+ \hbox{\vrule width#2\hskip#1 % draw the top
+ \vbox{\vskip#1
+ \hbox{#7}
+ \vskip#1}\hskip#1\vrule width#2} % draw the bottom
+ \hrule height#2} % draw the right side
+ \ifdim #3=0pt \*scr{#6}{\box\A} % print if not a shadow
+ \else \D=\ht\A
+ \advance \D by -#3
+ \vbox{\hbox{\vrule width #3 height \D depth 0pt
+ \*scr{#6}{\copy\A}}
+ \hrule width \wd\A height #3 depth 0pt}
+ \fi
+ \fi}
+
+% #1 = Screen percent
+% #2 = box to be printed
+
+\def\*scr#1#2{\ifnum#1=0 #2
+ \else \setbox\A=\vbox{#2}
+ \D=\ht\A
+ \advance \D by \dp\A
+ \E=#1%
+ \advance \E by 48%
+ \hbox{\vbox{\vbox to \D{\leaders
+ \hbox to \wd\A{\leaders\hbox{\dtscr\char\E}\hfill}
+ \vfill}
+ \vskip -\D
+ \box\A}}
+ \fi
+}
+%
+% End of boxes
+%
+\message{more misc, }
+%
+% page skip
+%
+\def\newpage{\vfil\break}% changed from vfill to vfil 11/4/86 bth
+\let\np=\newpage
+%
+% emptypage
+%
+\def\emptypage{\global\advance\*pcount by1}% produces empty pages
+\let\ep=\emptypage
+%
+\def\*blkpg{ % BLANK PAGE MACRO, produces the empty page
+ \loop % checks the number of empty pages
+ \*badj % check for binding adjust
+ \shipout\vbox{\*setcrops{\vbox{
+ \makeheadline % shipout page with headline
+ \vbox to\*txth{\vfil} % and fooline only
+ \makefootline}}}
+ \global\advance\*pcount by\m@ne % decrement empty page counter
+ \advancepageno % advance the page number
+ \ifnum\*pcount>0 % check for empty pages
+ \repeat}% END, empty page macro
+%
+\message{enumeration macros, }
+%
+% List Level Macros
+%
+\newcount\ll*n % Current list level number
+\newcount\*toklimit
+\newcount\*countlimit
+\newcount\ll*stb % list style start
+\newcount\ll*cs % list*enum*value*start
+\newcount\ll*cmps % list compare start
+\newcount\ll*cmpe
+\newcount\ll*lc % Last level called
+\*toklimit = 188 % Positions 224-253 are used for the 30 table column justification
+ % Positions 199-223 are used for the 25 different list level styles
+ % Tokens below 199 are available for \newtoks use.
+ % Token 190 is the build token
+ % 191-197 is the list level formats, level 1-7
+ % 198 is the bullet format
+%
+\*countlimit = 236 % Counters 244-250 are the styles for the 7 list levels
+ % Counters 237-243 are the enum counters for the 7 list levels
+ % Counters below 237 are available for \newcount use.
+%
+\ll*stb = 244 % Counters 244-250 correspond to the 7 list level styles,
+ % value is index into tokens 199-223
+\ll*cs = 237 % Counters 237-243 correspond to the 7 list level enum values.
+\ll*cmps = 199 % Where to start in the \toks values for the 25 different list level styles
+\ll*cmpe = 223 % Where to stop in the \toks values for the 25 different list level styles
+%
+\count244 = 1 % style "1."
+\count245 = 4 % style "a."
+\count246 = 7 % style "i."
+\count247 = 2 % style "1)"
+\count248 = 5 % style "a)"
+\count249 = 8 % style "i)"
+\count250 = 3 % style "(1)"
+%
+\newskip\ll*sb \ll*sb = 0pt % Default is no \vskip
+\newskip\ll*sa \ll*sa = 0pt % Default is no \vskip
+%
+\toks191={\rm\leftindent{.5in}\gutter{1em}} % level 1 indent is 5 characters initially
+\toks192={\rm\leftindent{.8in}\gutter{1em}} % level 2 indent
+\toks193={\rm\leftindent{1.1in}\gutter{1em}} % level 3 indent
+\toks194={\rm\leftindent{1.4in}\gutter{1em}} % level 4 indent
+\toks195={\rm\leftindent{1.7in}\gutter{1em}} % level 5 indent
+\toks196={\rm\leftindent{2in}\gutter{1em}} % level 6 indent
+\toks197={\rm\leftindent{2.3in}\gutter{1em}} % level 7 indent
+\toks198={\rm\leftindent{+.5in}\gutter{1em}} % bullets
+%
+ % The 25 different List level styles:
+\toks199 = {1.} % Style 1
+\toks200 = {1)} % 2
+\toks201 = {(1)} % 3
+\toks202 = {a.} % 4
+\toks203 = {a)} % 5
+\toks204 = {(a)} % 6
+\toks205 = {i.} % 7
+\toks206 = {i)} % 8
+\toks207 = {(i)} % 9
+\toks208 = {I.} % 10
+\toks209 = {I)} % 11
+\toks210 = {(I)} % 12
+\toks211 = {A.} % 13
+\toks212 = {A)} % 14
+\toks213 = {(A)} % 15
+\toks214 = {1]} % 16
+\toks215 = {[1]} % 17
+\toks216 = {a]} % 18
+\toks217 = {[a]} % 19
+\toks218 = {i]} % 20
+\toks219 = {[i]} % 21
+\toks220 = {I]} % 22
+\toks221 = {[I]} % 23
+\toks222 = {A]} % 24
+\toks223 = {[A]} % 25
+%
+\newif\if*check % True unless done parsing \listformat
+\newif\ifll*lp
+\newif\ifll*rp
+\newif\if*lsqb
+\newif\if*rsqb
+\newif\ifll*per
+\newif\ifll*dig
+\newif\ifl*alpha
+\newif\if*u*alpha
+\newif\if*l*roman
+\newif\if*u*roman
+\newif\ifll*nil
+%
+\ll*niltrue
+%
+\outer\def\newtoks{\alloc@5\toks\toksdef\*toklimit}
+\outer\def\newcount{\alloc@0\count\countdef\*countlimit}
+%
+%
+% Macros for producing enumerated list levels.
+%
+%
+\def\listformat#1{{\begingroup%
+ \def\liststyle##1{\par\N = 1
+ \toks190 = {}
+ \Z##1\end}%
+ \def\Z##1{\ifx ##1\end \Y
+ \let \next = \relax
+ \else \ifnum \N > 7
+ \message{<TEXT1> Error! Too many list levels specified, 7 is max.
+ Statement ignored.}
+ \let \next = \Z
+ \else \ifx ##1, \Y
+ \advance \N by 1
+ \toks190 = {}
+ \let \next = \Z
+ \else \toks190 = \expandafter{\the\toks190 ##1}
+ \let \next = \Z
+ \fi\fi\fi\next}%
+ \def\Y{\*tempiffalse
+ \*checktrue
+ \E = \ll*cmps
+ \loop \ifnum \E > \ll*cmpe
+ \*checkfalse
+ \*tempiftrue
+ \else \edef\T{\the\toks190}%
+ \edef\U{\the\toks\E}%
+ \ifx\T\U
+ \*checkfalse
+ \F = \ll*stb
+ \advance \F by -1
+ \advance \F by \N
+ \count\F = \E
+ \advance \count\F by -\ll*cmps
+ \global\advance \count\F by 1
+ \fi\fi
+ \if*check% Then
+ \advance \E by 1
+ \repeat
+ \if*tempif \message{<TEXT1> Error! \the\toks190 is an invalid list
+ level style. It will be ignored}
+ \fi}%
+ \def\skipbefore##1{\global\ll*sb = ##1\relax}%
+ \def\skipafter##1{\global\ll*sa = ##1\relax}%
+ \def\everylistlevel##1##2{\ifcase ##1
+ \or \global\toks191 = {##2}
+ \or \global\toks192 = {##2}
+ \or \global\toks193 = {##2}
+ \or \global\toks194 = {##2}
+ \or \global\toks195 = {##2}
+ \or \global\toks196 = {##2}
+ \or \global\toks197 = {##2}
+ \fi}%
+ \def\everybullet##1{\global\toks198 = {##1}}%
+ \relax
+ #1
+ \endgroup}}
+%
+\let \lif = \listformat
+%
+\def\listbegin{\vskip\ll*sb\relax
+ \ll*nilfalse
+ \begingroup
+ \global\ll*lc = 0
+ \ll*ini1
+ }
+\let\lib=\listbegin
+%
+\def\listend{\vskip\ll*sa\relax
+ \endgroup
+ \ll*niltrue
+}
+\let\lie=\listend
+%
+\def\listlevel#1{\par
+ \ifll*nil \message{<TEXT1> Warning, listbegin was not
+ specified. The left margin indent will be set to zero.}
+ \else \if*dbl \else \if*tpl
+ % If in multiple columns, don't end the group. Do so otherwise
+ \else \endgroup
+ \begingroup
+ \fi\fi
+ \fi
+ \*tempiftrue % Usually not quite so pessimistic
+ \ifcat 1#1 \ifnum #1 < 8 \*tempiffalse % OK if \listlevel1-\listlevel7
+ \fi\fi
+ \if*tempif \message{<TEXT1> Warning, invalid list level "#1",
+ listlevel1 will be used instead.}
+ \listlevel1
+ \else \E = #1
+ \global\ll*n = \E
+ \advance \E by 1
+ \ll*ini\E
+ \par
+ \ll*fmt
+ \noindent
+ \txt*in{\ll*p{#1}}
+ \fi
+}
+\let \lil = \listlevel
+%
+\def\txt*in#1{\hbox to 0pt{\hss{#1}\hskip\*gut}\ignorespaces}
+%
+\def\ll*fmt{\*gut=1em
+ \ifcase \the\ll*n
+ \or \the\toks191
+ \or \the\toks192
+ \or \the\toks193
+ \or \the\toks194
+ \or \the\toks195
+ \or \the\toks196
+ \or \the\toks197
+ \fi}
+%
+\def\listresume{% rev. 7/6/87
+ \if*start*bul\global\advance\ll*n by 1\global\*start*bulfalse\fi
+ % account for bulleted list ffems
+ \ifnum \ll*n < 2 \lin{0pt}
+ \global\ll*n = 1
+ \else \global\advance \ll*n by -1
+ \ll*fmt
+ \fi
+ \noindent\ignorespaces}
+%
+\let\lir=\listresume
+% Evaluate Style
+\def\e*s{%
+ \global\ll*lpfalse
+ \global\ll*rpfalse
+ \global\*lsqbfalse
+ \global\*rsqbfalse
+ \global\ll*perfalse
+ \global\ll*digfalse
+ \global\l*alphafalse
+ \global\*u*alphafalse
+ \global\*l*romanfalse
+ \global\*u*romanfalse
+ \ifcase \count\F
+ \or \global\ll*digtrue \global\ll*pertrue % Style 1
+ \or \global\ll*digtrue \global\ll*rptrue % 2
+ \or \global\ll*digtrue \global\ll*rptrue \global\ll*lptrue % 3
+ \or \global\l*alphatrue \global\ll*pertrue % 4
+ \or \global\l*alphatrue \global\ll*rptrue % 5
+ \or \global\l*alphatrue \global\ll*rptrue \global\ll*lptrue % 6
+ \or \global\*l*romantrue \global\ll*pertrue % 7
+ \or \global\*l*romantrue \global\ll*rptrue % 8
+ \or \global\*l*romantrue \global\ll*rptrue \global\ll*lptrue % 9
+ \or \global\*u*romantrue \global\ll*pertrue % 10
+ \or \global\*u*romantrue \global\ll*rptrue % 11
+ \or \global\*u*romantrue \global\ll*rptrue \global\ll*lptrue % 12
+ \or \global\*u*alphatrue \global\ll*pertrue % 13
+ \or \global\*u*alphatrue \global\ll*rptrue % 14
+ \or \global\*u*alphatrue \global\ll*rptrue \global\ll*lptrue % 15
+ \or \global\ll*digtrue \global\*rsqbtrue % 16
+ \or \global\ll*digtrue \global\*rsqbtrue \global\*lsqbtrue % 17
+ \or \global\l*alphatrue \global\*rsqbtrue % 18
+ \or \global\l*alphatrue \global\*rsqbtrue \global\*lsqbtrue % 19
+ \or \global\*l*romantrue \global\*rsqbtrue % 20
+ \or \global\*l*romantrue \global\*rsqbtrue \global\*lsqbtrue % 21
+ \or \global\*u*romantrue \global\*rsqbtrue % 22
+ \or \global\*u*romantrue \global\*rsqbtrue \global\*lsqbtrue % 23
+ \or \global\*u*alphatrue \global\*rsqbtrue % 24
+ \or \global\*u*alphatrue \global\*rsqbtrue \global\*lsqbtrue % 25
+ \fi}
+
+%
+\def\ll*ini#1{\*start*bulfalse
+ \ifnum #1 < 7 \N = #1
+ \advance \N by -1
+ \loop \ifnum \N < 7 % Loop max of 7 times
+ \E = \N
+ \advance \E by \ll*cs
+ \global\count\E = 0
+ \advance \N by 1
+ \repeat
+ \fi} % else don't initialize when \lil7
+%
+\def\ll*p#1{%
+ \E = #1
+ \advance \E by \ll*cs
+ \advance \E by -1 % \E is the listlevel value counter
+ \F = \E
+ \advance \F by 7
+ \global\advance \count\E by 1 % Increment the list level counter
+ %
+ % If this level is same as previous level, no need to re-evaluate
+ % the style to be used.
+ %
+ \ifnum \ll*lc = #1
+ \else \e*s
+ \global\ll*lc = #1
+ \fi
+ %
+ % Print the prefix punctuation
+ %
+ \ifll*lp (\unskip % Styles 3, 6, 9, 12, 15
+ \else \if*lsqb [\unskip % Styles 17, 19, 21, 23, 25
+ \fi\fi
+ %
+ % Print the listlevel value, i.e. "1", "a", "A", "I", or "i".
+ %
+ \ifll*dig % Then its a style using digits
+ \number\count\E % Print the number
+ \unskip % To get rid of any following extra spaces
+ \else \ifl*alpha % Then its a style with lower case letters
+ \a*c{\count\E} % Print the lower case letters
+ \unskip % To get rid of any following extra spaces
+ \else \if*u*alpha % Then its a style with upper case letters
+ \a*c{\count\E} % Print uppercase alpha
+ \unskip % To get rid of any following extra spaces
+ \else \if*l*roman % Then its a style with lower case roman numerals
+ \romannumeral\count\E % Print the lower case roman numeral
+ \unskip % To get rid of any following extra spaces
+ \else \if*u*roman % Print upper case roman numeral
+ \uppercase\expandafter{\romannumeral\count\E}
+ \unskip % To get rid of any following extra spaces
+ \else \message{<TEXT1> Error! Something is awry in the listlevel style. Call a consultant.}
+ \fi\fi\fi\fi\fi
+ %
+ % Print the suffix punctuation
+ %
+ \ifll*per .\unskip % Styles 1, 4, 7, 10, 13
+ \else \ifll*rp )\unskip % Styles 2, 3, 5, 6, 8, 9, 11, 12, 14, 15
+ \else \if*rsqb ]\unskip % Styles 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
+ \fi\fi\fi
+}
+ %
+ % This macro will convert an integer into a letter. In Appendix F of the
+ % TeXbook you will see that octal character '141 is the small letter "a".
+ % Octal 141=Decimal 97, Therefore, add 96 to value of listlevel counter.
+ % For example, 1="a", 2="b", etc. The macro will also change 27="aa", 28="ab", etc.
+ %
+\def\a*c#1{%
+ \ifnum #1 < 27 \G = #1% % Then its a single letter a-z
+ \advance \G by 96% % See the font table in App. F
+ \ifl*alpha% % Then its a lower case style
+ \char\G% % Print the character a-z
+ \else \advance \G by -32%
+ \char\G% % Print the character A-Z
+ \fi%
+ \else \G = #1% % else its "AA" or greater
+ \divide \G by 26% % This holds the first character
+ \Q = #1% % Get ready to compute second letter
+ \R = #1%
+ \divide \R by 26%
+ \multiply \R by 26%
+ \ifnum #1 = \R%
+ \advance \G by -1%
+ \Q = 26%
+ \else \advance \Q by -\R%
+ \fi%
+ \a*c{\G}% % Get the first character a-z
+ \unskip%
+ \a*c{\Q}% % Get the second letter
+ \fi} % End of \a*c
+%
+% for setting the list level number other than sequential
+%
+\def\slln#1#2{{\E=#1
+ \advance \E by -1
+ \advance \E by \ll*cs
+ \global\count\E = #2}}
+\let\setlistlevelnumber=\slln
+%
+% Bullets
+%
+\newif\if*start*bul
+\newdimen\*bul*dim
+\mathchardef\*bullet="220F
+\def\bullet{% bullet defined for both math and text modes, rev. 6/25/87
+ \ifmmode \*bullet % math mode bullet
+ \else % text or list bullet
+ \ifll*nil % no list in progress, text bullet
+ \leftskip = 0pt
+ {\if*msp{*}\else\sy\char"0F\fi}
+ \else % list in progress, list bullet
+ \the\toks198
+ \if*start*bul \lin{\*bul*dim}
+ \else \*bul*dim = \leftskip
+ \*start*bultrue \fi % end starting bullet
+ \par\noindent
+ \txt*in{{\if*msp{*}\else\sy\char"0F\fi}}
+ \fi % end list in progress check
+ \fi % end math mode bullet check
+}% end bullet
+\let \bul=\bullet
+%
+%
+% The \gutter macro is actually used for several macros, \bul, \lil, etc.
+%
+\newdimen\*gut
+\def\gutter#1{\*gut=#1}
+\message{end of enumeration macros, }
+\message{TOC, }
+%
+% Macros for doing Table of Contents, Heads, Subheads, Tables, and Figures
+%
+\newtoks\*TCt \*TCt={\cl{\twelvept\bd Table of Contents}\vs{1\bl}}
+\newtoks\*ptf \*ptf={\vs{1\bl}\cl{Part \partnumber}\cl{\parttitle}%
+ \vs{1\bl}\nin Part \partnumber \leader \pagenumber}
+\newtoks\*ctf \*ctf={\hangingchapternumber \chaptertitle \leader \pagenumber}
+\newtoks\*atf \*atf={\hangingappendixnumber \appendixtitle \leader \pagenumber}
+\newtoks\*prtf \*prtf={\nin \prefacetitle \leader \pagenumber}
+\newtoks\*satf \*satf={\leftindent{.5in}\nin \subheadatitle \leader \pagenumber}
+\newtoks\*sbtf \*sbtf={\leftindent{1in}\nin \subheadbtitle \leader \pagenumber}
+\newtoks\*sctf \*sctf={\leftindent{1.5in}\nin \subheadctitle \leader \pagenumber}
+\newtoks\*sdtf \*sdtf={\leftindent{2in}\nin \subheaddtitle \leader \pagenumber}
+\newtoks\*btf \*btf={\nin\bibtitle \leader \pagenumber}
+\newtoks\*ftf \*ftf={\hangingnumber{\figurenumber.} \figuretitle \leader \pagenumber}
+\newtoks\*ftt \*ftt={\newpage\cl{\twelvept\bd List of Figures}\line{Figure\hfill Page}}
+\newtoks\*ttf \*ttf={\hangingnumber{\tablenumber.} \tabletitle\leader \pagenumber}
+\newtoks\*ttt \*ttt={\newpage\cl{\twelvept\bd List of Tables}\line{Table\hfill Page}}
+\newtoks\*figt \*figt={\bqb\tenpt\bd\hp Figure \figurenumber. \rm\figuretitle \bqe}
+\newtoks\*tabt \*tabt={\vs{\bl}\cl{\twelvept\bd Table \tablenumber}%
+ \cl{\twelvept\tabletitle}\vs{\bl}}
+\newtoks\*partt \*partt={\dumpinsertseject\titlepage
+ \hrule height 0pt depth 0pt\vfil
+ \cl{\twelvept\bd Part \partnumber}
+ \cl{\twelvept\bd\parttitle}
+ \vs{.5\tp*sk}
+ \np
+ \scn{0}\ssan{0}\ssbn{0}\sscn{0}\ssdn{0}
+ \sfn{0}\stn{0}\sfnn{0}\senn{0}
+ }%
+\newtoks\*chapt \*chapt={\dumpinsertseject
+ \cl{\twelvept\bd Chapter \chapternumber}%
+ \cl{\twelvept\bd\chaptertitle}
+ \vs{1\bl}
+ \ssan{0}\ssbn{0}\sscn{0}\ssdn{0}
+ }
+\newtoks\*appt \*appt={\dumpinsertseject %
+ \cl{\twelvept\bd Appendix \appendixnumber}
+ \cl{\twelvept\bd\appendixtitle}
+ \vs{1\bl}
+ \scn{0}\ssan{0}\ssbn{0}\sscn{0}
+ \ssdn{0}\sfn{0}\stn{0}
+ }
+\newtoks\*pret \*pret={\dumpinsertseject %
+ \cl{\twelvept\bd\prefacetitle}
+ \vs{1\bl}
+ \ssan{0}\ssbn{0}\sscn{0}\ssdn{0}
+ }%
+\newtoks\*subat \*subat={\removelastskip\goodbreak
+ \vs{2\bl}
+ \nin\twelvept\bd\subheadatitle\par\nobreak
+ \vs{1\bl}\nobreak
+ \ssbn{0}\sscn{0}\ssdn{0}
+ }
+\newtoks\*subbt \*subbt={\removelastskip\goodbreak
+ \vs{2\bl}
+ \nin\twelvept\it\subheadbtitle\par\nobreak
+ \vs{1\bl}\nobreak
+ \sscn{0}\ssdn{0}
+ }
+\newtoks\*subct \*subct={\removelastskip\goodbreak
+ \vs{2\bl}
+ \nin\twelvept\subheadctitle\par\nobreak
+ \vs{1\bl}\nobreak
+ \ssdn{0}
+ }
+\newtoks\*subdt \*subdt={\goodbreak\twelvept\it\subheaddtitle.}
+%
+\newif\if*cont*chap \*cont*chapfalse
+\newif\if*TC*fig \*TC*figtrue
+\newif\if*TC*tab \*TC*tabtrue
+\newif\if*TC*prt \*TC*prttrue
+\newif\if*TC*chp \*TC*chptrue
+\newif\if*TC*app \*TC*apptrue
+\newif\if*TC*pre \*TC*pretrue
+\newif\if*TC*sha \*TC*shatrue
+\newif\if*TC*shb \*TC*shbtrue
+\newif\if*TC*shc \*TC*shcfalse
+\newif\if*TC*shd \*TC*shdfalse
+\newif\if*TCaopen \*TCaopenfalse
+\newif\if*TCbopen \*TCbopenfalse
+\newif\if*TCcopen \*TCcopenfalse
+%
+\newdimen\*ch*hi \*ch*hi=.25in
+\newdimen\*ap*hi \*ap*hi=.25in
+\newdimen\fi*hi \fi*hi=.25in
+\newdimen\ta*hi \ta*hi=.25in
+%
+\newcount\fi*n \fi*n=0
+\newcount\ta*n \ta*n=0
+\newcount\*pt*num \*pt*num=0
+\newcount\*pt*st \*pt*st=1
+\newcount\*ch*num \*ch*num=0
+\newcount\*ch*st \*ch*st=1
+\newcount\*ap*num \*ap*num=0
+\newcount\*ap*st \*ap*st=2
+\newcount\*sa*num \*sa*num=0
+\newcount\sa*st \sa*st=1
+\newcount\*sb*num \*sb*num=0
+\newcount\sb*st \sb*st=1
+\newcount\*sc*num \*sc*num=0
+\newcount\sc*st \sc*st=1
+\newcount\*sd*num \*sd*num=0
+\newcount\sd*st \sd*st=1
+%
+\newwrite\TC*fa
+\newwrite\TC*fb
+\newwrite\TC*fc
+% putincontents last modified 12/6/91
+\def\notintoc#1{#1}
+\newtoks\*toclbla
+\newtoks\*toclblb
+\newtoks\*toclblc
+\if*PC
+ \*toclbla={text1xx.tc1}
+ \*toclblb={text1xx.tc2}
+ \*toclblc={text1xx.tc3}
+\else
+ \*toclbla={text1xx.toc1}
+ \*toclblb={text1xx.toc2}
+ \*toclblc={text1xx.toc3}
+\fi
+
+\long\def\putincontents#1#2{\begingroup\ifcase #1 % Putincontents markup
+ \message{<TEXT1> Warning, request for Contents entry other than
+ 1, 2, or 3. Contents 1 will be assumed.}
+ \putincontents1{#2}
+ \or \if*TCaopen % Do nothing if open, else open it
+ \else \immediate\openout\TC*fa=\the\*toclbla
+ \immediate\write\TC*fa{\the\*TCt}%
+ \global\*TCaopentrue
+ \fi
+ \*defnoexpands
+ \edef\T{\leftskip=0pt #2}%
+ \edef\next{\write\TC*fa{\T\par}}%
+ \next\relax
+ \or \if*TCbopen % Do nothing if open, else open it
+ \else \immediate\openout\TC*fb=\the\*toclblb
+ \immediate\write\TC*fb{\the\*ftt}%
+ \global\*TCbopentrue\fi
+ \*defnoexpands
+ \edef\T{#2}%
+ \edef\next{\write\TC*fb{\T\par}}%
+ \next\relax
+ \or \if*TCcopen % Do nothing if open, else open it
+ \else \immediate\openout\TC*fc=\the\*toclblc
+ \immediate\write\TC*fc{\the\*ttt}%
+ \global\*TCcopentrue\fi
+ \*defnoexpands
+ \edef\T{#2}%
+ \edef\next{\write\TC*fc{\T\par}}%
+ \next\relax
+ \else \message{<TEXT1> Warning, request for Contents entry other than
+ 1, 2, or 3. Contents 1 will be assumed.}
+ \putincontents1{#2}
+ \fi\endgroup}% End putincontents markup
+\let\pic=\putincontents
+
+\def\*defnoexpands{%
+ \def\AA{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\AA}%
+ \def\aa{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\aa}%
+ \def\appendixnumber{\noexpand\noexpand\noexpand\san{\the\*ap*num}%
+ \noexpand\noexpand\noexpand\appendixnumber}%
+ \def\autoendnote##1{}%
+ \let\aen=\autoendnote%
+ \def\autofootnote##1{}%
+ \let\afn=\autofootnote%
+ \def\bullet{\noexpand\noexpand\noexpand\bullet}%
+ \let\bul=\bullet%
+ \def\centerline##1{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\centerline{##1}}%
+ \let\cl=\centerline%
+ \def\chapternumber{\noexpand\noexpand\noexpand\scn{\the\*ch*num}%
+ \noexpand\noexpand\noexpand\chapternumber}%
+ \def\dag{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\dag}%
+ \def\ddag{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\ddag}%
+ \def\eightteenpt{\noexpand\noexpand\noexpand\eightteenpt}%
+ \def\fourteenpt{\noexpand\noexpand\noexpand\fourteenpt}%
+ \def\hangingappendixnumber{\noexpand\noexpand\noexpand%
+ \hangingappendixnumber{\the\*ap*num}}%
+ \def\hangingchapternumber{\noexpand\noexpand\noexpand%
+ \hangingchapternumber{\the\*ch*num}}%
+ \def\hangingindent##1{\noexpand\noexpand\noexpand%
+ \hangingindent{##1}}%
+ \let\hin=\hangingparagraph%
+ \def\hangingnumber##1{\noexpand\noexpand\noexpand\HFN{##1}}%
+ \def\hangingparagraph{\noexpand\noexpand\noexpand\hangingparagraph}%
+ \let\hp=\hangingparagraph%
+ \def\justify{\noexpand\noexpand\noexpand\noexpand\noexpand\justify}%
+ \let\ju=\justify%
+ \def\leavevmode{\noexpand\noexpand\noexpand\leavevmode}%
+ \def\leftindent##1{\leftskip=##1}%
+ \let\lin=\leftindent%
+ \let\linebreak=\space%
+ \let\lbr=\space%
+ \def\neg{\noexpand\noexpand\noexpand\noexpand\noexpand\neg}%
+ \def\notintoc##1{}%
+ \def\pagenumber{\noexpand\pagenumber}%
+ \def\pn{\noexpand\pagenumber}%
+ \def\par{\endgraf}%
+ \def\paragraph{\endgraf}%
+ \def\partnumber{\noexpand\noexpand\noexpand\sptn{\the\*pt*num}%
+ \noexpand\noexpand\noexpand\partnumber}%
+ \def\subheadanumber{\noexpand\noexpand\noexpand\ssan{\the\*sa*num}%
+ \noexpand\noexpand\noexpand\subheadanumber}%
+ \def\subheadbnumber{\noexpand\noexpand\noexpand\ssbn{\the\*sb*num}%
+ \noexpand\noexpand\noexpand\subheadbnumber}%
+ \def\subheadcnumber{\noexpand\noexpand\noexpand\sscn{\the\*sc*num}%
+ \noexpand\noexpand\noexpand\subheadcnumber}%
+ \def\subheaddnumber{\noexpand\noexpand\noexpand\ssdn{\the\*sd*num}%
+ \noexpand\noexpand\noexpand\subheaddnumber}%
+ \def\tenpt{\noexpand\noexpand\noexpand\tenpt}%
+ \def\tilde{\noexpand\noexpand\noexpand\noexpand\noexpand\tilde}%
+ \def\toclinebreak{\noexpand\noexpand\noexpand\toclinebreak}%
+ \def\toclbr{\noexpand\noexpand\noexpand\toclinebreak}%
+ \def\twelvept{\noexpand\noexpand\noexpand\twelvept}%
+ \def\underscore##1{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\underscore{##1}}%
+ \let\us=\underscore%
+ \def\\{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\\}%
+ \def\{{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\{}%
+ \def\}{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\}}%
+ \def\_{\noexpand\noexpand\noexpand\noexpand\noexpand%
+ \noexpand\noexpand\_}%
+}
+%
+\def\tableofcontentsformat#1{{%
+ \def\continuechapter##1{\global\*cont*chapfalse
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U \global\*cont*chaptrue
+ \else \ifx \T\V % Not continue chapter
+ \else \message{<TEXT1> Warning, argument to
+ continuechapter is not "yes" or "no".
+ "no" will be assumed}
+ \fi\fi}%
+ \def\toctitle##1{\global\*TCt={##1}}%
+ \def\parttocformat##1{\global\*ptf={##1}}%
+ \def\chaptertocformat##1{\global\*ctf={##1}}%
+ \def\hangingchapterindent##1{\global\*ch*hi=##1}%
+ \def\appendixtocformat##1{\global\*atf={##1}}%
+ \def\hangingappendixindent##1{\global\*ap*hi=##1}%
+ \def\prefacetocformat##1{\global\*prtf={##1}}%
+ \def\subheadatocformat##1{\global\*satf={##1}}%
+ \def\subheadbtocformat##1{\global\*sbtf={##1}}%
+ \def\subheadctocformat##1{\global\*sctf={##1}}%
+ \def\subheaddtocformat##1{\global\*sdtf={##1}}%
+ \def\bibliographytocformat##1{\global\*btf={##1}}%
+ \def\figuretoctitle##1{\global\*ftt={##1}}%
+ \def\figuretocformat##1{\global\*ftf={##1}}%
+ \def\hangingfigureindent##1{\global\fi*hi=##1}%
+ \def\tabletoctitle##1{\global\*ttt={##1}}%
+ \def\tabletocformat##1{\global\*ttf={##1}}%
+ \def\hangingtableindent##1{\global\ta*hi=##1}%
+ #1}}
+\let\tocf=\tableofcontentsformat
+% tableofcontents last modified on 12/6/91
+\def\tableofcontents#1{%
+ \edef\T{}\edef\U{#1}\ifx\T\U\E=-3\else\E=#1\fi
+ \dumpinsertseject
+ \setpagenumber{\E}
+ \immediate\closeout\TC*fa
+ \begingroup
+ \def\noexpand{}
+ \def\centerline##1{\par % Begin centerline markup
+ \bgroup
+ \parindent=0pt \relax % zero indent
+ \parfillskip=0pt plus1fil \relax
+ \everypar{\null\hskip0pt plus1fil\relax} % add infinite glue
+ \def\linebreak{\hskip0pt plus1fil\relax\break
+ \null\hskip0pt plus1fil\relax}%
+ \let\toclinebreak=\linebreak % linebreak is a space in text1xx.
+ \let\toclbr=\linebreak % toc1, toclbr available in toc
+ \justify
+ \setbox\A=\vbox{##1\par % figure skip for multiple centerline
+ \global\C=\baselineskip
+ \setbox0=\hbox{(}
+ \global\advance\C by-\ht0}% end vbox
+ \line{\hss\vbox{\vskip\C##1\par}\hss} %
+ \egroup
+ }% End centerline markup
+ \let\cl=\centerline
+ \justify
+ \parfillskip=0pt
+ \rightskip=0pt plus 5em
+ \input \the\*toclbla
+ \endgraf
+ \leftskip=0pt
+ \if*TCbopen % True only if figures were used.
+ \immediate\closeout\TC*fb
+ \input \the\*toclblb
+ \fi
+ \if*TCcopen % True only if tables were used.
+ \immediate\closeout\TC*fc
+ \input \the\*toclblc
+ \fi
+ \endgroup}
+\let\toc=\tableofcontents
+%
+\message{part, }
+%
+\long\def\partformat#1{{%
+ \def\numberingstyle##1{\global\*pt*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\*pt*st=2
+ \else \ifx \T\W \global\*pt*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the partformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*partt={##1}}%
+ \def\incontents##1{\global\*TC*prttrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*prtfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in partformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\paf=\partformat
+%
+\def\parttitle{}
+\def\part#1{\par % Part revised 11/5/86
+ \global\def\parttitle{#1}%
+ \global\advance \*pt*num by 1
+ \bgroup
+ \let\toclinebreak=\space % prevent linebreak in title
+ \let\toclbr=\space % break in contents only
+ \the\*partt % This prints the title in the text
+ \egroup
+ \par
+ \D=\lastskip
+ \removelastskip
+ \if*TC*prt \putincontents1{\the\*ptf}\fi
+ \ignorespaces
+ \vs{\D}
+}% END
+%
+\def\partnumber{{\ifcase \*pt*st
+ \or \the\*pt*num
+ \or \l*alphafalse
+ \a*c{\*pt*num}
+ \or \uppercase\expandafter{\romannumeral\the\*pt*num}
+ \fi}}
+%
+\def\setpartnumber#1{\global\*pt*num=#1}%
+% \spn is setpagenumber
+\let\sptn=\setpartnumber
+%
+\message{chapter, }
+%
+\long\def\chapterformat#1{{%
+ \def\numberingstyle##1{\global\*ch*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\*ch*st=2
+ \else \ifx \T\W \global\*ch*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the chapterformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*chapt={##1}}%
+ \def\incontents##1{\global\*TC*chptrue%
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*chpfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in chapterformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\chf=\chapterformat
+%
+\def\chaptertitle{}
+\def\chapter#1{\par
+ \global\def\chaptertitle{#1}%
+ \global\advance \*ch*num by 1
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*chapt % prints the title in the text
+ \egroup
+ \D=\lastskip
+ \removelastskip
+ \if*TC*chp \putincontents1{\the\*ctf}\fi
+ \ignorespaces
+ \vs{\D}
+}% END chapter markup definition
+%
+\def\chapternumber{{\ifcase \*ch*st
+ \or \the\*ch*num
+ \or \l*alphafalse
+ \a*c{\*ch*num}
+ \or \uppercase\expandafter{\romannumeral\the\*ch*num}
+ \fi
+ \removelastskip}}
+\let\chap=\chapter
+%
+\def\hangingchapternumber#1{\*ch*num=#1\laf{\labelwidth{\*ch*hi}}
+ \label{\hskip\*ch*hi\llap{\chapternumber.}}}
+%
+\def\setchapternumber#1{\global\*ch*num=#1}%
+\let\scn=\setchapternumber
+%
+\message{appendix,}
+%
+\long\def\appendixformat#1{{%
+ \def\numberingstyle##1{\global\*ap*st=2
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U \global\*ap*st=1
+ \else \ifx \T\V \global\*ap*st=2
+ \else \ifx \T\W \global\*ap*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the appendixformat command is
+ invalid. Style 2 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*appt={##1}}%
+ \def\incontents##1{\global\*TC*apptrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*appfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in appendixformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\apf=\appendixformat
+%
+\def\appendixtitle{}
+\def\appendix#1{% Appendix revised 11/3/86 (added toclinebreak)
+ \global\def\appendixtitle{#1}%
+ \global\advance \*ap*num by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*appt % prints the appendix title
+ \egroup
+ \D=\lastskip
+ \removelastskip
+ \if*TC*app \putincontents1{\the\*atf}\fi
+ \ignorespaces
+ \vs{\D}
+}% END appendix markup definition
+%
+\def\appendixnumber{{\ifcase \*ap*st
+ \or \the\*ap*num
+ \or \l*alphafalse
+ \a*c{\*ap*num}
+ \or \uppercase\expandafter{\romannumeral\the\*ap*num}
+ \fi
+ \removelastskip}}
+\let\app=\appendix
+%
+\def\hangingappendixnumber#1{\*ap*num=#1\laf{\labelwidth{\*ap*hi}}
+ \label{\hskip\*ap*hi\llap{\appendixnumber.}}}
+%
+\def\setappendixnumber#1{\global\*ap*num=#1}%
+\let\san=\setappendixnumber
+%
+\message{preface,}
+%
+\long\def\prefaceformat#1{{%
+ \long\def\titleformat##1{\global\*pret={##1}}%
+ \def\incontents##1{\global\*TC*pretrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*prefalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in prefaceformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\prf=\prefaceformat
+%
+\def\prefacetitle{}
+\def\preface#1{% Preface revised 11/3/86 (added toclinebreak)
+ \global\def\prefacetitle{#1}%
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*pret % prints the title in the text
+ \egroup
+ \D=\lastskip
+ \removelastskip
+ \if*TC*pre \putincontents1{\the\*prtf}\fi
+ \ignorespaces
+ \vs{\D}
+}% END preface markup definition
+\let\pre=\preface
+%
+\message{subheads,}
+%
+\long\def\subheadaformat#1{{%
+ \def\numberingstyle##1{\global\sa*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\sa*st=2
+ \else \ifx \T\W \global\sa*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the subheadaformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*subat={##1}}%
+ \def\incontents##1{\global\*TC*shatrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*shafalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in subheadaformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\shaf=\subheadaformat
+%
+\def\subheadatitle{}
+\def\subheada#1{%
+ \global\def\subheadatitle{#1}%
+ \global\advance \*sa*num by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*subat % prints the title in the text
+ \egroup
+ \ifvmode \D=\lastskip \removelastskip
+ \else \D=0pt\fi
+ \if*TC*sha \putincontents1{\the\*satf}\fi
+ \ifdim\D>0pt\vs{\D}\else\ignorespaces\fi%
+}% END subheada markup definition
+%
+\def\subheadanumber{{\ifcase \sa*st
+ \or \the\*sa*num
+ \or \l*alphafalse
+ \a*c{\*sa*num}
+ \or \uppercase\expandafter{\romannumeral\the\*sa*num}
+ \fi
+ \removelastskip}}
+\let\sha=\subheada
+%
+\def\setsubheadanumber#1{\global\*sa*num=#1}%
+\let\ssan=\setsubheadanumber
+%
+\long\def\subheadbformat#1{{%
+ \def\numberingstyle##1{\global\sb*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\sb*st=2
+ \else \ifx \T\W \global\sb*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the subheadbformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*subbt={##1}}%
+ \def\incontents##1{\global\*TC*shbtrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*shbfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in subheadbformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\shbf=\subheadbformat
+%
+\def\subheadbtitle{}
+\def\subheadb#1{%
+ \global\def\subheadbtitle{#1}%
+ \global\advance \*sb*num by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*subbt % This prints the title in the text
+ \egroup
+ \ifvmode \D=\lastskip \removelastskip
+ \else \D=0pt\fi
+ \if*TC*shb \putincontents1{\the\*sbtf}\fi
+ \ignorespaces
+ \ifdim\D>0pt\vs{\D}\else\ignorespaces\fi
+}% END subheadb markup definition
+%
+\def\subheadbnumber{{\ifcase \sb*st
+ \or \the\*sb*num
+ \or \l*alphafalse
+ \a*c{\*sb*num}
+ \or \uppercase\expandafter{\romannumeral\the\*sb*num}
+ \fi
+ \removelastskip}}
+\let\shb=\subheadb
+%
+\def\setsubheadbnumber#1{\global\*sb*num=#1}%
+\let\ssbn=\setsubheadbnumber
+%
+\long\def\subheadcformat#1{{%
+ \def\numberingstyle##1{\global\sc*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\sc*st=2
+ \else \ifx \T\W \global\sc*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the subheadcformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*subct={##1}}
+ \def\incontents##1{\global\*TC*shcfalse
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U \global\*TC*shctrue
+ \else \ifx \T\V \global\*TC*shcfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in subheadcformat is not "yes" or "no".
+ "no" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\shcf=\subheadcformat
+%
+\def\subheadctitle{}
+\def\subheadc#1{%
+ \global\def\subheadctitle{#1}%
+ \global\advance \*sc*num by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*subct % prints the title in the text
+ \egroup
+ \ifvmode \D=\lastskip \removelastskip
+ \else \D=0pt\fi
+ \if*TC*shc \putincontents1{\the\*sctf}\fi
+ \ignorespaces
+ \ifdim\D>0pt\vs{\D}\else\ignorespaces\fi
+}% END subheadc markup
+%
+\def\subheadcnumber{{\ifcase \sc*st
+ \or \the\*sc*num
+ \or \l*alphafalse
+ \a*c{\*sc*num}
+ \or \uppercase\expandafter{\romannumeral\the\*sc*num}
+ \fi
+ \removelastskip}}
+\let\shc=\subheadc
+%
+\def\setsubheadcnumber#1{\global\*sc*num=#1}%
+\let\sscn=\setsubheadcnumber
+%
+\long\def\subheaddformat#1{{%
+ \def\numberingstyle##1{\global\sd*st=1
+ \edef\T{##1}%
+ \edef\U{1}%
+ \edef\V{A}%
+ \edef\W{I}%
+ \ifx \T\U % then style=1, the default
+ \else \ifx \T\V \global\sd*st=2
+ \else \ifx \T\W \global\sd*st=3
+ \else \message{<TEXT1> Warning, numbering style
+ in the subheaddformat command is
+ invalid. Style 1 will be assumed.}
+ \fi\fi\fi}%
+ \long\def\titleformat##1{\global\*subdt={##1}}%
+ \def\incontents##1{\global\*TC*shdfalse
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U \global\*TC*shdtrue
+ \else \ifx \T\V \global\*TC*shdfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in subheaddformat is not "yes" or "no".
+ "no" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\shdf=\subheaddformat
+%
+\def\subheaddtitle{}
+\def\subheadd#1{%
+ \global\def\subheaddtitle{#1}%
+ \global\advance \*sd*num by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*subdt % This prints the title in the text
+ \egroup
+ \ifvmode \D=\lastskip \removelastskip
+ \else \D=0pt\fi
+ \if*TC*shd \putincontents1{\the\*sdtf}\fi
+ \ignorespaces
+ \ifdim\D>0pt\vs{\D}\else\ignorespaces\fi
+}% END subheadd markup definition
+%
+\def\subheaddnumber{{\ifcase \sd*st
+ \or \the\*sd*num
+ \or \l*alphafalse
+ \a*c{\*sd*num}
+ \or \uppercase\expandafter{\romannumeral\the\*sd*num}
+ \fi
+ \removelastskip}}
+\let\shd=\subheadd
+%
+\def\setsubheaddnumber#1{\global\*sd*num=#1}%
+\let\ssdn=\setsubheaddnumber
+%
+\message{figures,}
+%
+% FIGURE MARKUP, bth 8/25/86
+% Figure altered to allow alignments and other text markups within the
+% arguments of figure and allow the immediate print feature (nofloat).
+% Footnoting and multiple columns allowed in nofloat format only.
+% Floating figures use top insert which uses a vbox that cancels any
+% footnoting or multiple column setting. When \fullpage or \halfpage
+% are used they must be the only argument in position one.
+%
+%
+% Figureformat revised on 4/5/88, drg
+%
+\catcode`* = 11
+\catcode`@ = 11
+\newif\if*fp \*fpfalse % fullpage, used in figure
+\newif\if*hp \*hpfalse % halfpage, " "
+\newcount\fi*pos \fi*pos=1 % 1=\float,2=\nofloat,3=\midfloat,4=\keep
+\newtoks\fi*sb \fi*sb={1\bl}
+\newtoks\fi*sa \fi*sa={1\bl}
+\def\figureformat#1{{%
+ \def\skipbefore##1{\global\fi*sb={##1}}%
+ \def\position{% printing position of figure, floating or nonfloating
+ \def\nofloat{\global\fi*pos=2} % prints immediate
+ \def\keep{\global\fi*pos=4} % prints immediate, but on same pg
+ \def\midfloat{\global\fi*pos=3}% uses midinsert
+ \def\float{\global\fi*pos=1}} % uses topinsert, the default
+ \long\def\titleformat##1{\global\*figt={##1}}%
+ \def\incontents##1{\global\*TC*figtrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*figfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in figureformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ \def\skipafter##1{\global\fi*sa={##1}}%
+ #1}}% End figure format markup
+\let\fif=\figureformat
+%
+\newif\if*tpreset % titlepage reset for figure markup
+\*tpresetfalse % no reset necessary
+%
+% Figure revised on 10/4/89, drg
+%
+\def\figuretitle{}
+\def\figure{\futurelet\next\*fga}
+\def\*fga{\ifcat\bgroup\noexpand\next \let\next\*fgb
+ \else\let\next\*fgc\fi \next}
+\def\*fgb{\global\setbox\A=\vbox\bgroup\aftergroup\*fgd\let\next}
+\def\*fgc#1{\*fge{#1}}
+\def\*fgd{\*fge{\box\A}}
+\long\def\*fge#1#2{\par % Begin figure markup definition
+ \gdef\figuretitle{#2}%
+ \global\advance \fi*n by 1 % figure number
+ \begingroup % trap null setting for lets
+ \let\fullpage=\null % make fullpage non-printable
+ \let\halfpage=\null % make halfpage non-printable
+ \let\toclinebreak=\space % prevent break in title
+ \let\toclbr=\space % prevent break in title
+% for value of \fi*pos: 1=\float,2=\nofloat,3=\midfloat,4=\keep
+ \ifcase\fi*pos
+ \or % BEGIN TOPINSERT FIGURES
+ \if*fp % full page topinsert figure
+ \if*title\*tpresettrue\notitlepage\fi % account for titlepage
+ \topinsert % floating figures are topinserts
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vbox to\vsize{\vrule width0pt\relax
+ \vfil#1\the\*figt}
+ \endinsert
+ \if*tpreset\titlepage\*tpresetfalse\fi % reset titlepage
+ \else\if*hp % half page topinsert figure
+ \topinsert
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vbox to.5\vsize{\vrule width0pt \relax
+ \vskip\the\fi*sb\relax
+ \vfil#1\the\*figt
+ \vskip\the\fi*sa\relax}
+ \endinsert
+ \else % variable size floating figure
+ \topinsert
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vskip\the\fi*sb\relax
+ #1\the\*figt
+ \vskip\the\fi*sa\relax
+ \endinsert
+ \fi\fi % end float full and half page check
+ \or % BEGIN IMMEDIATE FIGURES
+ \if*fp % FULL PAGE IMMEDIATE FIGURE
+ \np % figure won't fit on current page
+ \if*TC*fig \putincontents2{\the\*ftf}\fi % send to contents
+ \vrule width0pt \relax % prevent fil from going away
+ \vfill\the\*figt % fill to figure title
+ \break % insures break at end of insert
+ \else
+ \if*hp % HALF PAGE IMMEDIATE FIGURE
+ \dimen\D=.5\vsize % depth check for half page figure
+ \advance\dimen\D by\topskip % add topskip to .5 vsize
+ \ifdim\pagetotal>\dimen\D\np\fi % won't fit on current page
+ \vbox to.49\vsize{\vrule width0pt % keep skip
+ \vfil\relax % skip all but title height to
+ #1\the\*figt % print figure title
+ \vskip\the\fi*sa\relax} % print half page figure title
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \else % VARIABLE SIZE IMMEDIATE FIGURE
+ \vrule width0pt \relax % prevent skip from going away
+ \vskip\the\fi*sb\relax
+ #1\the\*figt
+ \vskip\the\fi*sa\relax
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \fi% End of check at half page
+ \fi % End of check at full page
+ \or % BEGIN MIDINSERT FIGURES
+ \if*fp % full page midinsert figure
+ \if*title\*tpresettrue\notitlepage\fi % account for titlepage
+ \topinsert % use topinsert for full page only
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vbox to\vsize{\vrule width0pt\relax
+ \vfil#1\the\*figt}
+ \endinsert
+ \if*tpreset\titlepage\*tpresetfalse\fi % reset titlepage
+ \else\if*hp % half page midinsert figure
+ \midinsert
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vbox to.5\vsize{\vrule width0pt \relax
+ \vskip\the\fi*sb\relax
+ \vfil#1\the\*figt
+ \vskip\the\fi*sa\relax}
+ \endinsert
+ \else % variable size floating figure
+ \midinsert
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \vskip\the\fi*sb\relax
+ #1\the\*figt
+ \vskip\the\fi*sa\relax
+ \endinsert
+ \fi\fi % end float full and half page check
+ \or % BEGIN IMMEDIATE KEEP FIGURES
+ \if*fp % FULL PAGE IMMEDIATE FIGURE
+ \np % figure won't fit on current page
+ \if*TC*fig \putincontents2{\the\*ftf}\fi % send to contents
+ \vrule width0pt \relax % prevent fil from going away
+ \vfill\the\*figt % fill to figure title
+ \break % insures break at end of insert
+ \else
+ \if*hp % HALF PAGE IMMEDIATE FIGURE
+ \dimen\D=.5\vsize % depth check for half page figure
+ \advance\dimen\D by\topskip % add topskip to .5 vsize
+ \ifdim\pagetotal>\dimen\D\np\fi % won't fit on current page
+ \vbox to.49\vsize{\vrule width0pt % keep skip
+ \vfil\relax % skip all but title height to
+ #1\the\*figt % print figure title
+ \vskip\the\fi*sa\relax} % print half page figure title
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \else % VARIABLE SIZE IMMEDIATE FIGURE
+ \vrule width0pt \relax % prevent skip from going away
+ \vskip\the\fi*sb\relax
+ \vbox{#1\the\*figt
+ \vskip\the\fi*sa\relax}
+ \if*TC*fig \putincontents2{\the\*ftf}\fi
+ \fi% End of check at half page
+ \fi % End of check at full page
+ \fi % End of case statement
+ \endgroup % end trap for null settings
+ \global\*fpfalse % reset full page
+ \global\*hpfalse % reset half page
+}% End figure markup
+\let\fig=\figure % abbreviation for figure markup
+%
+\def\fullpage{\global\*fptrue}% used in figure markup
+\def\halfpage{\global\*hptrue}% used in figure markup
+%
+\def\figurenumber{\the\fi*n}%
+%
+\def\HFN#1{\laf{\labelwidth{\fi*hi}}\label{#1}}%
+%
+\def\setfigurenumber#1{\global\fi*n=#1}%
+\let\sfn=\setfigurenumber
+%
+% Redefined from PLAIN TEX
+%
+\def\topinsert{\@midfalse\p@gefalse\t*ptrue\@ins}
+%
+\def\midinsert{% redefine from plain tex
+ \@midtrue
+ \if*fix % don't change meaning in fixed mode
+ \else % change midinsert to topinsert in flex mode
+ \if*dbl\global\@midfalse\fi % leave old meaning in single column mode
+ \if*tpl\global\@midfalse\fi %
+ \fi\@ins} %
+%
+\def\@ins{\par\begingroup
+ \if*fix % do nothing in fixed mode
+ \else\ift*p\hsize=\*txtw\fi\fi % ift*p hsize of insert set
+ \setbox0=\vbox\bgroup} % insert set to full page width
+%
+% Tables
+%
+\def\tableformat#1{{%
+ \long\def\titleformat##1{\global\*tabt={##1}}%
+ \def\incontents##1{\global\*TC*tabtrue
+ \edef\T{##1}%
+ \edef\U{yes}%
+ \edef\V{no}%
+ \ifx \T\U % Already true
+ \else \ifx \T\V \global\*TC*tabfalse
+ \else \message{<TEXT1> Warning, argument to
+ incontents in tableformat is not "yes" or "no".
+ "yes" will be assumed.}
+ \fi\fi}%
+ #1}}
+\let\taf=\tableformat
+%
+\def\tabletitle#1{{% Tabletitle revised 11/3/86 (added toclinebreak)
+ \def\tabletitle{#1}%
+ \global\advance \ta*n by 1
+ \par
+ \bgroup
+ \let\toclinebreak=\space
+ \let\toclbr=\space
+ \the\*tabt % prints the title in the text
+ \egroup
+ \par
+ \D=\lastskip
+ \removelastskip
+ \if*TC*tab \putincontents3{\the\*ttf}\fi
+ \ignorespaces
+ \vs{\D}
+}}% END tabletitle markup definition
+\let\tat=\tabletitle
+%
+\def\tablenumber{\the\ta*n}
+\def\HTN#1{\laf{\labelwidth{\ta*hi}}\label{#1}}
+%
+\def\settablenumber#1{\global\ta*n=#1}%
+\let\stn=\settablenumber
+%
+\message{8600 macros,}
+%
+% Macros specific for the 8600 (JKW) revision 11/25/86
+%
+\newskip\evenmar
+\newskip\oddmar
+\evenmar=0pt
+\oddmar=0pt
+\def\evenpagemargin#1{{\setbox0=\hbox{\global\evenmar=#1 pt}}
+ \special{even_page_margin=\the\evenmar}}%
+\let\epm=\evenpagemargin
+\def\oddpagemargin#1{{\setbox0=\hbox{\global\oddmar=#1 pt}}
+ \special{odd_page_margin=\the\oddmar}}%
+\let\opm=\oddpagemargin
+\def\linenumberfont#1{\B={#1}
+ \special{line_number_font=\the\B}}%
+\let\lnf=\linenumberfont
+\def\poplevel#1{\B={#1}
+ \special{pop_level=\the\B}}%
+\let\ppl=\poplevel
+\def\lineinterval#1{\B={#1}
+ \special{line_interval=\the\B}}%
+\let\lint=\lineinterval
+\def\numberinglines#1{\special{numbering_lines=#1}}%
+\let\numl=\numberinglines
+\def\countinglines#1{\special{counting_lines=#1}}%
+\let\coul=\countinglines
+\def\printingnumbers#1{\special{printing_numbers=#1}}%
+\let\prin=\printingnumbers
+\def\linefootnotereference{\special{line_footnote_reference}}%
+\let\lfnr=\linefootnotereference
+%
+\message{ more misc,}
+%
+% To be able to use PLAIN.TEX math code
+%
+\def\plaintexmathon{%
+ \catcode`\$=3\relax
+ \catcode`@=12\relax}
+\let\dollarmathon=\plaintexmathon
+\def\atmathon{%
+ \catcode`\$=12\relax
+ \catcode`@=3\par}
+%
+\message{multiple columns,}
+%
+\outer\def\bye{\par\onecolumn\vfill\supereject\end} % redefined from PLAIN.TEX
+% to close multiple column routines
+%
+% MULTIPLE COLUMNS
+% Brian Harvey 1/20/85
+%
+% Macros to be imbedded into TEXT1 to drive the multiple column
+% routines FLEXCOL and FIXCOL.
+%
+\newbox\*lftcol % left column box, fixed column mode, TeXbook name
+\newbox\*midcol % center column, fixed column mode, TeXbook name
+\newbox\*ppage % page accummulated before multicolumn, partialpage, flex
+\newcount\*pcount % counter for empty page macro, keeps track of the
+\*pcount=0 % number of empty page calls
+\newdimen\*bigch % Twc=2vise, Thc=3vsize---bigcolumnheight
+\newdimen\*txtw % textwidth, stores full hsize for multicolumn mode
+\let\galleywidth=\*txtw % create galleywidth = text width
+\newdimen\*txth % textheight, stores page height for multicolumn mode
+\*txtw=\hsize % initialize full page text width for multicolumn mode
+\*txth=\vsize % initialize full text height for multicolumn mode
+\newif\ift*p % ift*p required to check for midinsert in flex mode
+\newif\if*dbl % double column indicator
+\*dblfalse % set double column format indicator false
+\newif\if*tpl % triple column indicator
+\*tplfalse % set triple column format indicator false
+\newif\if*fix % format indicator (fixed if true, otherwise flexible)
+\newif\if*norule % used to suppress rules in output routines
+\newif\if*plain % check for plain.tex, plainoutput
+\*plaintrue % set plain format indicator true
+\newtoks\*twcw % width for twocolumns
+\newtoks\*thcw % width for threecolumns
+\newtoks\*twcgut % gutter for twocolumns
+\newtoks\*thcgut % gutter for threecolumns
+\newtoks\*clrw % rule width between multiple columns
+\newtoks\*mskb % skip before multicolumn format
+\newtoks\*mska % skip after multicolumn format
+\*twcw={.48\*txtw} % initialize column and gutter default widths
+\*thcw={.31\*txtw}
+\*twcgut={.04\*txtw}
+\*thcgut={.035\*txtw}
+\*clrw={0.0pt} % initialize between column rule width
+\*mskb={6pt plus 3pt minus 2pt} % initialize skips before and after multiple columns:
+\*mska={6pt plus 3pt minus 2pt} % used in multiple column flex mode only
+
+\def\fixedformat{\global\*fixtrue} % calls fixed format file
+\let\fixf=\fixedformat
+\global\*fixfalse % sets up flex format
+%
+\def\multicolumnformat#1{% format macro for both fixed and flexible, texblock is multicol
+ \def\twocolumnwidth##1{\global\*twcw={##1}}%
+ \def\threecolumnwidth##1{\global\*thcw={##1}}%
+ \def\twocolumngutter##1{\global\*twcgut={##1}}%
+ \def\threecolumngutter##1{\global\*thcgut={##1}}%
+ \def\columnrulewidth##1{\global\*clrw={##1}}%
+ \def\skipbefore##1{\global\*mskb={##1}}% flex mode only
+ \def\skipafter##1{\global\*mska={##1}}% flex mode only
+ #1\*txtwck}% END, multicol format
+\let\mcf=\multicolumnformat
+%
+% COLUMN WIDTH CHECK FOR MULTIPLE COLUMN ROUTINES
+%
+\def\*txtwck{% check column width and gutters against hsize
+ \dimen@=\the\*twcw
+ \dimen@=2\dimen@
+ \dimen1=\the\*twcgut
+ \advance\dimen@ by\dimen1
+ \ifdim\dimen@ > \*txtw % if greater than current pagewidth
+ \dimen1=\dimen@
+ \advance\dimen1 by-\*txtw
+ \advance\dimen@ by -\*txtw
+ \ifdim\dimen@ > 1pt % only warn if over 1pt
+ \immediate\write16{%
+ <TEXT1> Warning! The column and gutter widths specified%
+ for two columns are wider than the current pagewidth by%
+ \the\dimen1 . }
+ \fi
+ \else\ifdim\dimen@ < \*txtw % if less than current pagewidth
+ \dimen1=\*txtw
+ \advance\dimen1 by-\dimen@
+ \advance\dimen@ by -\*txtw
+ \multiply\dimen@ by -1
+ \ifdim\dimen@ > 1pt % Only warn if over 1pt difference
+ \immediate\write16{%
+ <TEXT1> Warning! The column and gutter widths specified%
+ for two columns are shorter than the current pagewidth by%
+ \the\dimen1 . }
+ \fi
+ \fi\fi
+%
+ \dimen@=\the\*thcw % width of each column, three columns
+ \dimen@=3\dimen@ % three columns
+ \dimen1=\the\*thcgut % width of the gutters
+ \dimen1=2\dimen1 % two gutters in three columns
+ \advance\dimen@ by\dimen1 % add columns and gutters together
+ \ifdim\dimen@ > \*txtw % if greater than current pagewidth
+ \dimen1=\dimen@
+ \advance\dimen1 by-\*txtw
+ \advance\dimen@ by -\*txtw
+ \ifdim\dimen@ > 1pt % only warn if over 1pt
+ \immediate\write16{%
+ <TEXT1> Warning! The column and gutter widths specified%
+ for three columns are wider than the current pagewidth by%
+ \the\dimen1 . }
+ \fi
+ \else\ifdim\dimen@ < \*txtw % if less than current pagewidth
+ \dimen1=\*txtw
+ \advance\dimen1 by-\dimen@
+ \advance\dimen@ by -\*txtw
+ \multiply\dimen@ by -1
+ \ifdim\dimen@ > 1pt % Only warn if over 1pt difference
+ \immediate\write16{%
+ <TEXT1> Warning! The column and gutter widths specified%
+ for three columns are shorter than the current pagewidth by%
+ \the\dimen1 . }
+ \fi
+ \fi\fi
+ } % END, widthcheck
+%
+\newif\if*start*mc \*start*mcfalse
+\def\twocolumns{% TWOCOLUMNS set-up macro
+ \if*fix \input fixcol % input fixed format file
+ \immediate\write-16{% write to log file only
+ <TEXT1> Fixed format for multiple columns in effect. }
+ \gdef\twocolumns{\*fixtwc}% redefine twocolumns, fixed mode
+ \gdef\threecolumns{\*fixthc}% redefine threecolumns, fixed mode
+ \else \input flexcol % input flex format file
+ \immediate\write-16{% write to log file only
+ <TEXT1> Flexible format for multiple columns in effect. }
+ \gdef\twocolumns{\*flextwc}% redefine twocolumns, flex mode
+ \gdef\threecolumns{\*flexthc}\fi% redefine threecolumns, flex mode
+ \twocolumns
+ \global\let\twc=\twocolumns % to current meaning of twocolumns
+ \global\let\thc=\threecolumns % to current meaning of threecolumns
+}% END twocolumns markup
+%
+\let\twc=\twocolumns
+%
+\def\threecolumns{% THREECOLUMNS set-up macro
+ \*start*mctrue
+ \if*fix \input fixcol % input fixed format file
+ \immediate\write-16{% write to log file only
+ <TEXT1> Fixed format for multiple columns active. }
+ \gdef\twocolumns{\*fixtwc}% redefine twocolumns, fixed mode
+ \gdef\threecolumns{\*fixthc}% redefine threecolumns, fixed mode
+ \else \input flexcol % input flex format file
+ \immediate\write-16{% write to log file only
+ <TEXT1> Flexible format for multiple columns active. }
+ \gdef\twocolumns{\*flextwc}% redefine twocolumns, flex mode
+ \gdef\threecolumns{\*flexthc}\fi% redefine threecolumns, flex mode
+ \threecolumns
+ \global\let\twc=\twocolumns % to current meaning of twocolumns
+ \global\let\thc=\threecolumns % to current meaning of threecolumns
+}% End threecolumns markup
+%
+\let\thc=\threecolumns
+%
+\let\onecolumn=\null % Empty definition for single format
+\let\oc=\onecolumn
+%
+\let\newcolumn=\newpage
+\let\nc=\newpage
+\newif\if*nc \*ncfalse % true if \nc was used in mult cols
+%
+\global
+\newhelp\balerrhelp{onecolumn The best approach to solve this problem
+ is to shorten the text by a line. You could also add or delete a
+ paragraph or change the column size. }%
+%
+\message{index macros,}
+%
+% Here are the macros necessary for doing an index
+%
+\newtoks\*ixarc \*ixarc={case=no} % IndeX A Respect Case
+\newcount\*ixpn % Page number type: 0,2,4,6, or 9
+\newtoks\*ixast \*ixast={style=3} % IndeX A STyle
+\newtoks\*ixald \*ixald={leadering=no} % IndeX A LeaDering
+\newtoks\*ixabr \*ixabr={\vs{1\bl}} % IndeX A BReak
+\newtoks\*ixasea \*ixasea={1em} % IndeX A SubEntry 1
+\newtoks\*ixaseb \*ixaseb={2em} % IndeX A SubEntry 2
+\newtoks\*ixaev \*ixaev={\tenpt} % Index A every time
+\newtoks\*ixahp \*ixahp={1.5em} % Index A hang indent
+\newtoks\*ixbrc \*ixbrc={case=no} % IndeX B Respect Case
+\newtoks\*ixbst \*ixbst={style=3} % IndeX B STyle
+\newtoks\*ixbld \*ixbld={leadering=no} % IndeX B LeaDering
+\newtoks\*ixbbr \*ixbbr={\vs{1\bl}} % IndeX B BReak
+\newtoks\*ixbsea \*ixbsea={1em} % IndeX B SubEntry 1
+\newtoks\*ixbseb \*ixbseb={2em} % IndeX B SubEntry 2
+\newtoks\*ixbev \*ixbev={\tenpt} % Index B every time
+\newtoks\*ixbhp \*ixbhp={1.5em} % Index B hang indent
+\newtoks\*ixcrc \*ixcrc={case=no} % IndeX C Respect Case
+\newtoks\*ixcst \*ixcst={style=3} % IndeX C STyle
+\newtoks\*ixcld \*ixcld={leadering=no} % IndeX C LeaDering
+\newtoks\*ixcbr \*ixcbr={\rule\vs{1\bl}} % IndeX C BReak
+\newtoks\*ixcsea \*ixcsea={1em} % IndeX C SubEntry 1
+\newtoks\*ixcseb \*ixcseb={2em} % IndeX C SubEntry 2
+\newtoks\*ixcev \*ixcev={\tenpt} % Index C every time
+\newtoks\*ixchp \*ixchp={1.5em} % Index C hang indent
+%
+\newcount\*ixlvl \*ixlvl=1 % IndeX LeVeL
+%
+\long\def\indexformat#1#2{{\ifnum #1>3 \message{<TEXT1> Error! Only three indices
+ allowed. Level 1 will be used.}
+ \*ixlvl=1
+ \else \*ixlvl=#1\fi
+ \def\respectcase##1{\edef\T{yes}
+ \edef\U{no}
+ \edef\V{##1}
+ \ifx \T\V \B={case=yes}
+ \else \B={case=no}
+ \ifx \U\V % Already set
+ \else\message{<TEXT1> Error!! Case respect not "yes"
+ or "no" in indexformat. "no" will be used.}
+ \fi\fi
+ \ifcase \*ixlvl \or \global\*ixarc=\B
+ \or \global\*ixbrc=\B
+ \or \global\*ixcrc=\B
+ \fi}
+ \def\style##1{\edef\T{paragraph}
+ \edef\U{dash}
+ \edef\V{indent}
+ \edef\W{##1}
+ \ifx \T\W \B={style=1} % paragraph style
+ \else \ifx \U\W \B={style=2} % dash style
+ \else \B={style=3} % indented style
+ \ifx \V\W % Already done
+ \else \message{<TEXT1> Error!! Style invalid in indexformat.
+ "indented" will be used.}
+ \fi\fi\fi
+ \ifcase \*ixlvl \or \global\*ixast=\B
+ \or \global\*ixbst=\B
+ \or \global\*ixcst=\B
+ \fi}
+ \def\leadering##1{\edef\T{yes}
+ \edef\U{no}
+ \edef\V{##1}
+ \ifx\T\V \B={leadering=yes}
+ \else \B={leadering=no}
+ \ifx\U\V
+ \else \message{<TEXT1> Error!! Only "yes" and "no" can
+ be used in the indexformat. "no" will be assumed.}
+ \fi\fi
+ \ifcase \*ixlvl \or \global\*ixald=\B
+ \or \global\*ixbld=\B
+ \or \global\*ixcld=\B
+ \fi
+ }
+ \long\def\everyletterbreak##1{\ifcase \*ixlvl \or \global\*ixabr={##1}
+ \or \global\*ixbbr={##1}
+ \or \global\*ixcbr={##1}
+ \fi}
+ \def\everyindex##1{\ifcase \*ixlvl \or \global\*ixaev={##1}
+ \or \global\*ixbev={##1}
+ \or \global\*ixcev={##1}
+ \fi}
+ \def\everyhang##1{\ifcase \*ixlvl \or \global\*ixahp={##1}
+ \or \global\*ixbhp={##1}
+ \or \global\*ixchp={##1}
+ \fi}
+ \def\indentsubentry##1##2{\R = ##1
+ \ifnum ##1<1 \message{<TEXT1> Error!! Subentry level number in indexformat
+ may only be 1 or 2. 1 will be used.}
+ \R = 1
+ \else \ifnum ##1>2 \message{<TEXT1> Error!! Subentry level number in indexformat
+ may only be 1 or 2. 1 will be used.}
+ \R = 1
+ \fi\fi
+ \ifcase \R \or \ifcase \*ixlvl \or \global\*ixasea={##2}
+ \or \global\*ixbsea={##2}
+ \or \global\*ixcsea={##2}
+ \fi
+ \or \ifcase \*ixlvl \or \global\*ixaseb={##2}
+ \or \global\*ixbseb={##2}
+ \or \global\*ixcseb={##2}
+ \fi
+ \fi}
+ #2}}
+\let\ixf=\indexformat
+\newwrite\*ixfilea % IndeX FILE A
+\newwrite\*ixfileb % IndeX FILE B
+\newwrite\*ixfilec % IndeX FILE C
+\newif\if*ixaopen \*ixaopenfalse % IndeX file A OPEN?
+\newif\if*ixbopen \*ixbopenfalse % IndeX file B OPEN?
+\newif\if*ixcopen \*ixcopenfalse % IndeX file C OPEN?
+\def\*openixfile#1{\ifcase #1 \or
+ \immediate\openout\*ixfilea=text1xx.ix1%
+ \global\*ixaopentrue
+ \immediate\write\*ixfilea{\the\*ixarc}%
+ \immediate\write\*ixfilea{\the\*ixast}%
+ \immediate\write\*ixfilea{\the\*ixald}%
+ \or \immediate\openout\*ixfileb=text1xx.ix2%
+ \global\*ixbopentrue
+ \immediate\write\*ixfileb{\the\*ixbrc}%
+ \immediate\write\*ixfileb{\the\*ixbst}%
+ \immediate\write\*ixfileb{\the\*ixbld}%
+ \or \immediate\openout\*ixfilec=text1xx.ix3%
+ \global\*ixcopentrue
+ \immediate\write\*ixfilec{\the\*ixcrc}%
+ \immediate\write\*ixfilec{\the\*ixcst}%
+ \immediate\write\*ixfilec{\the\*ixcld}%
+ \fi}
+{\catcode`\$=12
+\global\def\index#1#2{{\global\*ixpn = 2
+ \def\subentry##1##2{${$}se##1##2{$}}%
+ \def\bdpn{\global\*ixpn = 0}%
+ \def\uspn{\global\*ixpn = 4}%
+ \def\itpn{\global\*ixpn = 6}%
+ \def\blindentry##1{\global\*ixpn = 9}%
+ \def\sortas##1{${$}sa##1{$}}%
+ \def\dagger{ \noexpand\dagger}%
+ \def\ddagger{ \noexpand\ddagger}%
+ \def\\{\noexpand\\}%
+ \def\{{\noexpand\{}%
+ \def\}{\noexpand\}}%
+ \def\_{\noexpand\_}%
+ \def\@{\noexpand\@}%
+ \def\S{\noexpand\S}%
+ \def\P{\noexpand\P}%
+ \def\L{\noexpand\L}%
+ \def\AA{\noexpand\AA}%
+ \def\neg{\noexpand\neg}%
+ \def\tilde{\noexpand\tilde}%
+ \def\vbar{\noexpand\vbar}%
+ \def\roman{\noexpand\rm}\let\rm=\roman%
+ \def\bold{\noexpand\bd}\let\bd=\bold%
+ \def\italic{\noexpand\it}\let\it=\italic%
+ \def\typewriter{\noexpand\tt}\let\tt=\typewriter%
+ \def\caps{\noexpand\cc}\let\cc=\caps%
+ \def\mathitalic{\noexpand\mi}\let\mi=\mathitalic%
+ \def\symbol{\noexpand\sy}\let\sy=\symbol%
+ \def\extension{\noexpand\ex}\let\ex=\extension%
+ \def\bolditalic{\noexpand\bi}\let\bi=\bolditalic%
+ \setbox0=\vbox{\hsize=100in#2}%
+ \def\bdpn{}%
+ \def\uspn{}%
+ \def\itpn{}%
+ \def\blindentry##1{${$}be##1{$}}%
+ \*ixlvl = #1
+ \ifcase #1 \message{<TEXT1> Error!! You can only have index level 1, 2, or 3.
+ Index level 1 will be used.}
+ \*ixlvl = 1
+ \or\or\or% % These levels are ok
+ \else \message{<TEXT1> Error!! You can only have index level 1, 2, or 3.
+ Index level 1 will be used.}
+ \*ixlvl = 1
+ \fi%
+ \edef\*ixtoken{#2}%
+ \edef\temp{\*ixtoken}%
+ \ifcase \*ixlvl \or\if*ixaopen\else\*openixfile1\fi% Open the file if not done yet
+ \immediate\write\*ixfilea{{\the\*ixpn}{\the\pageno}{\pagenumber}\*ixtoken}%
+ \or \if*ixbopen \else \*openixfile2 \fi % Open the file if not done yet
+ \immediate\write\*ixfileb{{\the\*ixpn}{\the\pageno}{\pagenumber}\*ixtoken}%
+ \or \if*ixcopen \else \*openixfile3 \fi % Open the file if not done yet
+ \immediate\write\*ixfilec{{\the\*ixpn}{\the\pageno}{\pagenumber}\*ixtoken}%
+ \fi}\ignorespaces}
+}% End math cat code change
+\def\everyletterbreak#1#2{\def\nextletter{#2}
+ \ifcase #1 \or \the\*ixabr
+ \or \the\*ixbbr
+ \or \the\*ixcbr
+ \fi}
+\def\everyindex#1{\ifcase \*ixlvl \or \the\*ixaev
+ \or \the\*ixbev
+ \or \the\*ixcev
+ \fi}
+\def\indentsubentry#1#2{\par\penalty5000\hp
+ \ifcase #2 \or \ifcase #1 \or \hs{\the\*ixasea}
+ \or \hs{\the\*ixbsea}
+ \or \hs{\the\*ixcsea}
+ \fi
+ \or \ifcase #1 \or \hs{\the\*ixaseb}
+ \or \hs{\the\*ixbseb}
+ \or \hs{\the\*ixcseb}
+ \fi
+ \fi}
+\let\ix=\index
+\let\*ix=\printindex
+\def\printindex#1{%\*ix#1 used only when printindex is a hardcoded command
+ \ifcase #1 \or \input text1xx.ix1
+ \or \input text1xx.ix2
+ \or \input text1xx.ix3
+ \fi}
+%
+\message{wrap it up...}
+%
+\def\@{\char'100{}}%
+%
+% and set default values
+%
+\hfuzz=1pt
+\parindent=24pt \parskip=0pt plus 3pt minus 0pt
+\normalbottom
+\pageno=0
+\catcode`* = 12
+% The END