home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d6xx / d616 / tex.lha / TeX / texinputs.lha / texinputs / ini / latex.tex (.txt) < prev    next >
LaTeX Document  |  1991-11-09  |  284KB  |  7,294 lines

  1. % LATEX VERSION 2.09 <9 Jan 1990>     modified for international usage
  2. % Copyright (C) 1988 by Leslie Lamport
  3. % Modified by J.Schrod (TeXsys).
  4. % according to the suggestion of H.Partl (TU Wien) in german.sty
  5. % to make caption names adaptable to other languages.
  6. % This version is named ILaTeX (International LaTeX).
  7. \everyjob{\typeout{ILaTeX Version 2.09 <9 Jan 1990>}}
  8. \immediate\write10{ILaTeX Version 2.09 <9 Jan 1990>}
  9. %                 TABLE OF CONTENTS
  10. % COMMAND LIST .........................................  2
  11. % GENERAL CONVENTIONS ..................................  6
  12. % COUNTERS, ETC. .......................................  7
  13. % USEFUL HACKS .........................................  8
  14. % ERROR HANDLING ....................................... 12
  15. % \par AND \everypar ................................... 15
  16. % SPACING / LINE AND PAGE BREAKING ..................... 17
  17. % PROGRAM CONTROL STRUCTURE MACROS ..................... 21
  18. % FILE HANDLING ........................................ 24
  19. % ENVIRONMENT COUNTER MACROS ........................... 27
  20. % PAGE NUMBERING ....................................... 30
  21. % CROSS REFERENCING MACROS  ............................ 31
  22. % ENVIRONMENTS ......................................... 33
  23. % MATH ENVIRONMENTS .................................... 36
  24. % CENTER, FLUSHRIGHT, FLUSHLEFT, ETC. .................. 39
  25. % VERBATIM ............................................. 40
  26. % THE LIST ENVIRONMENT ................................. 41
  27. % ITEMIZE AND ENUMERATE ................................ 49
  28. % BOXES ................................................ 51
  29. % THE TABBING ENVIRONMENT .............................. 57
  30. % ARRAY AND TABULAR ENVIRONMENTS ....................... 63
  31. % THE PICTURE ENVIRONMENT .............................. 72
  32. % THEOREM ENVIRONMENTS ................................. 86
  33. % LENGTHS .............................................. 88
  34. % THE TITLE .............................................89
  35. % SECTIONING ........................................... 90
  36. % TABLE OF CONTENTS, ETC. .............................. 94
  37. % INDEX COMMANDS ....................................... 97
  38. % BIBLIOGRAPHY ......................................... 98
  39. % FLOATS .............................................. 100
  40. % FOOTNOTES ........................................... 106
  41. % INITIAL DECLARATION COMMANDS ........................ 110
  42. % OUTPUT .............................................. 113
  43. % DEBUGGING AND TEST INITIALIZATIONS  ................. 137
  44. \catcode`\~=13 \def~{\penalty\@M \ }
  45. %     ****************************************
  46. %     *           COMMAND LIST               *
  47. %     ****************************************
  48. % DECLARATIONS:
  49. %  PREAMBLE:     \nofiles \documentstyle \includeonly
  50. %                \makeindex \makeglossary
  51. %  IN DOCUMENT :
  52. %    FONT SELECTION:
  53. %         SIZE: \normalsize \small \footnotesize \scriptsize \tiny
  54. %               \large \Large \LARGE \huge \Huge
  55. %         STYLE: \bf \it \rm \sl \ss \tt \mit[math mode only]
  56. %    STYLE:
  57. %         PAGE: [all global] \pagestyle \thispagestyle \pagenumbering \head
  58. %         MISC: \raggedright \thicklines \thinlines
  59. %    PARAMETER: \setlength \settowidth \addtolength \setcounter \addtocounter
  60. %    NEW:       \newlength \newtheorem \newcommand
  61. %    MISC:      \savebox \sbox \obeycr \restorecr
  62. % ENVIRONMENTS:
  63. %    ?   -> PAR:  document
  64. %   PAR  -> PAR:  list enumerate itemize description
  65. %                 center flushright flushleft
  66. %                 verbatim picture float
  67. %   PAR  -> BOX:  tabular tabbing
  68. %   PAR  -> MATH: math displaymath equation
  69. %   MATH -> MATH: array
  70. %   ANY  -> PAR:  minipage
  71. %   ANY  -> BOX:  stack
  72. % TEXT-PRODUCING:
  73. %   WITH TEXT ARGUMENT:
  74. %      ANY -> BOX: \makebox \mbox \framebox \fbox \dashbox
  75. %                  \shortstack \footnotemark \cite[] \raisebox
  76. %      ANY -> PAR: \parbox[inner]
  77. %      PAR -> PAR: \chapter \section ... \footnote \footnotetext
  78. %                  \topnewpage \verb
  79. %      MATH:       \sqrt \underline \overline
  80. %      PICTURE:    \put \multiput
  81. %      LIST:       \item
  82. %   WITHOUT TEXT ARGUMENT:
  83. %     ANY MODE:
  84. %          SYMBOLS: \$ \{ \} \_ \@ \& \#
  85. %          ACCENTS: See TeXbook
  86. %          OTHER:   \rule \ref \pageref \today \usebox \typein \input \cite
  87. %     MATH:     \over
  88. %     PAR MODE: \include \bibliography \tableofcontents \listoffigures ...
  89. %     LIST:     \item \arabic \roman \Roman \alph \Alph
  90. %     PICTURE:  \line \vector \circle \oval
  91. %     ARRAY & TABULAR: \hline \vline
  92. % SPACING & BREAKING:
  93. %    ANY       : \hfill \hspace
  94. %    PAR       : \newpage \newpage \vspace \noindent
  95. %    PAR & INNER MATH
  96. %              : \newpage \clearpage \cleardoublepage
  97. %              : \pagebreak \nopagebreak \linebreak \nolinebreak \newline
  98. %    MATH      : \over \; \, \!
  99. %    MULTILINE : \\
  100. %    TABBING   : \pushtab \poptab \> \< \+ \- \kill ...
  101. %    ARRAY & TABULAR
  102. %              : \multicolumn \noalign
  103. % NO DIRECT CHANGES TO DOCUMENT:
  104. %    \index \glossary \typeout \label \tableentry \stop \protect
  105. % PARAMETERS:
  106. % \columnsep         \skip\footin        \intextsep
  107. % \columnseprule                         \oddsidemargin
  108. % \columnwidth                           \textfloatsep
  109. % \evensidemargin    \footsep            \textheight
  110. % \floatsep          \headheight         \textwidth
  111. % \headsep            \topmargin
  112. %   ALPHABETIZED LIST:
  113. % ORDINARY COMMANDS:
  114. % \Alph                \include             \parbox
  115. % \Roman               \index               \put
  116. % \\                   \item                \raisebox
  117. % \alph                \label               \ref
  118. % \appendix            \line                \roman
  119. % \arabic              \linebreak           \rule
  120. % \bibliography        \listoffigures       \section
  121. % \chapter             \listoftables        \shortstack
  122. % \circle              \makebox             \stop
  123. % \cite                \mbox                \subsection
  124. % \cite                \multicolumn         \subsubsection
  125. % \cleardoublepage     \multiput            \tableentry
  126. % \clearpage                                \tableofcontents
  127. % \dashbox             \newline             \today
  128. % \fbox                \newpage             \typein
  129. % \footnotemark        \noindent            \typeout
  130. % \footnotetext        \nolinebreak         \usebox
  131. % \framebox            \nopagebreak         \vector
  132. % \glossary            \oval                \vline
  133. % \hline               \pagebreak           \vspace
  134. % \hspace              \pageref             \protect
  135. % ENVIRONMENTS & DECLARATIONS:
  136. % For each of these commands, the same command name prefixed by 'end'
  137. % is also reserved--e.g., \enddocument.
  138. % \BIG               \footnotesize       \pagestyle
  139. % \Big               \head               \picture
  140. % \addtocounter      \includeonly        \raggedright
  141. % \addtolength       \itemize            \restorecr
  142. % \array             \list               \savebox
  143. % \big               \makeglossary       \sbox
  144. % \center            \makeindex          \scriptscriptsize
  145. % \description       \math               \scriptsize
  146. % \displaymath       \minipage           \setcounter
  147. % \document          \newcommand         \setlength
  148. % \documentstyle     \newlength          \settowidth
  149. % \enumerate         \newtheorem         \small
  150. % \equation          \nofiles            \shortstack\tabbing
  151. %                    \normalsize             \tabular
  152. % \float             \obeycr             \thicklines
  153. % \flushleft         \pagelayout         \thinlines
  154. % \flushright        \pagenumbering      \thispagestyle
  155. %                                        \verb, \verbatim
  156. % PARAMETERS :
  157. % \columnsep         \footinsertskip     \intextsep
  158. % \columnseprule                         \oddsidemargin
  159. % \columnwidth                           \textfloatsep
  160. % \evensidemargin    \footsep            \textheight
  161. % \floatsep          \headheight         \textwidth
  162. % \headsep            \topmargin
  163. % TABBING COMMANDS:
  164. % These commannds are defined only within a tabbing environment.
  165. % \kill      \>    \-
  166. % \pushtab   \<    \=
  167. % \poptab    \+
  168. % COMPLETE LIST :
  169. % Below is a complete list of every command starting with `\' that
  170. % appears in LATEX.TEX.
  171. % \@@
  172. % \@@end
  173. % \@@endpbox
  174. % \@@eqncr
  175. % \@@hyph
  176. % \@@input
  177. % \@@par
  178. % \@@sqrt
  179. % \@@startpbox
  180. % \@@underline
  181. % \@acci
  182. % \@accii
  183. % \@acciii
  184. % \@acol
  185. % \@acolampacol
  186. % \@addamp
  187. % \@addfield
  188. % \@addmarginpar
  189. % \@addtobot
  190. % \@addtocurcol
  191. % \@addtodblcol
  192. % \@addtonextcol
  193. % \@addtopreamble
  194. % \@addtoreset
  195. % \@addtotoporbot
  196. % \@afterheading
  197. % \@afterindentfalse
  198. % \@afterindenttrue
  199. % \@Alph
  200. % \@alph
  201. % \@ampacol
  202. % \@arabic
  203. % \@argarraycr
  204. % \@argdef
  205. % \@argrsbox
  206. % \@argtabularcr
  207. % \@array
  208. % \@arrayacol
  209. % \@arrayclassiv
  210. % \@arrayclassv
  211. % \@arrayclassz
  212. % \@arraycr
  213. % \@arrayparboxrestore
  214. % \@arrayrule
  215. % \@arstrut
  216. % \@arstrutbox
  217. % \@auxout
  218. % \@badcrerr
  219. % \@badend
  220. % \@badlinearg
  221. % \@badmath
  222. % \@badpoptabs
  223. % \@badtab
  224. % \@beginparpenalty
  225. % \@begintheorem
  226. % \@bibitem
  227. % \@biblabel
  228. % \@bitor
  229. % \@botlist
  230. % \@botnum
  231. % \@botroom
  232. % \@bsphack
  233. % \@caption
  234. % \@captype
  235. % \@car
  236. % \@carcube
  237. % \@cclv
  238. % \@cdr
  239. % \@centercr
  240. % \@centering
  241. % \@cfla
  242. % \@cflb
  243. % \@charlb
  244. % \@charrb
  245. % \@chclass
  246. % \@checkend
  247. % \@chnum
  248. % \@circ
  249. % \@circle
  250. % \@circlefnt
  251. % \@cite
  252. % \@citea
  253. % \@citeb
  254. % \@citex
  255. % \@cla         % counter used in \cline
  256. % \@classi
  257. % \@classii
  258. % \@classiii
  259. % \@classiv
  260. % \@classv
  261. % \@classz
  262. % \@clb         % counter used in \cline
  263. % \@cline
  264. % \@clnht
  265. % \@clnwd
  266. % \@clubpenalty
  267. % \@colht
  268. % \@colnum
  269. % \@colroom
  270. % \@combinedblfloats
  271. % \@combinefloats
  272. % \@comdblflelt
  273. % \@comflelt
  274. % \@cons
  275. % \@contfield
  276. % \@ctrerr
  277. % \@curfield
  278. % \@curline
  279. % \@currbox
  280. % \@currentlabel
  281. % \@currentreference
  282. % \@currenvir
  283. % \@currlist
  284. % \@currtype
  285. % \@curtab
  286. % \@curtabmar
  287. % \@dascnt
  288. % \@dashbox
  289. % \@dashcnt
  290. % \@dashdim
  291. % \@dblarg
  292. % \@dbldeferlist
  293. % \@dblfloat
  294. % \@dblfloatplacement
  295. % \@dblfloatsep
  296. % \@dblfpbot
  297. % \@dblfpsep
  298. % \@dblfptop
  299. % \@dblmaxsep
  300. % \@dbltextfloatsep
  301. % \@dbltoplist
  302. % \@dbltopnum
  303. % \@dbltoproom
  304. % \@deferlist
  305. % \@definecounter
  306. % \@defpar
  307. % \@depth
  308. % \@dischyph
  309. % \@doclearpage
  310. % \@documentstyle
  311. % \@doendpe
  312. % \@donoparitem
  313. % \@dot
  314. % \@dotsep
  315. % \@dottedtocline
  316. % \@downline
  317. % \@downvector
  318. % \@eha
  319. % \@ehb
  320. % \@ehc
  321. % \@ehd
  322. % \@elt
  323. % \@empty
  324. % \@endparenv
  325. % \@endparpenalty
  326. % \@endpbox
  327. % \@endpefalse
  328. % \@endpetrue
  329. % \@endtabbing
  330. % \@endtheorem
  331. % \@enumctr
  332. % \@enumdepth
  333. % \@enumspacing
  334. % \@eqncr
  335. % \@eqnnum
  336. % \@eqnsel
  337. % \@eqnswtrue
  338. % \@esphack
  339. % \@evenfoot
  340. % \@evenhead
  341. % \@expast
  342. % \@failedlist
  343. % \@fcolmadefalse
  344. % \@filesw
  345. % \@fileswfalse
  346. % \@fileswtrue
  347. % \@firstampfalse
  348. % \@firstamptrue
  349. % \@firstcolumntrue
  350. % \@firsttab
  351. % \@flfail
  352. % \@float
  353. % \@floatpenalty
  354. % \@floatplacement
  355. % \@floatsep
  356. % \@flsucceed
  357. % \@fltovf
  358. % \@flushglue
  359. % \@fnsymbol
  360. % \@footnotemark
  361. % \@footnotetext
  362. % \@for
  363. % \@forloop
  364. % \@fornoop
  365. % \@fpbot
  366. % \@fpmin
  367. % \@fpsep
  368. % \@fptop
  369. % \@framebox
  370. % \@framepicbox
  371. % \@freelist
  372. % \@getcirc
  373. % \@getlarrow
  374. % \@getlinechar
  375. % \@getpen
  376. % \@getrarrow
  377. % \@glossaryfile
  378. % \@gobble
  379. % \@gobblecr
  380. % \@gobbletwo
  381. % \@gtempa
  382. % \@halfwidth
  383. % \@halignto
  384. % \@hangfrom
  385. % \@height
  386. % \@highpenalty
  387. % \@hightab
  388. % \@hline
  389. % \@holdpg
  390. % \@hspace
  391. % \@hspacer
  392. % \@hvector
  393. % \@icentercr
  394. % \@iden
  395. % \@ifatmargin
  396. % \@ifdefinable
  397. % \@ifnch
  398. % \@ifnextchar
  399. % \@iforloop
  400. % \@iframebox
  401. % \@iframepicbox
  402. % \@ifstar
  403. % \@ifundefined
  404. % \@iinput           % used in \input
  405. % \@iirsbox
  406. % \@imakebox
  407. % \@imakepicbox
  408. % \@iminipage
  409. % \@index
  410. % \@indexfile
  411. % \@inlabelfalse
  412. % \@input
  413. % \@insertfalse
  414. % \@inserttrue
  415. % \@iparbox
  416. % \@irsbox
  417. % \@isavebox
  418. % \@isavepicbox
  419. % \@ishortstack
  420. % \@istackcr
  421. % \@itabcr
  422. % \@item
  423. % \@itemdepth
  424. % \@itemfudge
  425. % \@itemitem
  426. % \@itemlabel
  427. % \@itempenalty
  428. % \@itemspacing
  429. % \@iwhiledim
  430. % \@iwhilenum
  431. % \@iwhilesw
  432. % \@ixstackcr
  433. % \@killglue
  434. % \@labels
  435. % \@lastchclass
  436. % \@latexbug
  437. % \@latexerr
  438. % \@lbibitem
  439. % \@leftcolumn
  440. % \@leftmarginskip
  441. % \@leftmark
  442. % \@lhead
  443. % \@linechar
  444. % \@linefnt
  445. % \@linelen
  446. % \@list
  447. % \@listctr
  448. % \@listdepth
  449. % \@listi
  450. % \@listii
  451. % \@listvi
  452. % \@lnbk
  453. % \@lowpenalty
  454. % \@lquote
  455. % \@ltab
  456. % \@M
  457. % \@m
  458. % \@mainaux
  459. % \@mainout
  460. % \@makebox
  461. % \@makecaption
  462. % \@makecol
  463. % \@makefcolumn
  464. % \@makefnmark
  465. % \@makefntext
  466. % \@makeonecolumn
  467. % \@makeother
  468. % \@makepicbox
  469. % \@maketwocolumn
  470. % \@marbox
  471. % \@markright
  472. % \@maxdepth
  473. % \@maxsep
  474. % \@maxtab
  475. % \@medpenalty
  476. % \@Mi
  477. % \@midlist
  478. % \@Mii
  479. % \@Miii
  480. % \@minipagefalse
  481. % \@minipagerestore
  482. % \@Miv
  483. % \@mkboth
  484. % \@mklab
  485. % \@mkpream
  486. % \@MM
  487. % \@mparbottom
  488. % \@mparswitchfalse
  489. % \@mpfn
  490. % \@mpfnnumber
  491. % \@mpfootins
  492. % \@mpfootnotetext
  493. % \@mplistdepth
  494. % \@multicnt
  495. % \@namedef
  496. % \@nameuse
  497. % \@nbitem
  498. % \@ne
  499. % \@negargfalse
  500. % \@negargtrue
  501. % \@newctr
  502. % \@newenv
  503. % \@newline
  504. % \@newlist
  505. % \@newlistfalse
  506. % \@next
  507. % \@nextchar
  508. % \@nextwhile
  509. % \@nil
  510. % \@nmbrlistfalse
  511. % \@nmbrlisttrue
  512. % \@nnil
  513. % \@nobreakfalse
  514. % \@nocnterr
  515. % \@nodocument
  516. % \@nofonterror
  517. % \@noitemargfalse
  518. % \@noitemargtrue
  519. % \@noitemerr
  520. % \@noligs
  521. % \@nolnbk
  522. % \@nolnerr
  523. % \@noparitemfalse
  524. % \@noparitemtrue
  525. % \@noparlistfalse
  526. % \@noparlisttrue
  527. % \@nopgbk
  528. % \@normalcr
  529. % \@normalsize
  530. % \@noskipsecfalse
  531. % \@notdefinable
  532. % \@notprerr
  533. % \@nthm
  534. % \@nxttabmar
  535. % \@oddfoot
  536. % \@oddhead
  537. % \@opargbegintheorem
  538. % \@opcol
  539. % \@optionfiles
  540. % \@optionlist
  541. % \@options
  542. % \@othm
  543. % \@outerparskip
  544. % \@outputbox
  545. % \@outputdblcol
  546. % \@outputpage
  547. % \@oval
  548. % \@ovbtrue
  549. % \@ovdx
  550. % \@ovdy
  551. % \@ovhorz
  552. % \@ovltrue
  553. % \@ovri
  554. % \@ovro
  555. % \@ovrtrue
  556. % \@ovttrue
  557. % \@ovvert
  558. % \@ovxx
  559. % \@ovyy
  560. % \@pagedp
  561. % \@pageht
  562. % \@par
  563. % \@parboxrestore
  564. % \@parmoderr
  565. % \@partaux
  566. % \@partlist
  567. % \@partout
  568. % \@partsw
  569. % \@partswfalse
  570. % \@partswtrue
  571. % \@pboxswfalse
  572. % \@pboxswtrue
  573. % \@pgbk
  574. % \@picbox
  575. % \@picht
  576. % \@picture
  577. % \@pnumwidth
  578. % \@preamble
  579. % \@preamblecmds
  580. % \@preamerr
  581. % \@put
  582. % \@qend
  583. % \@qrelax
  584. % \@reargdef
  585. % \@renewenv
  586. % \@restorepar
  587. % \@reversemarginfalse
  588. % \@reversemargintrue
  589. % \@rhead
  590. % \@rightmark
  591. % \@rightskip
  592. % \@Roman
  593. % \@roman
  594. % \@rsbox
  595. % \@rtab
  596. % \@rule
  597. % \@sanitize
  598. % \@savebox
  599. % \@savemarbox
  600. % \@savepicbox
  601. % \@savsf
  602. % \@savsk
  603. % \@scolelt
  604. % \@sdblcolelt
  605. % \@secpenalty
  606. % \@sect
  607. % \@setpar
  608. % \@settab
  609. % \@sharp
  610. % \@shortstack
  611. % \@sline
  612. % \@spaces
  613. % \@specialoutput
  614. % \@specialpagefalse
  615. % \@specialstyle
  616. % \@sptoken
  617. % \@sqrt
  618. % \@ssect
  619. % \@startcolumn
  620. % \@startdblcolumn
  621. % \@startfield
  622. % \@startline
  623. % \@startpbox
  624. % \@startsection
  625. % \@starttoc
  626. % \@stopfield
  627. % \@stopline
  628. % \@stpelt
  629. % \@svector
  630. % \@sverb
  631. % \@svsec
  632. % \@svsechd
  633. % \@tabacol
  634. % \@tabarray
  635. % \@tabclassiv
  636. % \@tabclassz
  637. % \@tabcr
  638. % \@tablab
  639. % \@tabminus
  640. % \@tabplus
  641. % \@tabpush
  642. % \@tabrj
  643. % \@tabular
  644. % \@tabularcr
  645. % \@temp
  646. % \@tempa
  647. % \@tempb
  648. % \@tempbox
  649. % \@tempboxa
  650. % \@tempc
  651. % \@tempcnta
  652. % \@tempcntb
  653. % \@tempd
  654. % \@tempdima
  655. % \@tempdimb
  656. % \@tempe
  657. % \@tempskipa
  658. % \@tempskipb
  659. % \@tempswa
  660. % \@tempswafalse
  661. % \@tempswatrue
  662. % \@temptokena
  663. % \@testdef
  664. % \@testfp
  665. % \@testpach
  666. % \@textbottom
  667. % \@textfloatsep
  668. % \@textmin
  669. % \@texttop
  670. % \@tfor
  671. % \@tforloop
  672. % \@thanks
  673. % \@thefnmark
  674. % \@thefoot
  675. % \@thehead
  676. % \@themargin
  677. % \@themark
  678. % \@thm
  679. % \@thmcounter
  680. % \@thmcountersep
  681. % \@tocrmarg
  682. % \@toodeep
  683. % \@toplist
  684. % \@topnewpage
  685. % \@topnum
  686. % \@toproom
  687. % \@topsep
  688. % \@topsepadd
  689. % \@totalleftmargin
  690. % \@trivlist
  691. % \@tryfcolumn
  692. % \@trylist
  693. % \@twocolumnfalse
  694. % \@twoside
  695. % \@twosidefalse
  696. % \@typein
  697. % \@upline
  698. % \@upordown
  699. % \@upvector
  700. % \@verb
  701. % \@verbatim
  702. % \@vline
  703. % \@vobeyspaces
  704. % \@vspace
  705. % \@vspacer
  706. % \@vtryfc
  707. % \@vvector
  708. % \@warning
  709. % \@wckptelt
  710. % \@whiledim
  711. % \@whilenoop
  712. % \@whilenum
  713. % \@whilesw
  714. % \@whileswnoop
  715. % \@wholewidth
  716. % \@width
  717. % \@wrindex
  718. % \@writeckpt
  719. % \@writefile
  720. % \@wtryfc
  721. % \@x@sf
  722. % \@xarg
  723. % \@xargarraycr
  724. % \@xarraycr
  725. % \@xbitor
  726. % \@xcentercr
  727. % \@xdblarg
  728. % \@xdblfloat
  729. % \@xdim
  730. % \@xeqncr
  731. % \@xexnoop
  732. % \@xexpast
  733. % \@xfloat
  734. % \@xfootnote
  735. % \@xfootnotemark
  736. % \@xfootnotenext
  737. % \@xhead
  738. % \@xifnch
  739. % \@xmpar
  740. % \@xnewline
  741. % \@xnthm
  742. % \@xobeysp
  743. % \@xsect
  744. % \@xstartcol
  745. % \@xtabcr
  746. % \@xtabularcr
  747. % \@xthm
  748. % \@xtryfc
  749. % \@xtypein
  750. % \@xverbatim
  751. % \@xxxii
  752. % \@xympar
  753. % \@yarg
  754. % \@yargarraycr
  755. % \@ydim
  756. % \@yeqncr
  757. % \@yhead
  758. % \@ympar
  759. % \@ynthm
  760. % \@ythm
  761. % \@ytryfc
  762. % \@yyarg
  763. % \@ztryfc
  764. % \active
  765. % \addcontentsline
  766. % \addpenalty
  767. % \addtocontents
  768. % \addtocounter
  769. % \addtolength
  770. % \addvspace
  771. % \advance
  772. % \alloc@
  773. % \allocationnumber
  774. % \Alph
  775. % \alph
  776. % \and
  777. % \appendix
  778. % \arabic
  779. % \array
  780. % \arraycolsep
  781. % \arrayrulewidth
  782. % \arraystretch
  783. % \author
  784. % \bar
  785. % \baselineskip
  786. % \begin
  787. % \begingroup
  788. % \bf
  789. % \bgroup
  790. % \bibcite
  791. % \bibdata
  792. % \bibitem
  793. % \bibliography
  794. % \bibliographystyle
  795. % \bibstyle
  796. % \BIG
  797. % \Big
  798. % \big
  799. % \bigskip
  800. % \botfigrule
  801. % \botmark
  802. % \botnum
  803. % \bottomfraction
  804. % \box
  805. % \boxmaxdepth
  806. % \buildrel
  807. % \bullet
  808. % \c@bottomnumber
  809. % \c@chapter
  810. % \c@dbltopnumber
  811. % \c@equation
  812. % \c@eval
  813. % \c@footnote
  814. % \c@mpfootnote
  815. % \c@page
  816. % \c@secnumdepth
  817. % \c@section
  818. % \c@tocdepth
  819. % \c@topnumber
  820. % \c@totalnumber
  821. % \caption
  822. % \catcode
  823. % \catcoded
  824. % \center
  825. % \centering
  826. % \chapter
  827. % \chaptermark
  828. % \char
  829. % \chardef
  830. % \circle
  831. % \cite
  832. % \cl@@ckpt
  833. % \cleardoublepage
  834. % \clearpage
  835. % \cline
  836. % \closeout
  837. % \clubpenalty
  838. % \columnsep
  839. % \columnseprule
  840. % \columnwidth
  841. % \contentsline
  842. % \copy
  843. % \count
  844. % \countdef
  845. % \cr
  846. % \crcr
  847. % \csname
  848. % \dag
  849. % \dagger
  850. % \dashbox
  851. % \date
  852. % \dblfigrule
  853. % \dblfloatpagefraction
  854. % \dblfloatsep
  855. % \dbltexfloatsep
  856. % \dbltextfloatsep
  857. % \dbltopfraction
  858. % \ddagger
  859. % \deadcycles
  860. % \def
  861. % \description
  862. % \dimen
  863. % \dimen@
  864. % \discretionary
  865. % \displaymath
  866. % \displaystyle
  867. % \displaywidth
  868. % \divide
  869. % \do
  870. % \document
  871. % \documentstyle
  872. % \dospecials
  873. % \doublerulesep
  874. % \dp
  875. % \edef
  876. % \egroup
  877. % \else
  878. % \end
  879. % \end@dblfloat
  880. % \end@float
  881. % \endarray
  882. % \endcsname
  883. % \enddocument
  884. % \endenumerate
  885. % \endequation
  886. % \endfigure
  887. % \endgroup
  888. % \enditemize
  889. % \endlist
  890. % \endpicture
  891. % \endsloppypar
  892. % \endtabbing
  893. % \endtabular
  894. % \endthebibliography
  895. % \endtrivlist
  896. % \enumerate
  897. % \eqnarray
  898. % \eqno
  899. % \equation
  900. % \errmessage
  901. % \errorstopmode
  902. % \eval
  903. % \evensidemargin
  904. % \everyjob
  905. % \everypar
  906. % \expandafter
  907. % \extracolsep
  908. % \fbox
  909. % \fboxrule
  910. % \fboxsep
  911. % \fi
  912. % \figure
  913. % \fill
  914. % \firstmark
  915. % \float
  916. % \floatingpenalty
  917. % \floatpagefraction
  918. % \floatsep
  919. % \flushbottom
  920. % \flushleft
  921. % \flushright
  922. % \fnsymbol
  923. % \footins
  924. % \footinsertskip
  925. % \footnote
  926. % \footnotemark
  927. % \footnoterule
  928. % \footnotesep
  929. % \footnotesize
  930. % \footnotetext
  931. % \footsep
  932. % \footskip
  933. % \frac
  934. % \frame
  935. % \framebox
  936. % \framerule
  937. % \framesep
  938. % \frenchspacing
  939. % \fussy
  940. % \futurelet
  941. % \gdef
  942. % \global
  943. % \glossary
  944. % \halfwidth
  945. % \halign
  946. % \hangindent
  947. % \hbox
  948. % \head
  949. % \headheight
  950. % \headsep
  951. % \hfil
  952. % \hfill
  953. % \hfuzz
  954. % \hline
  955. % \hrule
  956. % \hsize
  957. % \hskip
  958. % \hspace
  959. % \hss
  960. % \ht
  961. % \Huge
  962. % \huge
  963. % \hyphenchar
  964. % \if
  965. % \if@afterindent
  966. % \if@eqnsw
  967. % \if@endpe
  968. % \if@fcolmade
  969. % \if@filesw
  970. % \if@firstamp
  971. % \if@firstcolumn
  972. % \if@ignore
  973. % \if@inlabel
  974. % \if@insert
  975. % \if@minipage
  976. % \if@mparswitch
  977. % \if@negarg
  978. % \if@newlist
  979. % \if@nmbrlist
  980. % \if@nobreak
  981. % \if@noitemarg
  982. % \if@noparitem
  983. % \if@noparlist
  984. % \if@noskipsec
  985. % \if@ovb
  986. % \if@ovl
  987. % \if@ovr
  988. % \if@ovt
  989. % \if@pboxsw
  990. % \if@reversemargin
  991. % \if@rjfield
  992. % \if@specialpage
  993. % \if@tempswa
  994. % \if@test
  995. % \if@twocolumn
  996. % \if@twoside
  997. % \ifcase
  998. % \ifdim
  999. % \ifeof
  1000. % \ifhmode
  1001. % \ifinner
  1002. % \ifmmode
  1003. % \ifnum
  1004. % \ifodd
  1005. % \ifvmode
  1006. % \ifvoid
  1007. % \ifx
  1008. % \ignorespaces
  1009. % \immediate
  1010. % \include
  1011. % \includeonly
  1012. % \indent
  1013. % \index
  1014. % \indexentry
  1015. % \input
  1016. % \insc@unt
  1017. % \insert
  1018. % \interdisplaylinepenalty
  1019. % \interfootnotelinepenalty
  1020. % \interlinepenalty
  1021. % \intextsep
  1022. % \it
  1023. % \item
  1024. % \itemindent
  1025. % \itemize
  1026. % \itemsep
  1027. % \jobname
  1028. % \kern
  1029. % \kill
  1030. % \label
  1031. % \labelenumi
  1032. % \labelenumiv
  1033. % \labelitemi
  1034. % \labelitemii
  1035. % \labelitemiii
  1036. % \labelitemiv
  1037. % \labelsep
  1038. % \labelwidth
  1039. % \LARGE
  1040. % \Large
  1041. % \large
  1042. % \lastbox
  1043. % \lastskip
  1044. % \LaTeX
  1045. % \lbrace
  1046. % \leaders
  1047. % \leavevmode
  1048. % \lefteqn
  1049. % \leftmargin
  1050. % \leftmargini
  1051. % \leftmarginvi
  1052. % \leftmark
  1053. % \leftskip
  1054. % \let
  1055. % \limits
  1056. % \line
  1057. % \linebreak
  1058. % \lineskip
  1059. % \linethickness
  1060. % \linewidth
  1061. % \list
  1062. % \listoffigures
  1063. % \listoftables
  1064. % \listparindent
  1065. % \llap
  1066. % \long
  1067. % \lower
  1068. % \m@ne
  1069. % \m@th
  1070. % \makeatletter
  1071. % \makeatother
  1072. % \makebox
  1073. % \makeglossary
  1074. % \makeindex
  1075. % \makelabel
  1076. % \maketitle
  1077. % \marginpar
  1078. % \marginparpush
  1079. % \marginparsep
  1080. % \marginparwidth
  1081. % \mark
  1082. % \markboth
  1083. % \markright
  1084. % \math
  1085. % \mathchar
  1086. % \mathchardef
  1087. % \mathop
  1088. % \mathrel
  1089. % \maxdeadcycles
  1090. % \maxdepth
  1091. % \maxdimen
  1092. % \mb@b
  1093. % \mb@eval
  1094. % \mb@l
  1095. % \mb@r
  1096. % \mb@t
  1097. % \mbox
  1098. % \medskip
  1099. % \message
  1100. % \minipage
  1101. % \mit
  1102. % \mkern
  1103. % \moveright
  1104. % \mskip
  1105. % \multicolumn
  1106. % \multiply
  1107. % \multiput
  1108. % \multispan
  1109. % \newbox
  1110. % \newcommand
  1111. % \newcount
  1112. % \newcounter
  1113. % \newdimen
  1114. % \newenvironment
  1115. % \newif
  1116. % \newinsert
  1117. % \newlabel
  1118. % \newlength
  1119. % \newline
  1120. % \newlinechar
  1121. % \newpage
  1122. % \newsavebox
  1123. % \newskip
  1124. % \newswitch
  1125. % \newtheorem
  1126. % \newtoks
  1127. % \newwrite
  1128. % \noalign
  1129. % \nobreak
  1130. % \nocite
  1131. % \noexpand
  1132. % \nofiles
  1133. % \noindent
  1134. % \nointerlineskip
  1135. % \nolinebreak
  1136. % \nonumber
  1137. % \nopagebreak
  1138. % \normalbaselineskip
  1139. % \normallineskip
  1140. % \normalmarginpar
  1141. % \normalsize
  1142. % \nullfont
  1143. % \number
  1144. % \numberline
  1145. % \obeycr
  1146. % \obeylines
  1147. % \obeyspaces
  1148. % \oddsidemargin
  1149. % \of
  1150. % \onecolumn
  1151. % \openin
  1152. % \or
  1153. % \outer
  1154. % \output
  1155. % \outputpenalty
  1156. % \oval
  1157. % \over
  1158. % \overfullrule
  1159. % \overline
  1160. % \p@
  1161. % \pagebreak
  1162. % \pagelayout
  1163. % \pagenumbering
  1164. % \pageref
  1165. % \pagestyle
  1166. % \par
  1167. % \paragraph
  1168. % \parbox
  1169. % \parfillskip
  1170. % \parindent
  1171. % \parsep
  1172. % \parshape
  1173. % \parskip
  1174. % \partopsep
  1175. % \partsw
  1176. % \penalty
  1177. % \picture
  1178. % \poptab
  1179. % \poptabs
  1180. % \postdisplaypenalty
  1181. % \prevdepth
  1182. % \protect
  1183. % \ps@empty
  1184. % \ps@plain
  1185. % \pushtab
  1186. % \pushtabs
  1187. % \put
  1188. % \quotation
  1189. % \raggedbottom
  1190. % \raggedleft
  1191. % \raggedright
  1192. % \raise
  1193. % \raisebox
  1194. % \rbrace
  1195. % \read
  1196. % \ref
  1197. % \refstepcounter
  1198. % \relax
  1199. % \renewcommand
  1200. % \renewenvironment
  1201. % \restorecr
  1202. % \reversemarginpar
  1203. % \right
  1204. % \rightmargin
  1205. % \rightmark
  1206. % \rightskip
  1207. % \rlap
  1208. % \rm
  1209. % \Roman
  1210. % \roman
  1211. % \romannumeral
  1212. % \root
  1213. % \rule
  1214. % \samepage
  1215. % \savebox
  1216. % \sbox
  1217. % \sc
  1218. % \scriptscriptsize
  1219. % \scriptsize
  1220. % \secdef
  1221. % \section
  1222. % \sectionmark
  1223. % \setbox
  1224. % \setcounter
  1225. % \setlength
  1226. % \settowidth
  1227. % \shipout
  1228. % \shortstack
  1229. % \showboxbreadth
  1230. % \showboxdepth
  1231. % \sixt@@n
  1232. % \skip
  1233. % \sl
  1234. % \sloppy
  1235. % \sloppypar
  1236. % \small
  1237. % \smallskip
  1238. % \space
  1239. % \spacefactor
  1240. % \splitmaxdepth
  1241. % \splittopskip
  1242. % \sqrt
  1243. % \ss
  1244. % \stackrel
  1245. % \stepcounter
  1246. % \stop
  1247. % \stretch
  1248. % \string
  1249. % \strut
  1250. % \subsection
  1251. % \subsubsection
  1252. % \tabalign
  1253. % \tabbing
  1254. % \tabbingsep
  1255. % \tabcolsep
  1256. % \tableentry
  1257. % \tableofcontents
  1258. % \tabskip
  1259. % \tabular
  1260. % \tencirc
  1261. % \tencircw
  1262. % \tenln
  1263. % \tenlnw
  1264. % \textfloatsep
  1265. % \textfraction
  1266. % \textheight
  1267. % \textwidth
  1268. % \thanks
  1269. % \the
  1270. % \thebibliography
  1271. % \theenumi
  1272. % \theenumii
  1273. % \theequation
  1274. % \thefigure
  1275. % \thefootnote
  1276. % \thempfn
  1277. % \thempfootnote
  1278. % \thepage
  1279. % \thesection
  1280. % \thicklines
  1281. % \thinlines
  1282. % \thinspace
  1283. % \thispagestyle
  1284. % \tiny
  1285. % \title
  1286. % \today
  1287. % \tolerance
  1288. % \topfigrule
  1289. % \topfraction
  1290. % \topmargin
  1291. % \topnewpage
  1292. % \topnum
  1293. % \topsep
  1294. % \topskip
  1295. % \tracingonline
  1296. % \tracingoutput
  1297. % \tracingstats
  1298. % \trivlist
  1299. % \tt
  1300. % \tw@
  1301. % \twocolumn
  1302. % \typein
  1303. % \typeout
  1304. % \unbox
  1305. % \underline
  1306. % \unhbox
  1307. % \unitlength
  1308. % \unskip
  1309. % \unvbox
  1310. % \usebox
  1311. % \usecounter
  1312. % \vadjust
  1313. % \value
  1314. % \vbox
  1315. % \vcenter
  1316. % \vector
  1317. % \verb
  1318. % \verbatim
  1319. % \vfil
  1320. % \vfuzz
  1321. % \vline
  1322. % \vrule
  1323. % \vsize
  1324. % \vskip
  1325. % \vspace
  1326. % \vsplit
  1327. % \vss
  1328. % \vtop
  1329. % \wd
  1330. % \write
  1331. % \writes
  1332. % \xdef
  1333. % \z@
  1334. %      ****************************************
  1335. %      *         GENERAL CONVENTIONS          *
  1336. %      ****************************************
  1337. % THE \LaTeX LOGO IS DEFINED HERE.
  1338. \def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em
  1339.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
  1340. % SAVED VERSIONS OF TeX PRIMITIVES:
  1341. %  The TeX primitive \foo is saved as \@@foo .  The following primitives
  1342. %  are handled in this way:
  1343. \let\@@par=\par
  1344. %\let\@@relax=\relax  % This was needed at one time, but seems to be obsolete.
  1345. \let\@@input=\input
  1346. \let\@@end=\end
  1347. % The following was added 19 April 1986:
  1348. % The \- command is redefined to allow it to work in the \tt type style,
  1349. % where automatic hyphenation is suppressed by setting \hyphenchar to -1.
  1350. % The original definition is saved as \@@hyph just in case anyone needs it.
  1351. \let\@@hyph=\-        % Original defin
  1352. \def\-{\discretionary{-}{}{}}
  1353. % SAVED VERSIONS OF TeX PARAMETERS
  1354. %  \normalbaselineskip and \normallineskip hold the
  1355. %  normal values of \baselineskip and \lineskip
  1356. % Any font-changing commands that change the normal value of \lineskip
  1357. % and \baselineskip should change their saved values.
  1358. % The following definitions save token space.  E.g., using \@height
  1359. % instead of height saves 5 tokens at the cost in time of one macro
  1360. % expansion.
  1361. \def\@height{height}
  1362. \def\@depth{depth}
  1363. \def\@width{width}
  1364. % The following implements the LaTeX \{ and \} commands.
  1365. % Changed 21 Apr 87 to make them robust.
  1366. \def\{{\protect\@lb}
  1367. \def\@lb{\relax\ifmmode\lbrace\else$\lbrace$\fi}
  1368. \def\}{\protect\@rb}
  1369. \def\@rb{\relax\ifmmode\rbrace\else$\rbrace$\fi}
  1370. \message{counters,}
  1371. %      ****************************************
  1372. %      *          COUNTERS, ETC.              *
  1373. %      ****************************************
  1374. % THE FOLLOWING ARE FROM PLAIN:
  1375. % \z@         : A zero dimen or number.  It's more efficient to write
  1376. %               \parindent\z@ than \parindent 0pt.
  1377. % \@ne        : The number 1.
  1378. % \m@ne       : The number -1.
  1379. % \tw@        : The number 2.
  1380. % \sixt@@n    : The number 16.
  1381. % \@m         : The number 1000.
  1382. % \@xxxii     : The number 32
  1383. % \@M         : The number 10000.
  1384. % \@Mi        : The number 10001.
  1385. % \@Mii       : The number 10002.
  1386. % \@Miii      : The number 10003.
  1387. % \@Miv       : The number 10004.
  1388. % \@MM        : The number 20000.
  1389. % \@flushglue : Glue used for \right- & \leftskip to = 0pt plus 1fil
  1390. \chardef\@xxxii=32
  1391. \mathchardef\@Mi=10001
  1392. \mathchardef\@Mii=10002
  1393. \mathchardef\@Miii=10003
  1394. \mathchardef\@Miv=10004
  1395. % Redefine PLAIN.TEX macros not to be \outer
  1396. \def\newcount{\alloc@0\count\countdef\insc@unt}
  1397. \def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
  1398. \def\newskip{\alloc@2\skip\skipdef\insc@unt}
  1399. \def\newbox{\alloc@4\box\chardef\insc@unt}
  1400. \def\newwrite{\alloc@7\write\chardef\sixt@@n}
  1401. \newwrite\@unused
  1402. \newcount\@tempcnta
  1403. \newcount\@tempcntb
  1404. \newif\if@tempswa\@tempswatrue
  1405. \newdimen\@tempdima
  1406. \newdimen\@tempdimb
  1407. \newbox\@tempboxa
  1408. \newskip\@flushglue \@flushglue = 0pt plus 1fil
  1409. \newskip\@tempskipa
  1410. \newskip\@tempskipb
  1411. \newtoks\@temptokena
  1412. \message{hacks,}
  1413. %      ****************************************
  1414. %      *            USEFUL HACKS              *
  1415. %      ****************************************
  1416. %  \@namedef{NAME}   : Expands to \def\NAME , except name can contain any
  1417. %                      characters.
  1418. %  \@nameuse{NAME}   : Expands to \NAME .
  1419. %  \@ifnextchar X{YES}{NO}
  1420. %                    : Expands to YES if next character is an 'X',
  1421. %                      and to NO otherwise. (Uses temps a-c.)
  1422. %                      NOTE: GOBBLES ANY SPACE FOLLOWING IT.
  1423. %  \@ifstar{YES}{NO} : Gobbles following spaces and then tests if next the
  1424. %                      character is a '*'.  If it is, then it gobbles the
  1425. %                      '*' and expands to YES, otherwise it expands to NO.
  1426. %  \@dblarg{CMD}{ARG}  : \@dblarg{CMD}{ARG} expands to CMD[ARG]{ARG}.  Use
  1427. %                        \@dblarg\CS when \CS takes arguments [ARG1]{ARG2},
  1428. %                        where default is ARG1 = ARG2.
  1429. %  \@ifundefined{NAME}{YES}{NO}
  1430. %                    : If \NAME is undefined then it executes YES,
  1431. %                      otherwise it executes NO.  More precisely,
  1432. %                      true if \NAME either undefined or = \relax.
  1433. %  \@ifdefinable \NAME {YES}
  1434. %                    : Executes YES if the user is allowed to define \NAME,
  1435. %                      otherwise it gives an error.  The user can define \NAME
  1436. %                      if \@ifundefined{NAME} is true, 'NAME' /= 'relax'
  1437. %                      and the first three letters of 'NAME' are not
  1438. %                      'end'.
  1439. %  \newcommand{\FOO}[i]{TEXT}
  1440. %                    : User command to define \FOO to be a macro with
  1441. %                      i arguments (i = 0 if missing) having the definition
  1442. %                      TEXT.  Produces an error if \FOO already defined.
  1443. %  \renewcommand{\FOO}[i]{TEXT} : Same as \newcommand, except it
  1444. %                      checks if \FOO already defined.
  1445. %  \newenvironment{FOO}[i]{DEF1}{DEF2}
  1446. %         equivalent to
  1447. %         \newcommand{\FOO}[i]{DEF1} \def{\endFOO}{DEF2}
  1448. %  \renewenvironment : obvious companion to \newenvironment
  1449. %  \@cons : See description of \output routine.
  1450. %  \@car T1 T2 ... Tn\@nil == T1  (unexpanded)
  1451. %  \@cdr T1 T2 ... Tn\@nil == T2 ... Tn     (unexpanded)
  1452. %  \typeout{message} : produces a warning message on the terminal
  1453. %  \@warning{message}: prints 'LaTeX Warning: message.'
  1454. %  \typein{message}  : Types message, asks the user to type in a command, then
  1455. %                      executes it
  1456. %  \typein[\CS]{MSG} : Same as above, except defines \CS to be the input
  1457. %                      instead of executing it.
  1458. \def\typein{\let\@typein\relax\@ifnextchar[{\@xtypein}{\@xtypein[\@typein]}}
  1459. \def\@xtypein[#1]#2{\typeout{#2}\read0 to#1\ifx #1\@defpar \def#1{}\else
  1460.    \@iden{\expandafter\@strip\expandafter
  1461.    #1#1\@gobble\@gobble} \@gobble\fi\@typein}
  1462. \def\@strip#1#2 \@gobble{\def #1{#2}}
  1463. \def\@defpar{\par}
  1464. \def\@iden#1{#1}
  1465. \def\typeout#1{{\let\protect\string\immediate\write\@unused{#1}}}
  1466. \def\@warning#1{\typeout{LaTeX Warning: #1.}}
  1467. \def\@namedef#1{\expandafter\def\csname #1\endcsname}
  1468. \def\@nameuse#1{\csname #1\endcsname}
  1469. \def\@cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup}
  1470. \def\@car#1#2\@nil{#1}
  1471. \def\@cdr#1#2\@nil{#2}
  1472. % \@carcube T1 ... Tn\@nil = T1 T2 T3 , n > 3
  1473. \def\@carcube#1#2#3#4\@nil{#1#2#3}
  1474. \def\newcommand#1{\@ifnextchar [{\@argdef#1}{\@argdef#1[0]}}
  1475. \def\renewcommand#1{\edef\@tempa{\expandafter\@cdr\string
  1476.   #1\@nil}\@ifundefined{\@tempa}{\@latexerr{\string#1\space undefined}\@ehc
  1477.     }{}\@ifnextchar [{\@reargdef#1}{\@reargdef#1[0]}}
  1478. \def\newenvironment#1{\@ifnextchar
  1479.      [{\@newenv{#1}}{\@newenv{#1}[0]}}
  1480. \long\def\@newenv#1[#2]#3{\expandafter\newcommand
  1481.      \csname #1\endcsname[#2]{#3}\expandafter\long
  1482.      \expandafter\def\csname end#1\endcsname}
  1483. \def\renewenvironment#1{\@ifnextchar
  1484.      [{\@renewenv{#1}}{\@renewenv{#1}[0]}}
  1485. \long\def\@renewenv#1[#2]#3{\expandafter\renewcommand
  1486.      \csname #1\endcsname[#2]{#3}\expandafter\long
  1487.      \expandafter\def\csname end#1\endcsname}
  1488. \long\def\@argdef#1[#2]#3{\@ifdefinable #1{\@reargdef#1[#2]{#3}}}
  1489. % Absolutely untypable control sequence \@?@?  substituted for \@tempb in
  1490. % definition of \@reargdef because it (and therefore \newcommand and
  1491. % \renewcommand) leaves the control sequence dangerously \let to #.
  1492. % (Change made 23 November 87.)
  1493. \catcode`\?=11\relax
  1494. \long\def\@reargdef#1[#2]#3{\@tempcnta#2\relax\let#1\relax
  1495. \edef\@tempa{\long\def#1}\@tempcntb \@ne
  1496. \let\@?@?\relax\@whilenum\@tempcnta>0
  1497. \do{\edef\@tempa{\@tempa\@?@?\the\@tempcntb}\advance\@tempcntb \@ne \advance
  1498. \@tempcnta \m@ne}\let\@?@?##\@tempa{#3}}
  1499. \catcode`\?=12\relax
  1500. % 9 Jan 90 : Missing % added to following definition.
  1501. \long\def\@ifdefinable #1#2{\edef\@tempa{\expandafter\@cdr\string #1\@nil}%
  1502. \@ifundefined{\@tempa}{\edef\@tempb{\expandafter\@carcube \@tempa xxxx\@nil}%
  1503. \ifx \@tempb\@qend \@notdefinable\else
  1504. \ifx \@tempa\@qrelax \@notdefinable\else  #2\fi\fi}{\@notdefinable}}
  1505. \long\def\@ifundefined#1#2#3{\expandafter\ifx\csname
  1506.   #1\endcsname\relax#2\else#3\fi}
  1507. % The following define \@qend and \@qrelax to be the strings 'end' and
  1508. % 'relax' with the characters \catcoded 12.
  1509. \edef\@qend{\expandafter\@cdr\string\end\@nil}
  1510. \edef\@qrelax{\expandafter\@cdr\string\relax\@nil}
  1511. % \@ifnextchar X{YES}{NO}
  1512. %  BEGIN
  1513. %    \@tempe := X  % uses \let
  1514. %    \@tempa := YES
  1515. %    \@tempb := NO
  1516. %    \futurelet\@tempc
  1517. %    \@ifnch
  1518. %  END
  1519. % \@ifnch ==
  1520. %   BEGIN
  1521. %     if  \@tempc = blank space
  1522. %       then  \@tempd := def(\@xifnch)
  1523. %       else  if  \@tempc = \@tempe
  1524. %                then  \@tempd := def(\@tempa)
  1525. %                else  \@tempd := def(\@tempb)
  1526. %             fi
  1527. %     fi
  1528. %     \@tempd
  1529. %   END
  1530. % \@xifnch ==
  1531. %  BEGIN
  1532. %    gobble blanks
  1533. %    \futurelet\@tempc
  1534. %    \@ifnch
  1535. %  END
  1536. \def\@ifnextchar#1#2#3{\let\@tempe #1\def\@tempa{#2}\def\@tempb{#3}\futurelet
  1537.     \@tempc\@ifnch}
  1538. \def\@ifnch{\ifx \@tempc \@sptoken \let\@tempd\@xifnch
  1539.       \else \ifx \@tempc \@tempe\let\@tempd\@tempa\else\let\@tempd\@tempb\fi
  1540.       \fi \@tempd}
  1541. % NOTE: the following hacking must precede the definition of \:
  1542. %  as math medium space.
  1543. \def\:{\let\@sptoken= } \:  % this makes \@sptoken a space token
  1544. \def\:{\@xifnch} \expandafter\def\: {\futurelet\@tempc\@ifnch}
  1545. \def\@ifstar#1#2{\@ifnextchar *{\def\@tempa*{#1}\@tempa}{#2}}
  1546. \long\def\@dblarg#1{\@ifnextchar[{#1}{\@xdblarg{#1}}}
  1547. \long\def\@xdblarg#1#2{#1[{#2}]{#2}}
  1548. % The command \@sanitize changes the catcode of all special characters
  1549. % except for braces to 'other'.  It can be used for commands like
  1550. % \index that want to write their arguments verbatim.  Needless to
  1551. % say, this command should only be executed within a group, or chaos
  1552. % will ensue.
  1553. \def\@sanitize{\@makeother\ \@makeother\\\@makeother\$\@makeother\&%
  1554. \@makeother\#\@makeother\^\@makeother\^^K\@makeother\_\@makeother\^^A%
  1555. \@makeother\%\@makeother\~}
  1556. \message{errors,}
  1557. %      ****************************************
  1558. %      *           ERROR HANDLING             *
  1559. %      ****************************************
  1560. %  \@latexerr{MSG}{HLP}: Types a LaTeX error message MSG and gives an error
  1561. %                          halt with error help message HLP.
  1562. \newlinechar`\^^J
  1563. % 19 Jun 86, took out the grouping. re: John Hobby
  1564. \def\@latexerr#1#2{%
  1565. \edef\@tempc{#2}\expandafter\errhelp\expandafter{\@tempc}%
  1566. \typeout{LaTeX error. \space See LaTeX manual for explanation.^^J
  1567.  \space\@spaces\@spaces\@spaces Type \space H <return> \space for
  1568.  immediate help.}\errmessage{#1}}
  1569. \def\@spaces{\space\space\space\space}
  1570. %% error help message pieces.
  1571. \def\@eha{Your command was ignored.
  1572. ^^JType \space I <command> <return> \space to replace it
  1573.   with another command,^^Jor \space <return> \space to continue without it.}
  1574. \def\@ehb{You've lost some text. \space \@ehc}
  1575. \def\@ehc{Try typing \space <return>
  1576.   \space to proceed.^^JIf that doesn't work, type \space X <return> \space to
  1577.   quit.}
  1578. \def\@ehd{You're in trouble here.  \space\@ehc}
  1579. % Here are all the error message-generating commands of LaTeX.
  1580. % \@notdefinable : Error message generated in \@ifdefinable from calls
  1581. %                  by \newcommand, \newlength, \newtheorem specifying an
  1582. %                  already-defined command name.
  1583. % \@nolnerr      : Generated by \newline and \\ when called in vertical mode.
  1584. % '\... undefined' : Generated in \renewcommand.
  1585. % \@nocnterr     : Generated by \setcounter, \addtocounter or \newcounter
  1586. %                  for undefined counter.
  1587. % \@ctrerr       : Called when trying to print the value of a counter
  1588. %                  numbered by letters that's greater than 26.
  1589. % 'Environment --- undefined' : Issued by \begin for undefined environment.
  1590. % \@badend       : Called by \end that doesn't match its \begin.
  1591. % \@badmath      : Called by \[, \], \( or \) when used in wrong mode.
  1592. % \@toodeep      : Called by a list environment nested more than six levels
  1593. %                  deep, or an enumerate or itemize nested more than four
  1594. %                  levels.
  1595. % \@badpoptabs   : Called by \endtabbing when not enough \poptabs have
  1596. %                  occurred, or by \poptabs when too many have occurred.
  1597. % \@badtab : Called by \>, \+ , \- or \< when stepping to an undefined tab.
  1598. % 'tab overflow' : Occurs in \= when maximum number of tabs exceeded.
  1599. % '\< in mid line' : Occurs in \< when it appears in middle of line.
  1600. % \@preamerr : Occurs in array or tabular environment, or in \multicolumn
  1601. %              command, when error in argument detected.
  1602. % \@badlinearg : Occurs in \line and \vector command when a bad slope
  1603. %                argument is encountered.
  1604. % \@parmoderr  : Occurs in a float environment or a \marginpar when
  1605. %                encountered in inner vertical mode.
  1606. % \@fltovf     : Occurs in float environment or \marginpar when there
  1607. %                are no more free boxes for storing floats.
  1608. % \@latexbug   :  Occurs in output routine.  This is bad news.
  1609. % 'Float(s) lost' : In output routine, caused by a float environment or
  1610. %                   \marginpar occurring in inner vertical mode.
  1611. % \@nofonterror   : Typeface not available.  %%% OBSOLETE; DELETED.
  1612. % \@badcrerr      : A \\ used where it shouldn't be in a centering or flushing
  1613. %                   environment.
  1614. % \@noitemerr     : \addvspace or \addpenalty was called when not in vmode.
  1615. %                   Probably caused by a missing \item.
  1616. % \@notprerr      : A command that can be used only in the preamble
  1617. %                   appears after the \begin{document} command.
  1618. \def\@notdefinable{\@latexerr{Command name '\@tempa' already used}\@eha}
  1619. \def\@nolnerr{\@latexerr{There's no line here to end}\@eha}
  1620. \def\@nocnterr{\@latexerr{No such counter}\@eha}
  1621. \def\@ctrerr{\@latexerr{Counter too large}\@ehb}
  1622. \def\@nodocument{\@latexerr{Missing \string\begin{document}}\@ehd}
  1623. \def\@badend#1{\@latexerr{\string\begin{\@currenvir} ended by
  1624.       \string\end{#1}}\@eha}
  1625. \def\@badmath{\@latexerr{Bad math environment delimiter}\@eha}
  1626. \def\@toodeep{\@latexerr{Too deeply nested}\@ehd}
  1627. \def\@badpoptabs{\@latexerr{\string\pushtabs \space and \string\poptabs
  1628.     \space don't match}\@ehd}
  1629. \def\@badtab{\@latexerr{Undefined tab position}\@ehd}
  1630. \def\@preamerr#1{\@latexerr{\ifcase #1 Illegal character\or
  1631.      Missing @-exp\or Missing p-arg\fi\space
  1632.      in array arg}\@ehd}
  1633. \def\@badlinearg{\@latexerr{Bad \string\line\space or \string\vector
  1634.    \space argument}\@ehb}
  1635. \def\@parmoderr{\@latexerr{Not in outer par mode}\@ehb}
  1636. \def\@fltovf{\@latexerr{Too many unprocessed floats}\@ehb}
  1637. \def\@latexbug{\@latexerr{This may be a LaTeX bug}{Call for help}}
  1638. % \def\@nofonterror{\@latexerr{Typeface not available}\@eha}
  1639. \def\@badcrerr {\@latexerr{Bad use of \string\\}\@ehc}
  1640. \def\@noitemerr{\@latexerr{Something's wrong--perhaps a missing
  1641. \string\item}\@ehc}
  1642. \def\@notprerr {\@latexerr{Can be used only in preamble}\@eha}
  1643. \message{par,}
  1644. %       ****************************************
  1645. %       *          \par AND \everypar          *
  1646. %       ****************************************
  1647. % There are two situations in which \par may be changed:
  1648. %   - Long-term changes, in which the new value is to remain in effect
  1649. %     until the current environment is left.  The environments that
  1650. %     change \par in this way are the following:
  1651. %         * All list environments (itemize, quote, etc.)
  1652. %         * Environments that turn \par into a noop:
  1653. %              tabbing, array and tabular.
  1654. %   - Temporary changes, in which \par is restored to its previous value the
  1655. %     next time it is executed. The following are all such uses.
  1656. %         * \end [when preceded by \@endparenv, which is called by
  1657. %                 \endtrivlist]
  1658. %         * The mechanism for avoiding page breaks and getting the
  1659. %           spacing right after section heads.
  1660. % To permit the proper interaction of these two situations, long-term
  1661. % changes are made by the following command:
  1662. %     \@setpar{VAL}      : To set \par. It \def's \par and \@par to VAL.
  1663. % Short-term changes are made by the usual \def\par commands.
  1664. % The original values are restored after a short-term change
  1665. % by the \@restorepar commands.
  1666. % NOTE: \@@par always is defined to be the original TeX \par.
  1667. % \everypar is changed only for the short term.  Whenever \everypar
  1668. % is set non-null, it should restore itself to null when executed.
  1669. % The following commands change \everypar in this way:
  1670. %         * \item
  1671. %         * \end [when preceded by \@endparenv, which is called by
  1672. %                 \endtrivlist]
  1673. %         * \minipage
  1674. % WARNING: Commands that make short-term changes to \par and \everypar
  1675. % must take account of the possibility that the new commands and the
  1676. % ones that do the restoration may be executed inside a group.  In
  1677. % particular, \everypar is executed inside a group whenever a new paragraph
  1678. % begins with a left brace.  The \everypar command that restores its
  1679. % definition should be local to the current group (in case the command
  1680. % is inside a minipage used inside someplace where \everypar has been
  1681. % redefined).  Thus, if \everypar is redefined to do an \everypar{}
  1682. % it could take several executions of \everypar before
  1683. % the restoration 'holds'.  This usually causes no problem.  However, to
  1684. % prevent the extra executions from doing harm, use a global switch
  1685. % to keep anything harmful in the new \everypar from being done twice.
  1686. % WARNING: Commands that change \everypar should remember that \everypar
  1687. % might be supposed to set the following switches false:
  1688. %              @nobreak
  1689. %              @minipage
  1690. % they should do the setting if necessary.
  1691. \def\@par{\let\par=\@@par\par}
  1692. \def\@setpar#1{\def\par{#1}\def\@par{#1}}
  1693. \def\@restorepar{\def\par{\@par}}
  1694. \message{spacing,}
  1695. %      **********************************************
  1696. %      *     SPACING / LINE AND PAGE BREAKING       *
  1697. %      **********************************************
  1698. % USER COMMANDS:
  1699. % \nopagebreak[i] : i = 0,...,4.  Default argument = 4.  Puts a penalty
  1700. %                 into the vertical list output as follows:
  1701. %                   0 : penalty = 0
  1702. %                   1 : penalty = \@lowpenalty
  1703. %                   2 : penalty = \@medpenalty
  1704. %                   3 : penalty = \@highpenalty
  1705. %                   4 : penalty = 10000
  1706. % \pagebreak[i]   : same as \nopagebreak except negatives of its penalty
  1707. % \linebreak[i], \nolinebreak[i] : analogs of the above
  1708. % \samepage : inhibits page breaking most places by setting the following
  1709. %             penalties to 10000
  1710. %                    \interlinepenalty
  1711. %                    \postdisplaypenalty
  1712. %                    \interdisplaylinepenalty
  1713. %                    \@beginparpenalty
  1714. %                    \@endparpenalty
  1715. %                    \@itempenalty
  1716. %                    \@secpenalty
  1717. %                    \interfootnotelinepenalty
  1718. % \obeycr    : defines <CR> == \\.
  1719. % \restorecr : restores <CR> to its usual meaning.
  1720. % \\         : initially defined to be \newline
  1721. % \\[LENGTH] : initially defined to be \vspace{LENGTH}\newline
  1722. %              Note: \\* adds a \vadjust{\penalty 10000}
  1723. \def\nopagebreak{\@ifnextchar[{\@nopgbk}{\@nopgbk[4]}}
  1724. \def\@nopgbk[#1]{\ifvmode \penalty \@getpen{#1}\else
  1725. \@bsphack\vadjust{\penalty \@getpen{#1}}\@esphack\fi}
  1726. \def\pagebreak{\@ifnextchar[{\@pgbk}{\@pgbk[4]}}
  1727. \def\@pgbk[#1]{\ifvmode \penalty -\@getpen{#1}\else
  1728. \@bsphack\vadjust{\penalty -\@getpen{#1}}\@esphack\fi}
  1729. \def\nolinebreak{\@ifnextchar[{\@nolnbk}{\@nolnbk[4]}}
  1730. \def\@nolnbk[#1]{\ifvmode \@nolnerr\else \@tempskipa\lastskip
  1731.      \unskip \penalty \@getpen{#1}\ifdim \@tempskipa >\z@
  1732.      \hskip\@tempskipa\ignorespaces\fi\fi}
  1733. \def\linebreak{\@ifnextchar[{\@lnbk}{\@lnbk[4]}}
  1734. \def\@lnbk[#1]{\ifvmode \@nolnerr\else
  1735.      \unskip\penalty -\@getpen{#1}\fi}
  1736. \def\samepage{\interlinepenalty\@M
  1737.    \postdisplaypenalty\@M
  1738.    \interdisplaylinepenalty\@M
  1739.    \@beginparpenalty\@M
  1740.    \@endparpenalty\@M
  1741.    \@itempenalty\@M
  1742.    \@secpenalty\@M
  1743.    \interfootnotelinepenalty\@M}
  1744. % \nobreak added to \newline to prevent null lines when \newline
  1745. % ends an overfull line.  Change made 24 May 89 as suggested by
  1746. % Frank Mittelbach and Rainer Sch\"opf
  1747. \def\newline{\ifvmode \@nolnerr \else \unskip\nobreak\hfil
  1748.   \penalty -\@M\relax\fi}
  1749. \def\@normalcr{\@ifstar{\vadjust{\penalty\@M}\@xnewline}{\@xnewline}}
  1750. \def\@xnewline{\@ifnextchar[{\@newline}{\newline}}
  1751. \def\@newline[#1]{\ifhmode\unskip\fi\vspace{#1}\newline}
  1752. \let\\=\@normalcr
  1753. \def\@getpen#1{\ifcase #1 0 \or \@lowpenalty\or
  1754.          \@medpenalty \or \@highpenalty
  1755.          \else \@M \fi}
  1756. % @nobreak : Switch used to avoid page breaks caused by \label after a section
  1757. %            heading, etc. It should be GLOBALLY set true after the \nobreak
  1758. %            and GLOBALLY set false by the next invocation of \everypar.
  1759. %            Commands that reset \everypar should globally set it false
  1760. %            if appropriate.
  1761. \newif\if@nobreak \@nobreakfalse
  1762. % \@bsphack ... \@esphack
  1763. %     used by macros such as \index and \begin{@float} ... \end{@float}
  1764. %     that want to be invisible -- i.e.,
  1765. %     not leave any extra space when used in the middle of text.  Such
  1766. %     a macro should begin with \@bsphack and end with \@esphack
  1767. %     The macro in question should not create any text, nor change the
  1768. %     mode.
  1769. % \@bsphack ==
  1770. %  BEGIN
  1771. %   if not mmode then                 %% Test for math mode added 18 Dec 89
  1772. %         \dimen\@savsk := \lastskip
  1773. %       if  hmode  then  \@savsf := \spacefactor  fi
  1774. %   fi
  1775. %  END
  1776. % \@esphack ==
  1777. %  BEGIN
  1778. %   if not mmode then                 %% Test for math mode added 18 Dec 89
  1779. %    if  hmode
  1780. %      then  \spacefactor := \@savsf
  1781. %            if \dimen\@savsk > 0pt  then  \ignorespaces
  1782. %                                          \global\@ignoretrue   fi
  1783. %    fi
  1784. %   fi
  1785. %  END
  1786. \newdimen\@savsk
  1787. \newcount\@savsf
  1788. \def\@bsphack{\relax\ifmmode\else\@savsk\lastskip
  1789.     \ifhmode\@savsf\spacefactor\fi\fi}
  1790. \def\@esphack{\relax\ifmmode\else\ifhmode\spacefactor\@savsf
  1791.      {}\ifdim \@savsk >\z@ \global\@ignoretrue \ignorespaces
  1792.   \fi \fi\fi}
  1793. % VERTICAL SPACING:
  1794. % LaTeX supports the PLAIN TeX commands \smallskip, \medskip and \bigskip.
  1795. % However, it redefines them using \vspace instead of \vskip.
  1796. % Extra vertical space is added by the command command \addvspace{SKIP},
  1797. % which adds a vertical skip of SKIP to the document.  The sequence
  1798. %         \addvspace{S1} \addvspace{S2}
  1799. % is equivalent to
  1800. %         \addvspace{maximum of S1, S2}.
  1801. % \addvspace should be used only in vertical mode, and gives an error if it's
  1802. % not.  The \addvspace command does NOT add vertical space if
  1803. % @minipage = T. The minipage environment uses this to inhibit
  1804. % the addition of extra vertical space at the beginning.
  1805. % Penalties are put into the vertical list with the \addpenalty{PENALTY}
  1806. % command.  It works properly when \addpenalty and \addvspace commands
  1807. % are mixed.
  1808. % The @nobreak switch is set true used when in vertical mode and no page
  1809. % break should occur.  (Right now, it is used only by the section heading
  1810. % commands to inhibit page breaking after a heading.)
  1811. % \addvspace{SKIP} ==
  1812. %  BEGIN
  1813. %   if vmode
  1814. %     then if @minipage
  1815. %            else if \lastskip =0
  1816. %                    then  \vskip SKIP
  1817. %                    else  if \lastskip < SKIP
  1818. %                             then  \vskip -\lastskip
  1819. %                                   \vskip SKIP
  1820. %                             else if SKIP < 0 and \lastskip >= 0
  1821. %                                    then \vskip -\lastskip
  1822. %                                         \vskip \lastskip + SKIP
  1823. %          fi      fi       fi      fi
  1824. %     else 'missing \item' error.
  1825. %   fi
  1826. %  END
  1827. \def\addvspace#1{\ifvmode
  1828.      \if@minipage\else
  1829.           \ifdim \lastskip =\z@ \vskip #1\relax
  1830.              \else \@tempskipb#1\relax\@xaddvskip
  1831.      \fi\fi
  1832.   \else\@noitemerr\fi}
  1833. \def\@xaddvskip{\ifdim \lastskip <\@tempskipb\vskip-\lastskip\vskip
  1834.              \@tempskipb\relax
  1835.         \else  \ifdim \@tempskipb<\z@
  1836.                  \ifdim \lastskip <\z@
  1837.                     \else \advance\@tempskipb\lastskip
  1838.                            \vskip -\lastskip \vskip \@tempskipb
  1839.       \fi\fi\fi}
  1840. \def\addpenalty#1{\ifvmode
  1841.    \if@minipage\else\if@nobreak\else
  1842.       \ifdim\lastskip=\z@ \penalty#1\relax
  1843.          \else \@tempskipb\lastskip
  1844.                \vskip -\lastskip \penalty#1\vskip\@tempskipb
  1845.       \fi\fi\fi
  1846.    \else\@noitemerr\fi}
  1847. \def\vspace{\@ifstar{\@vspacer}{\@vspace}}
  1848. \def\@vspace#1{\ifvmode
  1849.     \dimen@\prevdepth \expandafter\vskip #1\vskip \z@\prevdepth\dimen@
  1850.        \else
  1851.         \@bsphack\vadjust{\dimen@\prevdepth
  1852.             \expandafter\vskip #1\vskip \z@\prevdepth\dimen@}\@esphack\fi}
  1853. \def\@vspacer#1{\ifvmode \dimen@\prevdepth
  1854.          \hrule height\z@ \nobreak \expandafter\vskip #1\vskip \z@
  1855.            \prevdepth\dimen@
  1856.         \else
  1857.          \@bsphack\vadjust{\dimen@\prevdepth \hrule height\z@ \nobreak
  1858.             \expandafter\vskip #1\vskip \z@ \prevdepth\dimen@}\@esphack\fi}
  1859. \def\smallskip{\vspace\smallskipamount}
  1860. \def\medskip{\vspace\medskipamount}
  1861. \def\bigskip{\vspace\bigskipamount}
  1862. % See list environment for explanation of the following macros.
  1863. \def\endtrivlist{\if@newlist\@noitemerr\fi
  1864.    \if@inlabel\indent\fi
  1865.    \ifhmode\unskip \par\fi
  1866.    \if@noparlist \else
  1867.       \ifdim\lastskip >\z@ \@tempskipa\lastskip \vskip -\lastskip
  1868.          \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip
  1869.          \vskip\@tempskipa
  1870.    \fi\@endparenv\fi}
  1871. % CHANGES TO \@endparenv:
  1872. % Changed  \hskip -\parindent  to  \setbox0=\lastbox  so a \noindent
  1873. % becomes a no-op when used before a line immediately following a
  1874. % list environment.  (Changed 23 Oct 86)
  1875. % To suppress the paragraph indentation in text immediately following
  1876. % a paragraph-making environment, \everypar is changed to remove the
  1877. % space, and \par is redefined to restore \everypar.  Instead of redefining
  1878. % \par and \everpar, \@endparenv was changed to set the @endpe switch,
  1879. % letting \end redefine \par and \everypar.  This allows paragraph-
  1880. % making environments work right when called by other environments.
  1881. % (Changed 27 Oct 86)
  1882. \def\@endparenv{\addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue}
  1883. \def\@doendpe{\@endpetrue
  1884.      \def\par{\@restorepar\everypar{}\par\@endpefalse}\everypar
  1885.                {\setbox0=\lastbox\everypar{}\@endpefalse}}
  1886. \newif\if@endpe
  1887. \@endpefalse
  1888. % HORIZONTAL SPACE
  1889. % \, : used in paragraph mode produces a \thinspace.  It has the ordinary
  1890. %      definition in math mode.  Useful for quotes inside quotes, as in
  1891. %      ``\,`Foo', he said.''
  1892. % \@ : placed before a '.', makes it a sentence-ending period.  Does the
  1893. %     right thing for other punctuation marks as well.  Does this by
  1894. %     setting spacefactor to 1000.
  1895. \def\,{\protect\pcomma}
  1896. \def\pcomma{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
  1897. \def\@{\spacefactor\@m}
  1898. \def\hspace{\protect\phspace}
  1899. \def\phspace{\@ifstar{\@hspacer}{\@hspace}}
  1900. \def\@hspace#1{\leavevmode\expandafter\hskip #1\relax}
  1901. \def\@hspacer#1{\leavevmode\vrule width\z@\nobreak\expandafter\hskip
  1902.                 #1\hskip \z@\relax}
  1903.                       %% extra \hskip 0pt added 12/17/85 to guard
  1904.                       %% against a following \unskip
  1905.                       %% \relax added 13 Oct 88 for usual TeX lossage
  1906. % define \fill to = 0pt plus 1fill
  1907. \newskip\fill \fill = 0pt plus 1fill
  1908. % \stretch{N} == 0pt plus N fill
  1909. \def\stretch#1{\z@ plus #1fill\relax}
  1910. {\catcode`\^^M=13 \gdef\obeycr{\catcode`\^^M=13 \def^^M{\\}\@gobblecr}%
  1911. \gdef\restorecr{\catcode`\^^M=5 }} %} BRACE MATCHING
  1912. \message{control,}
  1913. %      **********************************************
  1914. %      *     PROGRAM CONTROL STRUCTURE MACROS       *
  1915. %      **********************************************
  1916. % \@whilenum TEST \do {BODY}
  1917. % \@whiledim TEST \do {BODY}  : These implement the loop
  1918. %           while  TEST  do  BODY  od
  1919. %     where  TEST  is a TeX \ifnum or \ifdim test, respectively.
  1920. %     They are optimized for the normal case of TEST initially false.
  1921. % \@whilesw SWITCH \fi {BODY} : Implements the loop
  1922. %               while SWITCH do BODY od
  1923. %     where SWITCH is a command defined by \newswitch.
  1924. %     Optimized for normal case of SWITCH initially false.
  1925. % \@for NAME := LIST \do {BODY} : Assumes that LIST expands to A1,A2, ... ,An .
  1926. %      Executes  BODY  n  times, with  NAME = Ai  on the i-th iteration.
  1927. %      Optimized for the normal case of n = 1.  Works for n=0.
  1928. % \@tfor NAME := LIST \do {BODY}
  1929. %      if, before expansion, LIST = T1 ... Tn  where each Ti is a
  1930. %      token or {...}, then executes  BODY  n  times, with  NAME = Ti
  1931. %      on the i-th iteration.  Works for n=0.
  1932. %  NOTES: 1. These macros use no \@temp sequences.
  1933. %         2. These macros do not work if the body contains anything that looks
  1934. %            syntactically to TeX like an improperly balanced \if \else \fi.
  1935. % \@whilenum TEST \do {BODY} ==
  1936. %  BEGIN
  1937. %    if  TEST
  1938. %      then  BODY
  1939. %            \@iwhilenum{TEST \relax BODY}
  1940. %  END
  1941. % \@iwhilenum {TEST BODY} ==
  1942. %  BEGIN
  1943. %    if  TEST
  1944. %      then  BODY
  1945. %            \@nextwhile = def(\@iwhilenum)
  1946. %      else  \@nextwhile = def(\@whilenoop)
  1947. %    fi
  1948. %    \@nextwhile {TEST BODY}
  1949. %  END
  1950. % \@whilesw SWITCH \fi {BODY} ==
  1951. %  BEGIN
  1952. %    if SWITCH
  1953. %      then BODY
  1954. %           \@iwhilesw {SWITCH BODY}\fi
  1955. %    fi
  1956. %  END
  1957. % \@iwhilesw {SWITCH BODY} \fi ==
  1958. %  BEGIN
  1959. %    if SWITCH
  1960. %      then BODY
  1961. %           \@nextwhile = def(\@iwhilesw)
  1962. %      else \@nextwhile = def(\@whileswnoop)
  1963. %    fi
  1964. %    \@nextwhile {SWITCH BODY} \fi
  1965. %  END
  1966. \def\@whilenoop#1{}
  1967. \def\@whilenum#1\do #2{\ifnum #1\relax #2\relax\@iwhilenum{#1\relax
  1968.      #2\relax}\fi}
  1969. \def\@iwhilenum#1{\ifnum #1\let\@nextwhile=\@iwhilenum
  1970.          \else\let\@nextwhile=\@whilenoop\fi\@nextwhile{#1}}
  1971. \def\@whiledim#1\do #2{\ifdim #1\relax#2\@iwhiledim{#1\relax#2}\fi}
  1972. \def\@iwhiledim#1{\ifdim #1\let\@nextwhile=\@iwhiledim
  1973.         \else\let\@nextwhile=\@whilenoop\fi\@nextwhile{#1}}
  1974. \def\@whileswnoop#1\fi{}
  1975. \def\@whilesw#1\fi#2{#1#2\@iwhilesw{#1#2}\fi\fi}
  1976. \def\@iwhilesw#1\fi{#1\let\@nextwhile=\@iwhilesw
  1977.          \else\let\@nextwhile=\@whileswnoop\fi\@nextwhile{#1}\fi}
  1978. % \@for NAME := LIST \do {BODY} ==
  1979. %    BEGIN \@forloop expand(LIST),\@nil,\@nil \@@ NAME {BODY} END
  1980. % \@forloop CAR, CARCDR, CDRCDR \@@ NAME {BODY} ==
  1981. %   BEGIN
  1982. %     NAME = CAR
  1983. %     if def(NAME) = def(\@nnil)
  1984. %       else BODY;
  1985. %            NAME = CARCDR
  1986. %            if def(NAME) = def(\@nnil)
  1987. %              else BODY
  1988. %                   \@iforloop CDRCDR \@@ NAME \do {BODY}
  1989. %            fi
  1990. %     fi
  1991. %   END
  1992. % \@iforloop CAR, CDR \@@ NAME {BODY} =
  1993. %     NAME = CAR
  1994. %     if def(NAME) = def(\@nnil)
  1995. %        then  \@nextwhile = def(\@fornoop)
  1996. %        else  BODY ;
  1997. %              \@nextwhile = def(\@iforloop)
  1998. %     fi
  1999. %     \@nextwhile name cdr {body}
  2000. % \@tfor NAME := LIST \do {BODY}
  2001. %    =  \@tforloop LIST \@nil \@@ NAME {BODY}
  2002. % \@tforloop car cdr \@@ name {body} =
  2003. %     name = car
  2004. %     if def(name) = def(\@nnil)
  2005. %        then  \@nextwhile == \@fornoop
  2006. %        else  body ;
  2007. %              \@nextwhile == \@forloop
  2008. %     fi
  2009. %     \@nextwhile name cdr {body}
  2010. \def\@nnil{\@nil}
  2011. \def\@empty{}
  2012. \def\@fornoop#1\@@#2#3{}
  2013. \def\@for#1:=#2\do#3{\edef\@fortmp{#2}\ifx\@fortmp\@empty \else
  2014.     \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi}
  2015. \def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
  2016.        #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi}
  2017. \def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
  2018.        \let\@nextwhile=\@fornoop \else
  2019.       #4\relax\let\@nextwhile=\@iforloop\fi\@nextwhile#2\@@#3{#4}}
  2020. \def\@tfor#1:=#2\do#3{\xdef\@fortmp{#2}\ifx\@fortmp\@empty \else
  2021.     \@tforloop#2\@nil\@nil\@@#1{#3}\fi}
  2022. \def\@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
  2023.        \let\@nextwhile=\@fornoop \else
  2024.       #4\relax\let\@nextwhile=\@tforloop\fi\@nextwhile#2\@@#3{#4}}
  2025. \message{files,}
  2026. %     ****************************************
  2027. %     *           FILE HANDLING              *
  2028. %     ****************************************
  2029. % THE FOLLOWING USER COMMANDS ARE DEFINED IN THIS PART:
  2030. %  \document            : Reads in the .AUX files and \catcode's @ to 12.
  2031. %  \nofiles             : Suppresses all file output by setting \@filesw false.
  2032. %  \includeonly{NAME1, ... ,NAMEn}
  2033. %                    : Causes only parts NAME1, ... ,NAMEn to be read by
  2034. %                      their \include commands.  Works by setting \@partsw true
  2035. %                      and setting \@partlist to NAME1, ... ,NAMEn.
  2036. %  \include{NAME}    : Does an \input NAME unless \partsw is true and
  2037. %                      NAME is not in \@partlist.  If \@filesw is true, then
  2038. %                      it directs .AUX output to NAME.AUX, including a
  2039. %                      checkpoint at the end.
  2040. % \input{NAME}       : The same as TeX's \input, except it allows optional
  2041. %                      braces around the file name.
  2042. %  VARIABLES, SWITCHES AND INTERNAL COMMANDS:
  2043. %    \@mainaux    : Output file number for main .AUX file.
  2044. %    \@partaux    : Output file number for current part's .AUX file.
  2045. %    \@auxout     : Either \@mainout or \@partout, depending on which .AUX
  2046. %                   file output goes to.
  2047. %    \@input{foo} : If file foo exists, then \input's it, otherwise types
  2048. %                   a warning message.
  2049. %    @filesw       : Switch -- set false if no .AUX, .TOC, .IDX etc files are
  2050. %                   to be
  2051. %    @partsw      : Set true by a \includeonly command.
  2052. %    \@partlist   : Set to the argument of the \includeonly command.
  2053. %    \cp@FOO      : The checkpoint for \include'd file FOO.TEX, written
  2054. %                   by \@writeckpt at the end of file FOO.AUX
  2055. % \document ==
  2056. %   BEGIN
  2057. %     \endgroup   % cancels \begingroup generated by \begin command
  2058. %     \@colht := \@colroom := \vsize := \textheight
  2059. %     \columnwidth := \textwidth
  2060. %     \@clubpenalty := \clubpenalty          % \@clubpenalty saves value.
  2061. %     IF @twocolumn = T
  2062. %       THEN \columnwidth := (\columnwidth - \columnsep)/2
  2063. %            @firstcolumn := T
  2064. %     FI
  2065. %     \hsize  := \linewidth := \columnwidth
  2066. %     \begingroup
  2067. %        \@floatplacement \@dblfloatplacement
  2068. %        \@input{\jobname.aux}
  2069. %     \endgroup
  2070. %     IF \@filesw = T
  2071. %       THEN  open file \@mainaux for writing
  2072. %             write ``\relax''on file \@mainaux
  2073. %     FI
  2074. %     \do{COMMAND} == BEGIN \let COMMAND = \@notprerr END
  2075. %     \@preamblecmds
  2076. %     \do == \noexpand
  2077. %     \@normalsize
  2078. %     \everypar{}
  2079. %   END
  2080. % \includeonly{FILELIST} ==
  2081. %  BEGIN
  2082. %   \@partsw   := T
  2083. %   \@partlist := FILELIST
  2084. %  END
  2085. % \include{FILE} ==
  2086. %  BEGIN
  2087. %   \clearpage
  2088. %   if \@filesw = T
  2089. %     then  \immediate\write\@mainaux{\string\@input{FILE.AUX}}
  2090. %   fi
  2091. %   if  \@partsw = T
  2092. %     then \@tempswa := F
  2093. %          \@tempb == FILE
  2094. %          for \@tempa := \@partlist
  2095. %              do if eval(\@tempa) = eval(\@tempb)
  2096. %                   then \@tempswa := T          fi
  2097. %              od
  2098. %   fi
  2099. %   if \@tempswa = T
  2100. %      then \@auxout := \@partaux
  2101. %           if \@filesw = T
  2102. %             then  \immediate\openout\@partaux{FILE.AUX}
  2103. %                   \immediate\write\@partaux{\relax}
  2104. %           fi
  2105. %           \@input{FILE.TEX}
  2106. %           \clearpage
  2107. %           \@writeckpt{FILE}
  2108. %           if @filesw then \closeout \@partaux fi
  2109. %           \@auxout := \@mainaux
  2110. %      else \cp@FILE
  2111. %   fi
  2112. %  END
  2113. % \@writeckpt{FILE} ==
  2114. %  BEGIN
  2115. %    if \@filesw = T
  2116. %        \immediate\write on file \@partaux:
  2117. %                  \gdef\cp@FILE{                  %% }
  2118. %        for \@tempa := \cl@@ckpt
  2119. %           do  \immediate\write on file \@partaux:
  2120. %                   \global\string\setcounter
  2121. %                       {eval(\@tempa)}{eval(\c@eval(\@tempa))}
  2122. %           od                                     %% {
  2123. %        \immediate\write on file \@partaux:  }
  2124. %    fi
  2125. %  END
  2126. %  INITIALIZATION
  2127. %    \@tempswa := T
  2128. \newif\if@filesw \@fileswtrue
  2129. \newif\if@partsw \@partswfalse
  2130. \newwrite\@mainaux
  2131. \newwrite\@partaux
  2132. \newcount\@clubpenalty
  2133. \def\document{\endgroup
  2134.   \@colht\textheight  \@colroom\textheight \vsize\textheight
  2135.    \columnwidth\textwidth \@clubpenalty\clubpenalty
  2136.    \if@twocolumn \advance\columnwidth -\columnsep
  2137.       \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
  2138.    \fi
  2139.   \hsize\columnwidth \linewidth\hsize
  2140.   \begingroup\@floatplacement\@dblfloatplacement
  2141.    \makeatletter\let\@writefile\@gobbletwo
  2142.    \@input{\jobname.aux}\endgroup
  2143.   \if@filesw \immediate\openout\@mainaux=\jobname.aux
  2144.     \immediate\write\@mainaux{\relax}\fi
  2145.   \def\do##1{\let ##1\@notprerr}%
  2146.   \@preamblecmds
  2147.   \let\do\noexpand
  2148.   \@normalsize\everypar{}}
  2149. \def\@gobbletwo#1#2{}
  2150. \def\nofiles{\@fileswfalse \typeout
  2151.    {No auxiliary output files.}\typeout{}}
  2152. \def\@input#1{\openin1 #1 \ifeof1 \typeout
  2153.   {No file #1.}\else\closein1 \relax\@@input #1 \fi}
  2154. \let\@auxout=\@mainaux
  2155. \def\includeonly#1{\@partswtrue\edef\@partlist{#1}}
  2156. % In the definition of \include, \def\@tempb changed to \edef\@tempb to
  2157. % be consistent with the \edef in \includeonly.  (Suggested by Rainer
  2158. % Sch\"opf & Frank Mittelbach.  Change made 20 Jul 88.)
  2159. % Changed definition of \include to allow space at end of file name--
  2160. % otherwise, typing \include{foo } would cause LaTeX to overwrite
  2161. % foo.tex.  Change made 24 May 89, suggested by Rainer Sch\"opf  and
  2162. % Frank Mittelbach
  2163. \def\include#1{\@include#1 }
  2164. \def\@include#1 {\clearpage
  2165. \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi
  2166. \@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for
  2167. \@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi
  2168. \if@tempswa \if@filesw \let\@auxout=\@partaux
  2169. \immediate\openout\@partaux #1.aux
  2170. \immediate\write\@partaux{\relax}\fi\@input{#1.tex}\clearpage
  2171. \@writeckpt{#1}\if@filesw \immediate\closeout\@partaux \fi
  2172. \let\@auxout=\@mainaux\else\@nameuse{cp@#1}\fi}
  2173. \def\@writeckpt#1{\if@filesw
  2174. \immediate\write\@partaux{\string\global\string\@namedef{cp@#1}\@charlb}%
  2175. {\let\@elt\@wckptelt \cl@@ckpt}\immediate\write\@partaux{\@charrb}\fi}
  2176. \def\@wckptelt#1{\immediate\write\@partaux
  2177. {\string\setcounter{#1}{\the\@nameuse{c@#1}}}}
  2178. \def\input{\@ifnextchar \bgroup{\@iinput}{\@@input }}
  2179. \def\@iinput#1{\@@input #1 }
  2180. % The following defines \@charlb and \@charrb to be { and }, respectively
  2181. % with \catcode 11.
  2182. {\catcode`[=1 \catcode`]=2
  2183. \catcode`{=11 \catcode`}=11
  2184. \gdef\@charlb[{]
  2185. \gdef\@charrb[}]
  2186. ]% }brace matching
  2187. \message{env. counters,}
  2188. %          ****************************************
  2189. %          *     ENVIRONMENT COUNTER MACROS       *
  2190. %          ****************************************
  2191. %  An environment  foo  has an associated counter defined by the
  2192. %  following control sequences:
  2193. %    \c@foo  :  Contains the counter's numerical value.  It is defined by
  2194. %                   \newcount\foocounter.
  2195. %    \thefoo : Macro that expands to the printed value of \foocounter.
  2196. %              For example, if sections are numbered within chapters,
  2197. %              and section headings look like
  2198. %                  Section II-3.  The Nature of Counters
  2199. %              then \thesection might be defined by:
  2200. %                 \def\thesection{\@Roman{\c@chapter}-\@arabic{\c@section}}
  2201. %    \p@foo  : Macro that expands to a printed 'reference prefix' of
  2202. %              counter foo.  Any \ref to a value created by counter
  2203. %              foo will produce the expansion of \p@foo\thefoo  when the
  2204. %              the \label command is executed.
  2205. % NOTE: \thefoo and \p@foo MUST BE DEFINED IN SUCH A WAY THAT
  2206. % \edef\bar{\thefoo} OR \edef\bar{\p@foo}
  2207. % DEFINES \bar SO THAT IT WILL EVALUATE TO THE COUNTER VALUE AT THE TIME
  2208. % OF THE \edef, EVEN AFTER \foocounter AND ANY OTHER COUNTERS HAVE BEEN
  2209. % CHANGED.  THIS WILL HAPPEN IF YOU USE THE STANDARD COMMANDS \@arabic,
  2210. % \@Roman, ETC.
  2211. %    \cl@foo : List of counters to be reset when foo stepped.  Has format
  2212. %              \@elt{countera}\@elt{counterb}\@elt{counterc}.
  2213. %  The following commands are used to define and modify counters.
  2214. %    \setcounter{FOO}{VAL}  : Globally sets \foocounter equal to VAL.
  2215. %    \addtocounter{FOO}{VAL}: Globally increments \foocounter by VAL.
  2216. %    \newcounter{NEWCTR}[OLDCTR] : Defines NEWCTR to be a counter, which is
  2217. %                             reset when counter OLDCTR is stepped.  If
  2218. %                             NEWCTR already defined produces 'c@NEWCTR
  2219. %                             already defined' error.
  2220. %    \value{CTR}           : produces the value of counter CTR, for use with
  2221. %                            a \setcounter or \addtocounter command.
  2222. %    \stepcounter{FOO}     : Globally increments counter \c@FOO
  2223. %                             and resets all subsidiary counters.
  2224. %    \refstepcounter{FOO}  : Same a \stepcounter, but it also defines
  2225. %                             \@currentreference so that a subsequent
  2226. %                             \label{bar} command causes \ref{bar} to
  2227. %                             generate the current value of counter foo.
  2228. %    \@definecounter{FOO}   : Initializes counter FOO (with empty reset list),
  2229. %                             defines \p@FOO and \theFOO to be null.
  2230. %                             Also adds FOO to \cl@@ckpt -- the reset
  2231. %                             list of a dummy counter @ckpt used for
  2232. %                             taking checkpoints.
  2233. %    \@addtoreset{FOO}{BAR} : Adds counter FOO to the list of counters
  2234. %                             \cl@BAR to be reset when counter bar is stepped.
  2235. %   NUMBERING MACROS:
  2236. %     \arabic{COUNTER} : Representation of COUNTER as arabic numerals.
  2237. %                        Changed 29 Apr 86 to make it print the obvious thing
  2238. %                        it COUNTER not positive.
  2239. %     \roman{COUNTER}  : Representation of COUNTER as lower-case
  2240. %                           Roman numerals.
  2241. %     \Roman{COUNTER}  : Representation of COUNTER as upper-case
  2242. %                           Roman numerals.
  2243. %     \alph{COUNTER}   : Representation of COUNTER as a lower-case
  2244. %                           letter: 1 = a, 2 = b, etc.
  2245. %     \Alph{COUNTER}   : Representation of COUNTER as an upper-case
  2246. %                           letter: 1 = A, 2 = B, etc.
  2247. %     \fnsymbol{COUNTER} : Representation of COUNTER as a footnote
  2248. %                           symbol: 1 = *, 2 = \dagger, etc.  Can be
  2249. %                           used only in math mode.
  2250. %  THE ABOVE ARE IMPLEMENTED IN TERMS OF THE FOLLOWING:
  2251. %     \@arabic\FOOcounter : Representation of \FOOcounter as arabic numerals.
  2252. %     \@roman\FOOcounter  : Representation of \FOOcounter as lower-case
  2253. %                           Roman numerals.
  2254. %     \@Roman\FOOcounter  : Representation of \FOOcounter as upper-case
  2255. %                           Roman numerals.
  2256. %     \@alph\FOOcounter   : Representation of \FOOcounter as a lower-case
  2257. %                           letter: 1 = a, 2 = b, etc.
  2258. %     \@Alph\FOOcounter   : Representation of \FOOcounter as an upper-case
  2259. %                           letter: 1 = A, 2 = B, etc.
  2260. %     \@fnsymbol\FOOcounter : Representation of \FOOcounter as a footnote
  2261. %                             symbol.  Can be used only in math mode.
  2262. \def\setcounter#1#2{\@ifundefined{c@#1}{\@nocnterr}%
  2263. {\global\csname c@#1\endcsname#2\relax}}
  2264. \def\addtocounter#1#2{\@ifundefined{c@#1}{\@nocnterr}%
  2265. {\global\advance\csname c@#1\endcsname #2\relax}}
  2266. \def\newcounter#1{\expandafter\@ifdefinable \csname c@#1\endcsname
  2267.     {\@definecounter{#1}}\@ifnextchar[{\@newctr{#1}}{}}
  2268. \def\value#1{\csname c@#1\endcsname}
  2269. \def\@newctr#1[#2]{\@ifundefined{c@#2}{\@nocnterr}{\@addtoreset{#1}{#2}}}
  2270. \def\stepcounter#1{\global\expandafter\advance\csname c@#1\endcsname
  2271.      \@ne {\let\@elt\@stpelt \csname cl@#1\endcsname}}
  2272. \def\@stpelt#1{\global\csname c@#1\endcsname \z@}
  2273. \def\cl@@ckpt{\@elt{page}}
  2274. \def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
  2275.      \setcounter{#1}0 \expandafter\gdef\csname cl@#1\endcsname{}\@addtoreset
  2276.      {#1}{@ckpt}\expandafter\gdef\csname p@#1\endcsname{}\expandafter
  2277.      \gdef\csname the#1\endcsname{\arabic{#1}}}
  2278. \def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
  2279. % Numbering commands for definitions of \theCOUNTER and \list arguments.
  2280. % \fnsymbol produces the standard footnoting symbols: asterisk, dagger, etc.
  2281. % They can be used only in math mode.
  2282. \def\arabic#1{\@arabic{\@nameuse{c@#1}}}
  2283. \def\roman#1{\@roman{\@nameuse{c@#1}}}
  2284. \def\Roman#1{\@Roman{\@nameuse{c@#1}}}
  2285. \def\alph#1{\@alph{\@nameuse{c@#1}}}
  2286. \def\Alph#1{\@Alph{\@nameuse{c@#1}}}
  2287. \def\fnsymbol#1{\@fnsymbol{\@nameuse{c@#1}}}
  2288. \def\@arabic#1{\number #1}  %% changed 29 Apr 86
  2289. \def\@roman#1{\romannumeral #1}
  2290. \def\@Roman#1{\expandafter\uppercase\expandafter{\romannumeral #1}}
  2291. \def\@alph#1{\ifcase#1\or a\or b\or c\or d\else\@ialph{#1}\fi}
  2292. \def\@ialph#1{\ifcase#1\or \or \or \or \or e\or f\or g\or h\or i\or j\or
  2293.    k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or
  2294.    z\else\@ctrerr\fi}
  2295. \def\@Alph#1{\ifcase#1\or A\or B\or C\or D\else\@Ialph{#1}\fi}
  2296. \def\@Ialph#1{\ifcase#1\or \or \or \or \or E\or F\or G\or H\or I\or J\or
  2297.    K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or
  2298.    Z\else\@ctrerr\fi}
  2299. \def\@fnsymbol#1{\ifcase#1\or *\or \dagger\or \ddagger\or
  2300.    \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger
  2301.    \or \ddagger\ddagger \else\@ctrerr\fi\relax}
  2302. \message{page nos.,}
  2303. %          ****************************************
  2304. %          *          PAGE NUMBERING              *
  2305. %          ****************************************
  2306. % Page numbers are produced by a page counter, used just like any other
  2307. % counter.  The only difference is that \c@page contains the number of
  2308. % the next page to be output (the one currently being produced), rather
  2309. % than one minus it.  Thus, it is normally initialized to 1 rather than
  2310. % 0.  \c@page is defined to be \count0, rather than a count assigned by
  2311. % \newcount.
  2312. % The user sets the pagenumber style with the \pagenumbering{FOO}
  2313. % command, which sets the page counter to 1 and defines \thepage to be
  2314. % \FOO.  For example, \pagenumbering{roman} causes pages to be numbered
  2315. % i, ii, etc.
  2316. \countdef\c@page=0 \c@page=1
  2317. \def\cl@page{}
  2318. \def\pagenumbering#1{\global\c@page \@ne \gdef\thepage{\csname @#1\endcsname
  2319.    \c@page}}
  2320. \message{x-ref,}
  2321. %          ****************************************
  2322. %          *      CROSS REFERENCING MACROS        *
  2323. %          ****************************************
  2324. %  The user writes  \label{foo}  to define the following cross-references:
  2325. %     \ref{foo}     : value of most recently incremented referencable counter.
  2326. %                     in the current environment. (Chapter, section, theorem
  2327. %                     and enumeration counters counters are referencable,
  2328. %                     footnote counters are not.)
  2329. %     \pageref{foo} : page number at which \label{foo} command appeared.
  2330. %  where  foo  can be any string of characters not containing '\', '{' or '}'.
  2331. %  Note: The scope of the \label command is delimited by environments, so
  2332. %          \begin{theorem} \label{foo} ... \end{theorem} \label{bar}
  2333. %  defines \ref{foo} to be the theorem number and \ref{bar} to be
  2334. %  the current section number.
  2335. %  Note: \label does the right thing in terms of spacing -- i.e.,
  2336. %  leaving a space on both sides of it is equivalent to leaving
  2337. %  a space on either side.
  2338. %  This is implemented as follows.  A referencable counter  CNT  is
  2339. %  incremented by the command  \refstepcounter{CNT} , which sets
  2340. %  \@currentlabel == {CNT}{eval(\p@cnt\theCNT)}.   The command
  2341. %  \label{FOO} then writes the following on file \@auxout :
  2342. %        \newlabel{FOO}{{eval(\@currentlabel)}{eval(\thepage)}}
  2343. %  \ref{FOO} ==
  2344. %    BEGIN
  2345. %      if \r@foo undefined
  2346. %        then  ??
  2347. %              Warning: 'reference foo on page ... undefined'
  2348. %        else  \@car \eval(\r@FOO)\@nil
  2349. %      fi
  2350. %    END
  2351. %  \pageref{foo} =
  2352. %    BEGIN
  2353. %      if \r@foo undefined
  2354. %        then  ??
  2355. %              Warning: 'reference foo on page ... undefined'
  2356. %        else  \@cdr \eval(\r@FOO)\@nil
  2357. %      fi
  2358. %    END
  2359. \def\ref#1{\@ifundefined{r@#1}{{\bf ??}\@warning
  2360.    {Reference `#1' on page \thepage \space
  2361.     undefined}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
  2362.     \@car\@tempa \@nil\null}}
  2363. \def\pageref#1{\@ifundefined{r@#1}{{\bf ??}\@warning
  2364.    {Reference `#1' on page \thepage \space
  2365.     undefined}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
  2366.     \@cdr\@tempa\@nil\null}}
  2367. \def\newlabel#1#2{\@ifundefined{r@#1}{}{\@warning{Label `#1' multiply
  2368.    defined}}\global\@namedef{r@#1}{#2}}
  2369. % \label and \refstepcounter changed to allow \protect'ed commands to
  2370. % work properly.  For example,
  2371. %   \def\thechapter{\protect\foo{\arabic{chapter}.\roman{section}}}
  2372. % will cause a \label{bar} command to define \ref{bar} to expand to
  2373. % something like \foo{4.d}.  Change made 20 Jul 88.
  2374. \def\label#1{\@bsphack\if@filesw {\let\thepage\relax
  2375.    \def\protect{\noexpand\noexpand\noexpand}%
  2376. \xdef\@gtempa{\write\@auxout{\string
  2377.       \newlabel{#1}{{\@currentlabel}{\thepage}}}}}\@gtempa
  2378.    \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
  2379. \def\refstepcounter#1{\stepcounter{#1}\let\@tempa\protect
  2380. \def\protect{\noexpand\protect\noexpand}%
  2381. \edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}%
  2382. \let\protect\@tempa}
  2383. \def\@currentlabel{} % For \label commands that come before any environment
  2384. \message{environments,}
  2385. %          ****************************************
  2386. %          *            ENVIRONMENTS              *
  2387. %          ****************************************
  2388. %  \begin{foo} and \end{foo} are used to delimit environment foo.
  2389. %  \begin{foo} starts a group and calls \foo if it is defined, otherwise
  2390. %  it does nothing.  \end{foo} checks to see that it matches the
  2391. %  corresponding \begin and if so, it calls \endfoo and does an
  2392. %  \endgroup.  Otherwise, \end{foo} does nothing.
  2393. %  If \end{foo} needs to ignore blanks after it, then \endfoo should
  2394. %  globally set the @ignore switch true with \global\@ignoretrue.
  2395. %  \@currenvir : the name of the current environment.  Initialized to
  2396. %                'document' to make \end{document} work right.
  2397. %  \@preamblecmds : a list of commands that can be used only in the
  2398. %                   preamble (before the \begin{document}), in the
  2399. %                   form  \do \CMDA \do \CMDB ... .   These commands
  2400. %                   are redefined to \@notprerr by \begin{document}
  2401. %                   to save space.  They include the following:
  2402. %                       \document \documentstyle \@documentstyle
  2403. %                       \@options \@preamblecmds \@optionlist
  2404. %                       \@optionfiles \nofiles \includeonly \makeindex
  2405. %                       \makeglossary
  2406. %                   The document style can add any other commands to
  2407. %                   this list by
  2408. %                      \def\do{\noexpand\do\noexpand}
  2409. %                      \edef\@preamblecmds{\@preamblecmds \do ...}
  2410. %  NOTE: \@@end is defined to be the \end command of TeX82.
  2411. %  \enddocument is the user's command for ending the manuscript file.
  2412. %  \stop is a panic button -- to end TeX in the middle.
  2413. % \enddocument ==
  2414. %   BEGIN
  2415. %    \@checkend{document}   %% checks for unmatched \begin
  2416. %    \clearpage
  2417. %    \begingroup
  2418. %      if @filesw = true
  2419. %        then  close file @mainaux
  2420. %              \global \@namedef {ARG1}{ARG2} == null
  2421. %              \newlabel{LABEL}{VAL} ==
  2422. %                  BEGIN
  2423. %                    \@tempa == VAL
  2424. %                    if def(\@tempa) = def(\r@LABEL)
  2425. %                      else @tempswa := true          fi
  2426. %                  END
  2427. %              \bibcite{LABEL}{VAL} == null
  2428. %                  BEGIN
  2429. %                    \@tempa == VAL
  2430. %                    if def(\@tempa) = def(\g@LABEL)
  2431. %                      else @tempswa := true          fi
  2432. %                  END
  2433. %              @tempswa := false
  2434. %              make @ a letter
  2435. %              \input \jobname.AUX
  2436. %              if @tempswa = true
  2437. %                then LaTeX Warning: 'Label may have changed.
  2438. %                                     Rerun to get cross-references right.'
  2439. %       fi     fi
  2440. %    \endgroup
  2441. %    finish up
  2442. %   END
  2443. %  \@writefile{EXT}{ENTRY} ==
  2444. %      if tf@EXT undefined
  2445. %        else \write\tf@EXT{ENTRY}
  2446. %      fi
  2447. \def\@currenvir{document}
  2448. \def\@preamblecmds{\do\document \do\documentstyle \do\@documentstyle
  2449.    \do\@options \do\@preamblecmds \do\@optionlist \do\@optionfiles
  2450.    \do\nofiles \do\includeonly \do\makeindex \do\makeglossary}
  2451. \newif\if@ignore
  2452. \def\enddocument{\@checkend{document}\clearpage\begingroup
  2453. \if@filesw \immediate\closeout\@mainaux
  2454. \def\global\@namedef##1##2{}\def\newlabel{\@testdef r}%
  2455. \def\bibcite{\@testdef b}\@tempswafalse \makeatletter\input \jobname.aux
  2456. \if@tempswa \@warning{Label(s) may have changed.  Rerun to get
  2457. cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end}
  2458. \def\@testdef #1#2#3{\def\@tempa{#3}\expandafter \ifx \csname #1@#2\endcsname
  2459.  \@tempa  \else \@tempswatrue \fi}
  2460. \def\@writefile#1#2{\@ifundefined{tf@#1}{}{\expandafter
  2461.    \immediate\write\csname tf@#1\endcsname{#2}}}
  2462. \def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end}
  2463. \everypar{\@nodocument} %% To get an error if text appears before the
  2464. \nullfont               %% \begin{document}
  2465. % \begin, \end, and \@checkend changed so \end{document} will catch
  2466. % an unmatched \begin.  Changed 24 May 89 as suggested by
  2467. % Frank Mittelbach and Rainer Sch\"opf.
  2468. % \begin{NAME} ==
  2469. %  BEGIN
  2470. %    IF \NAME undefined  THEN  \@tempa == BEGIN report error END
  2471. %                        ELSE  \@tempa ==  (\@currenvir :=L NAME) \NAME
  2472. %    FI
  2473. %    @ignore :=G F      %% Added 30 Nov 88
  2474. %    \begingroup
  2475. %    \@currenvir :=L NAME
  2476. %    \NAME
  2477. %  END
  2478. % \end{NAME} ==
  2479. %  BEGIN
  2480. %   \endNAME
  2481. %   \@checkend{NAME}
  2482. %   IF @endpe = T                  %% @endpe set True by \@endparenv
  2483. %     THEN \@gtempa :=G \@doendpe  %% \@doendpe redefines \par and \everypar
  2484. %     ELSE \@gtempa :=G \relax     %% to suppress paragraph indentation in
  2485. %   FI                             %% immediately following text
  2486. %   \endgroup
  2487. %   \@gtempa
  2488. %   IF @ignore = T
  2489. %     THEN @ignore :=G F
  2490. %          \ignorespaces
  2491. %   FI
  2492. %  END
  2493. % \@checkend{NAME} ==
  2494. %  BEGIN
  2495. %   IF \@currenvir = NAME
  2496. %     ELSE \@badend{NAME}
  2497. %   FI
  2498. %  END
  2499. \def\begin#1{\@ifundefined{#1}{\def\@tempa{\@latexerr{Environment #1
  2500.   undefined}\@eha}}{\def\@tempa{\def\@currenvir{#1}%
  2501.   \csname #1\endcsname}}\begingroup\@endpefalse\@tempa}
  2502. \def\end#1{\csname end#1\endcsname\@checkend{#1}%
  2503.      \if@endpe\global\let\@gtempa\@doendpe
  2504.      \else\global\let\@gtempa\relax\fi
  2505.     \endgroup
  2506.      \@gtempa
  2507.      \if@ignore \global\@ignorefalse
  2508.                                \ignorespaces\fi}
  2509. \def\@checkend#1{\def\@tempa{#1}\ifx
  2510.       \@tempa\@currenvir \else\@badend{#1}\fi}
  2511. \message{math,}
  2512. %      **********************************************
  2513. %      *               MATH ENVIRONMENTS            *
  2514. %      **********************************************
  2515. % \( ==  BEGIN  if math mode
  2516. %                 then error: '\( in math mode'
  2517. %                 else $
  2518. %               fi
  2519. %        END
  2520. % \) ==  BEGIN  if math mode
  2521. %                 then if inner mode
  2522. %                        then $
  2523. %                        else error ``\[ closed with \)''
  2524. %                 else error 'unmatched \)'
  2525. %               fi
  2526. %        END
  2527. % \[ ==  BEGIN  if math mode
  2528. %                 then error: '\[ in math mode'
  2529. %                 else $$
  2530. %               fi
  2531. %        END
  2532. % \] ==  BEGIN  if math mode
  2533. %                 then if inner mode
  2534. %                        then error '\( closed with \]'
  2535. %                        else $$
  2536. %                 else error 'unmatched \]'
  2537. %               fi
  2538. %        END
  2539. % \equation      ==  BEGIN \refstepcounter{equation} $$ END
  2540. % \endequation   ==  BEGIN \eqno (\theequation) $$\ignorespaces END
  2541. % NOTE: The document style must define \theequation etc., and do
  2542. % the appropriate \@addtoreset.  It should also redefine \@eqnnum
  2543. % if another format for the equation number is desired other than the
  2544. % standard (...), or to move the equation numbers to the flushleft.
  2545. % (See comment on the \def of \@eqnnum.)
  2546. % \stackrel{TOP}{BOT} == PLAIN TeX's \buildrel {TOP} \over {BOT}
  2547. % \frac{TOP}{BOT} == {TOP \over BOT}
  2548. % \sqrt[N]{EXP} produces an Nth root of EXP formula.
  2549. %  \: == \>  (medium space)
  2550. \def\({\relax\ifmmode\@badmath\else$%%$BRACE MATCH HACK
  2551. \def\){\relax\ifmmode\ifinner$\else\@badmath%%$ BRACE MATCH HACK
  2552. \fi\else \@badmath\fi}
  2553. \def\[{\relax\ifmmode\@badmath\else
  2554.     \ifvmode \nointerlineskip \makebox[.6\linewidth]\fi$$%%$$ BRACE MATCH HACK
  2555. \def\]{\relax\ifmmode\ifinner\@badmath\else$$\fi%%$$ BRACE MATCH HACK
  2556.         \else \@badmath \fi\ignorespaces}
  2557. \let\math=\(
  2558. \let\endmath=\)
  2559. \def\displaymath{\[}
  2560. \def\enddisplaymath{\]\global\@ignoretrue}
  2561. \@definecounter{equation}
  2562. \def\equation{$$ % $$ BRACE MATCHING HACK
  2563. \refstepcounter{equation}}
  2564. \def\endequation{\eqno \@eqnnum % $$ BRACE MATCHING HACK
  2565. $$\global\@ignoretrue}
  2566. %  \@eqnnum: Produces the equation number for equation and
  2567. %     eqnarray environments.  The following definition is for
  2568. %     flushright numbers; for flushleft numbers, see leqno.doc.
  2569. %     The {\rm ... } puts the equation number in roman type even if
  2570. %     an eqnarray environment appears in an italic environment.
  2571. \def\@eqnnum{{\rm (\theequation)}}
  2572. \def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}
  2573. \def\frac#1#2{{#1\over #2}}
  2574. \let\@@sqrt=\sqrt
  2575. \def\sqrt{\@ifnextchar[{\@sqrt}{\@@sqrt}}
  2576. \def\@sqrt[#1]{\root #1\of}
  2577. \let\:=\>
  2578. % Here's the eqnarray environment:
  2579. %  Default is for left-hand side of equations to be flushleft.
  2580. %  To make them flushright, \let\@eqnsel = \hfil
  2581. \newcount\@eqcnt
  2582. \newcount\@eqpen
  2583. \newif\if@eqnsw\@eqnswtrue
  2584. \@centering = 0pt plus 1000pt % Changed 11/4/85 to produce warning message
  2585.                               % if line extends into margin.  Doesn't warn
  2586.                               % about formula overprinting equation number.
  2587. \def\eqnarray{\stepcounter{equation}\let\@currentlabel=\theequation
  2588. \global\@eqnswtrue
  2589. \global\@eqcnt\z@\tabskip\@centering\let\\=\@eqncr
  2590. $$\halign to \displaywidth\bgroup\@eqnsel\hskip\@centering
  2591.   $\displaystyle\tabskip\z@{##}$&\global\@eqcnt\@ne
  2592.   \hskip 2\arraycolsep \hfil${##}$\hfil
  2593.   &\global\@eqcnt\tw@ \hskip 2\arraycolsep $\displaystyle\tabskip\z@{##}$\hfil
  2594.    \tabskip\@centering&\llap{##}\tabskip\z@\cr}
  2595. \def\endeqnarray{\@@eqncr\egroup
  2596.       \global\advance\c@equation\m@ne$$\global\@ignoretrue}
  2597. \let\@eqnsel=\relax
  2598. \def\nonumber{\global\@eqnswfalse}
  2599. \def\@eqncr{{\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
  2600.     \@yeqncr}{\global\@eqpen\interdisplaylinepenalty \@yeqncr}}
  2601. \def\@yeqncr{\@ifnextchar [{\@xeqncr}{\@xeqncr[\z@]}}
  2602. \def\@xeqncr[#1]{\ifnum0=`{\fi}\@@eqncr
  2603.    \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}
  2604. \def\@@eqncr{\let\@tempa\relax
  2605.     \ifcase\@eqcnt \def\@tempa{& & &}\or \def\@tempa{& &}
  2606.       \else \def\@tempa{&}\fi
  2607.      \@tempa \if@eqnsw\@eqnnum\stepcounter{equation}\fi
  2608.      \global\@eqnswtrue\global\@eqcnt\z@\cr}
  2609. % Here's the eqnarray* environment:
  2610. \let\@seqncr=\@eqncr
  2611. \@namedef{eqnarray*}{\def\@eqncr{\nonumber\@seqncr}\eqnarray}
  2612. \@namedef{endeqnarray*}{\nonumber\endeqnarray}
  2613. % \lefteqn{FORMULA} typesets FORMULA in display math style
  2614. %  flushleft in a box of width zero.
  2615. \def\lefteqn#1{\hbox to \z@{$\displaystyle #1$\hss}}
  2616. \message{center,}
  2617. %      ************************************************
  2618. %      *      CENTER, FLUSHRIGHT, FLUSHLEFT, ETC.     *
  2619. %      ************************************************
  2620. % \center, \flushright and \flushleft set
  2621. %   \rightskip = 0pt or \@flushglue (as appropriate)
  2622. %   \leftskip  = 0pt or \@flushglue (as appropriate)
  2623. %   \parindent = 0pt
  2624. %   \parfillskip   = 0pt. (except \flushleft)
  2625. %   \\         == \par \vskip -\parskip
  2626. %   \\[LENGTH] == \\ \vskip LENGTH
  2627. %   \\*        == \par \penalty 10000 \vskip -\parskip
  2628. %   \\*[LEN]   == \\* \vskip LENGTH
  2629. % They invoke the trivlist environment to handle vertical spacing before
  2630. % and after them.
  2631. % \centering, \raggedright and \raggedleft are the declaration analogs
  2632. % of the above.
  2633. % \raggedright has a more universal effect, however.  It sets
  2634. % \@rightskip := flushglue.  Every environment, like the list environments,
  2635. % that set \rightskip to its 'normal' value set it to \@rightskip
  2636. \def\@centercr{\ifhmode \unskip\else \@badcrerr\fi
  2637.        \par\@ifstar{\penalty \@M\@xcentercr}{\@xcentercr}}
  2638. \def\@xcentercr{\addvspace{-\parskip}\@ifnextchar
  2639.     [{\@icentercr}{\ignorespaces}}
  2640. \def\@icentercr[#1]{\vskip #1\ignorespaces}
  2641. \def\center{\trivlist \centering\item[]}
  2642. \def\centering{\let\\=\@centercr\rightskip\@flushglue\leftskip\@flushglue
  2643. \parindent\z@\parfillskip\z@}
  2644. \let\endcenter=\endtrivlist
  2645. \newskip\@rightskip \@rightskip \z@
  2646. \def\flushleft{\trivlist \raggedright\item[]}
  2647. \def\raggedright{\let\\=\@centercr\@rightskip\@flushglue \rightskip\@rightskip
  2648.   \leftskip\z@
  2649.   \parindent\z@}
  2650. \let\endflushleft=\endtrivlist
  2651. \def\flushright{\trivlist \raggedleft\item[]}
  2652. \def\raggedleft{\let\\=\@centercr\rightskip\z@\leftskip\@flushglue
  2653.   \parindent\z@\parfillskip\z@}
  2654. \let\endflushright=\endtrivlist
  2655. \message{verbatim,}
  2656. %       ****************************************
  2657. %       *              VERBATIM                *
  2658. %       ****************************************
  2659. %  The verbatim environment uses the fixed-width \tt font, turns blanks into
  2660. %  spaces, starts a new line for each carrige return (or sequence of
  2661. %  consecutive carriage returns), and interprets EVERY character literally.
  2662. %  I.e., all special characters \, {, $,tion. are \catcode'd to 'other'.
  2663. %  The command \verb produces in-line verbatim text, where the argument
  2664. %  is delimited by any pair of characters.  E.g., \verb #...# takes
  2665. %  '...' as its argument, and sets it verbatim in \tt font.
  2666. %  The *-variants of these commands is the same, except that spaces
  2667. %  print as the TeXbook's space character instead of as blank spaces.
  2668. {\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
  2669. {\@gobble}{\ignorespaces}}}
  2670. {\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
  2671. % Definition of \@xobeysp chaned on 19 Nov 86 from
  2672. % \def\@xobeysp{\leavevmode{} }
  2673. % to prevent line breaks at spaces.  Change suggested by
  2674. % Nelson Beebe
  2675. \def\@xobeysp{\leavevmode\penalty10000\ }
  2676. \begingroup \catcode `|=0 \catcode `[= 1
  2677. \catcode`]=2 \catcode `\{=12 \catcode `\}=12
  2678. \catcode`\\=12 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
  2679. |gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
  2680. |endgroup
  2681. % \@sverbatim obsolete -- removed 24 May 89, as suggested by
  2682. % Rainer Sch\"opf and Frank Mittelbach
  2683. % \def\@sverbatim{\obeyspaces\@verbatim}
  2684. \def\@gobble#1{}
  2685. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  2686. \leftskip\@totalleftmargin\rightskip\z@
  2687. \parindent\z@\parfillskip\@flushglue\parskip\z@
  2688. \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
  2689. \obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \dospecials}
  2690. \def\verbatim{\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
  2691. \let\endverbatim=\endtrivlist
  2692. \@namedef{verbatim*}{\@verbatim\@sxverbatim}
  2693. \expandafter\let\csname endverbatim*\endcsname =\endtrivlist
  2694. \def\@makeother#1{\catcode`#112\relax}
  2695. \def\verb{\begingroup \catcode``=13 \@noligs
  2696. \tt \let\do\@makeother \dospecials
  2697. \@ifstar{\@sverb}{\@verb}}
  2698. % Definitions of \@sverb and \@verb changed so \verb+ foo+  does not lose
  2699. % leading blanks when it comes at the beginning of a line.
  2700. % Change made 24 May 89. Suggested by Frank Mittelbach and Rainer Sch\"opf.
  2701. \def\@sverb#1{\def\@tempa ##1#1{\leavevmode\null##1\endgroup}\@tempa}
  2702. \def\@verb{\@vobeyspaces \frenchspacing \@sverb}
  2703. %% \@noligs prevents ?` and !` from being treated as ligatures
  2704. %% added 19 April 86
  2705. \begingroup
  2706. \catcode``=13
  2707. \gdef\@noligs{\let`=\@lquote}
  2708. \endgroup
  2709. \def\@lquote{{\kern\z@}`}
  2710. \message{list,}
  2711. %       ****************************************
  2712. %       *         THE LIST ENVIRONMENT         *
  2713. %       ****************************************
  2714. % The generic commands for creating an indented environment -- enumerate,
  2715. % itemize, quote, etc -- are
  2716. %        \list{LABEL}{COMMANDS} ... \endlist
  2717. % which can be invoked by the user as the list environment.  The LABEL
  2718. % argument specifies item labeling.  COMMANDS contains commands for
  2719. % changing the horizontal and vertical spacing parameters.
  2720. % Each item of the environment is begun by the command \item[ITEMLABEL]
  2721. % which produces an item labeled by ITEMLABEL.  If the argument is
  2722. % missing, then the LABEL argument of the \list command is used as the
  2723. % item label.
  2724. % The label is formed by putting \makelabel{ITEMLABEL} in an hbox whose
  2725. % width is either its natural width or else \labelwidth, whichever is
  2726. % larger.  The \list command defines \makelabel to have the default
  2727. % definition
  2728. %     \makelabel{ARG} == BEGIN \hfil ARG END
  2729. % which, for a label of width less than \labelwidth, puts the label
  2730. % flushright, \labelsep to the left of the item's text.  However,
  2731. % \makelabel can be \let to another command by the \list's COMMANDS
  2732. % argument.
  2733. % A \usecounter{foo} command in the second argument causes the counter
  2734. % foo to be initialized to zero, and stepped by every \item command
  2735. % without an argument.  (\label commands within the list refer to this
  2736. % counter.)
  2737. % When you leave a list environment, returning either to an enclosing
  2738. % list or normal text mode, LaTeX begins a new paragraph if and only if
  2739. % you leave a blank line after the \end command.  This is accomplished
  2740. % by the \@endparenv command.
  2741. % Blank lines are ignored every other reasonable place--i.e.:
  2742. %     - Between the \begin{list} and the first \item,
  2743. %     - Between the \item and the text of that item.
  2744. %     - Between the end of the last item and the \end{list}.
  2745. % For an environment like quotation, in which items are not labeled,
  2746. % the entire environment is a single item.  It is defined by
  2747. % letting \quotation == \list{}{...}\item[].  (Note the [], there in
  2748. % case the first character in the environment is a '['.)  The spacing
  2749. % parameters provide a great deal of flexability in designing the
  2750. % format, including the ability to let the indentation of the first
  2751. % paragraph be different from that of the subsequent ones.
  2752. % The trivlist environment is equivalent to a list environment
  2753. % whose second argument sets the following parameter values:
  2754. %    \leftmargin = 0 : causes no indentation of left margin
  2755. %    \labelwidth = 0 : see below for precise effect this has.
  2756. %    \itemindent = 0 : with a null label, makes first paragraph
  2757. %        have no indentation.  Succeeding paragraphs have \parindent
  2758. %        indentation.  To give first paragraph same indentation, set
  2759. %        \itemindent = \parindent before the \item[].
  2760. % Every \item in a trivlist environment must have an argument---in many
  2761. % cases, this will be the null argument (\item[]).  The trivlist
  2762. % environment is mainly used for paragraphing environments, like
  2763. % verbatim, in which there is no margin change.  It provides the same
  2764. % vertical spacing as the list environment, and works reasonably well
  2765. % when it occurs immediately after an \item command in an enclosing list.
  2766. % The following variables are used inside a list environment:
  2767. %   \@totalleftmargin : The distance that the prevailing left margin is
  2768. %                       indented from the outermost left margin,
  2769. %   \linewidth        : The width of the current line.  Must be
  2770. %                       initialized to \hsize.
  2771. %   \@listdepth       : A count for holding current list nesting depth.
  2772. %   \makelabel        : A macro with a single argument, used to generate
  2773. %                       the label from the argument (given or implied) of the
  2774. %                       \item command.  Initialized to \@mklab by the \list
  2775. %                       command.  This command must produce some stretch--i.e.,
  2776. %                       an \hfil.
  2777. %   @inlabel          : A switch that is false except between the time an
  2778. %                       \item is encountered and the time that TeX actually
  2779. %                       enters horizontal mode.  Should be tested by
  2780. %                       commands that can be messed up by the list
  2781. %                       environment's use of \everypar.
  2782. %   \box\@labels      : When @inlabel = true, it holds the labels
  2783. %                       to be put out by \everypar.
  2784. %   @noparitem        : A switch set by \list when @inlabel = true.
  2785. %                       Handles the case of a \list being the first thing
  2786. %                       in an item.
  2787. %   @noparlist        : A switch set true for a list that begins an
  2788. %                       item.  No \topsep space is added before or after
  2789. %                       such a list.
  2790. %   @newlist          : Set true by \list, set false by the first \item's
  2791. %                       text (by \everypar).
  2792. %   @noitemarg        : Set true when executing an \item with no explicit
  2793. %                       argument.  Used to save space.  To save time,
  2794. %                       make two separate \@item commands.
  2795. %   @nmbrlist         : Set true by \usecounter command, causes list to
  2796. %                       be numbered.
  2797. %   \@listctr         : \def'ed by \usecounter to name of counter.
  2798. %   @noskipsec        : A switch set true by a sectioning command when it is
  2799. %                       creating an in-text heading with \everypar.
  2800. % Throughout a list environment, \hsize is the width of the current
  2801. % line, measured from the outermost left margin to the outermost right
  2802. % margin.  Environments like tabbing should use \linewidth instead of
  2803. % \hsize.
  2804. % Here are the parameters of a list that can be set by commands in
  2805. % the \list's COMMANDS argument.  These parameters are all TeX
  2806. % skips or dimensions (defined by \newskip or \newdimen), so the usual
  2807. % TeX or LaTeX commands can be used to set them.  The commands will
  2808. % be executed in vmode if and only if the \list was preceded by a
  2809. % \par (or something like an \end{list}), so the spacing parameters
  2810. % can be set according to whether the list is inside a paragraph
  2811. % or is its own paragraph.
  2812. %   VERTICAL SPACING (skips):
  2813. %      \topsep  : Space between first item and preceding paragraph.
  2814. %      \partopsep : Extra space added to \topsep when environment starts
  2815. %                   a new paragraph (is called in vmode).
  2816. %      \itemsep : Space between successive items.
  2817. %      \parsep  : Space between paragraphs within an item -- the \parskip
  2818. %                 for this environment.
  2819. %   PENALTIES
  2820. %     \@beginparpenalty : put at the beginning of a list
  2821. %     \@endparpenalty   : put at end of list
  2822. %     \@itempenalty     : put between items.
  2823. %   HORIZONTAL SPACING (dimens)
  2824. %      \leftmargin    : space between left margin of enclosing environment
  2825. %                       (or of page if top level list) and left margin of
  2826. %                       this list.  Must be nonnegative.
  2827. %      \rightmargin   : analogous.
  2828. %      \listparindent : extra indentation at beginning of every paragraph
  2829. %                       of a list except the one started by the \item
  2830. %                       command.  May be negative!  Usually, labeled lists
  2831. %                       have \listparindent equal to zero.
  2832. %      \itemindent    : extra indentation added right BEFORE an item label.
  2833. %      \labelwidth    : nominal width of box that contains the label.
  2834. %                       If the natural width of the label < = \labelwidth,
  2835. %                       then the label is flushed right inside a box
  2836. %                       of width \labelwidth (with an \hfil).  Otherwise,
  2837. %                       a box of the natural width is employed, which causes
  2838. %                       an indentation of the text on that line.
  2839. %      \labelsep      : space between end of label box and text of
  2840. %                       first item.
  2841. %   DEFAULT VALUES:
  2842. %      Defaults for the list environment are set as follows.
  2843. %      First, \rightmargin, \listparindent and \itemindent are set
  2844. %      to 0pt.  Then, one of the commands \@listi, \@listii, ... , \@listvi
  2845. %      is called, depending upon the current level of the list.
  2846. %      The \@list... commands should be defined by the document
  2847. %      style.  A convention that the document style should follow is
  2848. %      to set \leftmargin to \leftmargini, ... , \leftmarginvi for
  2849. %      the appropriate level.  Items that aren't changed may be left
  2850. %      alone, but everything that could possibly be changed must be
  2851. %      reset.
  2852. %  \list{LABEL}{COMMANDS} ==
  2853. %   BEGIN
  2854. %     if \@listdepth > 5
  2855. %       then LaTeX error: 'Too deeply nested'
  2856. %       else \@listdepth :=G \@listdepth + 1
  2857. %     fi
  2858. %     \rightmargin     := 0pt
  2859. %     \listparindent   := 0pt
  2860. %     \itemindent      := 0pt
  2861. %     \eval(@list \romannumeral\the\@listdepth)  %% Set default values:
  2862. %     \@itemlabel      :=L LABEL
  2863. %     \makelabel       == \@mklab
  2864. %     @nmbrlist        :=L false
  2865. %     COMMANDS
  2866. %     \@trivlist                % commands common to \list and \trivlist
  2867. %     \parskip          :=L \parsep
  2868. %     \parindent        :=L \listparindent
  2869. %     \linewidth        :=L \linewidth - \rightmargin -\leftmargin
  2870. %     \@totalleftmargin :=L \@totalleftmargin + \leftmargin
  2871. %     \parshape 1 \@totalleftmargin \linewidth
  2872. %     \ignorespaces                    % gobble space up to \item
  2873. %    END
  2874. % \endlist == BEGIN \@listdepth :=G \@listdepth -1
  2875. %                   \endtrivlist
  2876. %             END
  2877. % \@trivlist ==
  2878. %  BEGIN
  2879. %     if @newlist = T then \@noitemerr fi  %% This command removed for some
  2880. %                                          %% forgotten reason.
  2881. %     \@topsepadd :=L \topsep
  2882. %     if @noskipsec then leave vertical mode fi  %% Added 11 Jun 85
  2883. %     if vertical mode
  2884. %       then \@topsepadd :=L \@topsepadd + \partopsep
  2885. %       else \unskip \par                % remove glue from end of last line
  2886. %     fi
  2887. %     if @inlabel = true
  2888. %        then @noparitem :=L true
  2889. %             @noparlist :=L true
  2890. %        else @noparlist :=L false
  2891. %             \@topsep   :=L \@topsepadd
  2892. %     fi
  2893. %     \@topsep         :=L \@topsep + \parskip  %% Change 4 Sep 85
  2894. %     \leftskip        :=L 0pt           % Restore paragraphing parameters
  2895. %     \rightskip       :=L \@rightskip
  2896. %     \parfillskip     :=L 0pt + 1fil
  2897. %   NOTE: \@setpar called on every \list in case \par has been temporarily
  2898. %         munged before the \list command.
  2899. %     \@setpar{if @newlist = false then {\@@par} fi}
  2900. %     \@newlist         :=G T
  2901. %     \@outerparskip    :=L \parskip
  2902. % END
  2903. % \trivlist  ==
  2904. % BEGIN
  2905. %  \parsep     := \parskip
  2906. %  \@trivlist
  2907. %  \labelwidth := 0
  2908. %  \leftmargin := 0
  2909. %  \itemindent := \parindent
  2910. %  \makelabel{LABEL} == LABEL
  2911. % END
  2912. % \endtrivlist ==
  2913. %   BEGIN
  2914. %     if @inlabel = T then \indent fi
  2915. %     if horizontal mode then \unskip \par fi
  2916. %     if @noparlist = true
  2917. %       else if \lastskip > 0
  2918. %               then \@tempskipa := \lastskip
  2919. %                    \vskip - \lastskip
  2920. %                    \vskip \@tempskipa -\@outerparskip + \parskip
  2921. %            fi
  2922. %            \@endparenv
  2923. %     fi
  2924. %   END
  2925. % \@endparenv ==
  2926. %   BEGIN
  2927. %    \addpenalty{@endparpenalty}
  2928. %    \addvspace{\@topsepadd}
  2929. %    \endgroup    %% ends the \begin command's \begingroup
  2930. %    \par  ==  BEGIN
  2931. %                \@restorepar
  2932. %                \everypar{}
  2933. %                \par
  2934. %              END
  2935. %    \everypar == BEGIN remove \lastbox \everypar{} END
  2936. %    \begingroup  %% to match the \end commands \endgroup
  2937. %   END
  2938. % \item == BEGIN if  next char = [
  2939. %                  then  \@item
  2940. %                  else  @noitemarg := true
  2941. %                        \@item[@itemlabel]
  2942. %          END
  2943. % \@item[LAB] ==
  2944. %    BEGIN
  2945. %     if @noparitem = true
  2946. %       then @noparitem := false                        % NOTE: then clause
  2947. %                                                       % hardly every taken,
  2948. %            \box\@labels :=G \hbox{\hskip -\leftmargin % so made a macro
  2949. %                                   \box\@labels        % \@donoparitem
  2950. %                                   \hskip \leftmargin }
  2951. %            if @minipage = false then
  2952. %               \@tempskipa := \lastskip
  2953. %               \vskip -\lastskip
  2954. %               \vskip \@tempskipa + \@outerparskip - \parskip
  2955. %            fi
  2956. %       else if @inlabel = true
  2957. %              then \indent \par   % previous item empty.
  2958. %            fi
  2959. %            if hmode then 2 \unskip's  % To remove any space at end of prev.
  2960. %                     \par              % paragraph that could cause a blank
  2961. %            fi                         % line.
  2962. %            if @newlist = T
  2963. %               then if @nobreak = T   % Kludge if list follows \section
  2964. %                      then \addvspace{\@outerparskip - \parskip}
  2965. %                      else \addpenalty{\@beginparpenalty}
  2966. %                           \addvspace{\@topsep}
  2967. %                           \addvspace{-\parskip}   %% added 4 Sep 85
  2968. %                    fi
  2969. %               else \addpenalty{\@itempenalty}
  2970. %                    \addvspace{\itemsep}
  2971. %            fi
  2972. %            @inlabel :=G true
  2973. %     fi
  2974. %     \everypar{ @minipage :=G F
  2975. %                @newlist :=G F
  2976. %                if  @inlabel = true
  2977. %                  then @inlabel :=G false
  2978. %                       \hskip -\parindent
  2979. %                       \box\@labels
  2980. %                       \penalty 0       %% 3 Oct 85  -- allow line break here
  2981. %                       \box\@labels :=G null
  2982. %                fi
  2983. %                \everypar{} }
  2984. %     @nobreak :=G false
  2985. %     if  @noitemarg = true
  2986. %       then @noitemarg := false
  2987. %            if @nmbrlist
  2988. %              then \refstepcounter{\@listctr}
  2989. %     fi     fi
  2990. %     \@tempboxa   :=L \hbox{\makelabel{LAB}}
  2991. %     \box\@labels :=G \@labels \hskip \itemindent
  2992. %                       \hskip - (\labelwidth + \labelsep)
  2993. %                       if \wd \@tempboxa > \labelwidth
  2994. %                          then \box\@tempboxa
  2995. %                          else \hbox to \labelwidth {\makelabel{LAB}}
  2996. %                       fi
  2997. %                       \hskip\labelsep
  2998. %     \ignorespaces                        %gobble space up to text
  2999. %   END
  3000. %   \usecounter{CTR} == BEGIN  @nmbrlist :=L true
  3001. %                              \@listctr == CTR
  3002. %                              \setcounter{CTR}{0}
  3003. %                       END
  3004. % DEFINE \dimen's and \count
  3005. \newskip\topsep
  3006. \newskip\partopsep
  3007. \newskip\itemsep
  3008. \newskip\parsep
  3009. \newskip\@topsep
  3010. \newskip\@topsepadd
  3011. \newskip\@outerparskip
  3012. \newdimen\leftmargin
  3013. \newdimen\rightmargin
  3014. \newdimen\listparindent
  3015. \newdimen\itemindent
  3016. \newdimen\labelwidth
  3017. \newdimen\labelsep
  3018. \newdimen\linewidth
  3019. \newdimen\@totalleftmargin \@totalleftmargin=\z@
  3020. \newdimen\leftmargini
  3021. \newdimen\leftmarginii
  3022. \newdimen\leftmarginiii
  3023. \newdimen\leftmarginiv
  3024. \newdimen\leftmarginv
  3025. \newdimen\leftmarginvi
  3026. \newcount\@listdepth \@listdepth=0
  3027. \newcount\@itempenalty
  3028. \newcount\@beginparpenalty
  3029. \newcount\@endparpenalty
  3030. \newbox\@labels
  3031. \newif\if@inlabel \@inlabelfalse
  3032. \newif\if@newlist   \@newlistfalse
  3033. \newif\if@noparitem \@noparitemfalse
  3034. \newif\if@noparlist \@noparlistfalse
  3035. \newif\if@noitemarg \@noitemargfalse
  3036. \newif\if@nmbrlist  \@nmbrlistfalse
  3037. \def\list#1#2{\ifnum \@listdepth >5\relax \@toodeep
  3038.      \else \global\advance\@listdepth\@ne \fi
  3039.   \rightmargin \z@ \listparindent\z@ \itemindent\z@
  3040.   \csname @list\romannumeral\the\@listdepth\endcsname
  3041.   \def\@itemlabel{#1}\let\makelabel\@mklab \@nmbrlistfalse #2\relax
  3042.   \@trivlist
  3043.   \parskip\parsep \parindent\listparindent
  3044.   \advance\linewidth -\rightmargin \advance\linewidth -\leftmargin
  3045.   \advance\@totalleftmargin \leftmargin
  3046.   \parshape \@ne \@totalleftmargin \linewidth
  3047.   \ignorespaces}
  3048. \def\@trivlist{\@topsepadd\topsep
  3049.   \if@noskipsec \leavevmode \fi
  3050.   \ifvmode \advance\@topsepadd\partopsep \else \unskip\par\fi
  3051.   \if@inlabel \@noparitemtrue \@noparlisttrue
  3052.     \else \@noparlistfalse \@topsep\@topsepadd \fi
  3053.     \advance\@topsep \parskip
  3054.   \leftskip\z@\rightskip\@rightskip \parfillskip\@flushglue
  3055.   \@setpar{\if@newlist\else{\@@par}\fi}%
  3056.   \global\@newlisttrue \@outerparskip\parskip}
  3057. \def\trivlist{\parsep\parskip
  3058.   \@trivlist \labelwidth\z@ \leftmargin\z@
  3059.   \itemindent\z@ \def\makelabel##1{##1}}
  3060. \def\endlist{\global\advance\@listdepth\m@ne
  3061.     \endtrivlist}
  3062. % Definition of \endtrivlist moved earlier in file so other commands
  3063. % can be \let = to it.
  3064. \def\@mklab#1{\hfil #1}
  3065. \def\item{\@ifnextchar [{\@item}{\@noitemargtrue \@item[\@itemlabel]}}
  3066. \def\@donoparitem{\@noparitemfalse
  3067.    \global\setbox\@labels\hbox{\hskip -\leftmargin
  3068.                                \unhbox\@labels
  3069.                                 \hskip \leftmargin}\if@minipage\else
  3070.   \@tempskipa\lastskip
  3071.   \vskip -\lastskip \advance\@tempskipa\@outerparskip
  3072.   \advance\@tempskipa -\parskip \vskip\@tempskipa\fi}
  3073. \def\@item[#1]{\if@noparitem \@donoparitem
  3074.   \else \if@inlabel \indent \par \fi
  3075.          \ifhmode \unskip\unskip \par \fi
  3076.          \if@newlist \if@nobreak \@nbitem \else
  3077.                         \addpenalty\@beginparpenalty
  3078.                         \addvspace\@topsep \addvspace{-\parskip}\fi
  3079.            \else \addpenalty\@itempenalty \addvspace\itemsep
  3080.           \fi
  3081.     \global\@inlabeltrue
  3082. \everypar{\global\@minipagefalse\global\@newlistfalse
  3083.           \if@inlabel\global\@inlabelfalse \hskip -\parindent \box\@labels
  3084.              \penalty\z@ \fi
  3085.           \everypar{}}\global\@nobreakfalse
  3086. \if@noitemarg \@noitemargfalse \if@nmbrlist \refstepcounter{\@listctr}\fi \fi
  3087. \setbox\@tempboxa\hbox{\makelabel{#1}}%
  3088. \global\setbox\@labels
  3089.  \hbox{\unhbox\@labels \hskip \itemindent
  3090.        \hskip -\labelwidth \hskip -\labelsep
  3091.        \ifdim \wd\@tempboxa >\labelwidth
  3092.                 \box\@tempboxa
  3093.           \else \hbox to\labelwidth {\makelabel{#1}}\fi
  3094.        \hskip \labelsep}\ignorespaces}
  3095. \def\@nbitem{\@tempskipa\@outerparskip \advance\@tempskipa -\parskip
  3096.               \addvspace{\@tempskipa}}
  3097. \def\usecounter#1{\@nmbrlisttrue\def\@listctr{#1}\setcounter{#1}\z@}
  3098. \message{itemize,}
  3099. %      ****************************************
  3100. %      *        ITEMIZE AND ENUMERATE         *
  3101. %      ****************************************
  3102. %  Enumeration is done with four counters: enumi, enumii, enumiii
  3103. %  and enumiv, where enumN controls the numbering of the Nth level
  3104. %  enumeration.  The label is generated by the commands
  3105. %  \labelenumi ... \labelenumiv, which should be defined by the
  3106. %  document style.  Note that \p@enumN\theenumN defines the output
  3107. %  of a \ref command.  A typical definition might be:
  3108. %     \def\theenumii{\alph{enumii}}
  3109. %     \def\p@enumii{\theenumi\theenumii}
  3110. %     \def\labelenumii{(\theenumii)}
  3111. % which will print the labels as '(a)', '(b)', ... and print a \ref as
  3112. % '3a'.
  3113. % The item numbers are moved to the right of the label box, so they are
  3114. % always a distance of \labelsep from the item.
  3115. % \@enumdepth holds the current enumeration nesting depth.
  3116. % Itemization is controlled by four commands: \labelitemi, \labelitemii,
  3117. % \labelitemiii, and \labelitemiv.  To cause the second-level list to be
  3118. % bulleted, you just define \labelitemii to be $\bullet$.  \@itemspacing
  3119. % and \@itemdepth are the analogs of \@enumspacing and \@enumdepth.
  3120. % \enumerate ==
  3121. %   BEGIN
  3122. %     if \@enumdepth > 3
  3123. %       then errormessage: ``Too deeply nested''.
  3124. %       else \@enumdepth :=L \@enumdepth + 1
  3125. %            \@enumctr :=L eval(enum@\romannumeral\the\@enumdepth)
  3126. %            \list{\label(\@enumctr)}
  3127. %                 {\usecounter{\@enumctr}
  3128. %                  \makelabel{LABEL} ==  \hss \llap{LABEL}}
  3129. %     fi
  3130. %   END
  3131. % \endenumerate == \endlist
  3132. \newcount\@enumdepth \@enumdepth = 0
  3133. \@definecounter{enumi}
  3134. \@definecounter{enumii}
  3135. \@definecounter{enumiii}
  3136. \@definecounter{enumiv}
  3137. \def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
  3138.       \advance\@enumdepth \@ne
  3139.       \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
  3140.       {\csname label\@enumctr\endcsname}{\usecounter
  3141.         {\@enumctr}\def\makelabel##1{\hss\llap{##1}}}\fi}
  3142. \let\endenumerate =\endlist
  3143. %  \itemize ==
  3144. %    BEGIN
  3145. %      if \@itemdepth > 3
  3146. %        then  errormessage: 'Too deeply nested'.
  3147. %        else  \@itemdepth :=L \@itemdepth + 1
  3148. %              \@itemitem  == eval(labelitem\romannumeral\the\@itemdepth)
  3149. %              \list{\@nameuse{\@itemitem}}
  3150. %                   {\makelabel{LABEL} ==  \hss \llap{LABEL}}
  3151. %      fi
  3152. %    END
  3153. %  \enditemize ==  \endlist
  3154. \newcount\@itemdepth \@itemdepth = 0
  3155. \def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne
  3156. \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
  3157. \list{\csname\@itemitem\endcsname}{\def\makelabel##1{\hss\llap{##1}}}\fi}
  3158. \let\enditemize =\endlist
  3159. \message{boxes,}
  3160. %       *********************************************
  3161. %       *                 BOXES                     *
  3162. %       *********************************************
  3163. %  USER COMMANDS:
  3164. %  \makebox [WID][POS]{OBJ}
  3165. %          : puts OBJ in an \hbox of width WID, positioned by POS.
  3166. %            POS = l -> flushleft, POS = r -> flushright.
  3167. %            Default is centered.
  3168. %            If WID is missing, then POS is also missing and OBJ
  3169. %            is put in an \hbox of its natural width.
  3170. %  \mbox{OBJ} == \makebox{OBJ}, and is more efficient.
  3171. %  \makebox (X,Y)[POS]{OBJ}
  3172. %          : puts OBJ in an \hbox of width X * \unitlength
  3173. %            and height Y * \unitlength.  POS arguments are
  3174. %            l or r for flushleft, flushright and  t or b
  3175. %            for top, bottom -- or combinations like  tr or rb.
  3176. %            Default for horizontal and vertical are centered.
  3177. %  \newsavebox{\CMD} : If \CMD is undefined, then defines it
  3178. %           to be a TeX box register.
  3179. %  \savebox {\CMD} ... : \CMD is defined to be a TeX box register,
  3180. %            and the '...' are any \makebox arguments.  It is
  3181. %            like \makebox, except it doesn't produce text but
  3182. %            saves the value in \box \CMD.
  3183. %            \sbox N{OBJ} is an efficient abbreviation for
  3184. %            \savebox N{OBJ}.
  3185. %  \framebox ...  : like \makebox, except it puts a 'frame' around
  3186. %            the box.  The frame is made of lines of thickness
  3187. %            \framerule, separated by space \framesep from the
  3188. %            text -- except for \framebox(X,Y) ... , where the
  3189. %            thickness of the lines is as for the picture environment,
  3190. %            and there is no separation added.
  3191. %            \fbox{OBJ} is an efficient abbreviation for \framebox{OBJ}
  3192. %  \parbox[POS]{WIDTH}{TEXT} : Makes a box with \hsize TEXT, positioned
  3193. %         by POS as follows:
  3194. %              c : \vcenter (placed in $...$ if not in math mode)
  3195. %              b : \vbox
  3196. %              t : \vtop
  3197. %         default value is c.
  3198. %    Sets \hsize := WIDTH and calls \@parboxrestore, which does
  3199. %    the following:
  3200. %         Restores the original definitions of:
  3201. %              \par
  3202. %              \\
  3203. %              \- \' \` \=
  3204. %         Resets the following parameters:
  3205. %              \parindent        = 0pt
  3206. %              \parskip          = 0pt           %% added 20 Jan 87
  3207. %              \linewidth        = \hsize
  3208. %              \@totalleftmargin = 0pt
  3209. %              \leftskip         = 0pt
  3210. %              \rightskip        = 0pt
  3211. %              \@rightskip       = 0pt
  3212. %              \parfillskip      = 0pt plus 1fil
  3213. %              \lineskip         = \normallineskip
  3214. %              \baselineskip     = \normalbaselineskip
  3215. %         Calls \sloppy
  3216. %  Note: \@arrayparboxrestore same as \@parboxrestore
  3217. %         but it doesn't restore \\.
  3218. % \minipage  :  Similar to parbox, except it also
  3219. %        makes this look like a page by setting
  3220. %              \textwidth == \columnwidth == box width
  3221. %        changes footnotes by redefining:
  3222. %              \@mpfn         == mpfootnote
  3223. %              \thempfn       == \thempfootnote
  3224. %              \@footnotetext == \@mpfootnotetext
  3225. %        resets the following list environment parameters
  3226. %              \@listdepth    == \@mplistdepth
  3227. %        where  \@mplistdepth is initialized to zero,
  3228. %        and executes \@minipagerestore to allow the document
  3229. %        style to reset any other parameters it desires.
  3230. %        It sets @minipage := T, and resets \everypar to set
  3231. %        it false.  This switch keeps \addvspace from putting space
  3232. %        at the top of a minipage.
  3233. %        Change added 24 May 89: \minipage sets @minipage globally;
  3234. %        \endminipage resets it false.
  3235. % \rule [RAISED]{WIDTH}{HEIGHT} : Makes a WIDTH X HEIGHT rule, raised
  3236. %        RAISED.
  3237. % \underline {TEXT} : Makes an underlined hbox with TEXT in it.
  3238. % \raisebox{DISTANCE}[HEIGHT][DEPTH]{BOX} : Raises BOX up by DISTANCE
  3239. %        length (down if DISTANCE negative).  Makes TeX think that
  3240. %        the new box extends HEIGHT above the line and DEPTH below, for
  3241. %        a total vertical length of HEIGHT+DEPTH.  Default values of
  3242. %        HEIGHT & DEPTH = actual height and depth of box in new position.
  3243. % \makebox ==
  3244. %  BEGIN
  3245. %    if next char = (
  3246. %      then  \@makepicbox
  3247. %      else  if  next char = [
  3248. %              then  \@makebox
  3249. %              else  \mbox     fi
  3250. %    fi
  3251. %  END
  3252. % \@makebox[LEN] ==
  3253. % BEGIN
  3254. %   leave vertical mode
  3255. %   if next char '[' then \@imakebox[LEN]
  3256. %                    else \@imakebox[LEN][x]  fi
  3257. % END
  3258. % \@imakebox[LEN][POS]{OBJ} ==
  3259. %  BEGIN
  3260. %    \hbox to LEN
  3261. %      { \mb@l :=L \mb@r :=L \hss
  3262. %        \let\mb@POS = \relax
  3263. %       \mb@l OBJ \mb@r }
  3264. %  END
  3265. % \@makepicbox(X,Y) ==
  3266. %  BEGIN
  3267. %    leave vertical mode
  3268. %    if next char = [  then  \@imakepicbox(X,Y)
  3269. %                      else  \@imakepicbox(X,Y)[]  fi
  3270. %  END
  3271. % \@imakepicbox(X,Y)[POS]{OBJ} ==
  3272. %  BEGIN
  3273. %    \vbox to Y * \unitlength
  3274. %       { \mb@l :=L \mb@r :=L \hss
  3275. %         \mb@t :=L \mb@b :=L \hss
  3276. %         tfor \@tempa := POS    % one iteration for each token in POS
  3277. %           do  \mb@eval(\@tempa) :=L null od
  3278. %         \mb@t
  3279. %         \hbox to X * \unitlength
  3280. %           {\mb@l OBJ \mb@r }
  3281. %        \mb@b}
  3282. %  END
  3283. \def\makebox{\@ifnextchar ({\@makepicbox}{\@ifnextchar
  3284.      [{\@makebox}{\mbox}}}
  3285. \def\mbox#1{\leavevmode\hbox{#1}}
  3286. \def\@makebox[#1]{\leavevmode\@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][x]}}
  3287. \long\def\@imakebox[#1][#2]#3{\hbox to#1{\let\mb@l\hss
  3288. \let\mb@r\hss \expandafter\let\csname mb@#2\endcsname\relax
  3289. \mb@l #3\mb@r}}
  3290. \def\@makepicbox(#1,#2){\leavevmode\@ifnextchar
  3291.    [{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}
  3292. \long\def\@imakepicbox(#1,#2)[#3]#4{\vbox to#2\unitlength
  3293.    {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
  3294.     \let\mb@t\vss
  3295.     \@tfor\@tempa :=#3\do{\expandafter\let
  3296.         \csname mb@\@tempa\endcsname\relax}%
  3297. \mb@t\hbox to #1\unitlength{\mb@l #4\mb@r}\mb@b}}
  3298. \def\newsavebox#1{\@ifdefinable#1{\newbox#1}}
  3299. \def\savebox#1{\@ifnextchar ({\@savepicbox#1}{\@ifnextchar
  3300.      [{\@savebox#1}{\sbox#1}}}
  3301. \def\sbox#1#2{\setbox#1\hbox{#2}}
  3302. \def\@savebox#1[#2]{\@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][x]}}
  3303. \long\def\@isavebox#1[#2][#3]#4{\setbox#1 \hbox{\@imakebox[#2][#3]{#4}}}
  3304. \def\@savepicbox#1(#2,#3){\@ifnextchar
  3305.    [{\@isavepicbox#1(#2,#3)}{\@isavepicbox#1(#2,#3)[]}}
  3306. \long\def\@isavepicbox#1(#2,#3)[#4]#5{\setbox#1 \hbox{\@imakepicbox
  3307.      (#2,#3)[#4]{#5}}}
  3308. \def\usebox#1{\leavevmode\copy #1\relax}
  3309. %% The following definition of \frame was written by Pavel Curtis
  3310. %% (Extra space removed 14 Jan 88)
  3311. \long\def\frame#1{\leavevmode
  3312.     \hbox{\hskip-\@wholewidth
  3313.      \vbox{\vskip-\@wholewidth
  3314.             \hrule \@height\@wholewidth
  3315.           \hbox{\vrule \@width\@wholewidth #1\vrule \@width\@wholewidth}\hrule
  3316.            \@height \@wholewidth\vskip -\@halfwidth}\hskip-\@wholewidth}}
  3317. \newdimen\fboxrule
  3318. \newdimen\fboxsep
  3319. \long\def\fbox#1{\leavevmode\setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule
  3320.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  3321.    \hbox{\lower \@tempdima\hbox
  3322.   {\vbox{\hrule \@height \fboxrule
  3323.           \hbox{\vrule \@width \fboxrule \hskip\fboxsep
  3324.           \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
  3325.                  \fboxsep\vrule \@width \fboxrule}
  3326.                  \hrule \@height \fboxrule}}}}
  3327. \def\framebox{\@ifnextchar ({\@framepicbox}{\@ifnextchar
  3328.      [{\@framebox}{\fbox}}}
  3329. \def\@framebox[#1]{\@ifnextchar [{\@iframebox[#1]}{\@iframebox[#1][x]}}
  3330. \long\def\@iframebox[#1][#2]#3{\leavevmode
  3331.   \savebox\@tempboxa[#1][#2]{\kern\fboxsep #3\kern\fboxsep}\@tempdima\fboxrule
  3332.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  3333.    \hbox{\lower \@tempdima\hbox
  3334.   {\vbox{\hrule \@height \fboxrule
  3335.           \hbox{\vrule \@width \fboxrule \hskip-\fboxrule
  3336.               \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
  3337.                   -\fboxrule\vrule \@width \fboxrule}
  3338.                   \hrule \@height \fboxrule}}}}
  3339. \def\@framepicbox(#1,#2){\@ifnextchar
  3340.    [{\@iframepicbox(#1,#2)}{\@iframepicbox(#1,#2)[]}}
  3341. \long\def\@iframepicbox(#1,#2)[#3]#4{\frame{\@imakepicbox(#1,#2)[#3]{#4}}}
  3342. \def\parbox{\@ifnextchar [{\@iparbox}{\@iparbox[c]}}
  3343. \long\def\@iparbox[#1]#2#3{\leavevmode \@pboxswfalse
  3344.    \if #1b\vbox
  3345.      \else \if #1t\vtop
  3346.               \else \ifmmode \vcenter
  3347.                         \else \@pboxswtrue $\vcenter
  3348.                      \fi
  3349.            \fi
  3350.     \fi{\hsize #2\@parboxrestore #3}\if@pboxsw $\fi}
  3351. \let\@dischyph=\-
  3352. \let\@acci=\'
  3353. \let\@accii=\`
  3354. \let\@acciii=\=
  3355. \def\@arrayparboxrestore{\let\par\@@par
  3356.     \let\-\@dischyph
  3357.     \let\'\@acci \let\`\@accii \let\=\@acciii
  3358.     \parindent\z@ \parskip\z@
  3359.     \everypar{}\linewidth\hsize
  3360.     \@totalleftmargin\z@ \leftskip\z@ \rightskip\z@ \@rightskip\z@
  3361.     \parfillskip\@flushglue \lineskip\normallineskip
  3362.     \baselineskip\normalbaselineskip\sloppy}
  3363. \def\@parboxrestore{\@arrayparboxrestore\let\\=\@normalcr}
  3364. \newif\if@minipage \@minipagefalse
  3365. \def\minipage{\@ifnextchar [{\@iminipage}{\@iminipage[c]}}
  3366. \def\@iminipage[#1]#2{\leavevmode \@pboxswfalse
  3367.    \if #1b\vbox
  3368.      \else \if #1t\vtop
  3369.               \else \ifmmode \vcenter
  3370.                         \else \@pboxswtrue $\vcenter
  3371.                      \fi
  3372.            \fi
  3373.     \fi\bgroup
  3374.     \hsize #2\textwidth\hsize \columnwidth\hsize
  3375.     \@parboxrestore
  3376.     \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
  3377.     \let\@footnotetext\@mpfootnotetext
  3378.     \let\@listdepth\@mplistdepth \@mplistdepth\z@
  3379.     \@minipagerestore\global\@minipagetrue %% \global added 24 May 89
  3380.     \everypar{\global\@minipagefalse\everypar{}}}
  3381. \let\@minipagerestore=\relax
  3382. \def\endminipage{\par\vskip-\lastskip
  3383. \ifvoid\@mpfootins\else
  3384. \vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi
  3385. \global\@minipagefalse   %% added 24 May 89
  3386. \egroup\if@pboxsw $\fi}
  3387. \newcount\@mplistdepth
  3388. \newinsert\@mpfootins
  3389. \long\def\@mpfootnotetext#1{\global\setbox\@mpfootins
  3390.     \vbox{\unvbox\@mpfootins
  3391.     \footnotesize
  3392.     \hsize\columnwidth \@parboxrestore
  3393.    \edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}\@makefntext
  3394.      {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}}
  3395.      % \strut added 27 Mar 89, on suggestion by Don Hosek
  3396. \newif\if@pboxsw
  3397. \def\rule{\@ifnextchar[{\@rule}{\@rule[\z@]}}
  3398. \def\@rule[#1]#2#3{\@tempdima#3\advance\@tempdima #1\leavevmode\hbox{\vrule
  3399.   \@width#2 \@height\@tempdima \@depth-#1}}
  3400. \let\@@underline\underline
  3401. \def\underline#1{\relax\ifmmode
  3402.   \@@underline{#1}\else $\@@underline{\hbox{#1}}$\relax\fi}
  3403. \def\raisebox#1{\@ifnextchar[{\@argrsbox{#1}}{\@rsbox{#1}}}
  3404. \def\@argrsbox#1[#2]{%
  3405. \@ifnextchar[{\@iirsbox{#1}[#2]}{\@irsbox{#1}[#2]}}
  3406. \long\def\@rsbox#1#2{\leavevmode\hbox{\raise #1\hbox{#2}}}
  3407. \long\def\@irsbox#1[#2]#3{\setbox\@tempboxa \hbox
  3408.    {\raise #1\hbox{#3}}\ht\@tempboxa#2\leavevmode\box\@tempboxa}
  3409. \long\def\@iirsbox#1[#2][#3]#4{\setbox\@tempboxa \hbox
  3410.    {\raise #1\hbox{#4}}\ht\@tempboxa#2\dp\@tempboxa#3\leavevmode\box\@tempboxa}
  3411. \message{tabbing,}
  3412. %       ****************************************
  3413. %       *       THE TABBING ENVIRONMENT        *
  3414. %       ****************************************
  3415. %  \dimen(\@firsttab + i) = distance of tab stop i from left margin
  3416. %         0 <= i <= 15 (?).
  3417. %  \dimen\@firsttab is initialized to \@totalleftmargin, so it starts
  3418. %      at the prevailing left margin.
  3419. %  \@maxtab          = number of highest defined tab register
  3420. %                       probably = \@firsttab + 12
  3421. %  \@nxttabmar = tab stop number of next line's left margin
  3422. %  \@curtabmar = tab stop number of current line's left margin
  3423. %  \@curtab    = number of the current tab. At start of line,
  3424. %                      it equals \@curtabmar
  3425. %  \@hightab   = largest tab number currently defined.
  3426. %  \@tabpush   = depth of \pushtab's
  3427. %  \box\@curline     = contents of current line, excluding left margin skip,
  3428. %                      and excluding contents of current field
  3429. %  \box\@curfield    = contents of current field
  3430. %  @rjfield          = switch: T iff the last field of the line should be
  3431. %                      right-justified at the right margin.
  3432. %  \tabbingsep          = distance left by the \' command between the current
  3433. %                      position and the field that is ``left-shifted''.
  3434. %  UTILITY MACROS
  3435. %   \@stopfield  : closes the current field
  3436. %   \@addfield   : adds the current field to the current line.
  3437. %   \@contfield  : continues the current field
  3438. %   \@startfield : begins the next field
  3439. %   \@stopline   : closes the current line and outputs it
  3440. %   \@startline  : starts the next line
  3441. %   \@ifatmargin : an \if that is true iff the current line.
  3442. %                  has width zero
  3443. % \@startline ==
  3444. %  BEGIN
  3445. %   \@curtabmar :=G \@nxttabmar
  3446. %   \@curtab :=G \@curtabmar
  3447. %   \box\@curline :=G null
  3448. %   \@startfield
  3449. %   \strut
  3450. %  END
  3451. % \@stopline ==
  3452. %  BEGIN
  3453. %   \unskip
  3454. %   \@stopfield
  3455. %   if @rjfield = T
  3456. %     then  @rjfield :=G F
  3457. %           \@tempdima := \@totalleftmargin + \linewidth
  3458. %           \hbox to \@tempdima{\@itemfudge
  3459. %                               \hskip \dimen\@curtabmar
  3460. %                               \box\@curline
  3461. %                               \hfil
  3462. %                               \box\@curfield}
  3463. %     else \@addfield
  3464. %          \hbox {\@itemfudge
  3465. %                 \hskip \dimen\@curtabmar
  3466. %                 \box\@curline}
  3467. %   fi
  3468. %  END
  3469. % \@startfield ==
  3470. %  BEGIN
  3471. %    \box\@curfield :=G \hbox {
  3472. %  END
  3473. % \@stopfield ==
  3474. %  BEGIN
  3475. %     }
  3476. %  END
  3477. % \@contfield ==
  3478. %  BEGIN
  3479. %   \box\@curfield :=G \hbox { \unhbox\@currfield  %%} brace matching
  3480. %  END
  3481. % \@addfield ==
  3482. %  BEGIN
  3483. %   \box\@curline :=G \unbox\@curline * \unbox\@curfield
  3484. %  END
  3485. % \@ifatmargin ==
  3486. %  BEGIN
  3487. %   if  dim of box\@curline = 0pt  then
  3488. %  END
  3489. % \tabbing ==
  3490. %  BEGIN
  3491. %   \lineskip :=L 0pt
  3492. %   \> == \@rtab
  3493. %   \< == \@ltab
  3494. %   \= == \@settab
  3495. %   \+ == \@tabplus
  3496. %   \- == \@tabminus
  3497. %   \` == \@tabrj
  3498. %   \' == \@tablab
  3499. %   \\ == BEGIN \@stopline \@startline END
  3500. %   \\[DIST] == BEGIN \@stopline \vskip DIST \@startline\ignorespaces END
  3501. %   \\* == BEGIN \@stopline \penalty 10000 \@startline END
  3502. %   \\*[DIST] == BEGIN \@stopline \penalty 10000 \vskip DIST
  3503. %                      \@startline\ignorespaces               END
  3504. %   \@hightab :=G \@nxttabmar :=G \@firsttab
  3505. %   \@tabpush :=G 0
  3506. %   \dimen\@firsttab := \@totalleftmargin
  3507. %   @rjfield :=G F
  3508. %   \trivlist  \item[]
  3509. %   if @minipage = F then \vskip \parskip fi
  3510. %   \box\@tabfbox = \rlap{\indent\the\everypar}  % note: \the\everypar sets
  3511. %   \@itemfudge == BEGIN \box\@tabfbox END       %       @inlabel :=G F
  3512. %   \@startline
  3513. %   \ignorespaces
  3514. %  END
  3515. % \@endtabbing ==
  3516. %  BEGIN
  3517. %   \@stopline
  3518. %   if \@tabpush > 0 then error message: ''unmatched \poptabs'' fi
  3519. %   \endtrivlist
  3520. %  END
  3521. % \@rtab ==
  3522. %  BEGIN
  3523. %   \@stopfield
  3524. %   \@addfield
  3525. %   if \@curtab < \@hightab
  3526. %     then \@curtab :=G \@curtab + 1
  3527. %     else error message ``Undefined Tab''   fi
  3528. %   \@tempdima := \dimen\@curtab - \dimen\@curtabmar
  3529. %                        - width of box \@curline
  3530. %   \box\@curline :=G \hbox{\unhbox\@curline + \hskip\@tempdima}
  3531. %   \@startfield
  3532. %  END
  3533. % \@settab ==
  3534. %  BEGIN
  3535. %   \@stopfield
  3536. %   \@addfield
  3537. %   if \@curtab < \@maxtab
  3538. %     then \@curtab :=G \@curtab+1
  3539. %     else error message: ``Too many tabs''    fi
  3540. %   if \@curtab > \@hightab
  3541. %     then \@hightab :=L \@curtab    fi
  3542. %   \dimen\@curtab :=L \dimen\@curtabmar + width of \box\@curline
  3543. %   \@startfield
  3544. %  END
  3545. % \@ltab ==
  3546. %  BEGIN
  3547. %   \@ifatmargin
  3548. %     then if \@curtabmar > \@firsttab
  3549. %            then \@curtab :=G \@curtab - 1
  3550. %                 \@curtabmar :=G \@curtabmar - 1
  3551. %            else error message ``Too many untabs''      fi
  3552. %     else error message ``Left tab in middle of line''
  3553. %   fi
  3554. %  END
  3555. % \@tabplus ==
  3556. %  BEGIN
  3557. %        if  \@nxttabmar < \@hightab
  3558. %           then \@nxttabmar :=G \@nxttabmar+1
  3559. %           else error message ``Undefined tab''
  3560. %        fi
  3561. %  END
  3562. % \@tabminus ==
  3563. %  BEGIN
  3564. %        if \@nxttabmar > \@firsttab
  3565. %           then \@nxttabmar :=G \@nxttabmar-1
  3566. %           else error message ``Too many untabs''
  3567. %        fi
  3568. %  END
  3569. % \@tabrj ==
  3570. %  BEGIN \@stopfield
  3571. %        \@addfield
  3572. %        @rjfield :=G T
  3573. %        \@startfield
  3574. %  END
  3575. % \@tablab ==
  3576. %  BEGIN \@stopfield
  3577. %        \box\@curline G:= \hbox{ \box\@curline %% `G' added 17 Jun 86
  3578. %                                \hskip - width of \box\@curfield
  3579. %                                \hskip -\tabbingsep
  3580. %                                \box\@curfield
  3581. %                                \hskip \tabbingsep }
  3582. %        \@startfield
  3583. %  END
  3584. % \pushtabs ==
  3585. %   BEGIN
  3586. %     \@stopfield
  3587. %     \@tabpush :=G \@tabpush + 1
  3588. %     \begingroup
  3589. %     \@contfield
  3590. %   END
  3591. % \poptabs ==
  3592. %  BEGIN
  3593. %    \@stopfield
  3594. %    if \@tabpush > 0
  3595. %      then \endgroup
  3596. %           \@tabpush :=G \@tabpush - 1
  3597. %      else error message: ``Too many \poptabs''
  3598. %    fi
  3599. %    \@contfield
  3600. %  END
  3601. % The accents \` , \' , and \= that have been redefined inside a tabbing
  3602. % environment can be called by typing \a` , \a' , and \a=.
  3603. \expandafter \let \csname a`\endcsname = \`
  3604. \expandafter \let \csname a'\endcsname = \'
  3605. \expandafter \let \csname a=\endcsname = \=
  3606. \def\a#1{\csname a#1\endcsname}
  3607. \newif\if@rjfield
  3608. \newcount\@firsttab
  3609. \newcount\@maxtab
  3610. \newdimen\@gtempa \@firsttab=\allocationnumber
  3611. \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
  3612. \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
  3613. \newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
  3614. \newdimen\@getempa \@maxtab=\allocationnumber
  3615. \dimen\@firsttab=0pt
  3616. \newcount\@nxttabmar
  3617. \newcount\@curtabmar
  3618. \newcount\@curtab
  3619. \newcount\@hightab
  3620. \newcount\@tabpush
  3621. \newbox\@curline
  3622. \newbox\@curfield
  3623. \newbox\@tabfbox
  3624. \def\@startline{\global\@curtabmar\@nxttabmar\relax
  3625.    \global\@curtab\@curtabmar\global\setbox\@curline\hbox % missing \global
  3626.     {}\@startfield\strut}                                 % added 17 Jun 86
  3627. \def\@stopline{\unskip\@stopfield\if@rjfield \global\@rjfieldfalse
  3628.    \@tempdima\@totalleftmargin \advance\@tempdima\linewidth
  3629. \hbox to\@tempdima{\@itemfudge\hskip\dimen\@curtabmar
  3630.    \box\@curline\hfil\box\@curfield}\else\@addfield
  3631.    \hbox{\@itemfudge\hskip\dimen\@curtabmar\box\@curline}\fi}
  3632. \def\@startfield{\global\setbox\@curfield\hbox\bgroup}%{ BRACE MATCH HACK
  3633. \let\@stopfield=}
  3634. \def\@contfield{\global\setbox\@curfield\hbox\bgroup\unhbox\@curfield}
  3635. \def\@addfield{\global\setbox\@curline\hbox{\unhbox
  3636.      \@curline\unhbox\@curfield}}
  3637. \def\@ifatmargin{\ifdim \wd\@curline =\z@}
  3638. \def\@tabcr{\@stopline \@ifstar{\penalty \@M \@xtabcr}{\@xtabcr}}
  3639. \def\@xtabcr{\@ifnextchar[{\@itabcr}{\@startline\ignorespaces}}
  3640. \def\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
  3641. \def\kill{\@stopfield\@startline\ignorespaces}
  3642. % REMOVE \outer FROM PLAIN'S DEF OF \+
  3643. \def\+{\tabalign}
  3644. \def\tabbing{\lineskip \z@\let\>\@rtab\let\<\@ltab\let\=\@settab
  3645.      \let\+\@tabplus\let\-\@tabminus\let\`\@tabrj\let\'\@tablab
  3646.      \let\\=\@tabcr
  3647.      \global\@hightab\@firsttab
  3648.      \global\@nxttabmar\@firsttab
  3649.      \dimen\@firsttab\@totalleftmargin
  3650.      \global\@tabpush0 \global\@rjfieldfalse
  3651.      \trivlist \item[]\if@minipage\else\vskip\parskip\fi
  3652.      \setbox\@tabfbox\hbox{\rlap{\indent\hskip\@totalleftmargin
  3653.        \the\everypar}}\def\@itemfudge{\box\@tabfbox}\@startline\ignorespaces}
  3654. \def\endtabbing{\@stopline\ifnum\@tabpush > 0 \@badpoptabs \fi\endtrivlist}
  3655. \def\@rtab{\@stopfield\@addfield\ifnum \@curtab<\@hightab
  3656.       \global\advance\@curtab \@ne \else\@badtab\fi
  3657.       \@tempdima\dimen\@curtab
  3658.       \advance\@tempdima -\dimen\@curtabmar
  3659.       \advance\@tempdima -\wd\@curline
  3660.       \global\setbox\@curline\hbox{\unhbox\@curline\hskip\@tempdima}%
  3661.       \@startfield\ignorespaces}
  3662. % Omitted \global added to \@rtab 17 Jun 86
  3663. \def\@settab{\@stopfield\@addfield\ifnum \@curtab < \@maxtab
  3664.       \global\advance\@curtab \@ne \else\@latexerr{Tab overflow}\@ehd\fi
  3665.       \ifnum\@curtab > \@hightab
  3666.       \@hightab\@curtab\fi
  3667.       \dimen\@curtab\dimen\@curtabmar
  3668.       \advance\dimen\@curtab \wd\@curline\@startfield\ignorespaces}
  3669. \def\@ltab{\@ifatmargin\ifnum\@curtabmar > \@firsttab
  3670.       \global\advance\@curtab \m@ne \global\advance\@curtabmar \m@ne \else
  3671.       \@badtab\fi\else
  3672.       \@latexerr{\string\<\space in mid line}\@ehd\fi\ignorespaces}
  3673. \def\@tabplus {\ifnum \@nxttabmar < \@hightab
  3674.       \global\advance\@nxttabmar \@ne \else
  3675.       \@badtab\fi\ignorespaces}
  3676. \def\@tabminus{\ifnum\@nxttabmar > \@firsttab
  3677.       \global\advance\@nxttabmar \m@ne \else
  3678.       \@badtab\fi\ignorespaces}
  3679. \def\@tabrj{\@stopfield\@addfield\global\@rjfieldtrue\@startfield\ignorespaces}
  3680. \def\@tablab{\@stopfield\global\setbox\@curline\hbox{\box\@curline
  3681.      \hskip -\wd\@curfield \hskip -\tabbingsep \box\@curfield
  3682.       \hskip \tabbingsep}\@startfield\ignorespaces}
  3683. % \setbox\@curline made \global in \@tablab. 17 Jun 86
  3684. \def\pushtabs{\@stopfield\@addfield\global\advance\@tabpush \@ne \begingroup
  3685.        \@contfield}
  3686. \def\poptabs{\@stopfield\@addfield\ifnum\@tabpush > \z@ \endgroup
  3687.      \global\advance\@tabpush \m@ne \else
  3688.      \@badpoptabs\fi\@contfield}
  3689. \newdimen\tabbingsep
  3690. \message{array,}
  3691. %      ****************************************
  3692. %      *    ARRAY AND TABULAR ENVIRONMENTS    *
  3693. %      ****************************************
  3694. % ARRAY PARMETERS:
  3695. %  \arraycolsep    : half the width separating columns in an array environment
  3696. %  \tabcolsep      : half the width separating columns in a tabular environment
  3697. %  \arrayrulewidth : width of rules
  3698. %  \doublerulesep  : space between adjacent rules in array or tabular
  3699. %  \arraystretch   : line spacing in array and tabular environments is done by
  3700. %                    placing a strut in every row of height and depth
  3701. %                    \arraystretch times the height and depth of the strut
  3702. %                    produced by an ordinary \strut commmand.
  3703. % PREAMBLE:
  3704. %  The PREAMBLE argument of an array or tabular environment can contain
  3705. %  the following:
  3706. %    l,r,c  : indicate where entry is to be placed.
  3707. %    |      : for vertical rule
  3708. %    @{EXP} : inserts the text EXP in every column.  \arraycolsep or \tabcolsep
  3709. %             spacing is suppressed.
  3710. %    *{N}{PRE} : equivalent to writing N copies of PRE in the preamble.  PRE
  3711. %                may contain *{N'}{EXP'} expressions.
  3712. %    p{LEN} : makes entry in parbox of width LEN.
  3713. % SPECIAL ARRAY COMMANDS:
  3714. %   \multicolumn{N}{FORMAT}{ITEM} : replaces the next N column items by
  3715. %       ITEM, formatted according to FORMAT.  FORMAT should contain at most
  3716. %       one l,r or c.  If it contains none, then ITEM is ignored.
  3717. %   \vline : draws a vertical line the height of the current row.  May
  3718. %            appear in an array element entry.
  3719. %   \hline : draws a horizontal line between rows.  Must appear either
  3720. %            before the first entry (to appear above the first row) or right
  3721. %            after a \\ command.  If followed by another \hline, then adds
  3722. %            a \vskip of \doublerulesep.
  3723. %   \cline[i-j] : draws horizontal lines between rows covering columns
  3724. %                 i through j, inclusive.  Multiple commands may follow
  3725. %                 one another to provide lines covering several disjoint
  3726. %                 columns
  3727. %   \extracolsep{WIDTH} : for use inside an @ in the preamble.  Causes a WIDTH
  3728. %                 space to be added between columns for the rest of the
  3729. %                 columns.  This is in addition to the ordinary intercolumn
  3730. %                 space.
  3731. %  \array ==
  3732. %    BEGIN
  3733. %      \@acol    == \@arrayacol
  3734. %      \@classz  == \@arrayclassz
  3735. %      \@classiv == \@arrayclassiv
  3736. %      \\        == \@arraycr
  3737. %      \@halignto == NULL
  3738. %      \@tabarray
  3739. %    END
  3740. %  \endarray{NAME} ==  BEGIN  \crcr }}  END
  3741. %  \tabular  ==
  3742. %    BEGIN
  3743. %      \@halignto == NULL
  3744. %      \@tabular
  3745. %    END
  3746. %  \tabular*{WIDTH} ==
  3747. %    BEGIN
  3748. %      \@halignto == to WIDTH
  3749. %      \@tabular
  3750. %    END
  3751. %  \@tabular ==
  3752. %    BEGIN
  3753. %      \leavevmode
  3754. %      \hbox { $
  3755. %         \@acol    == \@tabacol
  3756. %         \@classz  == \@tabclassz
  3757. %         \@classiv == \@tabclassiv
  3758. %         \\        == \@tabularcr
  3759. %         \@tabarray
  3760. %    END
  3761. %  \endtabular == BEGIN \crcr}} $} END
  3762. %  \@tabarray == if next char = [ then \@array else \@array[c] fi
  3763. %  \@array[POS]{PREAMBLE} ==
  3764. %    BEGIN
  3765. %      define \@arstrutbox to make \@arstrut produce strut of height
  3766. %        and depth \arraystretch times the height and
  3767. %        depth of a normal strut.
  3768. %      \@mkpream{PREAMBLE}
  3769. %      \@preamble == \halign \@halignto {\tabskip=0pt\@arstrut
  3770. %                              eval{\@preamble}\tabskip = 0pt\cr  %% }
  3771. %      \@startpbox == \@@startpbox
  3772. %      \@endpbox == \@@endpbox
  3773. %      if POS = t then \vtop
  3774. %                 else if POS = b then \vbox
  3775. %                                 else \vcenter
  3776. %      fi              fi
  3777. %     {
  3778. %      \par          ==L \relax
  3779. %      \@sharp       == #
  3780. %      \protect      == \relax
  3781. %      \lineskip     :=L 0pt
  3782. %      \baselineskip :=L 0pt
  3783. %      \@preamble
  3784. %    END
  3785. %  \@arraycr ==
  3786. %   BEGIN
  3787. %     $                    %% Prevents extra space at end of row's last entry.
  3788. %     if next char = [
  3789. %      then  \@argarraycr
  3790. %      else  $ \cr         %% Needed to balance $
  3791. %   END
  3792. %  \@argarraycr[LENGTH] ==
  3793. %   BEGIN
  3794. %     $                    %% Needed to balance $ of \@arraycr
  3795. %     if LENGTH > 0
  3796. %       then  \@tempdima := depth of \@arstrutbox + LENGTH
  3797. %             \vrule height 0pt width 0pt depth \@tempdima
  3798. %             \cr
  3799. %       else  \cr \noalign{\vskip LENGTH}
  3800. %   END
  3801. %  \@tabularcr and \@argtabularcr  same as \@arraycr and \@argarraycr
  3802. %  except without the extra $'s.
  3803. \def\extracolsep#1{\tabskip #1\relax}
  3804. \def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
  3805.  \let\@classiv\@arrayclassiv \let\\\@arraycr\def\@halignto{}\@tabarray}
  3806. \def\endarray{\crcr\egroup\egroup}
  3807. \def\endtabular{\crcr\egroup\egroup $\egroup}
  3808. \expandafter \let \csname endtabular*\endcsname = \endtabular
  3809. \def\tabular{\def\@halignto{}\@tabular}
  3810. \expandafter \def\csname tabular*\endcsname #1{\def\@halignto{to #1}\@tabular}
  3811. \def\@tabular{\leavevmode \hbox \bgroup $\let\@acol\@tabacol
  3812.    \let\@classz\@tabclassz
  3813.    \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
  3814. \def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}}
  3815. \def\@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule
  3816.      height\arraystretch \ht\strutbox
  3817.      depth\arraystretch \dp\strutbox
  3818.      width\z@}\@mkpream{#2}\edef\@preamble{\halign \noexpand\@halignto
  3819. \bgroup \tabskip\z@ \@arstrut \@preamble \tabskip\z@ \cr}%
  3820. \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
  3821.   \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
  3822.   \bgroup \let\par\relax
  3823.   \let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@\@preamble}
  3824. \def\@arraycr{${\ifnum0=`}\fi\@ifstar{\@xarraycr}{\@xarraycr}}
  3825. \def\@xarraycr{\@ifnextchar[{\@argarraycr}{\ifnum0=`{\fi}${}\cr}}
  3826. \def\@argarraycr[#1]{\ifnum0=`{\fi}${}\ifdim #1>\z@ \@xargarraycr{#1}\else
  3827.    \@yargarraycr{#1}\fi}
  3828. \def\@tabularcr{{\ifnum0=`}\fi\@ifstar{\@xtabularcr}{\@xtabularcr}}
  3829. \def\@xtabularcr{\@ifnextchar[{\@argtabularcr}{\ifnum0=`{\fi}\cr}}
  3830. \def\@argtabularcr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
  3831.    \unskip\@xargarraycr{#1}\else \@yargarraycr{#1}\fi}
  3832. \def\@xargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox
  3833.    \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr}
  3834. \def\@yargarraycr#1{\cr\noalign{\vskip #1}}
  3835. % \multicolumn{NUMBER}{FORMAT}{ITEM} ==
  3836. %  BEGIN
  3837. %  \multispan{NUMBER}
  3838. %  \begingroup
  3839. %  \@addamp == null
  3840. %  \@mkpream{FORMAT}
  3841. %  \@sharp == ITEM
  3842. %  \protect == \relax
  3843. %  \@startpbox == \@@startpbox
  3844. %  \@endpbox == \@@endpbox
  3845. %  \@arstrut
  3846. %  \@preamble
  3847. %  \endgroup
  3848. %  END
  3849. % The command \def\@addamp{} was removed from \multicolumn on 6 Dec 86
  3850. % because it caused embedded array environments not to work.  I think
  3851. % that it was included originally to prevent an error message if
  3852. % the 2nd argument to the \multicolumn command had two column specifiers.
  3853. % 8 Feb 89 - \hbox{} added after \@preamble to correct bug that
  3854. %            occurred if \multicolumn preceded \\[D] with D > 0,
  3855. %            caused by \\[] command doing an \unskip, which removed
  3856. %            \tabcolsep glue inserted by \multicolumn
  3857. \def\multicolumn#1#2#3{\multispan{#1}\begingroup
  3858. \@mkpream{#2}%
  3859. \def\@sharp{#3}\let\protect\relax
  3860.   \let\@startpbox\@@startpbox\let\@endpbox\@@endpbox
  3861.   \@arstrut \@preamble\hbox{}\endgroup\ignorespaces}
  3862. % Codes for classes and character numbers of array, tabular and
  3863. % multicolumn arguments.
  3864. %    Character     Class       Number
  3865. %    ---------     -----       ------
  3866. %        c           0           0
  3867. %        l           0           1
  3868. %        r           0           2
  3869. %        |           1           -
  3870. %        @           2           -
  3871. %        p           3           -
  3872. %      {@-exp}       4           -
  3873. %      {p-arg}       5           -
  3874. % \@testpach \foo : expands \foo, which should be an array parameter token,
  3875. %                   and sets \@chclass and \@chnum to its class and number.
  3876. %                   Uses \@lastchclass to distinguish 4 and 5
  3877. % Preamble error codes
  3878. %    0: 'illegal character'
  3879. %    1: 'Missing @-exp'
  3880. %    2: 'Missing p-arg'
  3881. % \@addamp ==
  3882. %   BEGIN if @firstamp = true then @firstamp := false
  3883. %                             else &                     fi
  3884. %   END
  3885. % \@mkpream TOKENLIST ==
  3886. %   BEGIN
  3887. %    @firstamp     := T
  3888. %    \@lastchclass := 6
  3889. %    \@preamble    == null
  3890. %    \@sharp       == \relax
  3891. %    \protect      == BEGIN \noexpand\protect\noexpand END
  3892. %    \@startpbox   == \relax
  3893. %    \@endpbox     == \relax
  3894. %    \@expast{TOKENLIST}
  3895. %    for \@nextchar := expand(\@tempa)
  3896. %      do  \@testpach{\@nextchar}
  3897. %          case of \@chclass
  3898. %            0 -> \@classz
  3899. %            1 -> \@classi
  3900. %              ...
  3901. %            5 -> \@classv
  3902. %          end case
  3903. %          \@lastchclass := \@chclass
  3904. %      od
  3905. %      case of \@lastchclass
  3906. %         0 -> \hskip \arraycolsep             % lrc
  3907. %         1 ->                                  % |
  3908. %         2 -> \@preamerr1 % 'Missing @-exp'    % @
  3909. %         3 -> \@preamerr2 % 'Missing p-arg'    % p
  3910. %         4 ->                                  % @-exp
  3911. %         5 -> \hskip \arraycolsep             % p-exp
  3912. %      end case
  3913. %   END
  3914. %  \@arrayclassz ==
  3915. %    BEGIN
  3916. %      \@preamble := \@preamble *
  3917. %                    case of \@lastchclass
  3918. %                       0 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
  3919. %                       1 -> \@addamp \hskip \arraycolsep
  3920. %                       2 ->  % impossible
  3921. %                       3 ->  % impossible
  3922. %                       4 -> \@addamp
  3923. %                       5 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
  3924. %                       6 -> \@addamp \hskip \arraycolsep
  3925. %                     end case
  3926. %                   * case of \@chnum
  3927. %                        0 -> \hfil$\relax\@sharp$\hfil
  3928. %                        1 -> $\relax\@sharp$\hfil
  3929. %                        2 -> \hfil$\relax\@sharp$
  3930. %                     end case
  3931. %    END
  3932. % \@tabclassz == similar to \@arrayclassz
  3933. % \@classi ==
  3934. %  BEGIN
  3935. %    \@preamble := \@preamble *
  3936. %                  case of \@lastchclass
  3937. %                     0 -> \hskip \arraycolsep \@arrayrule
  3938. %                     1 -> \hskip \doublerulesep \@arrayrule
  3939. %                     2 -> % impossible
  3940. %                     3 -> % impossible
  3941. %                     4 -> \@arrayrule
  3942. %                     5 -> \hskip \arraycolsep \@arrayrule
  3943. %                     6 -> \@arrayrule
  3944. %                  end case
  3945. %  END
  3946. % \@classii ==
  3947. %  BEGIN
  3948. %    \@preamble := \@preamble *
  3949. %                  case of \@lastchclass
  3950. %                     0    ->
  3951. %                     1    -> \hskip .5\arrayrulewidth
  3952. %                     2    -> % impossible
  3953. %                     else ->
  3954. %                  end case
  3955. %  END
  3956. % \@classiii ==
  3957. %  BEGIN
  3958. %    \@preamble := \@preamble *
  3959. %                  case of \@lastchclass
  3960. %                     0 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
  3961. %                     1 -> \@addamp \hskip \arraycolsep
  3962. %                     2 -> % impossible
  3963. %                     3 -> % impossible
  3964. %                     4 -> \@addamp
  3965. %                     5 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
  3966. %                     6 -> \@addamp \hskip \arraycolsep
  3967. %                  end case
  3968. %  END
  3969. % \@arrayclassiv  ==  BEGIN  \@preamble := \@preamble * $ \@nextchar$  END
  3970. % \@tabclassiv   == same as \@arrayclassv except without the $ ... $
  3971. % \@classv ==
  3972. %   BEGIN
  3973. %    \@preamble := \@preamble * \@startpbox{\@nextchar}\ignorespaces\@sharp
  3974. %                               \@endpbox
  3975. %   END
  3976. % \@expast{S}: Sets \@tempa := S with all instances of *{N}{STRING}
  3977. %              replaced by N copies of STRING, where N > 0.  An *
  3978. %              appearing inside braces is ignored, but *-expressions
  3979. %              inside STRING are expanded, so nested *-expressions are
  3980. %              handled properly.
  3981. % \@expast{S} == BEGIN  \@xexpast S *0x\@@  END
  3982. % \@xexpast S1 *{N}{S2} S3 \@@ ==
  3983. %  BEGIN
  3984. %    \@tempa   := S1
  3985. %    \@tempcnta := N
  3986. %    if \@tempcnta > 0
  3987. %      then  while \@tempcnta > 0 do \@tempa   := \@tempa S2
  3988. %                                   \@tempcnta := \@tempcnta - 1 od
  3989. %            \@tempb == \@xexpast
  3990. %      else  \@tempb == \@xexnoop
  3991. %    fi
  3992. %    \expandafter \@tempb \@tempa S3 \@@
  3993. %  END
  3994. \def\@xexnoop #1\@@{}
  3995. \def\@expast#1{\@xexpast #1*0x\@@}
  3996. \def\@xexpast#1*#2#3#4\@@{\edef\@tempa{#1}\@tempcnta#2\relax
  3997.     \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
  3998.        {\edef\@tempa{\@tempa#3}\advance\@tempcnta by \m@ne}\let\@tempb\@xexpast
  3999.       \else \let\@tempb\@xexnoop\fi
  4000.     \expandafter\@tempb \@tempa #4\@@}
  4001. \newif\if@firstamp
  4002. \def\@addamp{\if@firstamp \@firstampfalse \else
  4003.     \edef\@preamble{\@preamble &}\fi}
  4004. \def\@arrayacol{\edef\@preamble{\@preamble \hskip \arraycolsep}}
  4005. \def\@tabacol{\edef\@preamble{\@preamble \hskip \tabcolsep}}
  4006. \def\@ampacol{\@addamp \@acol}
  4007. \def\@acolampacol{\@acol\@addamp\@acol}
  4008. \def\@mkpream#1{\@firstamptrue\@lastchclass6
  4009. \def\@preamble{}\def\protect{\noexpand\protect\noexpand}\let\@sharp\relax
  4010. \let\@startpbox\relax\let\@endpbox\relax
  4011. \@expast{#1}\expandafter\@tfor \expandafter
  4012.   \@nextchar \expandafter:\expandafter=\@tempa\do{\@testpach\@nextchar
  4013.   \ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
  4014.     \or \@classiv \or\@classv \fi\@lastchclass\@chclass}%
  4015. \ifcase \@lastchclass \@acol
  4016.     \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi}
  4017. \def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
  4018.    \or \or \@addamp \or
  4019.    \@acolampacol \or \@firstampfalse \@acol \fi
  4020. \edef\@preamble{\@preamble
  4021.   \ifcase \@chnum
  4022.      \hfil$\relax\@sharp$\hfil \or $\relax\@sharp$\hfil
  4023.     \or \hfil$\relax\@sharp$\fi}}
  4024. \def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
  4025.    \or \or \@addamp \or
  4026.    \@acolampacol \or \@firstampfalse \@acol \fi
  4027. \edef\@preamble{\@preamble
  4028.   \ifcase \@chnum
  4029.      \hfil\ignorespaces\@sharp\unskip\hfil
  4030.      \or \ignorespaces\@sharp\unskip\hfil
  4031.      \or \hfil\hskip\z@ \ignorespaces\@sharp\unskip\fi}}
  4032. \def\@classi{\ifcase \@lastchclass \@acol \@arrayrule \or
  4033.    \@addtopreamble{\hskip \doublerulesep}\@arrayrule\or
  4034.    \or \or \@arrayrule \or
  4035.    \@acol \@arrayrule \or \@arrayrule \fi}
  4036. \def\@classii{\ifcase \@lastchclass \or
  4037.    \@addtopreamble{\hskip .5\arrayrulewidth}\fi}
  4038. \def\@classiii{\ifcase \@lastchclass \@acolampacol \or
  4039.    \@addamp\@acol \or
  4040.    \or \or \@addamp \or
  4041.    \@acolampacol \or \@ampacol \fi}
  4042. \def\@tabclassiv{\@addtopreamble\@nextchar}
  4043. \def\@arrayclassiv{\@addtopreamble{$ \@nextchar$}}
  4044. \def\@classv{\@addtopreamble{\@startpbox{\@nextchar}\ignorespaces
  4045. \@sharp\@endpbox}}
  4046. \def\@addtopreamble#1{\edef\@preamble{\@preamble #1}}
  4047. \newcount\@chclass
  4048. \newcount\@lastchclass
  4049. \newcount\@chnum
  4050. \newdimen\arraycolsep
  4051. \newdimen\tabcolsep
  4052. \newdimen\arrayrulewidth
  4053. \newdimen\doublerulesep
  4054. \def\arraystretch{1}    % Default value.
  4055. \newbox\@arstrutbox
  4056. \def\@arstrut{\relax\ifmmode\copy\@arstrutbox\else\unhcopy\@arstrutbox\fi}
  4057. \def\@arrayrule{\@addtopreamble{\hskip -.5\arrayrulewidth
  4058.    \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}}
  4059. \def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
  4060.     \ifnum \@lastchclass=3 5 \else
  4061.      \z@ \if #1c\@chnum \z@ \else
  4062.                               \if #1l\@chnum \@ne \else
  4063.                               \if #1r\@chnum \tw@ \else
  4064.           \@chclass \if #1|\@ne \else
  4065.                     \if #1@\tw@ \else
  4066.                     \if #1p3 \else \z@ \@preamerr 0\fi
  4067.   \fi  \fi  \fi  \fi  \fi  \fi
  4068. \def\hline{\noalign{\ifnum0=`}\fi\hrule \@height \arrayrulewidth \futurelet
  4069.    \@tempa\@xhline}
  4070. \def\@xhline{\ifx\@tempa\hline\vskip \doublerulesep\fi
  4071.       \ifnum0=`{\fi}}
  4072. \def\vline{\vrule \@width \arrayrulewidth}
  4073. \newcount\@cla
  4074. \newcount\@clb
  4075. \def\cline#1{\@cline[#1]}
  4076. \def\@cline[#1-#2]{\noalign{\global\@cla#1\relax
  4077. \global\advance\@cla\m@ne
  4078. \ifnum\@cla>0\global\let\@gtempa\@clinea\else
  4079.   \global\let\@gtempa\@clineb\fi
  4080. \global\@clb#2\relax
  4081. \global\advance\@clb-\@cla}\@gtempa
  4082. \noalign{\vskip-\arrayrulewidth}}
  4083. \def\@clinea{\multispan\@cla&\multispan\@clb
  4084. \unskip\leaders\hrule \@height \arrayrulewidth \hfill
  4085. \def\@clineb{\multispan\@clb
  4086. \unskip\leaders\hrule \@height \arrayrulewidth \hfill
  4087. % \@startpbox{WIDTH} TEXT \egroup == \parbox{WIDTH}{TEXT}
  4088. % \@endpbox == \unskip \strut \par \egroup\hfil (Changed 14 Jan 89)
  4089. \def\@startpbox#1{\vtop\bgroup \hsize #1\@arrayparboxrestore}
  4090. \def\@endpbox{\unskip\strut\par\egroup\hfil}
  4091. % 14 Jan 89: Def of \@endpbox changed from
  4092. %    \def\@endpbox{\par\vskip\dp\@arstrutbox\egroup\hfil}
  4093. % so vertical spacing works out right if the last line of a `p' entry
  4094. % has a descender.
  4095. \let\@@startpbox=\@startpbox
  4096. \let\@@endpbox=\@endpbox
  4097. \message{picture,}
  4098. %      ****************************************
  4099. %      *       THE PICTURE ENVIRONMENT        *
  4100. %      ****************************************
  4101. %  \unitlength     = value of dimension argument
  4102. %  \@wholewidth    = current line width
  4103. %  \@halfwidth     = half of current line width
  4104. %  \@linefnt       = font for drawing lines
  4105. %  \@circlefnt     = font for drawing circles
  4106. % \linethickness{DIM} : Sets the width of horizontal and vertical lines
  4107. %     in a picture to DIM.  Does not change width of slanted lines
  4108. %     or circles.   Width of all lines reset by \thinlines and
  4109. %     \thicklines
  4110. % \picture(XSIZE,YSIZE)(XORG,YORG)
  4111. %   BEGIN
  4112. %     \@picht :=L YSIZE * \unitlength
  4113. %     box \@picbox :=
  4114. %          \hbox to XSIZE * \unitlength
  4115. %            {\hskip -XORG * \unitlength
  4116. %             \lower YORG * \unitlength
  4117. %             \hbox{
  4118. %             \ignorespaces    %% added 13 June 89
  4119. %   END
  4120. % \endpicture ==
  4121. %   BEGIN
  4122. %                   } \hss }
  4123. %                   heigth of \@picbox := \@picht
  4124. %                   depth  of \@picbox := 0
  4125. %                   leavevmode
  4126. %                   \box\@picbox
  4127. %   END
  4128. % \put(X, Y){OBJ} ==
  4129. %   BEGIN
  4130. %     \@killglue
  4131. %     \raise Y * \unitlength  \hbox to 0pt { \hskip X * \unitlength
  4132. %                                              OBJ \hss             }
  4133. %     \ignorespaces
  4134. %   END
  4135. % \multiput(X,Y)(DELX,DELY){N}{OBJ} ==
  4136. %   BEGIN
  4137. %    \@killglue
  4138. %    \@multicnt := N
  4139. %    \@xdim  := X * \unitlength
  4140. %    \@ydim  := Y * \unitlength
  4141. %    while \@multicnt > 0
  4142. %      do \raise \@ydim \hbox to 0pt { \hskip \@xdim
  4143. %                                             OBJ \hss   }
  4144. %         \@multicnt := \@multicnt - 1
  4145. %         \@xdim     := \@xdim + DELX * \unitlength
  4146. %         \@ydim     := \@ydim + DELY * \unitlength
  4147. %      od
  4148. %    \ignorespaces
  4149. %   END
  4150. %  \shortstack[POS]{TEXT} : Makes a \vbox containing TEXT stacked as
  4151. %      a one-column array, positioned l, r or c as indicated by POS.
  4152. \newdimen\@wholewidth
  4153. \newdimen\@halfwidth
  4154. \newdimen\unitlength \unitlength =1pt
  4155. \newbox\@picbox
  4156. \newdimen\@picht
  4157. \def\picture(#1,#2){\@ifnextchar({\@picture(#1,#2)}{\@picture(#1,#2)(0,0)}}
  4158. \def\@picture(#1,#2)(#3,#4){\@picht #2\unitlength
  4159. \setbox\@picbox\hbox to #1\unitlength\bgroup
  4160. \hskip -#3\unitlength \lower #4\unitlength \hbox\bgroup\ignorespaces}
  4161. \def\endpicture{\egroup\hss\egroup\ht\@picbox\@picht
  4162. \dp\@picbox\z@\leavevmode\box\@picbox}
  4163. % In the definitions of \put and \multiput, \hskip was replaced by \kern
  4164. % just in case arg #3 = ``plus''.  (Bug detected by Don Knuth.
  4165. % changed 20 Jul 87).
  4166. \long\def\put(#1,#2)#3{\@killglue\raise#2\unitlength\hbox to \z@{\kern
  4167. #1\unitlength #3\hss}\ignorespaces}
  4168. \long\def\multiput(#1,#2)(#3,#4)#5#6{\@killglue\@multicnt=#5\relax
  4169. \@xdim=#1\unitlength
  4170. \@ydim=#2\unitlength
  4171. \@whilenum \@multicnt > 0\do
  4172. {\raise\@ydim\hbox to \z@{\kern
  4173. \@xdim #6\hss}\advance\@multicnt \m@ne\advance\@xdim
  4174. #3\unitlength\advance\@ydim #4\unitlength}\ignorespaces}
  4175. \def\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}
  4176. \def\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
  4177.   \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
  4178. \def\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
  4179.   \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
  4180. \def\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth}
  4181. \def\shortstack{\@ifnextchar[{\@shortstack}{\@shortstack[c]}}
  4182. \def\@shortstack[#1]{\leavevmode
  4183. \vbox\bgroup\baselineskip-1pt\lineskip 3pt\let\mb@l\hss
  4184. \let\mb@r\hss \expandafter\let\csname mb@#1\endcsname\relax
  4185. \let\\\@stackcr\@ishortstack}
  4186. \def\@ishortstack#1{\halign{\mb@l ##\unskip\mb@r\cr #1\crcr}\egroup}
  4187. \def\@stackcr{\@ifstar{\@ixstackcr}{\@ixstackcr}}
  4188. \def\@ixstackcr{\@ifnextchar[{\@istackcr}{\cr\ignorespaces}}
  4189. \def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
  4190. % \line(X,Y){LEN} ==
  4191. % BEGIN
  4192. %  \@xarg    := X
  4193. %  \@yarg    := Y
  4194. %  \@linelen := LEN * \unitlength
  4195. %  if \@xarg = 0
  4196. %     then \@vline
  4197. %     else if \@yarg = 0
  4198. %            then \@hline
  4199. %            else \@sline
  4200. %          if
  4201. %  if
  4202. % END
  4203. % \@sline ==
  4204. %  BEGIN
  4205. %    if \@xarg < 0
  4206. %      then @negarg := T
  4207. %           \@xarg  := -\@xarg
  4208. %           \@yyarg := -\@yarg
  4209. %      else @negarg := F
  4210. %           \@yyarg := \@yarg
  4211. %    fi
  4212. %    \@tempcnta := |\@yyarg|
  4213. %    if \@tempcnta > 6
  4214. %      then error: 'LATEX ERROR: Illegal \line or \vector argument.'
  4215. %           \@tempcnta := 0
  4216. %    fi
  4217. %    \box\@linechar := \hbox{\@linefnt \@getlinechar(\@xarg,\@yyarg) }
  4218. %     if \@yarg > 0 then \@upordown = \raise
  4219. %                         \@clnht := 0
  4220. %                   else \@upordown = \lower
  4221. %                        \@clnht := height of \box\@linechar
  4222. %     fi
  4223. %     \@clnwd  := width of \box\@linechar
  4224. %     if @negarg
  4225. %       then \hskip - width of \box\@linechar
  4226. %            \@tempa == \hskip - 2* width of box \@linechar
  4227. %       else \@tempa == \relax
  4228. %     fi
  4229. %  %% Put out integral number of line segments
  4230. %     while \@clnwd <  \@linelen
  4231. %       do  \@upordown \@clnht \copy\@linechar
  4232. %           \@tempa
  4233. %           \@clnht := \@clnht + ht of \box\@linechar
  4234. %           \@clnwd := \@clnwd + width of \box\@linechar
  4235. %       od
  4236. %  %% Put out last segment
  4237. %     \@clnht := \@clnht - height of \box\@linechar
  4238. %     \@clnwd := \@clnwd - width of \box\@linechar
  4239. %     \@tempdima   := \@linelen - \@clnwd
  4240. %     \@tempdimb   := \@tempdima - width of \box\@linechar
  4241. %     if @negarg  then \hskip -\@tempdimb
  4242. %                 else \hskip  \@tempdimb
  4243. %     fi
  4244. %     \@tempdima   := 1000 * \@tempdima
  4245. %     \@tempcnta   := \@tempdima / width of \box\@linechar
  4246. %     \@tempdima   := (\@tempcnta * ht of \box\@linechar)/1000
  4247. %     \@clnht := \@clnht + \@tempdima
  4248. %     if \@linelen < width of box\@linechar
  4249. %         then \hskip width of box\@linechar
  4250. %         else \hbox{\@upordown \@clnht \copy\@linechar}
  4251. %     fi
  4252. % END
  4253. % \@hline ==
  4254. %   BEGIN
  4255. %     if \@xarg < 0 then  \hskip -\@linelen \fi
  4256. %     \vrule height \@halfwidth depth \@halfwidth width \@linelen
  4257. %     if \@xarg < 0 then  \hskip -\@linelen \fi
  4258. %  END
  4259. % \@vline == if \@yarg < 0 \@downline else \@upline  fi
  4260. % \@getlinechar(X,Y) ==
  4261. %   BEGIN
  4262. %     \@tempcnta := 8*X - 9
  4263. %     if Y > 0
  4264. %       then \@tempcnta := \@tempcnta + Y
  4265. %       else \@tempcnta := \@tempcnta - Y + 64
  4266. %     fi
  4267. %     \char\@tempcnta
  4268. %   END
  4269. % \vector(X,Y){LEN} ==
  4270. % BEGIN
  4271. %  \@xarg    := X
  4272. %  \@yarg    := Y
  4273. %  \@linelen := LEN * \unitlength
  4274. %  if \@xarg = 0
  4275. %     then \@vvector
  4276. %     else if \@yarg = 0
  4277. %            then \@hvector
  4278. %            else \@svector
  4279. %          if
  4280. %  if
  4281. % END
  4282. % \@hvector ==
  4283. %   BEGIN
  4284. %     \@hline
  4285. %     {\@linefnt if \@xarg < 0 then  \@getlarrow(1,0)
  4286. %                              else  \@getrarrow(1,0)
  4287. %                 fi}
  4288. %   END
  4289. % \@vvector == if \@yarg < 0 \@downvector else \@upvector  fi
  4290. % \@svector ==
  4291. %  BEGIN
  4292. %   \@sline
  4293. %   \@tempcnta := |\@yarg|
  4294. %     if  \@tempcnta < 5
  4295. %        then  \hskip - width of \box\@linechar
  4296. %              \@upordown \@clnht \hbox
  4297. %                       {\@linefnt
  4298. %                        if @negarg then \@getlarrow(\@xarg,\@yyarg)
  4299. %                                   else \@getrarrow(\@xarg,\@yyarg)
  4300. %                        fi }
  4301. %        else  error: 'LATEX ERROR: Illegal \line or \vector argument.'
  4302. %     fi
  4303. %  END
  4304. % \@getlarrow(X,Y) ==
  4305. %  BEGIN
  4306. %   if Y = 0
  4307. %     then \@tempcnta := '33
  4308. %     else \@tempcnta := 16 * X  -  9
  4309. %          \@tempcntb := 2 * Y
  4310. %          if \@tempcntb > 0
  4311. %            then  \@tempcnta := \@tempcnta  +  \@tempcntb
  4312. %            else  \@tempcnta := \@tempcnta  -  \@tempcntb +  64
  4313. %          fi
  4314. %   fi
  4315. %   \char\@tempcnta
  4316. %  END
  4317. % \@getrarrow(X,Y) ==
  4318. %  BEGIN
  4319. %   \@tempcntb := |Y|
  4320. %   case of \@tempcntb
  4321. %     0 : \@tempcnta := '55
  4322. %     1 : if X < 3
  4323. %           then \@tempcnta :=  24*X - 6
  4324. %           else if X = 3
  4325. %                  then \@tempcnta := 49
  4326. %                  else \@tempcnta := 58  fi
  4327. %         fi
  4328. %     2 : if X < 3
  4329. %           then \@tempcnta :=  24*X - 3
  4330. %           else \@tempcnta := 51     % X must = 3
  4331. %         fi
  4332. %     3 : \@tempcnta := 16*X - 2
  4333. %     4 : \@tempcnta := 16*X + 7
  4334. %   endcase
  4335. %   if Y < 0
  4336. %     then \@tempcnta := \@tempcnta + 64
  4337. %   fi
  4338. %   \char\@tempcnta
  4339. %  END
  4340. \newif\if@negarg
  4341. \def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
  4342. \@linelen=#3\unitlength
  4343. \ifnum\@xarg =0 \@vline
  4344.   \else \ifnum\@yarg =0 \@hline \else \@sline\fi
  4345. \def\@sline{\ifnum\@xarg< 0 \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg
  4346.   \else \@negargfalse \@yyarg \@yarg \fi
  4347. \ifnum \@yyarg >0 \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi
  4348. \ifnum\@tempcnta>6 \@badlinearg\@tempcnta0 \fi
  4349. \ifnum\@xarg>6 \@badlinearg\@xarg 1 \fi
  4350. \setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
  4351. \ifnum \@yarg >0 \let\@upordown\raise \@clnht\z@
  4352.    \else\let\@upordown\lower \@clnht \ht\@linechar\fi
  4353. \@clnwd=\wd\@linechar
  4354. \if@negarg \hskip -\wd\@linechar \def\@tempa{\hskip -2\wd\@linechar}\else
  4355.      \let\@tempa\relax \fi
  4356. \@whiledim \@clnwd <\@linelen \do
  4357.   {\@upordown\@clnht\copy\@linechar
  4358.    \@tempa
  4359.    \advance\@clnht \ht\@linechar
  4360.    \advance\@clnwd \wd\@linechar}%
  4361. \advance\@clnht -\ht\@linechar
  4362. \advance\@clnwd -\wd\@linechar
  4363. \@tempdima\@linelen\advance\@tempdima -\@clnwd
  4364. \@tempdimb\@tempdima\advance\@tempdimb -\wd\@linechar
  4365. \if@negarg \hskip -\@tempdimb \else \hskip \@tempdimb \fi
  4366. \multiply\@tempdima \@m
  4367. \@tempcnta \@tempdima \@tempdima \wd\@linechar \divide\@tempcnta \@tempdima
  4368. \@tempdima \ht\@linechar \multiply\@tempdima \@tempcnta
  4369. \divide\@tempdima \@m
  4370. \advance\@clnht \@tempdima
  4371. \ifdim \@linelen <\wd\@linechar
  4372.    \hskip \wd\@linechar
  4373.   \else\@upordown\@clnht\copy\@linechar\fi}
  4374. \def\@hline{\ifnum \@xarg <0 \hskip -\@linelen \fi
  4375. \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen
  4376. \ifnum \@xarg <0 \hskip -\@linelen \fi}
  4377. \def\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8
  4378. \advance\@tempcnta -9 \ifnum #2>0 \advance\@tempcnta #2\relax\else
  4379. \advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi
  4380. \char\@tempcnta}
  4381. \def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
  4382. \@tempcnta \ifnum\@xarg<0 -\@xarg\else\@xarg\fi
  4383. \ifnum\@tempcnta<5\relax
  4384. \@linelen=#3\unitlength
  4385. \ifnum\@xarg =0 \@vvector
  4386.   \else \ifnum\@yarg =0 \@hvector \else \@svector\fi
  4387. \else\@badlinearg\fi}
  4388. \def\@hvector{\@hline\hbox to 0pt{\@linefnt
  4389. \ifnum \@xarg <0 \@getlarrow(1,0)\hss\else
  4390.     \hss\@getrarrow(1,0)\fi}}
  4391. \def\@vvector{\ifnum \@yarg <0 \@downvector \else \@upvector \fi}
  4392. \def\@svector{\@sline
  4393. \@tempcnta\@yarg \ifnum\@tempcnta <0 \@tempcnta=-\@tempcnta\fi
  4394. \ifnum\@tempcnta <5
  4395.   \hskip -\wd\@linechar
  4396.   \@upordown\@clnht \hbox{\@linefnt  \if@negarg
  4397.   \@getlarrow(\@xarg,\@yyarg) \else \@getrarrow(\@xarg,\@yyarg) \fi}%
  4398. \else\@badlinearg\fi}
  4399. \def\@getlarrow(#1,#2){\ifnum #2 =\z@ \@tempcnta='33\else
  4400. \@tempcnta=#1\relax\multiply\@tempcnta \sixt@@n \advance\@tempcnta
  4401. -9 \@tempcntb=#2\relax\multiply\@tempcntb \tw@
  4402. \ifnum \@tempcntb >0 \advance\@tempcnta \@tempcntb\relax
  4403. \else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64
  4404. \fi\fi\char\@tempcnta}
  4405. \def\@getrarrow(#1,#2){\@tempcntb=#2\relax
  4406. \ifnum\@tempcntb < 0 \@tempcntb=-\@tempcntb\relax\fi
  4407. \ifcase \@tempcntb\relax \@tempcnta='55 \or
  4408. \ifnum #1<3 \@tempcnta=#1\relax\multiply\@tempcnta
  4409. 24 \advance\@tempcnta -6 \else \ifnum #1=3 \@tempcnta=49
  4410. \else\@tempcnta=58 \fi\fi\or
  4411. \ifnum #1<3 \@tempcnta=#1\relax\multiply\@tempcnta
  4412. 24 \advance\@tempcnta -3 \else \@tempcnta=51\fi\or
  4413. \@tempcnta=#1\relax\multiply\@tempcnta
  4414. \sixt@@n \advance\@tempcnta -\tw@ \else
  4415. \@tempcnta=#1\relax\multiply\@tempcnta
  4416. \sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<0 \advance\@tempcnta 64 \fi
  4417. \char\@tempcnta}
  4418. \def\@vline{\ifnum \@yarg <0 \@downline \else \@upline\fi}
  4419. \def\@upline{\hbox to \z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
  4420.    \@height \@linelen \@depth \z@\hss}}
  4421. \def\@downline{\hbox to \z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
  4422.    \@height \z@ \@depth \@linelen \hss}}
  4423. \def\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char'66}\raise
  4424.      \@linelen \hbox to\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}}
  4425. \def\@downvector{\@downline\lower \@linelen
  4426.       \hbox to \z@{\@linefnt\char'77\hss}}
  4427. % \dashbox{D}(X,Y) ==
  4428. %  BEGIN
  4429. %  leave vertical mode
  4430. %  \hbox to 0pt {
  4431. %       \baselineskip := 0pt
  4432. %       \lineskip     := 0pt
  4433. %  %% HORIZONTAL DASHES
  4434. %       \@dashdim := X * \unitlength
  4435. %       \@dashcnt := \@dashdim + 200 % to prevent roundoff error
  4436. %       \@dashdim := D * \unitlength
  4437. %       \@dashcnt := \@dashcnt / \@dashdim
  4438. %       if \@dashcnt is odd
  4439. %         then \@dashdim := 0pt
  4440. %              \@dashcnt := (\@dashcnt + 1) / 2
  4441. %         else \@dashdim := \@dashdim / 2
  4442. %              \@dashcnt := \@dashcnt / 2 - 1
  4443. %              \box\@dashbox   := \hbox{\vrule height \@halfwidth
  4444. %                                    depth \@halfwidth width \@dashdim}
  4445. %              \put(0,0){\copy\@dashbox}
  4446. %              \put(0,Y){\copy\@dashbox}
  4447. %              \put(X,0){\hskip -\@dashdim\copy\@dashbox}
  4448. %              \put(X,Y){\hskip -\@dashdim\box\@dashbox}
  4449. %              \@dashdim := 3 * \@dashdim
  4450. %       fi
  4451. %       \box\@dashbox := \hbox{\vrule height \@halfwidth
  4452. %                                 depth \@halfwidth width D * \unitlength
  4453. %                              \hskip D * \unitlength}
  4454. %       \@tempcnta := 0
  4455. %       \put(0,0){\hskip \@dashdim
  4456. %                while \@tempcnta < \@dascnt
  4457. %                  do \copy\@dashbox
  4458. %                     \@tempcnta := \@tempcnta + 1
  4459. %                  od
  4460. %               }
  4461. %       \@tempcnta := 0
  4462. %       put(0,Y){\hskip \@dashdim
  4463. %                while \@tempcnta < \@dascnt
  4464. %                  do \copy\@dashbox
  4465. %                     \@tempcnta := \@tempcnta + 1
  4466. %                  od
  4467. %               }
  4468. % %% vertical dashes
  4469. %       \@dashdim := Y * \unitlength
  4470. %       \@dashcnt := \@dashdim + 200 % to prevent roundoff error
  4471. %       \@dashdim := D * \unitlength
  4472. %       \@dashcnt := \@dashcnt / \@dashdim
  4473. %       if \@dashcnt is odd
  4474. %         then \@dashdim := 0pt
  4475. %              \@dashcnt := (\@dashcnt + 1) / 2
  4476. %         else \@dashdim := \@dashdim / 2
  4477. %              \@dashcnt := \@dashcnt / 2 - 1
  4478. %              \box\@dashbox   := \hbox{\hskip -\@halfwidth
  4479. %                                       \vrule width \@wholewidth
  4480. %                                                height \@dashdim  }
  4481. %              \put(0,0){\copy\@dashbox}
  4482. %              \put(X,0){\copy\@dashbox}
  4483. %              \put(0,Y){\lower\@dashdim\copy\@dashbox}
  4484. %              \put(X,Y){\lower\@dashdim\copy\@dashbox}
  4485. %              \@dashdim := 3 * \@dashdim
  4486. %       fi
  4487. %       \box\@dashbox := \hbox{\vrule width \@wholewidth
  4488. %                                 height D * \unitlength       }
  4489. %       \@tempcnta := 0
  4490. %       put(0,0){\hskip -\halfwidth
  4491. %                \vbox{while \@tempcnta < \@dashcnt
  4492. %                       do \vskip D*\unitlength
  4493. %                          \copy\@dashbox
  4494. %                          \@tempcnta := \@tempcnta + 1
  4495. %                       od
  4496. %                      \vskip \@dashdim
  4497. %                     } }
  4498. %       \@tempcnta := 0
  4499. %       put(X,0){\hskip -\halfwidth
  4500. %                \vbox{while \@tempcnta < \@dashcnt
  4501. %                       do \vskip D*\unitlength
  4502. %                          \copy\@dashbox
  4503. %                          \@tempcnta := \@tempcnta + 1
  4504. %                       od
  4505. %                      \vskip \@dashdim
  4506. %                     }
  4507. %               }
  4508. %    }     % END DASHES
  4509. %  \@imakepicbox(X,Y)
  4510. % END
  4511. \def\dashbox#1(#2,#3){\leavevmode\hbox to \z@{\baselineskip \z@%
  4512. \lineskip \z@%
  4513. \@dashdim=#2\unitlength%
  4514. \@dashcnt=\@dashdim \advance\@dashcnt 200
  4515. \@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
  4516. \ifodd\@dashcnt\@dashdim=\z@%
  4517. \advance\@dashcnt \@ne \divide\@dashcnt \tw@
  4518. \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  4519. \advance\@dashcnt \m@ne
  4520. \setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  4521. \@width \@dashdim}\put(0,0){\copy\@dashbox}%
  4522. \put(0,#3){\copy\@dashbox}%
  4523. \put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
  4524. \put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
  4525. \multiply\@dashdim 3
  4526. \setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  4527. \@width #1\unitlength\hskip #1\unitlength}\@tempcnta=0
  4528. \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  4529. \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta=0
  4530. \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  4531. \do{\copy\@dashbox\advance\@tempcnta \@ne }}%
  4532. \@dashdim=#3\unitlength%
  4533. \@dashcnt=\@dashdim \advance\@dashcnt 200
  4534. \@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
  4535. \ifodd\@dashcnt \@dashdim=\z@%
  4536. \advance\@dashcnt \@ne \divide\@dashcnt \tw@
  4537. \else
  4538. \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  4539. \advance\@dashcnt \m@ne
  4540. \setbox\@dashbox\hbox{\hskip -\@halfwidth
  4541. \vrule \@width \@wholewidth
  4542. \@height \@dashdim}\put(0,0){\copy\@dashbox}%
  4543. \put(#2,0){\copy\@dashbox}%
  4544. \put(0,#3){\lower\@dashdim\copy\@dashbox}%
  4545. \put(#2,#3){\lower\@dashdim\copy\@dashbox}%
  4546. \multiply\@dashdim 3
  4547. \setbox\@dashbox\hbox{\vrule \@width \@wholewidth
  4548. \@height #1\unitlength}\@tempcnta0
  4549. \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta < \@dashcnt
  4550. \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  4551. \vskip\@dashdim}}\@tempcnta0
  4552. \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta< \@dashcnt
  4553. \relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  4554. \vskip\@dashdim}}}\@makepicbox(#2,#3)}
  4555. % CIRCLES AND OVALS
  4556. %  USER COMMANDS:
  4557. %  \circle{D} : Produces the circle with the diameter as close as
  4558. %               possible to D * \unitlength.  \put(X,Y){\circle{D}}
  4559. %               puts the circle with its center at (X,Y).
  4560. %  \oval(X,Y) : Makes an oval as round as possible that fits in the
  4561. %               rectangle of width X * \unitlength and height
  4562. %               Y * \unitlength. The reference point is the center.
  4563. % \oval(X,Y)[POS] : Save as \oval(X,Y) except it draws only the
  4564. %                   half or quadrant of the oval indicated by POS.
  4565. %                   E.G., \oval(X,Y)[t] draws just the top half
  4566. %                   and \oval(X,Y)[br] draws just the bottom right
  4567. %                   quadrant.  In all cases, the reference point is
  4568. %                   the same as the unqualified \oval(X,Y) command.
  4569. % \@ovvert {DELTA1} {DELTA2} : Makes a vbox containing either the left side
  4570. %        or the right side of the oval being constructed.  The baseline
  4571. %        will coincide with the outside bottom edge of the oval; the left
  4572. %        side of the box will coincide with the left edge of the vertical
  4573. %        rule.  The width of the box will be \@tempdima.
  4574. %        DELTA1 and DELTA2 are added to the character number in \@tempcnta
  4575. %        to get the characters for the top and bottom quarter circle pieces.
  4576. % \@ovhorz : Makes an hbox containing the straight rule for either the
  4577. %         top or the bottom of the oval being constructed.  The baseline
  4578. %         will coincide with bottom edge of the rule; the left side of
  4579. %         the box will coincide with the left side of the oval.
  4580. %         The width of the box will be \@ovxx.
  4581. % \@getcirc {DIAM} : Sets \@tempcnta to the character number
  4582. %                   of the top-right quarter circle with the largest
  4583. %                   diameter less than or equal to DIAM.
  4584. %                   Sets \@tempboxa to an hbox containing that character.
  4585. %                   Sets \@tempdima to \wd \@tempboxa, which is the distance
  4586. %                   from the circle's left outside edge to its right
  4587. %                   inside edge.
  4588. %                   (These characters are like those described in the
  4589. %                   TeXbook, pp. 389-90.)
  4590. % \@getcirc {DIAM} ==
  4591. %   BEGIN
  4592. %     \@tempcnta       := integer coercion of (DIAM + 2pt)     %% + 2pt added
  4593. %     \@tempcnta       := \@tempcnta / integer coercion of 4pt %%    1 Nov 88
  4594. %     if \@tempcnta > 10
  4595. %       then \@tempcnta := 10 fi
  4596. %     if \@tempcnta > 0
  4597. %       then \@tempcnta := \@tempcnta-1
  4598. %       else LaTeX Warning: Oval too small.
  4599. %     fi
  4600. %     \@tempcnta       := 4 * \@tempcnta
  4601. %     \@tempboxa       := \hbox{\@circlefnt \char \@tempcnta}
  4602. %     \@tempdima       := \wd \@tempboxa
  4603. %   END
  4604. % \@put{X}{Y}{OBJ} ==
  4605. %   BEGIN
  4606. %     \raise Y \hbox to 0pt{\hskip X OBJ \hss}
  4607. %   END
  4608. % \@oval(X,Y)[POS] ==
  4609. %   BEGIN
  4610. %     \begingroup
  4611. %       \boxmaxdepth := \maxdimen
  4612. %       @ovt := @ovb := @ovl := @ovr := true
  4613. %       for all E in POS
  4614. %         do  @ovE := false od
  4615. %       \@ovxx      := X * \unitlength
  4616. %       \@ovyy      := Y * \unitlength
  4617. %       \@tempdimb := min(\@ovxx,\@ovyy)
  4618. %       \@getcirc{\@tempdimb-2pt}   %% "-2pt" added 7 Dec 89
  4619. %       \@ovro     := \ht \@tempboxa
  4620. %       \@ovri     := \dp \@tempboxa
  4621. %       \@ovdx     := \@ovxx - \@tempdima
  4622. %       \@ovdx     := \@ovdx/2
  4623. %       \@ovdy     := \@ovyy - \@tempdima
  4624. %       \@ovdy     := \@ovyy/2
  4625. %       \@circlefnt
  4626. %       \@tempboxa :=
  4627. %           \hbox{
  4628. %                 if @ovr
  4629. %                   then \@ovvert{3}{2} \kern -\@tempdima
  4630. %                 fi
  4631. %                 if @ovl
  4632. %                   then \kern \@ovxx \@ovvert{0}{1} \kern -\@tempdima
  4633. %                        \kern -\@ovxx
  4634. %                 fi
  4635. %                 if @ovt
  4636. %                   then \@ovhorz \kern -\@ovxx
  4637. %                 fi
  4638. %                 if @ovb
  4639. %                   then \raise \@ovyy \@ovhorz
  4640. %                 fi
  4641. %                }
  4642. %       \@ovdx    := \@ovdx + \@ovro
  4643. %       \@ovdy    := \@ovdy + \@ovro
  4644. %      \ht\@tempboxa := \dp\@tempboxa := 0
  4645. %       \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}
  4646. %    \endgroup
  4647. %   END
  4648. % \@ovvert {DELTA1} {DELTA2} ==
  4649. %   BEGIN
  4650. %      \vbox to \@ovyy {
  4651. %                      if @ovb
  4652. %                        then \@tempcntb := \@tempcnta + DELTA1
  4653. %                             \kern -\@ovro
  4654. %                             \hbox { \char \@tempcntb }
  4655. %                             \nointerlineskip
  4656. %                        else \kern \@ovri \kern \@ovdy
  4657. %                      fi
  4658. %                      \leaders \vrule width \@wholewidth \vfil
  4659. %                      \nointerlineskip
  4660. %                      if @ovt
  4661. %                        then \@tempcntb := \@tempcnta + DELTA2
  4662. %                             \hbox { \char \@tempcntb }
  4663. %                        else \kern \@ovdy \kern \@ovro
  4664. %                      fi
  4665. %                     }
  4666. %   END
  4667. % \@ovhorz ==
  4668. %   BEGIN
  4669. %    \hbox to \@ovxx{
  4670. %                   \kern \@ovro
  4671. %                   if @ovr
  4672. %                     then
  4673. %                     else \kern \@ovdx
  4674. %                   fi
  4675. %                   \leaders \hrule height \@wholewidth \hfil
  4676. %                   if @ovl
  4677. %                     then
  4678. %                     else \kern \@ovdx
  4679. %                   fi
  4680. %                   \kern \@ovri
  4681. %                  }
  4682. %   END
  4683. % \circle{DIAM} ==
  4684. %   BEGIN
  4685. %    \begingroup
  4686. %    \boxmaxdepth := maxdimen
  4687. %    \@tempdimb := DIAM *\unitlength
  4688. %    if \@tempdimb > 15.5pt
  4689. %      then \@getcirc{\@tempdimb}
  4690. %           \@ovro := \ht \@tempboxa
  4691. %           \@tempboxa := \hbox{
  4692. %                   \@circlefnt
  4693. %                   \@tempcnta := \@tempcnta + 2
  4694. %                   \char \@tempcnta
  4695. %                   \@tempcnta := \@tempcnta - 1
  4696. %                   \char \@tempcnta
  4697. %                   \kern -2\@tempdima
  4698. %                   \@tempcnta := \@tempcnta + 2
  4699. %                   \raise \@tempdima \hbox { \char \@tempcnta }
  4700. %                   \raise \@tempdima \box\@tempboxa
  4701. %                  }
  4702. %           \ht\@tempboxa := \dp\@tempboxa := 0
  4703. %           \@put{-\@ovro}{-\@ovro}{\@tempboxa}
  4704. %      else
  4705. %           \@circ{\@tempdimb}{96}
  4706. %    fi
  4707. %   \endgroup
  4708. %   END
  4709. % \circle*{DIAM}  ==  \@dot{DIAM} == \@circ{DIAM*\unitlength}{112}
  4710. % \@circ{DIAM}{CHAR} ==
  4711. %  BEGIN
  4712. %   \@tempcnta := integer coercion of (DIAM + .5pt)/1pt.
  4713. %   if \@tempcnta > 15 then \@tempcnta := 15 fi
  4714. %   if \@tempcnta > 1  then \@tempcnta := \@tempcnta - 1 fi
  4715. %   \@tempcnta := \@tempcnta + CHAR
  4716. %   \@circlefnt
  4717. %   \char \@tempcnta
  4718. %  END
  4719. \newif\if@ovt
  4720. \newif\if@ovb
  4721. \newif\if@ovl
  4722. \newif\if@ovr
  4723. \newdimen\@ovxx
  4724. \newdimen\@ovyy
  4725. \newdimen\@ovdx
  4726. \newdimen\@ovdy
  4727. \newdimen\@ovro
  4728. \newdimen\@ovri
  4729. %% \advance\@tempdima 2pt\relax added 1 Nov 88 to fix bug in which
  4730. %% size of drawn circle not monotonic function of argument of \circle,
  4731. %% caused by different rounding for dimensions of large and small circles.
  4732. \def\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2pt\relax
  4733.   \@tempcnta\@tempdima
  4734.   \@tempdima 4pt\relax \divide\@tempcnta\@tempdima
  4735.   \ifnum \@tempcnta > 10\relax \@tempcnta 10\relax\fi
  4736.   \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne
  4737.     \else \@warning{Oval too small}\fi
  4738.   \multiply\@tempcnta 4\relax
  4739.   \setbox \@tempboxa \hbox{\@circlefnt
  4740.   \char \@tempcnta}\@tempdima \wd \@tempboxa}
  4741. \def\@put#1#2#3{\raise #2\hbox to \z@{\hskip #1#3\hss}}
  4742. \def\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}
  4743. \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
  4744.   \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  4745.   \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  4746.   #1\unitlength \@ovyy #2\unitlength
  4747.   \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  4748.   \advance \@tempdimb -2pt\relax  %%%% added 7 Dec 89
  4749.   \@getcirc \@tempdimb
  4750.   \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
  4751.   \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
  4752.   \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
  4753.   \@circlefnt \setbox\@tempboxa
  4754.   \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
  4755.   \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
  4756.   \if@ovt \@ovhorz \kern -\@ovxx \fi
  4757.   \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
  4758.   \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
  4759.   \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  4760.   \endgroup}
  4761. \def\@ovvert#1#2{\vbox to \@ovyy{%
  4762.     \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb by #1\relax
  4763.       \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
  4764.     \else \kern \@ovri \kern \@ovdy \fi
  4765.     \leaders\vrule width \@wholewidth\vfil \nointerlineskip
  4766.     \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb by #2\relax
  4767.       \hbox{\char \@tempcntb}%
  4768.     \else \kern \@ovdy \kern \@ovro \fi}}
  4769. \def\@ovhorz{\hbox to \@ovxx{\kern \@ovro
  4770.     \if@ovr \else \kern \@ovdx \fi
  4771.     \leaders \hrule height \@wholewidth \hfil
  4772.     \if@ovl \else \kern \@ovdx \fi
  4773.     \kern \@ovri}}
  4774. \def\circle{\@ifstar{\@dot}{\@circle}}
  4775. \def\@circle#1{\begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
  4776.    \ifdim \@tempdimb >15.5pt\relax \@getcirc\@tempdimb
  4777.       \@ovro\ht\@tempboxa
  4778.      \setbox\@tempboxa\hbox{\@circlefnt
  4779.       \advance\@tempcnta\tw@ \char \@tempcnta
  4780.       \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
  4781.       \advance\@tempcnta\tw@
  4782.       \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
  4783.         \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
  4784.       \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
  4785.    \else  \@circ\@tempdimb{96}\fi\endgroup}
  4786. \def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
  4787. \def\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5pt\relax
  4788.    \@tempcnta\@tempdima \@tempdima 1pt\relax
  4789.    \divide\@tempcnta\@tempdima
  4790.    \ifnum\@tempcnta > 15\relax \@tempcnta 15\relax \fi
  4791.    \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne\fi
  4792.    \advance\@tempcnta #2\relax
  4793.    \@circlefnt \char\@tempcnta}
  4794. %INITIALIZATION
  4795. \thinlines
  4796. \newcount\@xarg
  4797. \newcount\@yarg
  4798. \newcount\@yyarg
  4799. \newcount\@multicnt
  4800. \newdimen\@xdim
  4801. \newdimen\@ydim
  4802. \newbox\@linechar
  4803. \newdimen\@linelen
  4804. \newdimen\@clnwd
  4805. \newdimen\@clnht
  4806. \newdimen\@dashdim
  4807. \newbox\@dashbox
  4808. \newcount\@dashcnt
  4809. \message{theorem,}
  4810. %       ****************************************
  4811. %       *         THEOREM ENVIRONMENTS         *
  4812. %       ****************************************
  4813. %  The user creates his own theorem-like environments with the command
  4814. %      \newtheorem{NAME}{TEXT}[COUNTER]  or
  4815. %      \newtheorem{NAME}[OLDNAME]{TEXT}
  4816. %  This defines the environment NAME to be just as one would expect a
  4817. %  theorem environment to be, except that it prints ``TEXT'' instead of
  4818. %  ``Theorem''.
  4819. %  If OLDNAME is given, then environments NAME and OLDNAME use the same
  4820. %  counter, so using a NAME environment advances the number of the next
  4821. %  NAME environment, and vice-versa.
  4822. %  If COUNTER is given, then environment NAME is numbered within COUNTER.
  4823. %  E.g., if COUNTER = subsection, then the first NAME in subsection 7.2
  4824. %  is numbered TEXT 7.2.1.
  4825. %  The way NAME environments are numbered can be changed by redefining
  4826. %  \theNAME.
  4827. %  DOCUMENT STYLE PARAMETERS
  4828. %  \@thmcounter{COUNTER} : A command such that
  4829. %               \edef\theCOUNTER{\@thmcounter{COUNTER}}
  4830. %         defines \theCOUNTER to produce a number for a theorem environment.
  4831. %         The default is:
  4832. %            BEGIN \noexpand\arabic{COUNTER} END
  4833. %  \@thmcountersep : A separator placed between a theorem number and
  4834. %         the number of the counter within which it is numbered.
  4835. %         E.g., to make the third theorem of section 7.2 be numbered
  4836. %         7.2-3, \@thmcountersep should be \def'ed to '-'.  Its
  4837. %         default is '.'.
  4838. %  \@begintheorem{NAME}{NUMBER} : A command that begins a theorem
  4839. %         environment for a 'theorem' named 'NAME NUMBER' --
  4840. %         e.g., \@begintheorem{Lemma}{3.7} starts Lemma 3.7.
  4841. %  \@opargbegintheorem{NAME}{NUMBER}{OPARG} : A command that begins a theorem
  4842. %         environment for a 'theorem' named 'NAME NUMBER' with optional
  4843. %         argument OPARG -- e.g., \@begintheorem{Lemma}{3.7}{Jones}
  4844. %         starts `Lemma 3.7 (Jones):'.
  4845. %  \@endtheorem : A command that ends a theorem environment.
  4846. % \newtheorem{NAME}{TEXT}[COUNTER] ==
  4847. %   BEGIN
  4848. %     if \NAME is definable
  4849. %       then \@definecounter{NAME}
  4850. %            if COUNTER present
  4851. %              then \@addtoreset{NAME}{COUNTER} fi
  4852. %                   \theNAME ==  BEGIN \theCOUNTER \@thmcountersep
  4853. %                                       eval\@thmcounter{NAME}      END
  4854. %              else \theNAME ==  BEGIN eval\@thmcounter{NAME} END
  4855. %            \NAME == \@thm{NAME}{TEXT}
  4856. %            \endNAME == \@endtheorem
  4857. %       else  error
  4858. %     fi
  4859. %   END
  4860. % \newtheorem{NAME}[OLDNAME]{TEXT}==
  4861. %   BEGIN
  4862. %     if \NAME is definable
  4863. %       then \theNAME == \theOLDNAME
  4864. %            \NAME == \@thm{OLDNAME}{TEXT}
  4865. %            \endNAME == \@endtheorem
  4866. %       else  error
  4867. %     fi
  4868. %   END
  4869. % \@thm{NAME}{TEXT} ==
  4870. %   BEGIN
  4871. %    \refstepcounter{NAME}
  4872. %    if next char = [
  4873. %       then \@ythm{NAME}{TEXT}
  4874. %       else \@xthm{NAME}{TEXT}
  4875. %    fi
  4876. %   END
  4877. % \@xthm{NAME}{TEXT} ==
  4878. %   BEGIN
  4879. %    \@begintheorem{TEXT}{\theNAME}
  4880. %    \ignorespaces
  4881. %   END
  4882. % \@ythm{NAME}{TEXT}[OPARG] ==
  4883. %   BEGIN
  4884. %    \@opargbegintheorem{TEXT}{\theNAME}{OPARG}
  4885. %    \ignorespaces
  4886. %   END
  4887. \def\newtheorem#1{\@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}
  4888. \def\@nthm#1#2{%
  4889. \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}
  4890. \def\@xnthm#1#2[#3]{\expandafter\@ifdefinable\csname #1\endcsname
  4891. {\@definecounter{#1}\@addtoreset{#1}{#3}%
  4892. \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand
  4893.   \csname the#3\endcsname \@thmcountersep \@thmcounter{#1}}%
  4894. \global\@namedef{#1}{\@thm{#1}{#2}}\global\@namedef{end#1}{\@endtheorem}}}
  4895. \def\@ynthm#1#2{\expandafter\@ifdefinable\csname #1\endcsname
  4896. {\@definecounter{#1}%
  4897. \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
  4898. \global\@namedef{#1}{\@thm{#1}{#2}}\global\@namedef{end#1}{\@endtheorem}}}
  4899. \def\@othm#1[#2]#3{\expandafter\@ifdefinable\csname #1\endcsname
  4900.   {\global\@namedef{the#1}{\@nameuse{the#2}}%
  4901. \global\@namedef{#1}{\@thm{#2}{#3}}%
  4902. \global\@namedef{end#1}{\@endtheorem}}}
  4903. \def\@thm#1#2{\refstepcounter
  4904.     {#1}\@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
  4905. \def\@xthm#1#2{\@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}
  4906. \def\@ythm#1#2[#3]{\@opargbegintheorem{#2}{\csname
  4907.        the#1\endcsname}{#3}\ignorespaces}
  4908. %DEFAULT VALUES
  4909. \def\@thmcounter#1{\noexpand\arabic{#1}}
  4910. \def\@thmcountersep{.}
  4911. %deleted September 2, 1986 MDK
  4912. %\def\@makethmnumber#1#2{\bf #1 #2:}
  4913. \def\@begintheorem#1#2{\it \trivlist \item[\hskip \labelsep{\bf #1\ #2}]}
  4914. \def\@opargbegintheorem#1#2#3{\it \trivlist
  4915.       \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]}
  4916. \def\@endtheorem{\endtrivlist}
  4917. \message{lengths,}
  4918. %     ****************************************
  4919. %     *              LENGTHS                 *
  4920. %     ****************************************
  4921. % USER COMMANDS:
  4922. %   \newlength{\NAME}          == \newskip\NAME
  4923. %   \setlength{\NAME}{VALUE}   == \NAME :=L VALUE
  4924. %   \addtolength{\NAME}{VALUE} == \NAME :=L \NAME + VALUE
  4925. %   \settowidth{\NAME}{TEXT}   == \NAME :=L width of \hbox{TEXT}
  4926. \def\newlength#1{\@ifdefinable#1{\newskip#1}}
  4927. \def\setlength#1#2{#1#2\relax}
  4928. \def\addtolength#1#2{\advance#1 #2\relax}
  4929. \def\settowidth#1#2{\setbox\@tempboxa\hbox{#2}#1\wd\@tempboxa\relax}
  4930.    %% \relax added 24 Mar 86
  4931. \message{title,}
  4932. %     *****************************************
  4933. %     *              THE TITLE                *
  4934. %     *****************************************
  4935. % The user defines the title, author, date by the declarations \title{NAME},
  4936. % \author{NAME} and \date{DATE}.  Inside these, he can use the \thanks
  4937. % command to make footnoted acknowledgements, notice of address, etc.
  4938. % The \maketitle command produces the actual title.  Note: multiple authors
  4939. % are separated with the \and command.
  4940. \def\title#1{\gdef\@title{#1}}
  4941. \def\author#1{\gdef\@author{#1}}
  4942. \def\date#1{\gdef\@date{#1}}
  4943. \gdef\@date{\today}          %Default is today's date
  4944. \def\thanks#1{\footnotemark\begingroup
  4945. \def\protect{\noexpand\protect\noexpand}\xdef\@thanks{\@thanks
  4946.   \protect\footnotetext[\the\c@footnote]{#1}}\endgroup}
  4947. \def\@thanks{}
  4948. \def\and{%%                             % \begin{tabular}
  4949. \end{tabular}\hskip 1em plus .17fil\begin{tabular}[t]{c}%% \end{tabular}
  4950. \message{sectioning,}
  4951. %     *****************************************
  4952. %     *              SECTIONING               *
  4953. %     *****************************************
  4954. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
  4955. %            optional * [ALTHEADING]{HEADING}
  4956. %    Generic command to start a section.
  4957. %    NAME       : e.g., 'subsection'
  4958. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  4959. %                 section = 2, etc.
  4960. %    INDENT     : Indentation of heading from left margin
  4961. %    BEFORESKIP : Absolute value = skip to leave above the heading.
  4962. %                 If negative, then paragraph indent of text following
  4963. %                 heading is suppressed.
  4964. %    AFTERSKIP  : if positive, then skip to leave below heading, else
  4965. %                 negative of skip to leave to right of run-in heading.
  4966. %    STYLE      : commands to set style
  4967. %  If '*' missing, then increments the counter.  If it is present, then
  4968. %  there should be no [ALTHEADING] argument.
  4969. %  Uses the counter 'secnumdepth' whose value is the highest section
  4970. %  level that is to be numbered.
  4971. %  WARNING: The \@startsection command should be at the same or higher
  4972. %  grouping level as the text that follows it.  For example, you
  4973. %  should NOT do something like
  4974. %      \def\foo{ \begingroup ...
  4975. %                   \paragraph{...}
  4976. %                 \endgroup}
  4977. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} ==
  4978. %    BEGIN
  4979. %     IF  @noskipsec = T  THEN  \leavevmode  FI  % true if previous section
  4980. %                                                % had no body.
  4981. %     \par
  4982. %     \@tempskipa  := BEFORESKIP
  4983. %     @afterindent := T
  4984. %     IF \@tempskipa < 0  THEN  \@tempskipa  := -\@tempskipa
  4985. %                               @afterindent := F
  4986. %     FI
  4987. %     IF @nobreak = true
  4988. %       THEN \everypar == null
  4989. %       ELSE \addpenalty{\@secpenalty}
  4990. %            \addvspace{\@tempskipa}
  4991. %     FI
  4992. %     IF * next
  4993. %       THEN \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
  4994. %       ELSE \@dblarg{\@sect
  4995. %                       {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}}
  4996. %     FI
  4997. % END
  4998. % \@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2} ==
  4999. %   BEGIN
  5000. %    IF LEVEL > \c@secnumdepth
  5001. %      THEN \@svsec :=L null
  5002. %      ELSE \refstepcounter{NAME}
  5003. %           \@svsec :=L BEGIN \theNAME END
  5004. %    FI
  5005. %    IF AFTERSKIP > 0
  5006. %      THEN \begingroup
  5007. %              STYLE
  5008. %              \@hangfrom{\hskip INDENT\@svsec}
  5009. %              {\interlinepenalty 10000 ARG2\par}
  5010. %           \endgroup
  5011. %           \NAMEmark{ARG1}
  5012. %           \addcontentsline{toc}{NAME}
  5013. %              { IF  LEVEL > \c@secnumdepth
  5014. %                  ELSE \protect\numberline{\theNAME}  FI
  5015. %                ARG1 }
  5016. %      ELSE \@svsechd == BEGIN  STYLE
  5017. %                               \hskip INDENT\@svsec
  5018. %                               ARG2
  5019. %                               \NAMEmark{ARG1}
  5020. %                               \addcontentsline{toc}{NAME}
  5021. %                                  { IF  LEVEL > \c@secnumdepth
  5022. %                                      ELSE \protect\numberline{\theNAME}  FI
  5023. %                                    ARG1 }
  5024. %                        END
  5025. %    FI
  5026. %    \@xsect{AFTERSKIP}
  5027. % END
  5028. % \@xsect{AFTERSKIP} ==
  5029. %  BEGIN
  5030. %    IF AFTERSKIP > 0
  5031. %      THEN \par \nobreak
  5032. %           \vskip AFTERSKIP
  5033. %           \@afterheading
  5034. %      ELSE @nobreak :=G F
  5035. %           @noskipsec :=G T
  5036. %           \everypar{ IF @noskipsec = T
  5037. %                        THEN @noskipsec :=G F
  5038. %                             \clubpenalty :=G 10000
  5039. %                             \hskip -\parindent
  5040. %                             \begingroup
  5041. %                               \@svsechd
  5042. %                             \endgroup
  5043. %                             \unskip
  5044. %                             \hskip -AFTERSKIP
  5045. %                        ELSE \clubpenalty :=G \@clubpenalty
  5046. %                             \everypar := NULL
  5047. %                      FI
  5048. %                    }
  5049. %    FI
  5050. %   END
  5051. % \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==
  5052. %   BEGIN
  5053. %    IF AFTERSKIP > 0
  5054. %      THEN \begingroup
  5055. %             STYLE
  5056. %             \@hangfrom{\hskip INDENT}{\interlinepenalty 10000 ARG\par}
  5057. %           \endgroup
  5058. %      ELSE \@svsechd == BEGIN STYLE
  5059. %                              \hskip INDENT
  5060. %                              ARG
  5061. %                        END
  5062. %    FI
  5063. %    \@xsect{AFTERSKIP}
  5064. %   END
  5065. % \@afterheading ==
  5066. %  BEGIN
  5067. %    @nobreak :=G true
  5068. %    \everypar := BEGIN  IF @nobreak = T
  5069. %                          THEN @nobreak  :=G false
  5070. %                               \clubpenalty :=G 10000
  5071. %                               IF @afterindent = F
  5072. %                                 THEN remove \lastbox
  5073. %                               FI
  5074. %                          ELSE \clubpenalty :=G \@clubpenalty
  5075. %                               \everypar := NULL
  5076. %                       FI
  5077. %                 END
  5078. %  END
  5079. % \@secpenalty : The penalty (usually negative) put before a section
  5080. %                heading unless it immediately follows another one.
  5081. \newcount\@secpenalty
  5082. \@secpenalty = -300
  5083. \newif\if@noskipsec  \@noskipsecfalse
  5084. \def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
  5085.    \par \@tempskipa #4\relax
  5086.    \@afterindenttrue
  5087.    \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
  5088.    \if@nobreak \everypar{}\else
  5089.      \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
  5090.      {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
  5091. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  5092.      \def\@svsec{}\else
  5093.      \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname\hskip 1em }\fi
  5094.      \@tempskipa #5\relax
  5095.       \ifdim \@tempskipa>\z@
  5096.         \begingroup #6\relax
  5097.           \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
  5098.         \endgroup
  5099.        \csname #1mark\endcsname{#7}\addcontentsline
  5100.          {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  5101.                       \protect\numberline{\csname the#1\endcsname}\fi
  5102.                     #7}\else
  5103.         \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
  5104.                       {#7}\addcontentsline
  5105.                            {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  5106.                              \protect\numberline{\csname the#1\endcsname}\fi
  5107.                        #7}}\fi
  5108.      \@xsect{#5}}
  5109. \def\@xsect#1{\@tempskipa #1\relax
  5110.       \ifdim \@tempskipa>\z@
  5111.        \par \nobreak
  5112.        \vskip \@tempskipa
  5113.        \@afterheading
  5114.     \else \global\@nobreakfalse \global\@noskipsectrue
  5115.        \everypar{\if@noskipsec \global\@noskipsecfalse
  5116.                    \clubpenalty\@M \hskip -\parindent
  5117.                    \begingroup \@svsechd \endgroup \unskip
  5118.                    \hskip -#1
  5119.                   \else \clubpenalty \@clubpenalty
  5120.                     \everypar{}\fi}\fi\ignorespaces}
  5121. \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
  5122.    \ifdim \@tempskipa>\z@
  5123.      \begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
  5124.    \else \def\@svsechd{#4\hskip #1\relax #5}\fi
  5125.     \@xsect{#3}}
  5126. \newif\if@afterindent \@afterindenttrue
  5127. \def\@afterheading{\global\@nobreaktrue
  5128.       \everypar{\if@nobreak
  5129.                    \global\@nobreakfalse
  5130.                    \clubpenalty \@M
  5131.                    \if@afterindent \else {\setbox0=\lastbox}\fi
  5132.                  \else \clubpenalty \@clubpenalty
  5133.                     \everypar{}\fi}}
  5134. % \@hangfrom{TEXT} : Puts TEXT in a box, and makes a hanging indentation
  5135. %    of the following material up to the first \par.  Should be used
  5136. %    in vertical mode.
  5137. \def\@hangfrom#1{\setbox\@tempboxa=\hbox{#1}%
  5138.       \hangindent 1\wd\@tempboxa\noindent\box\@tempboxa}
  5139. \newcount\c@secnumdepth
  5140. \newcount\c@tocdepth
  5141. % \secdef{UNSTARCMDS}{STARCMDS} :
  5142. %    When defining a \chapter or \section command without using
  5143. %    \@startsection, you can use \secdef as follows:
  5144. %       \def\chapter { ... \secdef \CMDA \CMDB }
  5145. %       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
  5146. %       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
  5147. \def\secdef#1#2{\@ifstar{#2}{\@dblarg{#1}}}
  5148. % Initializations
  5149. \def\sectionmark#1{}
  5150. \def\subsectionmark#1{}
  5151. \def\subsubsectionmark#1{}
  5152. \def\paragraphmark#1{}
  5153. \def\subparagraphmark#1{}
  5154. \message{contents,}
  5155. %     *****************************************
  5156. %     *        TABLE OF CONTENTS, ETC.        *
  5157. %     *****************************************
  5158. % CONVENTIONS:
  5159. %   \tf@foo = file number for output for table foo.  The file is
  5160. %             opened only if @filesw = true.
  5161. %   \contentsline{TYPE}{ENTRY}{PAGE}
  5162. %       Macro to produce a TYPE entry in a table of contents, etc.
  5163. %       It will appear in the .TOC or other file.  For example,
  5164. %       The entry for subsection 1.4.3 in the table of contents might
  5165. %       be produced by:
  5166. %       \contentsline{subsection}{\makebox{30pt}[r]{1.4.3} Gnats and Gnus}{22}
  5167. %       The \protect command causes command sequences to be written
  5168. %       without expanding them.
  5169. %   \l@TYPE{ENTRY}{PAGE}
  5170. %       Macro defined by document style for making an entry of
  5171. %       type TYPE in a table of contents, etc.  E.g., the document
  5172. %       style should define \l@chapter, \l@section, etc.
  5173. %   \addcontentsline{TABLE}{TYPE}{ENTRY}
  5174. %      User command for adding his own entry to a table of contents, etc.
  5175. %      It adds the entry
  5176. %         \contentsline{TYPE}{ENTRY}{page}
  5177. %      to the .TABLE file.
  5178. %   \addtocontents{TABLE}{TEXT} : Adds TEXT to the .TABLE file, with no
  5179. %      page number.
  5180. %  Note: When used in the ENTRY or TEXT of one of the above commands,
  5181. %  \protect causes the following control sequence to be written
  5182. %  on the file without being expanded.  The sequence will be expanded
  5183. %  when the table of contents entry is processed.
  5184. %  SURPRISE: \index, \glossary,  and \label are no-ops inside an
  5185. %  \addcontentsline or \addtocontents command argument.  This could cause a
  5186. %  problem if the user puts an \index or \label into one of the commands he
  5187. %  writes, or into the optional 'short version' argument of a \section or
  5188. %  \caption command.
  5189. % \addcontentsline{TABLE}{TYPE}{ENTRY}  ==
  5190. %   BEGIN
  5191. %     if @filesw = true
  5192. %       then  \begingroup
  5193. %               \index == \label == \glossary == \@gobble
  5194. %               \protect{ARG} == \string\string\string ARG \string\space\space
  5195. %               \@temptokena := \thepage
  5196. %               \@tempa  == write \string\contentsline
  5197. %                              {TYPE}{ENTRY}{\the\@temptokena}
  5198. %               \@tempa
  5199. %               IF vmode and @nobreak = true  THEN  \nobreak FI
  5200. %              \endgroup
  5201. %     fi
  5202. %   END
  5203. % \@starttoc{EXT} : Used to define \tableofcontents, \listoffigures, etc.--
  5204. %      e.g., \@starttoc{lof} is used in \listoffigures.  This command reads
  5205. %      the .EXT file and sets up to write the new .EXT file.
  5206. % \@starttoc{EXT} ==
  5207. %   BEGIN
  5208. %     \begingroup
  5209. %        \makeatletter
  5210. %        read file \jobname.EXT
  5211. %        IF @filesw = true
  5212. %          THEN  open \jobname.EXT as file \tf@EXT
  5213. %        FI
  5214. %        @nobreak :=G FALSE  %% added 24 May 89
  5215. %     \endgroup
  5216. %   END
  5217. \def\@starttoc#1{\begingroup
  5218.   \makeatletter
  5219.   \@input{\jobname.#1}\if@filesw \expandafter\newwrite\csname tf@#1\endcsname
  5220.              \expandafter\openout \csname tf@#1\endcsname \jobname.#1\relax
  5221.   \fi \global\@nobreakfalse \endgroup}
  5222. \let\protect=\relax
  5223. \def\addcontentsline#1#2#3{\if@filesw \begingroup
  5224. \let\label\@gobble \let\index\@gobble \let\glossary\@gobble
  5225. \def\protect##1{\string\string\string##1\string\space
  5226.    \space}\@temptokena{\thepage}%
  5227. \edef\@tempa{\write \@auxout{\string\@writefile{#1}{\protect
  5228.      \contentsline{#2}{#3}{\the\@temptokena}}}}\@tempa
  5229.    \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
  5230. \long\def\addtocontents#1#2{\if@filesw \begingroup
  5231. \let\label\@gobble \let\index\@gobble \let\glossary\@gobble
  5232. \def\protect##1{\string\string\string##1\string\space\space}%
  5233. \edef\@tempa{\write \@auxout {\string\@writefile{#1}{#2}}}\@tempa
  5234.   \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
  5235. \def\contentsline#1{\csname l@#1\endcsname}
  5236. % \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE} :
  5237. %   Macro to produce a table of contents line with the following
  5238. %   parameters:
  5239. %     LEVEL    : If LEVEL > \c@tocdepth, then no line produced.
  5240. %     INDENT   : Total indentation from the left margin.
  5241. %     NUMWIDTH : Width of box for number if the TITLE has a
  5242. %                \numberline command.
  5243. %                As of 25 Jan 88, this is also the amount of extra indentation
  5244. %                added to second and later lines of a multiple line entry.
  5245. %     TITLE    : Contents of entry.
  5246. %     PAGE     : Page number.
  5247. %  Uses the following parameters, which must be set by the document style.
  5248. %  They should be defined with \def's.
  5249. %    \@pnumwidth : Width of box in which page number is set.
  5250. %    \@tocrmarg  : Right margin indentation for all but last line of
  5251. %                  multiple-line entries.
  5252. %    \@dotsep    : Separation between dots, in mu units.  Should be \def'd to
  5253. %                  a number like 2 or 1.7
  5254. \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
  5255.   \vskip \z@ plus .2pt
  5256.   {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
  5257.     \parindent #2\relax\@afterindenttrue
  5258.    \interlinepenalty\@M
  5259.    \leavevmode
  5260.    \@tempdima #3\relax \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
  5261.     #4\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
  5262.        mu$}\hfill \nobreak \hbox to\@pnumwidth{\hfil\rm #5}\par}\fi}
  5263. %%% Note: \nobreak's added 7 Jan 86 to prevent bad line break that
  5264. %%% left the page number dangling by itself at left edge of a new line.
  5265. %%% Changed 25 Jan 88 to use \leftskip instead of \hangindent so
  5266. %%% leaders of multiple-line contents entries would line up properly.
  5267. % \numberline{NUMBER} : For use in a \contentsline command.
  5268. %   It puts NUMBER flushleft in a box of width \@tempdima
  5269. %   (Before 25 Jan 88 change, it also added \@tempdima to the hanging
  5270. %   indentation.)
  5271. \def\numberline#1{\hbox to\@tempdima{#1\hfil}}
  5272. \message{index,}
  5273. %       ****************************************************
  5274. %       *            INDEX COMMANDS AND GLOSSARY           *
  5275. %       ****************************************************
  5276. % \makeindex ==
  5277. %   BEGIN
  5278. %    if \@filesw = T
  5279. %      then  open file \jobname.IDX as \@indexfile
  5280. %             \index ==  BEGIN \@bsphack
  5281. %                              \begingroup
  5282. %                                 \protect{X} == \string X\space
  5283. %                                       %% added 3 Feb 87 for \index commands
  5284. %                                       %% in \footnotes
  5285. %                                  re-\catcode special characters to 'other'
  5286. %                                  \@wrindex
  5287. %    fi
  5288. %   END
  5289. %  \@wrindex{ITEM} ==
  5290. %    BEGIN
  5291. %        write of {\indexentry{ITEM}{page number}}
  5292. %      \endgroup
  5293. %      \@esphack
  5294. %    END
  5295. %  INITIALIZATION:
  5296. %  \index == BEGIN \@bsphack
  5297. %                  \begingroup
  5298. %                     re-\catcode special characters (in case '%' there)
  5299. %                     \@index
  5300. %            END
  5301. %  \@index{ITEM} == BEGIN \endgroup \@esphack END
  5302. % Changes made 14 Apr 89 to write \glossaryentry's instead of
  5303. % \indexentry's on the .glo file.
  5304. \def\makeindex{\if@filesw \newwrite\@indexfile
  5305.   \immediate\openout\@indexfile=\jobname.idx
  5306.   \def\index{\@bsphack\begingroup
  5307.              \def\protect####1{\string####1\space}\@sanitize
  5308.              \@wrindex}\typeout
  5309.   {Writing index file \jobname.idx }\fi}
  5310. \def\@wrindex#1{\let\thepage\relax
  5311.    \xdef\@gtempa{\write\@indexfile{\string
  5312.       \indexentry{#1}{\thepage}}}\endgroup\@gtempa
  5313.    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
  5314. \def\index{\@bsphack\begingroup \@sanitize\@index}
  5315. \def\@index#1{\endgroup\@esphack}
  5316. \def\makeglossary{\if@filesw \newwrite\@glossaryfile
  5317.   \immediate\openout\@glossaryfile=\jobname.glo
  5318.   \def\glossary{\@bsphack\begingroup\@sanitize\@wrglossary}\typeout
  5319.   {Writing glossary file \jobname.glo }\fi}
  5320. \def\@wrglossary#1{\let\thepage\relax
  5321.    \xdef\@gtempa{\write\@glossaryfile{\string
  5322.       \glossaryentry{#1}{\thepage}}}\endgroup\@gtempa
  5323.    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
  5324. \def\glossary{\@bsphack\begingroup\@sanitize\@index}
  5325. \message{bibliography,}
  5326. %      ****************************************
  5327. %      *            BIBLIOGRAPHY              *
  5328. %      ****************************************
  5329. %  A bibliography is created by the bibliography environment, which
  5330. %  generates a title such as ``References'', and a list of entries.
  5331. %  The BIBTeX program will create a file containing such an environment,
  5332. %  which will be read in by the \bibliography command.  With
  5333. %  BIBTeX, the following commands will be used.
  5334. %  \bibliography{FILE1,FILE2, ... ,FILEn} : specifies
  5335. %     the bibdata files.  Writes a \bibdata entry on the .aux file
  5336. %     and tries to read in mainfile.BBL.
  5337. %  \bibliographystyle{STYLE} : Writes a \bibstyle entry on the .aux file.
  5338. %  The thebibliography environment is a list environment.  To save the
  5339. %  use of an extra counter, it should use  enumiv  as the item counter.
  5340. %  Instead of using \item, items in the bibliography are produced by the
  5341. %  following commands:
  5342. %    \bibitem{NAME}             : Produces a numbered entry cited as NAME.
  5343. %    \bibitem[LABEL]{NAME}      : Produces an entry labeled by LABEL and
  5344. %                                 cited by NAME.
  5345. %  The former is used for bibliographies with citations like [1], [2], etc.;
  5346. %  the latter is used for citations like [Knuth82].
  5347. %  The document style must define the thebibliography environment.  This
  5348. %  environment has a single argument, which is the widest bibliography
  5349. %  label-- e.g., if the [Knuth67] is the widest entry, then thist argument
  5350. %  will be Knuth67.  The \thebibliography command must begin a list
  5351. %  environment, which the \endthebibliography command ends.
  5352. %  Entries are cited by the command \cite{NAME}.
  5353. %  PARAMETERS
  5354. %   \@cite     : A macro such that \@cite{LABEL1,LABEL2}{NOTE}
  5355. %                produces the output for a \cite[NOTE]{FOO1,FOO2} command,
  5356. %                where entry FOOi is defined by \bibitem[LABELi]{FOOi}.
  5357. %                The switch @tempswa is true if the optional NOTE argument
  5358. %                is present.
  5359. %                The default definition is :
  5360. %                  \@cite{LABELS}{NOTE} ==
  5361. %                     BEGIN [LABELS
  5362. %                           IF @tempswa = T THEN , NOTE FI
  5363. %                           ]
  5364. %                     END
  5365. %   \@biblabel : A macro to produce the label in the bibliography
  5366. %                entry.  For \bibitem[LABEL]{NAME}, the label is
  5367. %                generated by \@biblabel{LABEL}.  It has the default
  5368. %                definition \@biblabel{LABEL} -> [LABEL].
  5369. %  CONVENTION
  5370. %  \b@FOO : The name or number of the reference created by \cite{FOO}
  5371. %           E.g., if \cite{FOO} -> [17] , then \b@FOO -> 17.
  5372. \def\bibitem{\@ifnextchar[{\@lbibitem}{\@bibitem}}
  5373. \def\@lbibitem[#1]#2{\item[\@biblabel{#1}]\if@filesw
  5374.       { \def\protect##1{\string ##1\space}\immediate
  5375.         \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
  5376. %% Placement of `}' in def of \@lbibitem corrected 29 Apr 87
  5377. %% (Error found by Arthur Ogawa.)
  5378. \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
  5379.        {\string\bibcite{#1}{\the\c@enumi}}\fi\ignorespaces}
  5380. \def\bibcite#1#2{\global\@namedef{b@#1}{#2}}
  5381. \let\citation\@gobble
  5382. \def\cite{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
  5383. % \penalty\@m added to definition of \@citex to allow a line
  5384. % break after the `,' in citations like [Jones80,Smith77]
  5385. % (Added 23 Oct 86)
  5386. % space added after the `,' (21 Nov 87)
  5387. \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  5388.   \def\@citea{}\@cite{\@for\@citeb:=#2\do
  5389.     {\@citea\def\@citea{,\penalty\@m\ }\@ifundefined
  5390.        {b@\@citeb}{{\bf ?}\@warning
  5391.        {Citation `\@citeb' on page \thepage \space undefined}}%
  5392. \hbox{\csname b@\@citeb\endcsname}}}{#1}}
  5393. \let\bibdata=\@gobble
  5394. \let\bibstyle=\@gobble
  5395. \def\bibliography#1{\if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi
  5396.   \@input{\jobname.bbl}}
  5397. \def\bibliographystyle#1{\if@filesw\immediate\write\@auxout
  5398.     {\string\bibstyle{#1}}\fi}
  5399. % \nocite{CITATIONS} : puts information on .AUX file to cause
  5400. %   BibTeX to include the CITATIONS list in the bibliography,
  5401. %   but puts nothing in the text.  (Added 14 Jun 85)
  5402. \def\nocite#1{\@bsphack
  5403.   \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
  5404.   \@esphack}
  5405. %DEFAULT DEFINITIONS
  5406. \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
  5407. \def\@biblabel#1{[#1]\hfill}
  5408. \message{floats,}
  5409. %     ****************************************
  5410. %     *               FLOATS                 *
  5411. %     ****************************************
  5412. %  The different types of floats are identified by a TYPE name, which is
  5413. %  the name of the counter for that kind of float.  For example, figures
  5414. %  are of type 'figure' and tables are of type 'table'.  Each TYPE has
  5415. %  associated a positive TYPE NUMBER, which is a power of two.  E.g.,
  5416. %  figures might be have type number 1, tables type number 2, programs
  5417. %  type number 4, etc.
  5418. %  The locations where a float can go are specified by a PLACEMENT
  5419. %  SPECIFIER, which is a list of the possible locations, each denoted
  5420. %  by a letter as follows:
  5421. %     h : here   - at the current location in the text.
  5422. %     t : top    - at the top of a text page.
  5423. %     b : bottom - at the bottom of a text page.
  5424. %     p : page   - on a separate float page.
  5425. %  For example, 'pht' specifies that the float can appear in any of three
  5426. %  locations: page, here or top.
  5427. % Where floats may appear on a page, and how many may appear there
  5428. % are specified by the following float placement parameters.  The
  5429. % numbers are named like counters so the user can set them with
  5430. % the ordinary counter-setting commands.
  5431. %  \c@topnumber            : Number of floats allowed at the top of a column.
  5432. %  \topfraction            : Fraction of column that can be devoted to floats.
  5433. %  \c@dbltopnumber, \dbltopfraction : Same as above, but for double-column
  5434. %                          floats.
  5435. %  \c@bottomnumber, \bottomfraction : Same as above for bottom of page.
  5436. %  \c@totalnumber          : Number of floats allowed in a single column,
  5437. %                          including in-text floats.
  5438. %  \textfraction         : Minimum fraction of column that must contain text.
  5439. %  \floatpagefraction    : Minimum fraction of page that must be taken
  5440. %                          up by float page.
  5441. %  \dblfloatpagefraction : Same as above, for double-column floats.
  5442. % The document style must define the following.
  5443. %    \fps@TYPE   : The default placement specifier for floats of type TYPE.
  5444. %    \ftype@TYPE : The type number for floats of type TYPE.
  5445. %    \ext@TYPE   : The file extension indicating the file on which the
  5446. %                  contents list for float type TYPE is stored.  For example,
  5447. %                  \ext@figure = 'lof'.
  5448. %    \fnum@TYPE  : A macro to generate the figure number for a caption.
  5449. %                  For example, \fnum@TYPE == Figure \thefigure.
  5450. %    \@makecaption{NUM}{TEXT} : A macro to make a caption, with NUM the value
  5451. %                  produced by \fnum@... and TEXT the text of the caption.
  5452. %                  It can assume it's in a \parbox of the appropriate width.
  5453. % \@float{TYPE}[PLACEMENT] : This macro begins a float environment for a
  5454. %     single-column float of type TYPE with PLACEMENT as the placement
  5455. %     specifier.  The default value of PLACEMENT is defined by \fps@TYPE.
  5456. %     The environment is ended by \end@float.
  5457. %     E.g., \figure == \@float{figure}, \endfigure == \end@float.
  5458. %  \caption ==
  5459. %    BEGIN
  5460. %     \refstepcounter{\@captype}
  5461. %     \@dblarg{\@caption{\@captype}}
  5462. %    END
  5463. %% In following definition, \par moved from after \addcontentsline to
  5464. %% before \addcontentsline because the \write could cause
  5465. %% an extra blank line to be added to the paragraph above the
  5466. %% caption.  (Change made 12 Jun 87)
  5467. %  \@caption{TYPE}[STEXT]{TEXT} ==
  5468. %   BEGIN
  5469. %     \par
  5470. %     \addcontentsline{\ext@TYPE}{TYPE}{\numberline{\theTYPE}{STEXT}}
  5471. %     \begingroup
  5472. %       \@parboxrestore
  5473. %       \normalsize
  5474. %       \@makecaption{\fnum@TYPE}{TEXT}
  5475. %       \par
  5476. %     \endgroup
  5477. %   END
  5478. %  \@float{TYPE}[PLACEMENT] ==
  5479. %   BEGIN
  5480. %     if hmode then \@bsphack
  5481. %                   \@floatpenalty := -10002
  5482. %              else \@floatpenalty := -10003
  5483. %     fi
  5484. %     \@captype ==L TYPE
  5485. %     if inner
  5486. %       then LaTeX Error: 'Not in outer paragraph mode.'
  5487. %            \@floatpenalty := 0
  5488. %       else if \@freelist nonempty
  5489. %              then \@currbox  :=L head of \@freelist
  5490. %                   \@freelist :=G tail of \@freelist
  5491. %                   \count\@currbox :=G 32*\ftype@TYPE + 16 +
  5492. %                                          bits determined by PLACEMENT
  5493. %              else \@floatpenalty := 0
  5494. %                   LaTeX Error: 'Too many unprocessed floats'
  5495. %            fi
  5496. %     fi
  5497. %     \@currbox :=G \vbox{  %% 15 Dec 87 -- removed \boxmaxdepth :=L 0pt
  5498. %                           %% that made box zero depth because it screwed
  5499. %                           %% things up.  Instead, added \vskip 0pt at end
  5500. %                     \hsize = \columnwidth
  5501. %                     \@parboxrestore
  5502. %   END
  5503. %  \end@float ==
  5504. %    BEGIN
  5505. %       \vskip 0pt %% makes 0 depth box -- added 15 Dec 87
  5506. %       }
  5507. %      if \@floatpenalty < 0
  5508. %        then add \@currbox to \@currlist
  5509. %             if \ht\@currbox > \textheight
  5510. %               then \ht\@currbox :=G \textheight fi
  5511. %             if \@floatpenalty < -10002
  5512. %               then \penalty -10004
  5513. %                    \vbox{}
  5514. %                    \penalty \@floatpenalty
  5515. %               else \vadjust{\penalty -10004
  5516. %                             \vbox{}
  5517. %                             \penalty \@floatpenalty}
  5518. %                    \@esphack
  5519. %      fi    fi
  5520. %    END
  5521. %  \@dblfloat{TYPE}[PLACEMENT] : Macro to begin a float environment for a
  5522. %     double-column float of type TYPE with PLACEMENT as the placement
  5523. %     specifier.  The default value of PLACEMENT is 'tp'
  5524. %     The environment is ended by \end@dblfloat.
  5525. %     E.g., \figure* == \@dblfloat{figure}, \endfigure* == \end@dblfloat.
  5526. %  \@dblfloat{TYPE}[PLACEMENT] ==
  5527. %     Identical to \@float{TYPE}[PLACEMENT] except \hsize and \linewidth
  5528. %     are set to \textwidth.
  5529. %  \end@dblfloat ==
  5530. %     BEGIN    %%% { BRACE MATCHING
  5531. %       \vskip 0pt %% makes 0 depth box -- added 15 Dec 87
  5532. %       }
  5533. %       if \@floatpenalty < 0
  5534. %         then \@dbldeferlist :=G \@dbldeferlist * \@currbox
  5535. %       fi
  5536. %       if \@floatpenalty = -10002 then \@esphack  fi
  5537. %     END
  5538. \newcount\@floatpenalty
  5539. \def\caption{\refstepcounter\@captype \@dblarg{\@caption\@captype}}
  5540. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
  5541.   ext@#1\endcsname}{#1}{\protect\numberline{\csname
  5542.   the#1\endcsname}{\ignorespaces #2}}\begingroup
  5543.     \@parboxrestore
  5544.     \normalsize
  5545.     \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  5546.   \endgroup}
  5547. \def\@float#1{\@ifnextchar[{\@xfloat{#1}}{\edef\@tempa{\noexpand\@xfloat
  5548.     {#1}[\csname fps@#1\endcsname]}\@tempa}}
  5549. \def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
  5550.    \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
  5551.       \@parmoderr\@floatpenalty\z@
  5552.     \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
  5553.        \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
  5554.        \@tfor \@tempa :=#2\do
  5555.                         {\if\@tempa h\advance\@tempcnta \@ne\fi
  5556.                          \if\@tempa t\advance\@tempcnta \tw@\fi
  5557.                          \if\@tempa b\advance\@tempcnta 4\relax\fi
  5558.                          \if\@tempa p\advance\@tempcnta 8\relax\fi
  5559.          }\global\count\@currbox\@tempcnta}\@fltovf\fi
  5560.     \global\setbox\@currbox\vbox\bgroup
  5561. %    \boxmaxdepth\z@     % commented out 15 Dec 87
  5562.     \hsize\columnwidth \@parboxrestore}
  5563. \def\end@float{\par\vskip\z@\egroup %% \par\vskip\z@ added 15 Dec 87
  5564.    \ifnum\@floatpenalty <\z@
  5565.      \@cons\@currlist\@currbox
  5566.      \ifdim \ht\@currbox >\textheight
  5567.         \ht\@currbox\textheight \fi
  5568.      \ifnum\@floatpenalty < -\@Mii
  5569.         \penalty -\@Miv
  5570.         \@tempdima\prevdepth    %% saving and restoring \prevdepth added
  5571.         \vbox{}                 %% 26 May 87 to prevent extra vertical
  5572.         \prevdepth \@tempdima   %% space when used in vertical mode
  5573.         \penalty\@floatpenalty
  5574.       \else \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@esphack
  5575.      \fi\fi}
  5576. \def\@dblfloat{\if@twocolumn\let\@tempa\@dbflt\else\let\@tempa\@float\fi
  5577.   \@tempa}
  5578. \def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tp]}}
  5579. \def\@xdblfloat#1[#2]{\@xfloat{#1}[#2]\hsize\textwidth\linewidth\textwidth}
  5580. \def\end@dblfloat{\if@twocolumn
  5581.      \par\vskip\z@\egroup %% \par\vskip\z@ added 15 Dec 87\egroup
  5582.      \ifnum\@floatpenalty <\z@ \@cons\@dbldeferlist\@currbox\fi
  5583.       \ifnum \@floatpenalty =-\@Mii \@esphack\fi\else\end@float\fi}
  5584. \newcount\c@topnumber
  5585. \newcount\c@dbltopnumber
  5586. \newcount\c@bottomnumber
  5587. \newcount\c@totalnumber
  5588. \def\@floatplacement{\global\@topnum\c@topnumber
  5589.    \global\@toproom \topfraction\@colht
  5590.    \global\@botnum  \c@bottomnumber
  5591.    \global\@botroom \bottomfraction\@colht
  5592.    \global\@colnum  \c@totalnumber
  5593.    \@fpmin   \floatpagefraction\@colht}
  5594. \def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
  5595.    \global\@dbltoproom \dbltopfraction\@colht
  5596.    \@fpmin \dblfloatpagefraction\textheight
  5597.    \@fptop \@dblfptop
  5598.    \@fpsep \@dblfpsep
  5599.    \@fpbot \@dblfpbot}
  5600. %   MARGINAL NOTES:
  5601. %   Marginal notes use the same mechanism as floats to communicate
  5602. %   with the \output routine.  Marginal notes are distinguished from
  5603. %   floats by having a negative placement specification.  The command
  5604. %   \marginpar [LTEXT]{RTEXT} generates a marginal note in a parbox,
  5605. %   using LTEXT if it's on the left and RTEXT if it's on the right.
  5606. %   (Default is RTEXT = LTEXT.)  It uses the following parameters.
  5607. %   \marginparwidth : Width of marginal notes.
  5608. %   \marginparsep   : Distance between marginal note and text.
  5609. %        the page layout to determine how to move the marginal
  5610. %        note into the margin.   E.g., \@leftmarginskip ==
  5611. %        \hskip -\marginparwidth \hskip -\marginparsep .
  5612. %   \marginparpush  :  Minimum vertical separation between \marginpar's
  5613. %  Marginal notes are normally put on the outside of the page
  5614. %  if @mparswitch = true, and on the right if @mparswitch = false.
  5615. %  The command \reversemarginpar reverses the side where they
  5616. %  are put.  \normalmarginpar undoes \reversemarginpar.
  5617. %  These commands have no effect for two-column output.
  5618. %  SURPRISE: if two marginal notes appear on the same line of
  5619. %  text, then the second one could appear on the next page, in
  5620. %  a funny position.
  5621. %  \marginpar [LTEXT]{RTEXT} ==
  5622. %   BEGIN
  5623. %     if hmode then \@bsphack
  5624. %                   \@floatpenalty := -10002
  5625. %              else \@floatpenalty := -10003
  5626. %     fi
  5627. %     if inner
  5628. %       then LaTeX Error: 'Not in outer paragraph mode.'
  5629. %            \@floatpenalty := 0
  5630. %       else if \@freelist has two elements:
  5631. %              then get \@marbox, \@currbox  from \@freelist
  5632. %                   \count\@marbox :=G -1
  5633. %              else \@floatpenalty := 0
  5634. %                   LaTeX Error: 'Too many unprocessed floats'
  5635. %                   \@currbox, \@marbox := \@tempboxa    %%use \def
  5636. %            fi
  5637. %     fi
  5638. %     if optional argument
  5639. %       then %% \@xmpar ==
  5640. %            \@savemarbox\@marbox{LTEXT}
  5641. %            \@savemarbox\@currbox{RTEXT}
  5642. %       else %% \@ympar ==
  5643. %            \@savemarbox\@marbox{RTEXT}
  5644. %            \box\@currbox :=G \box\@marbox
  5645. %    fi
  5646. %    %% \@xympar ==
  5647. %    if \@floatpenalty < 0 then add \@marbox to \@currlist fi
  5648. %    \setbox\@tempboxa =L     %% added 3 Jan 88 to correct bug introduced
  5649. %       { \end@float %%%% BRACE MATCHING}        %% by 15 Dec 87 change
  5650. %   END
  5651. % \@savemarbox\BOX{TEXT} ==
  5652. %   BEGIN
  5653. %     \BOX  :=G \vtop{ \hsize = \marginparwidth
  5654. %                      \@parboxrestore
  5655. %                      TEXT
  5656. %                    }
  5657. %   END
  5658. % \reversemarginpar == BEGIN \@mparbottom   :=G 0
  5659. %                            @reversemargin :=G true
  5660. %                      END
  5661. % \normalmarginpar  == BEGIN \@mparbottom   :=G 0
  5662. %                            @reversemargin :=G false
  5663. %                      END
  5664. \def\marginpar{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
  5665.    \@floatpenalty-\@Miii\fi\ifinner
  5666.       \@parmoderr\@floatpenalty\z@
  5667.     \else\@next\@currbox\@freelist{}{}\@next\@marbox\@freelist{\global
  5668.       \count\@marbox\m@ne}{\@floatpenalty\z@ \@fltovf\def\@currbox{\@tempboxa
  5669.            }\def\@marbox{\@tempboxa}}\fi
  5670.      \@ifnextchar [{\@xmpar}{\@ympar}}
  5671. \long\def\@xmpar[#1]#2{\@savemarbox\@marbox{#1}\@savemarbox\@currbox
  5672.    {#2}\@xympar}
  5673. \long\def\@ympar#1{\@savemarbox\@marbox{#1}\global\setbox\@currbox
  5674.      \copy\@marbox\@xympar}
  5675. \long\def\@savemarbox#1#2{\global\setbox#1\vtop{\hsize\marginparwidth
  5676.    \@parboxrestore #2}}
  5677. \def\@xympar{\ifnum\@floatpenalty <\z@\@cons\@currlist\@marbox\fi
  5678.      \setbox\@tempboxa\vbox   %% added 3 Jan 88
  5679.      \bgroup\end@float\@esphack}
  5680. \def\reversemarginpar{\global\@mparbottom\z@ \@reversemargintrue}
  5681. \def\normalmarginpar{\global\@mparbottom\z@ \@reversemarginfalse}
  5682. \message{footnotes,}
  5683. %       ****************************************
  5684. %       *             FOOTNOTES                *
  5685. %       ****************************************
  5686. %   \footnote{NOTE}       : User command to insert a footnote.
  5687. %   \footnote[NUM]{NOTE}  : User command to insert a footnote numbered
  5688. %                           NUM, where NUM is a number -- 1, 2,
  5689. %                           etc.  For example, if footnotes are numbered
  5690. %                           *, **, etc. within pages, then \footnote[2]{...}
  5691. %                           produces footnote '**'.  This command does not
  5692. %                           step the footnote counter.
  5693. %   \footnotemark[NUM]    : Command to produce just the footnote mark in
  5694. %                           the text, but no footnote.  With no argument,
  5695. %                           it steps the footnote counter before generating
  5696. %                           the mark.
  5697. %   \footnotetext[NUM]{TEXT} : Command to produce the footnote but no
  5698. %                              mark.  \footnote is equivalent to
  5699. %                              \footnotemark \footnotetext .
  5700. %   As in PLAIN, footnotes use \insert\footins, and the following parameters:
  5701. %   \footnotesize   : Size-changing command for footnotes.
  5702. %   \footnotesep    : The height of a strut placed at the beginning of
  5703. %                     every footnote.
  5704. %   \skip\footins   : Space between main text and footnotes.  The rule
  5705. %                     separating footnotes from text occurs in this space.
  5706. %                     This space lies above the strut of height \footnotesep
  5707. %                     which is at the beginning of the first footnote.
  5708. %   \footnoterule   : Macro to draw the rule separating footnotes from text.
  5709. %                     It is executed right after a \vspace of \skip\footins.
  5710. %                     It should take zero vertical space--i.e., it should to
  5711. %                     a negative skip to compensate for any positive space
  5712. %                     it occupies.  (See PLAIN.TEX.)
  5713. %   \interfootnotelinepenalty : Interline penalty for footnotes.
  5714. %   \thefootnote : In usual LaTeX style, produces the footnote number.
  5715. %                  If footnotes are to be numbered within pages, then the
  5716. %                  document style file must include an \@addtoreset command
  5717. %                  to cause the footnote counter to be reset when the page
  5718. %                  counter is stepped.  This is not a good idea, though,
  5719. %                  because the counter will not always be reset in time
  5720. %                  to ensure that the first footnote on a page is footnote
  5721. %                  number one.
  5722. %   \@thefnmark : Holds the current footnote's mark--e.g., \dag or '1' or 'a'.
  5723. %   \@mpfnnumber     : A macro that generates the numbers for \footnote
  5724. %                      and \footnotemark commands. It == \thefootnote
  5725. %                      outside a minipage environment, but can be changed
  5726. %                      inside to generate numbers for \footnote's.
  5727. %   \@makefnmark : A macro to generate the footnote marker from \@thefnmark
  5728. %                  The default definition is \hbox{$^\@thefnmark$}.
  5729. %   \@makefntext{NOTE} :
  5730. %        Must produce the actual footnote, using \@thefnmark as the mark
  5731. %        of the footnote and NOTE as the text.  It is called when effectively
  5732. %        inside a \parbox, with \hsize = \columnwidth.  For example, it might
  5733. %        be as simple as
  5734. %               $^{\@thefnmark}$ NOTE
  5735. % In a minipage environment, \footnote and \footnotetext are redefined
  5736. % so that
  5737. %    (a) they use the counter mpfootnote
  5738. %    (b) the footnotes they produce go at the bottom of the minipage.
  5739. % The switch is accomplished by letting \@mpfn == footnote or mpfootnote
  5740. % and \thempfn == \thefootnote or \thempfootnote, and by redefining
  5741. % \@footnotetext to be \@mpfootnotetext in the minipage.
  5742. % \footnote{NOTE}  ==
  5743. %  BEGIN
  5744. %    \stepcounter{\@mpfn}
  5745. %    \@thefnmark :=G eval (\thempfn)
  5746. %    \@footnotemark
  5747. %    \@footnotetext{NOTE}
  5748. %  END
  5749. % \footnote[NUM]{NOTE} ==
  5750. %  BEGIN
  5751. %    begingroup
  5752. %       counter \@mpfn :=L NUM
  5753. %       \@thefnmark :=G eval (\thempfn)
  5754. %    endgroup
  5755. %    \@footnotemark
  5756. %    \@footnotetext{NOTE}
  5757. %  END
  5758. % \@footnotetext{NOTE} ==
  5759. %  BEGIN
  5760. %    \insert into \footins
  5761. %       {\footnotesize
  5762. %        \interlinepenalty :=L \interfootnotelinepenalty
  5763. %        \splittopskip     :=L \footnotesep
  5764. %        \splitmaxdepth    :=L \dp\strutbox
  5765. %        \floatingpenalty  :=L 20000
  5766. %        \hsize :=L \columnwidth
  5767. %        \@parboxrestore
  5768. %        set \@currentlabel to make \label command work right
  5769. %        \@makefntext{\rule{0pt}{\footnotesep} NOTE}
  5770. %       }
  5771. %  END
  5772. % \footnotemark      ==
  5773. %  BEGIN \stepcounter{footnote}
  5774. %        \@thefnmark :=G eval(\thefootnote)
  5775. %        \@footnotemark
  5776. %  END
  5777. % \footnotemark[NUM] ==
  5778. %   BEGIN
  5779. %       begingroup
  5780. %         footnote counter :=L NUM
  5781. %        \@thefnmark :=G eval(\thefootnote)
  5782. %       endgroup
  5783. %       \@footnotemark
  5784. %   END
  5785. % \@footnotemark ==
  5786. %   BEGIN
  5787. %    \leavevmode
  5788. %    IF hmode THEN \@x@sf := \the\spacefactor FI
  5789. %    \@makefnmark          % put number in main text
  5790. %    IF hmode THEN \spacefactor := \@x@sf FI
  5791. %   END
  5792. % \footnotetext      ==
  5793. %    BEGIN \@thefnmark :=G eval (\thempfn)
  5794. %          \@footnotetext
  5795. %    END
  5796. % \footnotetext[NUM] ==
  5797. %    BEGIN begingroup  counter \@mpfn :=L NUM
  5798. %                      \@thefnmark :=G eval (\thempfn)
  5799. %          endgroup
  5800. %          \@footnotetext
  5801. %    END
  5802. \@definecounter{footnote}
  5803. \def\thefootnote{\arabic{footnote}}
  5804. \@definecounter{mpfootnote}
  5805. \def\thempfootnote{\alph{mpfootnote}}
  5806. % Default definition
  5807. \def\@makefnmark{\hbox{$^{\@thefnmark}$}}
  5808. \newdimen\footnotesep
  5809. \def\footnote{\@ifnextchar[{\@xfootnote}{\stepcounter
  5810.    {\@mpfn}\xdef\@thefnmark{\thempfn}\@footnotemark\@footnotetext}}
  5811. \def\@xfootnote[#1]{\begingroup \csname c@\@mpfn\endcsname #1\relax
  5812.    \xdef\@thefnmark{\thempfn}\endgroup
  5813.    \@footnotemark\@footnotetext}
  5814. \long\def\@footnotetext#1{\insert\footins{\footnotesize
  5815.     \interlinepenalty\interfootnotelinepenalty
  5816.     \splittopskip\footnotesep
  5817.     \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
  5818.     \hsize\columnwidth \@parboxrestore
  5819.    \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
  5820.     {\rule{\z@}{\footnotesep}\ignorespaces
  5821.       #1\strut}}}
  5822. \def\footnotemark{\@ifnextchar[{\@xfootnotemark
  5823.     }{\stepcounter{footnote}\xdef\@thefnmark{\thefootnote}\@footnotemark}}
  5824. \def\@xfootnotemark[#1]{\begingroup \c@footnote #1\relax
  5825.    \xdef\@thefnmark{\thefootnote}\endgroup \@footnotemark}
  5826. \def\@footnotemark{\leavevmode\ifhmode
  5827.   \edef\@x@sf{\the\spacefactor}\fi \@makefnmark
  5828.    \ifhmode\spacefactor\@x@sf\fi\relax}
  5829. \def\footnotetext{\@ifnextchar
  5830.     [{\@xfootnotenext}{\xdef\@thefnmark{\thempfn}\@footnotetext}}
  5831. \def\@xfootnotenext[#1]{\begingroup \csname c@\@mpfn\endcsname #1\relax
  5832.    \xdef\@thefnmark{\thempfn}\endgroup \@footnotetext}
  5833. \def\@mpfn{footnote}
  5834. \def\thempfn{\thefootnote}
  5835. \message{initial,}
  5836. %          ****************************************
  5837. %          *    INITIAL DECLARATION COMMANDS      *
  5838. %          ****************************************
  5839. %                    DOCUMENT STYLE
  5840. %                    --------------
  5841. % The user starts his file with the command
  5842. %       \documentstyle [OPTION1, ... ,OPTIONk]{STYLE}
  5843. % which saves the OPTION's and \input's the file STYLE.STY.  When the
  5844. % STYLE.STY file issues the command \@options, the following happens
  5845. % for each i :
  5846. %     IF \ds@OPTIONi is defined
  5847. %       THEN execute \ds@OPTIONi
  5848. %       ELSE save OPTIONi on a list of unprocessed options.
  5849. %     FI
  5850. % After STYLE.STY has been executed, the file OPTIONi.STY is read for
  5851. % each OPTIONi on the list of unprocessed options.
  5852. % \documentstyle ==
  5853. %   BEGIN
  5854. %      IF next char = [
  5855. %        THEN  \@documentstyle
  5856. %        ELSE  \@documentstyle[]
  5857. %      FI
  5858. %   END
  5859. % \@documentstyle[OPTIONS]{STYLE} ==
  5860. %   BEGIN
  5861. %     \makeatletter
  5862. %     \@optionlist  :=  OPTIONS
  5863. %     \@optionfiles :=G null
  5864. %     \input STYLE.STY
  5865. %     \@elt == \input
  5866. %     \@optionfiles
  5867. %     \@elt == \relax
  5868. %     \makeatother
  5869. %   END
  5870. %  \@options ==
  5871. %    BEGIN
  5872. %      \@elt := \relax
  5873. %      FOR \@tempa := \@optionlist
  5874. %         DO  IF \ds@[eval(\@tempa)] defined
  5875. %               THEN  \ds@[eval(\@tempa)]
  5876. %               ELSE  \@optionfiles :=G \@optionfiles *
  5877. %                                           \@elt eval(\@tempa) \relax
  5878. %         OD  FI
  5879. %    END
  5880. %              PAGE STYLE COMMANDS
  5881. %              -------------------
  5882. %  \pagestyle{STYLE}     : sets the page style of the current and succeeding
  5883. %                          pages to STYLE
  5884. %  \thispagestyle{STYLE} : sets the page style of the current page only
  5885. %                          to STYLE
  5886. %  To define a page style STYLE, you must define \ps@STYLE to set the page
  5887. %  style parameters.
  5888. %  HOW A PAGE STYLE MAKES RUNNING HEADS AND FEET:
  5889. % The \ps@... command defines the macros \@oddhead, \@oddfoot,
  5890. % \@evenhead, and \@evenfoot to define the running heads and feet.
  5891. % (See output routine.)  To make headings determined by the sectioning
  5892. % commands, the page style defines the commands \chaptermark,
  5893. % \sectionmark, etc., where \chaptermark{TEXT} is called by \chapter to
  5894. % set a mark.  The \...mark commands and the \...head macros are defined
  5895. % with the help of the following macros.  (All the \...mark commands
  5896. % should be initialized to no-ops.)
  5897. % MARKING CONVENTIONS:
  5898. % LaTeX extends TeX's \mark facility by producing two kinds of marks
  5899. % a 'left' and a 'right' mark, using the following commands:
  5900. %     \markboth{LEFT}{RIGHT} : Adds both marks.
  5901. %     \markright{RIGHT}      : Adds a 'right' mark.
  5902. %     \leftmark  : Used in the output routine, gets the current 'left'  mark.
  5903. %                  Works like TeX's \botmark.
  5904. %     \rightmark : Used in the output routine, gets the current 'right' mark.
  5905. %                  Works like TeX's \firstmark.
  5906. % The marking commands work reasonably well for right marks 'numbered
  5907. % within' left marks--e.g., the left mark is changed by a \chapter command and
  5908. % the right mark is changed by a \section command.  However, it does
  5909. % produce somewhat anomalous results if 2 \markboth's occur on the same page.
  5910. % Commands like \tableofcontents that should set the marks in some page styles
  5911. % use a \@mkboth command, which is \let by the pagestyle command (\ps@...)
  5912. % to \markboth for setting the heading or to \@gobbletwo to do nothing.
  5913. \def\documentstyle{\@ifnextchar[{\@documentstyle}{\@documentstyle[]}}
  5914. \def\@documentstyle[#1]#2{\makeatletter
  5915.    \def\@optionlist{#1}\gdef\@optionfiles{}\input #2.sty\relax
  5916.    \let\@elt\input \@optionfiles \let\@elt\relax \makeatother}
  5917. \def\@options{\let\@elt\relax
  5918.     \@for\@tempa:=\@optionlist\do
  5919.         {\@ifundefined{ds@\@tempa}{\xdef\@optionfiles{\@optionfiles
  5920.              \@elt \@tempa.sty\relax}}{\csname ds@\@tempa\endcsname}}}
  5921. \def\pagestyle#1{\@nameuse{ps@#1}}
  5922. \def\thispagestyle#1{\global\@specialpagetrue\gdef\@specialstyle{#1}}
  5923. % \head : An obsolete command that was used in the `myheadings'
  5924. %         page style.   (Removed 14 Jun 85)
  5925. % \def\head{\@ifnextchar[{\@xhead}{\@yhead}}
  5926. % \def\@xhead[#1]#2{\if #1l \def\@lhead{#2}\else \def\@rhead{#2}\fi}
  5927. % \def\@yhead#1{\def\@lhead{#1}\def\@rhead{#1}}
  5928. % Initialization
  5929. \def\@lhead{}
  5930. \def\@rhead{}
  5931. % Default Initializations
  5932. \def\ps@empty{\let\@mkboth\@gobbletwo\def\@oddhead{}\def\@oddfoot{}%
  5933. \def\@evenhead{}\def\@evenfoot{}}
  5934. \def\ps@plain{\let\@mkboth\@gobbletwo
  5935.      \def\@oddhead{}\def\@oddfoot{\rm\hfil\thepage
  5936.      \hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}
  5937. \def\@leftmark#1#2{#1}
  5938. \def\@rightmark#1#2{#2}
  5939. %% test for @nobreak added 15 Apr 86 in \markboth and \markright
  5940. %% letting \label and \index to \relax added 22 Feb 86 so these
  5941. %%   commands can appear in sectioning command arguments
  5942. \def\markboth#1#2{\gdef\@themark{{#1}{#2}}{\let\protect\noexpand
  5943.      \let\label\relax \let\index\relax
  5944.      \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
  5945. \def\markright#1{{\let\protect\noexpand
  5946.      \let\label\relax \let\index\relax
  5947.      \expandafter\@markright\@themark
  5948.      {#1}\mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
  5949. \def\@markright#1#2#3{\gdef\@themark{{#1}{#3}}}
  5950. \def\leftmark{\expandafter\@leftmark\botmark}
  5951. \def\rightmark{\expandafter\@rightmark\firstmark}
  5952. % Initialization
  5953. \def\@themark{{}{}}
  5954. %  OTHER
  5955. %  -----
  5956. %   \raggedbottom : Typesets pages with no vertical stretch, so they have
  5957. %                   their natural height instead of all being exactly the
  5958. %                   same height.  (Uses a space of .0001fil to avoid
  5959. %                   interfering with the 1fil space of \newpage.)
  5960. %   \flushbottom  : Inverse of \raggedbottom - makes all pages the same
  5961. %                   height.
  5962. %   \sloppy : Resets TeX's parameters so it accepts worse line and page
  5963. %             breaks, and slightly more overfull boxes.
  5964. %   \fussy  : Resets TeX's parameters to their normal finnicky values.
  5965. \def\raggedbottom{\def\@textbottom{\vskip \z@ plus.0001fil}\let\@texttop\relax}
  5966. \def\flushbottom{\let\@textbottom\relax \let\@texttop\relax}
  5967. % Default definitions
  5968. %  \sloppy will never (well, hardly ever) produce overfull boxes, but may
  5969. %  produce underfull ones.  (14 June 85)
  5970. %  A sloppypar environment is equivalent to {\par \sloppy ... \par}.
  5971. \def\sloppy{\tolerance 10000 \hfuzz .5\p@ \vfuzz .5\p@}
  5972. \def\sloppypar{\par\sloppy}
  5973. \def\endsloppypar{\par}
  5974. \def\fussy{\tolerance 200 \hfuzz .1\p@ \vfuzz .1\p@}
  5975. % LaTeX default is no overfull box rule.  Changed by document
  5976. % style option
  5977. \overfullrule 0pt
  5978. \message{output,}
  5979. %     ****************************************
  5980. %     *               OUTPUT                 *
  5981. %     ****************************************
  5982. %  PAGE LAYOUT PARAMETERS
  5983. %   \topmargin      : Extra space added to top of page.
  5984. %   @twoside        : boolean.  T if two-sided printing
  5985. %   \oddsidemargin  : IF @twoside = T
  5986. %                         THEN extra space added to left of odd-numbered
  5987. %                              pages.
  5988. %                         ELSE extra space added to left of all pages.
  5989. %   \evensidemargin : IF @twoside = T
  5990. %                         THEN extra space added to left of even-numbered
  5991. %                              pages.
  5992. %   \headheight     : height of head
  5993. %   \headsep        : separation between head and text
  5994. %   \footskip       : distance separation between baseline of last
  5995. %                     line of text and baseline of foot.
  5996. %                     Note difference between \footSKIP and \headSEP.
  5997. %   \textheight     : height of text on page, excluding head and foot
  5998. %   \textwidth      : width of printing on page
  5999. %   \columnsep      : IF @twocolumn = T
  6000. %                       THEN width of space between columns
  6001. %   \columnseprule  : IF @twocolumn = T
  6002. %                       THEN width of rule between columns (0 if none).
  6003. %   \columnwidth    : IF @twocolumn = T
  6004. %                       THEN (\textwidth - \columnsep)/2
  6005. %                       ELSE \textwidth
  6006. %                     It is set by the \@maketwocolumn and \@makeonecolumn
  6007. %                     commands.
  6008. %   \@textbottom    : Command executed at bottom of vbox holding text of page
  6009. %                     (including figures).  The \raggedbottom command
  6010. %                     almost \let's this to \vfil (actually sets it to
  6011. %                     \vskip \z@ plus.0001fil). %expanded 18 Jun 86
  6012. %   \@texttop       : Command executed at top of vbox holding text of page
  6013. %                     (including figures).  Used by letter style; can also
  6014. %                     be used to produce centered pages.  Is \let to \relax
  6015. %                     by \raggedbottom and \flushbottom.
  6016. %   Page layout must also initialize \@colht and \@colroom to \textheight.
  6017. %  PAGE STYLE PARAMETERS:
  6018. %   \floatsep       : Space left between floats.
  6019. %   \textfloatsep   : Space between last top float or first bottom float
  6020. %                     and the text.
  6021. %   \topfigrule     : Command to place rule (or whatever) between floats
  6022. %                     at top of page and text.  Executed in inner vertical
  6023. %                     mode right before the \textfloatsep skip separating
  6024. %                     the floats from the text.  Must occupy zero vertical
  6025. %                     space.  (See \footnoterule.)
  6026. %   \botfigrule     : Same as \topfigrule, but put after the \textfloatsep
  6027. %                     skip separating text from the floats at bottom of page.
  6028. %   \intextsep      : Space left on top and bottom of an in-text float.
  6029. %   \@maxsep        : The maximum of \floatsep, \textfloatsep and \intextsep
  6030. %   \dblfloatsep    : Space between double-column floats.
  6031. %   \dbltextfloatsep : Space between top or bottom double-column floats
  6032. %                      and text.
  6033. %   \dblfigrule     : Similar to \topfigrule, but for double-column floats.
  6034. %   \@dblmaxsep     : The maximum of \dblfloatsep and \dbltexfloatsep
  6035. %   \@fptop         : Glue to go at top of float column -- must be 0pt +
  6036. %                     stretch
  6037. %   \@fpsep         : Glue to go between floats in a float column.
  6038. %   \@fpbot         : Glue to go at bottom of float column -- must be 0pt +
  6039. %                     stretch
  6040. %   \@dblfptop, \@dblfpsep, \@dblfpbot
  6041. %                   : Analogous for double-column float page in two-column
  6042. %                     format.
  6043. %  FOOTNOTES: As in PLAIN, footnotes use \insert\footins.
  6044. %  PAGE LAYOUT SWITCHES AND MACROS
  6045. %   @twocolumn      : Boolean.  T if two columns per page.
  6046. %  PAGE STYLE MACROS AND SWITCHES
  6047. %   \@oddhead        : IF @twoside = T
  6048. %                           THEN macro to generate head of odd-numbered pages.
  6049. %                           ELSE macro to generate head of all pages.
  6050. %   \@evenhead       : IF @twoside = T
  6051. %                           THEN macro to generate head of even-numbered pages.
  6052. %   \@oddfoot        : IF @twoside = T
  6053. %                           THEN macro to generate foot of odd-numbered pages.
  6054. %                           ELSE macro to generate foot of all pages.
  6055. %   \@evenfoot       : IF @twoside = T
  6056. %                           THEN macro to generate foot of even-numbered pages.
  6057. %   @specialpage    : boolean.  T if current page is to have a special format.
  6058. %   \@specialstyle  : If its value is  foo then
  6059. %                      IF @specialpage = T
  6060. %                        THEN the command \ps@foo is executed to temporarily
  6061. %                             reset the page style parameters before composing
  6062. %                             the current page.  This command should execute
  6063. %                             only \def's and \edef's, making only local
  6064. %                             definitions.
  6065. %  FLOAT PLACEMENT PARAMETERS
  6066. % The following parameters are set by the macro \@floatplacement.
  6067. % When \@floatplacement is called,
  6068. % \@colht is the height of the page or column being built.  I.e.:
  6069. %         * For single-column page it equals \textheight.
  6070. %         * For double-column page it equals \textheight - height
  6071. %           of double-column floats on page.
  6072. % Note that some are set globally and some locally:
  6073. %    \@topnum  :=G Maximum number of floats allowed on the top of a column.
  6074. %    \@toproom :=G Maximum amount of top of column devoted to floats--
  6075. %                  excluding \textfloatsep separation below the floats and
  6076. %                  \floatsep separation between them.  For two-column
  6077. %                  output, should be computed as a function of \@colht.
  6078. %    \@botnum, \@botroom
  6079. %                : Analogous to above.
  6080. %    \@colnum  :=G Maximum number of floats allowed in a column, including
  6081. %                  in-text floats.
  6082. %    \@textmin :=L Minimum amount of text (excluding footnotes) that must
  6083. %                  appear on a text page.  %% 27 Sep 85 : made local to
  6084. %                                          %% \@addtocurcol and \@addtonextcol
  6085. %    \@fpmin   :=L Minimum height of floats in a float column.
  6086. % The macro \@dblfloatplacement sets the following parameters.
  6087. %    \@dbltopnum  :=G Maximum number of double-column floats allowed at the
  6088. %                     top of a two-column page.
  6089. %    \@dbltoproom :=G Maximum height of double-column floats allowed at
  6090. %                     top of two-column page.
  6091. %    \@fpmin      :=L Minimum height of floats in a float column.
  6092. % It should also perform the following local assignments where necessary
  6093. % -- i.e., where the new value differs from the old one:
  6094. %      \@fptop       :=L \@dblfptop
  6095. %      \@fpsep       :=L \@dblfpsep
  6096. %      \@fpbot       :=L \@dblfpbot
  6097. %  OUTPUT ROUTINE VARIABLES
  6098. %  \@colht : The total height of the current column.  In single column
  6099. %            style, it equals \textheight.  In two-column style, it is
  6100. %            \textheight minus the height of the double-column floats
  6101. %            on the current page.  MUST BE INITIALIZED TO \textheight.
  6102. %  \@colroom : The height available in the current column for text and
  6103. %              footnotes.  It equals \@colht minus the height of all
  6104. %              floats committed to the top and bottom of the current
  6105. %              column.
  6106. %  \footins : Footnote insertion number.
  6107. %  \@maxdepth : Saved value of TeX's \maxdepth.  Must be set
  6108. %               when any routine sets \maxdepth.
  6109. %            CALLING THE OUTPUT ROUTINE
  6110. %            --------------------------
  6111. % The output routine is called either by TeX's normal page-breaking
  6112. % mechanism, or by a macro putting a penalty < or = -10000 in the output
  6113. % list.  In the latter case, the penalty indicates why the output
  6114. % routine was called, using the following code.
  6115. %   penalty   reason
  6116. %   -------   ------
  6117. %   -10000    \pagebreak
  6118. %             \newpage
  6119. %   -10001    \clearpage (called with \penalty -10000 \vbox{} \penalty -10001
  6120. %   -10002    float insertion, called from horizontal mode
  6121. %   -10003    float insertion, called from vertical mode.
  6122. %   -10004    float insertion.
  6123. % Note: A float or marginpar puts the following sequence in the output
  6124. %       list:  (i) a penalty of -10004,
  6125. %             (ii) a null \vbox
  6126. %            (iii) a penalty of -10002 or -10003.
  6127. %       This solves two special problems:
  6128. %         1. If the float comes right after a \newpage or \clearpage,
  6129. %            then the first penalty is ignored, but the second one
  6130. %            invokes the output routine.
  6131. %         2. If there is a split footnote on the page, the second 'page'
  6132. %            puts out the rest of the footnote.
  6133. %             THE OUTPUT ROUTINE
  6134. %             ------------------
  6135. % FUNCTIONS USED IN THE OUTPUT ROUTINE:
  6136. % \@outputpage : Produces an output page with the contents of box
  6137. %              \@outputbox as the text part.  Also sets
  6138. %              \@colht :=G \textheight.   The page style is determined
  6139. %              as follows.
  6140. %                IF  @thispagestyle = true
  6141. %                  THEN  use \thispagestyle style
  6142. %                  ELSE  use ordinary page style.
  6143. % \@tryfcolumn\FLIST : Tries to form a float column composed of floats from
  6144. %              \FLIST with with the following parameters:
  6145. %                \@colht : height of box
  6146. %                \@fpmin : minimum height of floats in the box
  6147. %                \@fpsep : interfloat space
  6148. %                \@fptop : glue at top of box
  6149. %                \@fpbot : glue at bottom of box.
  6150. %              If it succeeds, then it does the following:
  6151. %                * \@outputbox :=L the composed float box.
  6152. %                * @fcolmade   :=L true
  6153. %                * \FLIST      :=G \FLIST - floats put in box
  6154. %                * \@freelist  :=G \@freelist + floats put in box
  6155. %              If it fails, then:
  6156. %                * @fcolmade :=L false
  6157. %           NOTE: BIT MUST BE A SINGLE TOKEN!
  6158. % \@makefcolumn \FLIST : Same as \@tryfcolumn except that it
  6159. %             fails to make a float column only if \FLIST is empty.
  6160. %             Otherwise, it makes a float column containing at least
  6161. %             the first box in \FLIST, disregarding \@fpmin.
  6162. % \@startcolumn :
  6163. %       Calls \@tryfcolumn\@deferlist{8}.  If \@tryfcolumn returns with
  6164. %       @fcolmade = false, then:
  6165. %                * Globally sets \@toplist and \@botlist to floats
  6166. %                  from \@deferlist to go at top and bottom of column,
  6167. %                  deleting them from \@deferlist.  It does
  6168. %                  this using \@colht as the total height, the page
  6169. %                  style parameters \@floatsep and \@textfloatsep, and
  6170. %                  the float placement parameters \@topnum, \@toproom,
  6171. %                  \@botnum, \@botroom, \@colnum and \textfraction.
  6172. %                * Globally sets \@colroom to \@colht minus the height
  6173. %                  of the added floats.
  6174. % \@startdblcolumn :
  6175. %      Calls \@tryfcolumn\@dbldeferlist{8}.  If \@tryfcolumn returns
  6176. %      with @fcolmade = false, then:
  6177. %               * Globally sets \@dbltoplist to floats from \@dbldeferlist
  6178. %                 to go at top and bottom of column, deleting them from
  6179. %                 \@dbldeferlist.  It does this using \textheight as the
  6180. %                 total height, and the parameters \@dblfloatsep, etc.
  6181. %               * Globally sets \@colht to \textheight minus the height
  6182. %                 of the added floats.
  6183. % \@combinefloats : Combines the text from box
  6184. %              \@outputbox with the floats from \@toplist and \@botlist,
  6185. %              putting the new box in \@outputbox.  It uses \floatsep and
  6186. %              \textfloatsep for the appropriate separations.  It puts the
  6187. %              elements of \TOPLIST and \BOTLIST onto \@freelist, and makes
  6188. %              those lists null.
  6189. % \@makecol : Makes the contents of \box255 plus the accumulated
  6190. %              footnotes, plus the floats in \@toplist and \@botlist,
  6191. %              into a single column of height \@colht, which it puts
  6192. %              into box \@outputbox.  It puts boxes in \@midlist back
  6193. %              onto \@freelist and restores \maxdepth.
  6194. % \@opcol : Outputs a column whose text is in box \@outputbox
  6195. %              If @twocolumn = false, then it calls \@outputpage,
  6196. %              sets \@colht :=G \textheight, and calls \@floatplacement.
  6197. %              If @twocolumn = true, then:
  6198. %                  If @firstcolumn = true, then it puts box \@outputbox
  6199. %                  into \@leftcolumn and sets @firstcolumn :=G false.
  6200. %                  If @firstcolumn = false, then it puts out the current
  6201. %                  two-column page, any possible two-column float pages,
  6202. %                  and determines \@dbltoplist for the next page.
  6203. % \@opcol ==
  6204. %  BEGIN
  6205. %   \@mparbottom :=G 0pt
  6206. %   if @twocolumn = true
  6207. %     then %% \@outputdblcol ==
  6208. %          if @firstcolumn = true
  6209. %            then @firstcolumn :=G false
  6210. %                 \@leftcolumn :=G \@outputbox
  6211. %            else @firstcolumn :=G true
  6212. %                 \@outputbox  := \vbox{
  6213. %                                   \hbox to \textwidth{
  6214. %                                     \hbox to\columnwidth{\box\@leftcolumn
  6215. %                                                          \hss}
  6216. %                                     \hfil \vrule width \columnseprule \hfil
  6217. %                                     \hbox to\columnwidth{\box\@outputbox}
  6218. %                                                           \hss}             }
  6219. %                 \@combinedblfloats
  6220. %                 \@outputpage
  6221. %                 \begingroup
  6222. %                    \@dblfloatplacement
  6223. %                    \@startdblcolumn
  6224. %                    while @fcolmade = true
  6225. %                      do  \@outputpage
  6226. %                          \@startdblcolumn  od
  6227. %                 \endgroup
  6228. %          fi
  6229. %     else
  6230. %       \@outputpage
  6231. %       \@colht :=G \textheight
  6232. %   fi
  6233. %  END
  6234. %  \@makecol ==
  6235. %    BEGIN
  6236. %     ifvoid \insert\footins
  6237. %        then  \@outputbox := \box255
  6238. %        else  \@outputbox := \vbox {\boxmaxdepth :=L \maxdepth
  6239. %                                              %added 21 Jan 87
  6240. %                                    \unvbox255
  6241. %                                    \vskip \skip\footins
  6242. %                                    \footnoterule
  6243. %                                    \unvbox\footins
  6244. %                                   }
  6245. %    fi
  6246. %    \@freelist :=G \@freelist * \@midlist
  6247. %    \@midlist  :=G empty
  6248. %    \@combinefloats
  6249. %    \@outputbox := \vbox to \@colht{\boxmaxdepth := \maxdepth
  6250. %                                     \@texttop
  6251. %                                     temp :=L \dp\@outputbox
  6252. %                                     \unvbox\@outputbox
  6253. %                                     \vskip -temp
  6254. %                                     \@textbottom}
  6255. %    \maxdepth :=G \@maxdepth
  6256. %    END
  6257. % \@outputpage ==
  6258. %   BEGIN
  6259. %     \begingroup          %%% added 11 Jun 85 to keep special page
  6260. %                          %%%  declarations local to this output page
  6261. %     \catcode`\  := 10       %%make sure space is really a space
  6262. %     \- := \@dischyph     %%% Added 4 Aug 88 in event output routine
  6263. %     \' := \@acci         %%% called inside a tabbing environment.
  6264. %     \` := \@accii
  6265. %     \= := \@acciii
  6266. %     if @specialpage = T
  6267. %       then @specialpage :=G F
  6268. %            execute \ps@[eval(\@specialstyle)]  fi
  6269. %     if \@twoside = T
  6270. %       then if \count0 odd
  6271. %                    \@thehead       ==L \@oddhead
  6272. %                    \@thefoot       ==L \@oddfoot
  6273. %                    \@themargin     ==L \oddsidemargin
  6274. %               else \@thehead       ==L \@evenhead
  6275. %                    \@thefoot       ==L \@evenfoot
  6276. %                    \@themargin     ==L \evensidemargin  fi fi
  6277. %     \shipout\vbox
  6278. %       {\normalsize          % set fonts size for head and foot
  6279. %        \baselineskip :=L \lineskip :=L 0pt
  6280. %        \par :=L \@@par       %% added 15 Sep 87 for robustness
  6281. %        \vskip \topmargin
  6282. %        \moveright\@themargin\vbox
  6283. %              { \box\@tempboxa := \vbox to \headheight{\vfil
  6284. %                                      \hbox to \textwidth
  6285. %                                         {\index == \label == \@gobble
  6286. %                                              %% Added 22 Feb 87 as bug fix
  6287. %                                          \@thehead}}
  6288. %                \dp\@tempboxa := 0pt   % Don't skip space for descenders in
  6289. %                \box\@tempboxa         % running head.
  6290. %                \vskip \headsep
  6291. %                \box\@outputbox
  6292. %                \baselineskip\footskip
  6293. %                \hbox to \textwidth{\index == \label == \@gobble
  6294. %                                        %%% added 22 Feb 87 as bug fix
  6295. %                                    \@thefoot}
  6296. %               }
  6297. %       }
  6298. %     \@colht :=G \textheight
  6299. %     \endgroup                %% added 11 Jun 85
  6300. %     \stepcounter{page}
  6301. %     \firstmark ==L \botmark   %% So marks work properly on float
  6302. %                               %% pages. (14 Jun 85)
  6303. %   END
  6304. % \@startcolumn ==
  6305. %  BEGIN
  6306. %    \@colroom :=G \@colht
  6307. %    if \@deferlist is empty
  6308. %      then @fcolmade := false
  6309. %      else \@tryfcolumn\@deferlist       %% else clause == \@xstartcol
  6310. %           if @fcolmade = false
  6311. %             then \begingroup
  6312. %                    \@tempb     :=L \@deferlist
  6313. %                    \@deferlist :=G empty
  6314. %                    \@elt \BOX  ==  BEGIN \@currbox == \BOX      % use \gdef
  6315. %                                          \@addtonextcol
  6316. %                                    END  == \@scolelt
  6317. %                    \@tempb
  6318. %                  \endgroup
  6319. %    fi    fi
  6320. %  END
  6321. % \@startdblcolumn ==
  6322. %  BEGIN
  6323. %    \@colht :=G \textheight
  6324. %      \@tryfcolumn\@dbldeferlist      %% else clause == \@xstartcol
  6325. %      if @fcolmade = false
  6326. %        then \begingroup
  6327. %               \@tempb        :=L \@dbldeferlist
  6328. %               \@dbldeferlist :=G empty
  6329. %               \@elt \BOX     ==  BEGIN \@currbox == \BOX      % use \gdef
  6330. %                                        \@addtodblcol
  6331. %                                  END  == \@sdblcolelt
  6332. %               \@tempb
  6333. %             \endgroup
  6334. %    fi    fi
  6335. %  END
  6336. % \output ==
  6337. %  BEGIN
  6338. %   case of \outputpenalty
  6339. %      > -10001  -> \@makecol
  6340. %                   \@opcol
  6341. %                   \@floatplacement
  6342. %                   \@startcolumn
  6343. %                   while  @fcolmade = true
  6344. %                      do \@opcol
  6345. %                         \@startcolumn
  6346. %                      od
  6347. %  %%% \@specialoutput ==
  6348. %      -10001   ->  %% \@doclearpage ==
  6349. %                      if there are no footnote insertions
  6350. %                        then unbox the \writes at the head of \box255
  6351. %                               and throw away the rest
  6352. %                             \@deferlist :=G \@toplist * \@botlist
  6353. %                                                * \@deferlist
  6354. %                             \@toplist :=G \@botlist :=G empty
  6355. %                             \@colroom :=G \@colht
  6356. %                             if \@currlist not empty
  6357. %                               then  LaTeX error: float(s) lost
  6358. %                                     \@currlist :=G empty
  6359. %                             fi
  6360. %                             \@makefcolumn\@deferlist
  6361. %                             while  @fcolmade = true
  6362. %                                  do \@opcol
  6363. %                                     \@makefcolumn\@deferlist
  6364. %                                  od
  6365. %                             if @twocolumn
  6366. %                               then
  6367. %                                 if @firstcolumn = true
  6368. %                                   then \@dbldeferlist :=G \@dbltoplist *
  6369. %                                                           \@dbldeferlist
  6370. %                                        \@dbltoplist   :=G empty
  6371. %                                        \@colht :=G \textheight
  6372. %                                        \begingroup
  6373. %                                           \@dblfloatplacement
  6374. %                                           \@makefcolumn\@dbldeferlist
  6375. %                                           while  @fcolmade = true
  6376. %                                             do \@outputpage
  6377. %                                                \@makefcolumn\@dbldeferlist
  6378. %                                             od
  6379. %                                        \endgroup
  6380. %                                   else  \vbox{} \clearpage
  6381. %                             fi fi
  6382. %                        else \box255 := \vbox{\box255\vfil}
  6383. %                             \@makecol
  6384. %                             \@opcol
  6385. %                             \clearpage
  6386. %                      fi
  6387. %    < -10001     ->
  6388. %              if \outputpenalty < -10003
  6389. %                then if \outputpenalty <-20000  %% true only at end
  6390. %                        then \deadcycles := 0
  6391. %                     fi
  6392. %                     box \@holdpg :=G box255
  6393. %                else throw away box 255
  6394. %                     \@pagedp :=L natural depth of box \@holdpg
  6395. %                     \@pageht :=L natural ht of box \@holdpg
  6396. %                     \unvbox box \@holdpg  %% put text back
  6397. %                     if \@currlist nonempty
  6398. %                        then \@currbox  :=L head of \@currlist
  6399. %                             \@currlist :=G tail of \@currlist
  6400. %                             if \count\@currbox > 0
  6401. %                           %% Changed 28 Feb 88 so \@pageht and \@pagedp
  6402. %                           %% aren't changed for a marginal note
  6403. %                               then  %% this is a float
  6404. %                                 if there are footnote insertions
  6405. %                                   then advance \@pageht and \@pagedp and
  6406. %                                   reinsert footnotes
  6407. %                                 fi
  6408. %                                 \@addtocurcol
  6409. %                               else  %% this is a marginal note
  6410. %                                 if there are footnote insertions
  6411. %                                   reinsert footnotes
  6412. %                                 fi
  6413. %                                 \@addmarginpar
  6414. %                             fi
  6415. %                        else  THIS SHOULDN'T HAPPEN
  6416. %                     fi
  6417. %                     if \outputpenalty < 0           %% TO PERMIT PAGE BREAK
  6418. %                       then \penalty\interlinepenalty fi %% IF \@addtocurcol
  6419. %                                               %%  DIDN'T INSERT A PENALTY
  6420. %              fi
  6421. %   end case
  6422. %  \vsize :=G if \outputpenalty > -10004 then \@colroom  %%normal case
  6423. %                                        else \maxdimen  %%processing float
  6424. %             fi
  6425. %  END
  6426. % \@combinefloats ==
  6427. %  BEGIN
  6428. %    if \@toplist nonempty
  6429. %      then %%\@cfla ==
  6430. %           \@elt\BOX == BEGIN  \@tempbox := \vbox{\unvbox\@tempbox
  6431. %                                                  \box\BOX
  6432. %                                                  \vskip \floatsep}
  6433. %                         END  ==  \@comflelt
  6434. %            \@tempbox := null
  6435. %            \@toplist
  6436. %            \@outputbox := \vbox{\boxmaxdepth :=L \maxdepth
  6437. %                                              %added 21 Jan 87
  6438. %                                 \unvbox\@tempbox
  6439. %                                 \vskip - \floatsep
  6440. %                                 \topfigrule
  6441. %                                 \vskip \textfloatsep
  6442. %                                 \unvbox\@outputbox                }
  6443. %            \@elt == \relax
  6444. %            \@freelist :=G \@freelist * \@toplist
  6445. %            \@toplist  :=G null
  6446. %    fi
  6447. %    if \@botlist nonempty
  6448. %      then  %%\@cflb ==
  6449. %            \@elt == \@comflelt
  6450. %            \@tempbox   := null
  6451. %            \@botlist
  6452. %            \@outputbox := \vbox{ \unvbox\@outputbox
  6453. %                                  \vskip \textfloatsep
  6454. %                                  \botfigrule
  6455. %                                  \unvbox\@tempbox
  6456. %                                  \vskip  - \floatsep   }
  6457. %            \@elt == \relax
  6458. %            \@freelist :=G \@freelist * \@botlist
  6459. %            \@botlist  :=G null
  6460. %    fi
  6461. %  END
  6462. % \@combinedblfloats ==
  6463. %  BEGIN
  6464. %    if \@dbltoplist nonempty
  6465. %      then \@elt == \@comdblflelt
  6466. %            \@tempbox := null
  6467. %            \@dbltoplist
  6468. %            \@outputbox := \vbox to \textheight
  6469. %                              {\boxmaxdepth :=L \maxdepth
  6470. %                               \unvbox\@tempbox
  6471. %                               \vskip - \dblfloatsep
  6472. %                               \dblfigrule
  6473. %                               \vskip \dbltextfloatsep
  6474. %                               \box\@outputbox                         }
  6475. %            \@elt == \relax
  6476. %            \@freelist :=G \@freelist * \@dbltoplist
  6477. %            \@dbltoplist  :=G null
  6478. %    fi
  6479. %  END
  6480. %            USER COMMANDS THAT CALL OR AFFECT THE OUTPUT ROUTINE
  6481. %            ----------------------------------------------------
  6482. % \newpage == BEGIN \par\vfil\penalty -10000 END
  6483. % \clearpage == BEGIN \newpage
  6484. %                     \write -1{}    % Part of hack to make sure no
  6485. %                     \vbox{}        % \write's get lost.
  6486. %                     \penalty -10001
  6487. %               END
  6488. % \cleardoublepage == BEGIN \clearpage
  6489. %                           if @twoside = true and c@page is even
  6490. %                             then \hbox{} \newpage fi
  6491. %                     END
  6492. % \twocolumn ==
  6493. %  BEGIN
  6494. %    \clearpage
  6495. %    \columnwidth :=G .5(\textwidth - \columnsep)
  6496. %    \hsize       :=G \columnwidth
  6497. %    @twocolumn   :=G true
  6498. %    @firstcolumn :=G true
  6499. %    \@dblfloatplacement
  6500. %  END
  6501. % \onecolumn ==
  6502. %  BEGIN
  6503. %    \clearpage
  6504. %    \columnwidth :=G \textwidth
  6505. %    \hsize       :=G \columnwidth
  6506. %    @twocolumn   :=G false
  6507. %    \@floatplacement
  6508. %  END
  6509. % \topnewpage{BOX} : starts a new page and puts BOX in a parbox of width
  6510. %     \textwidth across the top.  Useful for full-width titles for
  6511. %     double-column pages.
  6512. %     SURPRISE: The stretch from \@dbltextfloatsep will be inserted
  6513. %     between the BOX and the top of the two columns.
  6514. % \topnewpage{BOX} ==
  6515. %  BEGIN
  6516. %   \clearpage
  6517. %   Take \@currbox from \@freelist
  6518. %   \box\@currbox :=G \parbox{BOX \par
  6519. %                             \vskip - \@dbltextfloatsep}
  6520. %   \count\@currbox :=G 2
  6521. %   \@dbltopnum     :=G 1
  6522. %   \@dbltoproom    :=G maxdimension
  6523. %   \@addtodblcol
  6524. %   \vsize          :=G \@colht
  6525. %   \@colroom       :=G \@colht
  6526. %  END
  6527. %            FLOAT-HANDLING MECHANISMS
  6528. %            -------------------------
  6529. % The float environment obtains an insertion number B from the
  6530. % \@freelist (see below for a description of list manipulation), puts
  6531. % the float into box B and sets \count B to a FLOAT SPECIFIER.  For
  6532. % a normal (not double-column) float, it then causes a page break
  6533. % in one of the following two ways:
  6534. %   - In outer hmode: \vadjust{\penalty -10002}
  6535. %   - In vmode :      \penalty -10003.
  6536. % For a double-column float, it puts B onto the \@dbldeferlist.
  6537. % The float specifier has two components:
  6538. %    * A PLACEMENT SPECIFICATION, describing where the float may
  6539. %      be placed.
  6540. %    * A TYPE, which is a power of two--e.g., figures might be
  6541. %      type 1 floats, tables type 2 floats, programs type 4 floats, etc.
  6542. % The float specifier is encoded as follows, where bit 0 is the least
  6543. % significant bit.
  6544. %  Bit    Meaning
  6545. %  ---    -------
  6546. %   0     1 iff the float may go where it appears in the text.
  6547. %   1     1 iff the float may go on the top of a page.
  6548. %   2     1 iff the float may go on the bottom of a page.
  6549. %   3     1 iff the float may go on a float page.
  6550. %   4     always 1
  6551. %   5     1 iff a type 1 float
  6552. %   6     1 iff a type 2 float
  6553. %   etc.
  6554. %  A negative float specifier is used to indicate a marginal note.
  6555. %     MACROS AND DATA STRUCTURES FOR PROCESSING FLOATS
  6556. %     ------------------------------------------------
  6557. %  A FLOAT LIST consisting of the floats in boxes \boxa ... \boxN has the form:
  6558. %         \@elt \boxa ... \@elt \boxN
  6559. %  where  \boxI is defined by
  6560. %         \newinsert\boxI
  6561. %  Normally, \@elt is \let to \relax.  A test can be performed on the entire
  6562. %  float list by locally \def'ing \@elt appropriately and executing
  6563. %  the list.  This is a lot more efficient than looping through the list.
  6564. %  The following macros are used for manipulating float lists.
  6565. %  \@next \CS \LIST {NONEMPTY}{EMPTY} ==  %% NOTE: ASSUME \@elt = \relax
  6566. %    BEGIN  assume that \LIST == \@elt \B1 ... \@elt \Bn
  6567. %           if n = 0
  6568. %             then  EMPTY
  6569. %             else  \CS    :=L \B1
  6570. %                   \LIST  :=G \@elt \B2 ... \@elt \Bn
  6571. %                   NONEMPTY
  6572. %           fi
  6573. %    END
  6574. %  \@bitor\NUM\LIST : Globally sets switch @test to the disjunction for all I
  6575. %        of bit  log2 \NUM of the float specifiers of all the floats in
  6576. %        \LIST.  I.e., @test is set to true iff there is at least one
  6577. %        float in \LIST having bit  log2 \NUM  of its float specifier
  6578. %        equal to 1.
  6579. %  Note: log2 [(\count I)/32] is the bit number corresponding to the
  6580. %  type of float I.  To see if there is any float in \LIST having
  6581. %  the same type as float I, you run \@bitor with \NUM = [(\count I)/32] * 32.
  6582. % \@bitor\NUM\LIST ==
  6583. %   BEGIN
  6584. %      @test :=G false
  6585. %      { \@elt \CTR ==  if \count\CTR / \NUM is odd
  6586. %                        then  @test := true       fi
  6587. %        \LIST
  6588. %      }
  6589. %   END
  6590. % \@cons\LIST\NUM : Globally sets \LIST := \LIST * \@elt \NUM
  6591. % \@cons\LIST\NUM ==
  6592. %   BEGIN {  \@elt == \relax
  6593. %            \LIST :=G \LIST \@elt \NUM
  6594. %         }
  6595. %  BOX LISTS FOR FLOAT-PLACEMENT ALGORITHMS
  6596. %    \@freelist     : List of empty boxes for placing new floats.
  6597. %    \@toplist      : List of floats to go at top of current column.
  6598. %    \@midlist      : List of floats in middle of current column.
  6599. %    \@botlist      : List of floats to go at bottom of current column.
  6600. %    \@deferlist    : List of floats to go after current column.
  6601. %    \@dbltoplist   : List of double-col. floats to go at top of current page.
  6602. %    \@dbldeferlist : List of double-column floats to go on subsequent pages.
  6603. %  FLOAT-PLACEMENT ALGORITHMS
  6604. % \@tryfcolumn \FLIST ==
  6605. %  BEGIN
  6606. %   @fcolmade    :=G false
  6607. %   \@trylist    :=G \FLIST
  6608. %   \@failedlist :=G empty
  6609. %   \begingroup
  6610. %    \@elt == \@xtryfc
  6611. %    \@trylist
  6612. %   \endgroup
  6613. %   if @fcolmade = true
  6614. %     then  \@vtryfc \FLIST
  6615. %   fi
  6616. %  END
  6617. %  \@vtryfc ==
  6618. %    BEGIN
  6619. %      \@outputbox :=G \vbox{}
  6620. %      \@elt\BOX == BEGIN
  6621. %                     \@outputbox :=L \vbox{ \unvbox \@outputbox
  6622. %                                            \vskip \@fpsep
  6623. %                                            \box\BOX            }
  6624. %                   END  == \@wtryfc
  6625. %      \@flsucceed
  6626. %      \@outputbox :=G \vbox to \@colht{ \vskip \@fptop
  6627. %                                        \vskip -\@fpsep
  6628. %                                        \unvbox \@outputbox
  6629. %                                        \vskip \@fpbot      }
  6630. %      \@elt      ==  \relax
  6631. %      \@freelist :=G \@freelist * \@flsucceed
  6632. %      \FLIST     :=G \@failedlist * \@flfail
  6633. %   END
  6634. % \@xtryfc \BOX ==
  6635. %  BEGIN
  6636. %    remove first element from \@trylist
  6637. %    \@currtype := (\count\BOX / 32) * 32
  6638. %    \@bitor \@currtype \@failedlist    % @test := true if type on list
  6639. %    \@testfp \BOX                      % @test := true if no p-option
  6640. %    if ht of \BOX > \@colht
  6641. %      then @test :=G true
  6642. %    fi
  6643. %    if @test = true
  6644. %      then add \BOX to \@failedlist
  6645. %      else \@ytryfc \BOX
  6646. %    fi
  6647. %  END
  6648. % \@ytryfc ==
  6649. %  BEGIN
  6650. %   \begingroup
  6651. %     \@flsucceed :=G \@elt\BOX
  6652. %     \@flfail    :=G empty
  6653. %     \@tempdima  := \ht\BOX
  6654. %     \@elt == \@ztryfc
  6655. %     \@trylist
  6656. %     if \@tempdima > \@fpmin
  6657. %       then @fcolmade :=G true
  6658. %       else add \BOX to \@failedlist
  6659. %     fi
  6660. %   \endgroup
  6661. %   if @fcolmade = true  then  \@elt == \@gobble fi
  6662. %  END
  6663. % \@ztryfc \BOX ==
  6664. %  BEGIN
  6665. %   \@tempcnta := (\count\BOX / 32) * 32
  6666. %   \@bitor \@tempcnta {\@failedlist \@flfail}  % @test := true if on a list
  6667. %   \@testfp \BOX                               % @test := true if not p-option
  6668. %   \@tempdimb := \@tempdima + ht of \BOX + \@fpsep
  6669. %   if \@tempdimb > \@colht
  6670. %     then @test :=G true
  6671. %   fi
  6672. %   if @test = true
  6673. %     then add \BOX to \@flfail
  6674. %     else add \BOX to \@flsucceed
  6675. %          \@tempdima := \@tempdimb
  6676. %   fi
  6677. %  END
  6678. % \@testfp \BOX == BEGIN if bit 3 of \count\BOX = 0
  6679. %                          then @test :=G true      fi
  6680. %                  END
  6681. % \@makefcolumn \FLIST ==
  6682. %  BEGIN
  6683. %   \begingroup
  6684. %     \@fpmin =:L 0
  6685. %     \@testfp == \@gobble
  6686. %     \@tryfcolumn \FLIST
  6687. %   \endgroup
  6688. %  END
  6689. %  \@addtobot : Tries to put insert \@currbox on \@botlist.  Called only when:
  6690. %                  * \ht BOX + \@maxsep < \@colroom
  6691. %                  * type of \@currbox not on \@deferlist
  6692. %                  * \@colnum > 0
  6693. %                  * @insert = false
  6694. %               If it succeeds, then:
  6695. %                  * sets @insert true
  6696. %                  * decrements \@botroom by \ht BOX
  6697. %                  * decrements \@botnum and \@colnum by 1
  6698. %                  * decrements \@colroom by \ht BOX + either \floatsep
  6699. %                    or \textfloatsep, as appropriate.
  6700. %                  * sets \maxdepth to 0pt
  6701. %  \@addtotoporbot : Tries to put insert \@currbox on \@toplist or \@botlist.
  6702. %                    Called only under same conditions as \@addtobot.
  6703. %                    If it succeeds, then:
  6704. %                       * sets @insert true
  6705. %                       * decrements either \@toproom or \@botroom by \ht BOX
  6706. %                       * decrements \@colnum and either \@topnum or
  6707. %                         \@botnum by 1
  6708. %                       * decrements \@colroom by \ht BOX + either \floatsep
  6709. %                         or \textfloatsep, as appropriate.
  6710. % \@addtocurcol : Tries to add \@currbox to current column, setting @insert
  6711. %                 true if it succeeds, false otherwise.  It will add
  6712. %                 \@currbox to top only if bit 0 of \count \@currbox is 0, and
  6713. %                 to the bottom only if bit 0 = 0 or an earlier float of
  6714. %                 the same type is put on the bottom.
  6715. %                 If the float is put in the text, then
  6716. %                 \penalty\interlinepenalty is put
  6717. %                 right after the float, before the following \vskip, and
  6718. %                 \outputpenalty :=L 0.
  6719. % \@addtonextcol : Tries to add \@currbox to the next column, setting @insert
  6720. %                 true if it succeeds, false otherwise.
  6721. % \@addtodblcol : Tries to add \@currbox to the next double-column page,
  6722. %                 adding it to \@dbltoplist if it succeeds and \@dbldeferlist
  6723. %                 if it fails.
  6724. %  \@addtobot ==
  6725. %    BEGIN
  6726. %      if bit 2 of \count \@currbox = 1
  6727. %        then  if \@botnum > 0
  6728. %                 then if \@botroom > \ht \@currbox
  6729. %                        then \@botnum   :=G \botnum - 1
  6730. %                             \@colnum   :=G \@colnum - 1
  6731. %                             \@tempdima  :=L - \ht\@currbox -
  6732. %                                            if \@botlist empty
  6733. %                                                then \textfloatsep
  6734. %                                                else \floatsep
  6735. %                                            fi
  6736. %                             \@botroom  :=G \@botroom + \@tempdima
  6737. %                             \@colroom  :=G \@colroom + \@tempdima
  6738. %                              add \@currbox to \@botlist
  6739. %                              \maxdepth :=G 0pt
  6740. %                              @insert :=L true
  6741. %      fi      fi       fi
  6742. %    END
  6743. %  \@addtotoporbot ==
  6744. %    BEGIN
  6745. %      if bit 1 of \count \@currbox = 1
  6746. %        then if \@topnum > 0
  6747. %               then if \@toproom > \ht \@currbox
  6748. %                       then if \@currtype not on \@midlist or \@botlist
  6749. %                               then \@topnum    :=G \topnum - 1
  6750. %                                    \@colnum    :=G \@colnum - 1
  6751. %                                    \@tempdima  :=L - \ht\@currbox -
  6752. %                                                   if \@toplist empty
  6753. %                                                       then \textfloatsep
  6754. %                                                       else \floatsep
  6755. %                                                   fi
  6756. %                                    \@toproom   :=G \@toproom + \@tempdima
  6757. %                                    \@colroom   :=G \@colroom + \@tempdima
  6758. %                                    add \@currbox to \@toplist
  6759. %                                    @insert :=L true
  6760. %      fi     fi      fi      fi
  6761. %      if @insert = false then \@addtobot fi
  6762. %    END
  6763. % \@addtocurcol ==
  6764. %  BEGIN
  6765. %    @insert :=L false
  6766. %    \@textmin := \textfraction\@colht         %% added 27 Sep 85
  6767. %    if \@colroom > \ht \@currbox + max(\@pageht+\@pagedp, \@textmin)
  6768. %                           + \@maxsep
  6769. %       then if \@colnum > 0
  6770. %               then \@currtype := type of \@currbox
  6771. %                    if \@currtype not on \@deferlist
  6772. %                      then if \@currtype on \@botlist
  6773. %                             then \@addtobot
  6774. %                             else if bit0 of \count \@currbox = 1
  6775. %                                    then  decrement \@colnum
  6776. %                                          put \@currbox on \@midlist
  6777. %                                          add \@currbox + space +
  6778. %                                            \penalty \interlinepenalty to text
  6779. %                                          \outputpenalty :=L 0
  6780. %                                          @insert := true
  6781. %                                    else  \@addtotoporbot
  6782. %    fi      fi      fi     fi     fi
  6783. %    if @insert = false
  6784. %      then add \@currbox to \@deferlist
  6785. %    fi
  6786. %  END
  6787. % \@addtonextcol ==
  6788. %  BEGIN
  6789. %    @insert :=L false
  6790. %    \@textmin := \textfraction\@colht         %% added 27 Sep 85
  6791. %    if \@colroom > \ht \@currbox + \@textmin + \@maxsep
  6792. %       then if \@colnum > 0
  6793. %               \@currtype := type of \@currbox
  6794. %               then if \@currtype not on \@deferlist
  6795. %                      then \@addtotoporbot
  6796. %    fi      fi      fi
  6797. %    if @insert = false
  6798. %      then add \@currbox to \@deferlist
  6799. %    fi
  6800. %  END
  6801. %  \@addtodblcol ==
  6802. %    BEGIN
  6803. %      @insert :=L false
  6804. %      if bit 1 of \count \@currbox = 1
  6805. %        then  if \@dbltopnum > 0
  6806. %                 then if \@dbltoproom > \ht \@currbox
  6807. %                        then if type of \@currbox not on \@dbldeferlist
  6808. %                               then \@dbltopnum   :=G \@dbltopnum - 1
  6809. %                                    \@tempdima := -\ht\@currbox -
  6810. %                                                  if \@dbltoplist empty
  6811. %                                                     then \dbltextfloatsep
  6812. %                                                     else \dblfloatsep
  6813. %                                                  fi
  6814. %                                    \@dbltoproom  :=G \@dbltoproom+\@tempdima
  6815. %                                    \@colht       :=G \@colht+\@tempdima
  6816. %                                    add \@currbox to \@dbltoplist
  6817. %                                     @insert :=L true
  6818. %      fi      fi       fi    fi
  6819. %      if @insert = false then add \@currbox to \@dbldeferlist
  6820. %    END
  6821. %  \@addmarginpar ==
  6822. %   BEGIN
  6823. %     if \@currlist nonempty
  6824. %       then remove \@marbox from \@currlist  %% NOTE: \@currbox = left box
  6825. %            add \@marbox and \@currbox to \@freelist
  6826. %       else LaTeX error: ?  %% shouldn't happen
  6827. %     fi
  6828. %     \@tempcnta := 1     %% 1 = right, -1 = left
  6829. %     if @twocolumn = true
  6830. %       then if @firstcolumn = true
  6831. %              then \@tempcnta := -1
  6832. %            fi
  6833. %       else if @mparswitch = true
  6834. %              then if count0 odd
  6835. %                     else \@tempcnta := -1
  6836. %                   fi
  6837. %            fi
  6838. %            if @reversemargin = true
  6839. %               then \@tempcnta := -\@tempcnta
  6840. %            fi
  6841. %     fi
  6842. %     if \@tempcnta < 0 then \box\@marbox :=G \box\@currbox fi
  6843. %     \@tempdima   :=L maximum(\@mparbottom - \@pageht + ht of \@marbox, 0)
  6844. %     if \@tempdima > 0 then LaTeX warning: 'marginpar moved' fi
  6845. %     \@mparbottom :=G \@pageht + \@tempdima + depth of \@marbox
  6846. %                          + \marginparpush
  6847. %     \@tempdima   :=L \@tempdima - ht of \@marbox
  6848. %     height of \@marbox :=G depth of \@marbox :=G 0
  6849. %     \vskip -\@pagedp
  6850. %     \vskip \@tempdima
  6851. %     \nointerlineskip
  6852. %     \hbox{ if @tempcnta > 0 then \hskip \columnwidth
  6853. %                                 \hskip \marginparsep
  6854. %                            else \hskip -\marginparsep
  6855. %                                 \hskip -\marginparwidth
  6856. %            fi
  6857. %            \box\@marbox
  6858. %            \hss
  6859. %          }
  6860. %     \vskip -\@tempdima
  6861. %     \nointerlineskip
  6862. %     \hbox{\vrule height 0 width 0 depth \@pagedp}
  6863. %   END
  6864. \maxdeadcycles = 100 % floats and \marginpar's add a lot of dead cycles
  6865. \let\@elt\relax
  6866. \def\@next#1#2#3#4{\ifx#2\@empty #4\else
  6867.    \expandafter\@xnext #2\@@#1#2#3\fi}
  6868. \def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}}
  6869. \newif\if@test
  6870. \def\@bitor#1#2{\global\@testfalse {\let\@elt\@xbitor
  6871.    \@tempcnta #1\relax #2}}
  6872. \def\@xbitor #1{\@tempcntb \count#1\divide\@tempcntb\@tempcnta
  6873.    \ifodd\@tempcntb \global\@testtrue\fi}
  6874. % DEFINITION OF FLOAT BOXES:
  6875. \newinsert\bx@A
  6876. \newinsert\bx@B
  6877. \newinsert\bx@C
  6878. \newinsert\bx@D
  6879. \newinsert\bx@E
  6880. \newinsert\bx@F
  6881. \newinsert\bx@G
  6882. \newinsert\bx@H
  6883. \newinsert\bx@I
  6884. \newinsert\bx@J
  6885. \newinsert\bx@K
  6886. \newinsert\bx@L
  6887. \newinsert\bx@M
  6888. \newinsert\bx@N
  6889. \newinsert\bx@O
  6890. \newinsert\bx@P
  6891. \newinsert\bx@Q
  6892. \newinsert\bx@R
  6893. \gdef\@freelist{\@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E
  6894.                \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J
  6895.                 \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N
  6896.                 \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R}
  6897. \gdef\@toplist{}
  6898. \gdef\@botlist{}
  6899. \gdef\@midlist{}
  6900. \gdef\@currlist{}
  6901. \gdef\@deferlist{}
  6902. \gdef\@dbltoplist{}
  6903. \gdef\@dbldeferlist{}
  6904. % PAGE LAYOUT PARAMETERS
  6905. \newdimen\topmargin
  6906. \newdimen\oddsidemargin
  6907. \newdimen\evensidemargin
  6908. \let\@themargin=\oddsidemargin
  6909. \newdimen\headheight
  6910. \newdimen\headsep
  6911. \newdimen\footskip
  6912. \newdimen\footheight % even though it never gets used.
  6913. \newdimen\textheight
  6914. \newdimen\textwidth
  6915. \newdimen\columnwidth
  6916. \newdimen\columnsep
  6917. \newdimen\columnseprule
  6918. \newdimen\@maxdepth    \@maxdepth = \maxdepth
  6919. \newdimen\marginparwidth
  6920. \newdimen\marginparsep
  6921. \newdimen\marginparpush
  6922. % PAGE STYLE PARAMETERS
  6923. \newskip\floatsep
  6924. \newskip\textfloatsep
  6925. \newskip\intextsep
  6926. \newdimen\@maxsep
  6927. \newskip\dblfloatsep
  6928. \newskip\dbltextfloatsep
  6929. \newdimen\@dblmaxsep
  6930. \newskip\@fptop
  6931. \newskip\@fpsep
  6932. \newskip\@fpbot
  6933. \newskip\@dblfptop
  6934. \newskip\@dblfpsep
  6935. \newskip\@dblfpbot
  6936. \let\topfigrule=\relax
  6937. \let\botfigrule=\relax
  6938. \let\dblfigrule=\relax
  6939. % INTERNAL REGISTERS
  6940. \newcount\@topnum
  6941. \newdimen\@toproom
  6942. \newcount\@dbltopnum
  6943. \newdimen\@dbltoproom
  6944. \newcount\@botnum
  6945. \newdimen\@botroom
  6946. \newcount\@colnum
  6947. \newdimen\@textmin
  6948. \newdimen\@fpmin
  6949. \newdimen\@colht
  6950. \newdimen\@colroom
  6951. \newdimen\@pageht
  6952. \newdimen\@pagedp
  6953. \newdimen\@mparbottom \@mparbottom\z@
  6954. \newcount\@currtype
  6955. \newbox\@outputbox
  6956. \newbox\@leftcolumn
  6957. \newbox\@holdpg
  6958. \newif\if@insert
  6959. \newif\if@fcolmade
  6960. \newif\if@specialpage \@specialpagefalse
  6961. \newif\if@twoside     \@twosidefalse
  6962. \newif\if@firstcolumn \@firstcolumntrue
  6963. \newif\if@twocolumn   \@twocolumnfalse
  6964. \newif\if@reversemargin \@reversemarginfalse
  6965. \newif\if@mparswitch  \@mparswitchfalse
  6966. \def\@thehead{\@oddhead} % initialization
  6967. \def\@thefoot{\@oddfoot}
  6968. \def\newpage{\par\vfil\penalty -\@M}
  6969. \def\clearpage{\newpage \write\m@ne{}\vbox{}\penalty -\@Mi}
  6970. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  6971.     \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
  6972. \def\twocolumn{\clearpage \global\columnwidth\textwidth
  6973.    \global\advance\columnwidth -\columnsep \global\divide\columnwidth\tw@
  6974.    \global\hsize\columnwidth \global\linewidth\columnwidth
  6975.    \global\@twocolumntrue \global\@firstcolumntrue
  6976.    \@dblfloatplacement\@ifnextchar[{\@topnewpage}{}}
  6977. \def\onecolumn{\clearpage\global\columnwidth\textwidth
  6978.      \global\hsize\columnwidth \global\linewidth\columnwidth
  6979.      \global\@twocolumnfalse \@floatplacement}
  6980. \long\def\@topnewpage[#1]{\@next\@currbox\@freelist{}{}%
  6981.     \global\setbox\@currbox\vbox{\hsize\textwidth \@parboxrestore
  6982.      #1\par\vskip -\dbltextfloatsep}\global\count\@currbox\tw@
  6983.     \global\@dbltopnum\@ne \global\@dbltoproom\maxdimen\@addtodblcol
  6984.     \global\vsize\@colht \global\@colroom\@colht}
  6985. \output{\ifnum\outputpenalty <-\@M\@specialoutput\else
  6986.   \@makecol\@opcol\@floatplacement\@startcolumn
  6987.   \@whilesw\if@fcolmade \fi{\@opcol\@startcolumn}\fi
  6988.   \global\vsize\ifnum\outputpenalty >-\@Miv \@colroom
  6989.                   \else \maxdimen\fi}
  6990. % CHANGES TO \@specialoutput:
  6991. % * \penalty\z@ changed to \penalty\interlinepenalty so \samepage
  6992. %   works properly with figure and table environments.
  6993. %   (Changed 23 Oct 86)
  6994. % * Definition of \@specialoutput changed 26 Feb 88 so \@pageht and \@pagedp
  6995. %   aren't changed for a marginal note.  (Change suggested by
  6996. %   Chris Rowley.)
  6997. \def\@specialoutput{\ifnum\outputpenalty > -\@Mii
  6998.     \@doclearpage
  6999.   \else
  7000.     \ifnum \outputpenalty <-\@Miii
  7001.        \ifnum\outputpenalty<-\@MM \deadcycles\z@\fi
  7002.        \global\setbox\@holdpg\vbox{\unvbox\@cclv}%
  7003.     \else \setbox\@tempboxa\box\@cclv
  7004.         \@pagedp\dp\@holdpg \@pageht\ht\@holdpg
  7005.         \unvbox\@holdpg
  7006.         \@next\@currbox\@currlist{\ifnum\count\@currbox >\z@
  7007.            \ifvoid\footins\else\advance\@pageht\ht\footins
  7008.              \advance\@pageht\skip\footins \advance\@pagedp\dp\footins
  7009.              \insert\footins{\unvbox\footins}\fi
  7010.             \@addtocurcol\else
  7011.            \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
  7012.             \@addmarginpar\fi}\@latexbug
  7013.     \ifnum \outputpenalty <\z@ \penalty\interlinepenalty\fi
  7014.   \fi\fi}
  7015. \def\@doclearpage{\ifvoid\footins
  7016.         \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
  7017.         \setbox\@tempboxa\box\@cclv
  7018.         \xdef\@deferlist{\@toplist\@botlist
  7019.             \@deferlist}\gdef\@toplist{}\gdef\@botlist{}\global\@colroom\@colht
  7020.              \ifx\@currlist
  7021.               \@empty\else\@latexerr{Float(s)
  7022.                  lost}\@ehb\gdef\@currlist{}\fi
  7023.        \@makefcolumn\@deferlist
  7024.         \@whilesw\if@fcolmade \fi{\@opcol
  7025.                                   \@makefcolumn\@deferlist}\if@twocolumn
  7026.            \if@firstcolumn
  7027.              \xdef\@dbldeferlist{\@dbltoplist
  7028.                  \@dbldeferlist}\gdef\@dbltoplist{}\global\@colht\textheight
  7029.               \begingroup \@dblfloatplacement \@makefcolumn\@dbldeferlist
  7030.                \@whilesw\if@fcolmade \fi{\@outputpage
  7031.                                          \@makefcolumn\@dbldeferlist}\endgroup
  7032.            \else \vbox{}\clearpage
  7033.         \fi\fi
  7034.      \else\setbox\@cclv\vbox{\box\@cclv\vfil}\@makecol\@opcol
  7035.       \clearpage
  7036.      \fi}
  7037. \def\@opcol{\global\@mparbottom\z@\if@twocolumn\@outputdblcol\else
  7038.     \@outputpage \global\@colht\textheight \fi}
  7039. \def\@outputdblcol{\if@firstcolumn \global\@firstcolumnfalse
  7040.     \global\setbox\@leftcolumn\box\@outputbox
  7041.   \else \global\@firstcolumntrue
  7042.     \setbox\@outputbox\vbox{\hbox to\textwidth{\hbox to\columnwidth
  7043.       {\box\@leftcolumn \hss}\hfil \vrule width\columnseprule\hfil
  7044.        \hbox to\columnwidth{\box\@outputbox \hss}}}\@combinedblfloats
  7045.        \@outputpage \begingroup \@dblfloatplacement \@startdblcolumn
  7046.        \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}\endgroup
  7047.     \fi}
  7048. % Extra \@texttop somehow found its way into \@makecol.  Deleted
  7049. % 1 Dec 86.  (Found by Mike Harrison)
  7050. \def\@makecol{\ifvoid\footins \setbox\@outputbox\box\@cclv
  7051.    \else\setbox\@outputbox
  7052.      \vbox{\boxmaxdepth \maxdepth
  7053.      \unvbox\@cclv\vskip\skip\footins\footnoterule\unvbox\footins}\fi
  7054.      \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
  7055.      \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
  7056.         \@texttop\dimen128=\dp\@outputbox\unvbox\@outputbox
  7057.         \vskip-\dimen128\@textbottom}%
  7058.      \global\maxdepth\@maxdepth}
  7059. \let\@texttop=\relax
  7060. \let\@textbottom=\relax
  7061. \def\@outputpage{\begingroup\catcode`\ =10
  7062.      \let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii
  7063.     \if@specialpage
  7064.      \global\@specialpagefalse\@nameuse{ps@\@specialstyle}\fi
  7065.      \if@twoside
  7066.        \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
  7067.             \let\@themargin\oddsidemargin
  7068.           \else \let\@thehead\@evenhead
  7069.           \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
  7070.      \fi\fi
  7071.      \shipout
  7072.      \vbox{\normalsize \baselineskip\z@ \lineskip\z@
  7073.            \let\par\@@par %% 15 Sep 87
  7074.            \vskip \topmargin \moveright\@themargin
  7075.            \vbox{\setbox\@tempboxa
  7076.                    \vbox to\headheight{\vfil \hbox to\textwidth
  7077.                                        {\let\label\@gobble \let\index\@gobble
  7078.                                          \@thehead}} %% 22 Feb 87
  7079.                  \dp\@tempboxa\z@
  7080.                  \box\@tempboxa
  7081.                  \vskip \headsep
  7082.                  \box\@outputbox
  7083.                  \baselineskip\footskip
  7084.                  \hbox to\textwidth{\let\label\@gobble
  7085.                            \let\index\@gobble  %% 22 Feb 87
  7086.                            \@thefoot}}}\global\@colht\textheight
  7087.            \endgroup\stepcounter{page}\let\firstmark\botmark}
  7088. \def\@combinefloats{\boxmaxdepth\maxdepth \ifx\@toplist\@empty\else\@cfla\fi
  7089.     \ifx\@botlist\@empty\else\@cflb\fi}
  7090. \def\@cfla{\let\@elt\@comflelt \setbox\@tempboxa\vbox{}\@toplist
  7091.     \setbox\@outputbox\vbox{\unvbox\@tempboxa\vskip-\floatsep
  7092.     \topfigrule\vskip\textfloatsep \unvbox\@outputbox}\let\@elt\relax
  7093.     \xdef\@freelist{\@freelist\@toplist}\gdef\@toplist{}}
  7094. \def\@cflb{\let\@elt\@comflelt \setbox\@tempboxa\vbox{}\@botlist
  7095.     \setbox\@outputbox\vbox{\unvbox\@outputbox \vskip\textfloatsep
  7096.     \botfigrule\unvbox\@tempboxa \vskip-\floatsep}\let\@elt\relax
  7097.     \xdef\@freelist{\@freelist\@botlist}\gdef\@botlist{}}
  7098. \def\@comflelt#1{\setbox\@tempboxa
  7099.       \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}}
  7100. \def\@combinedblfloats{\ifx\@dbltoplist\@empty\else
  7101.     \let\@elt\@comdblflelt \setbox\@tempboxa\vbox{}\@dbltoplist
  7102.     \setbox\@outputbox\vbox to\textheight
  7103.       {\boxmaxdepth\maxdepth
  7104.        \unvbox\@tempboxa\vskip-\dblfloatsep
  7105.        \dblfigrule\vskip\dbltextfloatsep \box\@outputbox}\let\@elt\relax
  7106.     \xdef\@freelist{\@freelist\@dbltoplist}\gdef\@dbltoplist{}\fi}
  7107. \def\@comdblflelt#1{\setbox\@tempboxa
  7108.       \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}}
  7109. \def\@startcolumn{\global\@colroom\@colht
  7110.     \ifx\@deferlist\@empty\global\@fcolmadefalse\else\@xstartcol\fi}
  7111. \def\@xstartcol{\@tryfcolumn\@deferlist \if@fcolmade\else
  7112.    \begingroup\edef\@tempb{\@deferlist}\gdef\@deferlist{}\let\@elt\@scolelt
  7113.    \@tempb\endgroup\fi}
  7114. \def\@scolelt#1{\def\@currbox{#1}\@addtonextcol}
  7115. \def\@startdblcolumn{\global\@colht\textheight
  7116.    \@tryfcolumn\@dbldeferlist \if@fcolmade\else
  7117.      \begingroup
  7118.        \edef\@tempb{\@dbldeferlist}\gdef\@dbldeferlist{}\let\@elt\@sdblcolelt
  7119.        \@tempb\endgroup\fi}
  7120. \def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol}
  7121. \def\@tryfcolumn #1{\global\@fcolmadefalse \xdef\@trylist{#1}\xdef\@failedlist
  7122.    {}\begingroup \let\@elt\@xtryfc \@trylist \endgroup
  7123.     \if@fcolmade \@vtryfc #1\fi}
  7124. \def\@vtryfc #1{\global\setbox\@outputbox\vbox{}\let\@elt\@wtryfc
  7125.        \@flsucceed \global\setbox\@outputbox\vbox to\@colht{\vskip \@fptop
  7126.        \vskip -\@fpsep \unvbox \@outputbox \vskip \@fpbot}\let\@elt\relax
  7127.        \xdef #1{\@failedlist\@flfail}\xdef\@freelist{\@freelist\@flsucceed}}
  7128. \def\@wtryfc #1{\global\setbox\@outputbox\vbox{\unvbox\@outputbox
  7129.     \vskip\@fpsep\box #1}}
  7130. \def\@xtryfc #1{\@next\@tempa\@trylist{}{}\@currtype
  7131.   \count #1\divide\@currtype\@xxxii \multiply\@currtype\@xxxii
  7132.   \@bitor \@currtype \@failedlist \@testfp #1\ifdim
  7133.     \ht #1>\@colht \global\@testtrue\fi
  7134.     \if@test \@cons\@failedlist #1\else \@ytryfc #1\fi}
  7135. \def\@ytryfc #1{\begingroup \gdef\@flsucceed{\@elt #1}\gdef\@flfail
  7136.   {}\@tempdima\ht #1\let\@elt\@ztryfc \@trylist \ifdim \@tempdima >\@fpmin
  7137.      \global\@fcolmadetrue \else \@cons\@failedlist #1\fi
  7138.   \endgroup \if@fcolmade \let\@elt\@gobble \fi}
  7139. \def\@ztryfc #1{\@tempcnta\count #1\divide\@tempcnta\@xxxii
  7140.     \multiply\@tempcnta\@xxxii \@bitor \@tempcnta {\@failedlist
  7141.     \@flfail}\@testfp #1\@tempdimb\@tempdima \advance\@tempdimb\ht #1\advance
  7142.     \@tempdimb\@fpsep \ifdim \@tempdimb >\@colht \global\@testtrue\fi
  7143.     \if@test \@cons\@flfail #1\else \@cons\@flsucceed #1\@tempdima\@tempdimb
  7144.     \fi}
  7145. \def\@testfp #1{\@tempcnta\count #1\divide\@tempcnta 8\relax
  7146.    \ifodd\@tempcnta \else \global\@testtrue\fi}
  7147. \def\@makefcolumn #1{\begingroup  \@fpmin\z@ \let\@testfp\@gobble
  7148.    \@tryfcolumn #1\endgroup}
  7149. \def\@addtobot{\@tempcnta\count\@currbox\divide\@tempcnta4 \ifodd\@tempcnta
  7150.    \ifnum \@botnum >\z@ \ifdim \@botroom >\ht\@currbox
  7151.     \global\advance\@botnum\m@ne
  7152.     \global\advance\@colnum\m@ne
  7153.     \@tempdima -\ht\@currbox
  7154.     \advance\@tempdima -\ifx\@botlist\@empty \textfloatsep
  7155.        \else\floatsep\fi
  7156.     \global\advance\@botroom \@tempdima
  7157.     \global\advance\@colroom \@tempdima
  7158.     \@cons\@botlist\@currbox \global\maxdepth\z@
  7159.     \@inserttrue\fi\fi\fi}
  7160. \def\@addtotoporbot{\@tempcnta\count\@currbox \divide\@tempcnta\tw@
  7161.    \ifodd\@tempcnta \ifnum \@topnum >\z@ \ifdim\@toproom >\ht\@currbox
  7162.      \@bitor\@currtype{\@midlist\@botlist}\if@test\else
  7163.         \global\advance\@topnum\m@ne
  7164.         \global\advance\@colnum\m@ne
  7165.         \@tempdima-\ht\@currbox
  7166.         \advance\@tempdima
  7167.            -\ifx\@toplist\@empty \textfloatsep \else\floatsep\fi
  7168.         \global\advance\@toproom \@tempdima
  7169.         \global\advance\@colroom \@tempdima
  7170.         \@cons\@toplist\@currbox
  7171.         \@inserttrue
  7172. \fi\fi\fi\fi
  7173. \if@insert\else\@addtobot \fi}
  7174. \def\@addtonextcol{\@insertfalse \@textmin \textfraction\@colht
  7175.    \@tempdima\ht\@currbox
  7176.    \advance\@tempdima\@textmin\advance\@tempdima\@maxsep
  7177.    \ifdim\@colroom >\@tempdima
  7178.      \ifnum\@colnum >\z@
  7179.         \@currtype\count\@currbox \divide\@currtype\@xxxii
  7180.         \multiply\@currtype\@xxxii
  7181.         \@bitor\@currtype\@deferlist
  7182.         \if@test\else
  7183.           \@addtotoporbot
  7184.     \fi\fi\fi
  7185.     \if@insert\else \@cons\@deferlist\@currbox\fi}
  7186. \def\@addtodblcol{\@insertfalse
  7187.    \@tempcnta\count\@currbox \divide\@tempcnta\tw@
  7188.    \ifodd\@tempcnta
  7189.       \ifnum\@dbltopnum >\z@
  7190.          \ifdim\@dbltoproom >\ht\@currbox
  7191.            \@currtype\count\@currbox \divide\@currtype\@xxxii
  7192.                \multiply\@currtype\@xxxii
  7193.            \@bitor\@currtype\@dbldeferlist
  7194.            \if@test\else
  7195.               \global\advance\@dbltopnum\m@ne
  7196.               \@tempdima -\ht\@currbox
  7197.               \advance\@tempdima -\ifx\@dbltoplist\@empty
  7198.                  \dbltextfloatsep\else\dblfloatsep\fi
  7199.               \global\advance\@dbltoproom \@tempdima
  7200.               \global\advance\@colht \@tempdima
  7201.               \@cons\@dbltoplist\@currbox
  7202.               \@inserttrue
  7203.    \fi\fi\fi\fi
  7204.    \if@insert\else \@cons\@dbldeferlist\@currbox \fi}
  7205. % CHANGE TO \@addtocurcol:
  7206. % \penalty\z@ changed to \penalty\interlinepenalty so \samepage
  7207. % works properly with figure and table environments.
  7208. % (Changed 23 Oct 86)
  7209. \def\@addtocurcol{\@insertfalse \@textmin \textfraction\@colht
  7210.    \@tempdima\@pageht \advance\@tempdima\@pagedp
  7211.    \ifdim \@textmin > \@tempdima \@tempdima\@textmin \fi
  7212.        \advance\@tempdima\ht\@currbox \advance\@tempdima\@maxsep
  7213.    \ifdim\@colroom >\@tempdima
  7214.       \ifnum\@colnum >\z@
  7215.          \@currtype\count\@currbox \divide\@currtype\@xxxii
  7216.                 \multiply\@currtype\@xxxii
  7217.          \@bitor\@currtype\@deferlist
  7218.          \if@test\else
  7219.             \@bitor\@currtype\@botlist
  7220.             \if@test \@addtobot \else
  7221.                \ifodd\count\@currbox
  7222.                  \global\advance\@colnum\m@ne
  7223.                  \@cons\@midlist\@currbox
  7224.                  \vskip\intextsep \box\@currbox
  7225.                  \penalty\interlinepenalty \vskip\intextsep
  7226.                  \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
  7227.                  \outputpenalty\z@
  7228.                  \@inserttrue
  7229.                \else \@addtotoporbot
  7230.    \fi\fi\fi\fi\fi
  7231.    \if@insert\else\@cons\@deferlist\@currbox\fi}
  7232. \def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox
  7233.     \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne
  7234.     \if@twocolumn
  7235.         \if@firstcolumn \@tempcnta\m@ne \fi
  7236.     \else
  7237.       \if@mparswitch
  7238.          \ifodd\c@page \else\@tempcnta\m@ne \fi
  7239.       \fi
  7240.       \if@reversemargin \@tempcnta -\@tempcnta \fi
  7241.     \fi
  7242.     \ifnum\@tempcnta <\z@  \global\setbox\@marbox\box\@currbox \fi
  7243.     \@tempdima\@mparbottom \advance\@tempdima -\@pageht
  7244.        \advance\@tempdima\ht\@marbox \ifdim\@tempdima >\z@
  7245.        \@warning{Marginpar on page \thepage\space moved}\else\@tempdima\z@ \fi
  7246.     \global\@mparbottom\@pageht \global\advance\@mparbottom\@tempdima
  7247.        \global\advance\@mparbottom\dp\@marbox
  7248.        \global\advance\@mparbottom\marginparpush
  7249.     \advance\@tempdima -\ht\@marbox
  7250.     \global\ht\@marbox\z@ \global\dp\@marbox\z@
  7251.     \vskip -\@pagedp \vskip\@tempdima\nointerlineskip
  7252.     \hbox to\columnwidth
  7253.       {\ifnum \@tempcnta >\z@
  7254.           \hskip\columnwidth \hskip\marginparsep
  7255.         \else \hskip -\marginparsep \hskip -\marginparwidth \fi
  7256.        \box\@marbox \hss}%
  7257.     \vskip -\@tempdima
  7258.     \nointerlineskip
  7259.     \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}}
  7260. \message{debugging}
  7261. %     ****************************************
  7262. %     * DEBUGGING AND TEST INITIALIZATIONS  *
  7263. %     ****************************************
  7264. % DEBUGGING
  7265. \def\showoverfull{\tracingonline=1}
  7266. \tracingstats1   % SHOWS HOW MUCH STUFF TeX HAS USED
  7267. \def\showoutput{\tracingonline1\tracingoutput1
  7268.     \showboxbreadth99999\showboxdepth99999\errorstopmode}
  7269. \def\makeatletter{\catcode`\@=11\relax}
  7270. \def\makeatother{\catcode`\@=12\relax}
  7271. \newcount\@lowpenalty
  7272. \newcount\@medpenalty
  7273. \newcount\@highpenalty
  7274. % LIST
  7275. % ENUMERATION
  7276. % ITEMIZE
  7277. % ARRAY AND TABULAR
  7278. % THE PICTURE ENVIRONMENT
  7279. \unitlength = 1pt
  7280. \fboxsep = 3pt
  7281. \fboxrule = .4pt
  7282. %% FOOTNOTES
  7283. %\def\footnoterule{}  % INITIALIZED BY PLAIN
  7284. %\skip\footins{}      % INITIALIZED BY PLAIN
  7285. %\interfootnotelinepenalty % INITIALIZED BY PLAIN
  7286. \@maxdepth       = \maxdepth
  7287. % \vsize initialized because a \clearpage with \vsize < \topskip
  7288. %  causes trouble.
  7289. % \@colroom and \@colht also initialized because \vsize may be
  7290. %  set to them if a \clearpage is done before the \begin{document}
  7291. \vsize = 1000pt
  7292. \@colroom = \vsize
  7293. \@colht = \vsize
  7294.