setup-aux.tex 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  1. % -*- Mode: TeX -*-
  2. \overfullrule 0pt
  3. \let\sub_ %subscripts
  4. % fonts
  5. \def\Font#1{\def\next{\fixfont#1}\afterassignment\next\font#1}
  6. \def\fixfont#1{\fontdimen3#1=0pt\fontdimen4#1=0pt}
  7. \def\sc {scaled}
  8. \let\mh \magstephalf \def\mi {\magstep1}
  9. \def\mii {\magstep2} \def\miii {\magstep3}
  10. \def\beginImplNote
  11. {\begingroup\advance\rightskip 3pc\advance\leftskip 3pc
  12. {\bf Implementation Note: }\vrule width0pt depth 5pt\hfil\break}
  13. \def\endImplNote{\par\endgroup}
  14. \def\beginTermNote
  15. {\begingroup\advance\rightskip 2pc\advance\leftskip 2pc
  16. {\bf Terminology Note: }\hfil\break}
  17. \def\endTermNote{\par\endgroup}
  18. \input setup-cmfont
  19. %\input setup-amfont
  20. \newif \iftt
  21. \newif \ifbf
  22. \newif \ifsphy \sphyfalse
  23. \def\tenpoint
  24. {\let\bit\prbiten
  25. \let\bbf\prbeleven
  26. \def\bbfl{\prbtwelve}%
  27. \def\brfl{\prmtwelve}%
  28. %%
  29. \def\arg{\ssiten}%%
  30. \def\keyword{\tt}%%
  31. \def\function{\bbfnine}%%
  32. %\def\datatype{\bslten}%%
  33. %!!! No longer used. -kmp 9-May-91
  34. % \def\datatype{\it}%%
  35. \def\word{\it}%%
  36. % Experimentally removed. This is defined by \let above, and I see no reason to override it.
  37. % -kmp 6-Sep-91
  38. % \def\bit{\it}%%
  39. \def\constant{\ssqeight}%%
  40. \def\cltl{\bscten}%%
  41. \def\andarg{\bslten}%%
  42. \def\argument{\ssiten}%%
  43. % \def\cal{\calten}%%
  44. %\def\rm{\fam0\prmten\textfont7\miten \textfont8\syten \ttfalse\bffalse}%
  45. \def\bf{\fam4\prbten\textfont7\bmiten\textfont8\bsyten\ttfalse\bftrue}%
  46. \def\it{\fam5\priten\textfont7\miten \textfont8\syten \ttfalse\bffalse}%
  47. \def\tt{\catothers\fam6\lgnine\textfont7\miten\textfont8\syten\tttrue\bffalse}%
  48. \textfont0=\prmten \scriptfont0=\prmseven \scriptscriptfont0=\prmfive
  49. \textfont1=\miten \scriptfont1=\miseven \scriptscriptfont1=\mifive
  50. \textfont2=\syten \scriptfont2=\syseven \scriptscriptfont2=\syfive
  51. \textfont4=\prbten \scriptfont4=\prbseven
  52. \textfont5=\priten \scriptfont5=\priseven
  53. \textfont6=\lgnine
  54. \baselineskip 11pt\rm
  55. }
  56. \def\elevenpoint
  57. {\let\bit\prbieleven
  58. \let\bbf\prbtwelve
  59. %\def\rm{%
  60. %\fam0\prmeleven\textfont7\mieleven \textfont8\syeleven \ttfalse\bffalse}%
  61. \def\bf{%
  62. \fam4\prbeleven\textfont7\bmieleven\textfont8\bsyeleven\ttfalse\bftrue}%
  63. \def\it{%
  64. \fam5\prieleven\textfont7\mieleven \textfont8\syeleven \ttfalse\bffalse}%
  65. \def\tt{\catothers
  66. \fam6\lgnine \textfont7\mieleven \textfont8\syeleven \tttrue \bffalse}%
  67. \textfont0=\prmeleven \scriptfont0=\prmeight \scriptscriptfont0=\prmfive
  68. \textfont1=\mieleven \scriptfont1=\mieight \scriptscriptfont1=\mifive
  69. \textfont2=\syeleven \scriptfont2=\syeight \scriptscriptfont2=\syfive
  70. \textfont4=\prbeleven \scriptfont4=\prbeight
  71. \textfont5=\prieleven \scriptfont5=\prieight
  72. \textfont6=\lgnine
  73. \baselineskip 12pt\rm
  74. }
  75. \def\twelvepoint
  76. {\let\rm\prmtwelve
  77. \let\bf\prbtwelve
  78. \baselineskip 13pt
  79. \rm
  80. }
  81. \def\bften
  82. {\fam4\prbten \textfont7\bmiten \textfont8\bsyten \bftrue\ttfalse}
  83. \def\bfeleven
  84. {\fam4\prbeleven \textfont7\bmieleven \textfont8\bsyeleven \bftrue\ttfalse}
  85. \def\bftwelve
  86. {\fam4\prbtwelve \textfont7\bmitwelve \textfont8\bsytwelve \bftrue\ttfalse}
  87. \def\bffourteen
  88. {\fam4\prbfourteen\textfont7\bmifourteen\textfont8\bsyfourteen\bftrue\ttfalse}
  89. \def\bfsixteen
  90. {\fam4\prbsixteen \textfont7\bmisixteen \textfont8\bsysixteen \bftrue\ttfalse}
  91. \def\bfeighteen
  92. {\fam4\prbeighteen\textfont7\bmieighteen\textfont8\bsyeighteen\bftrue\ttfalse}
  93. \let\normaltype=\elevenpoint
  94. \normaltype
  95. \def\marginstyle{\ttfalse\bffalse\vrule height6pt depth2pt width0pt\prmseven}
  96. \let\df\tt
  97. % page layout
  98. \newskip \normalleftskip \normalleftskip = 10pc
  99. \newskip \comleftskip \comleftskip = 6pc
  100. \newskip \hcomleftskip \hcomleftskip = 3pc
  101. \newskip \normalparskip \normalparskip = 1pc
  102. \newdimen \combarht \combarht = 1pt
  103. \hsize 40pc \vsize 43pc
  104. \topskip 2pc
  105. \leftskip \normalleftskip \rightskip 0pc plus 3pc
  106. \parindent 0pc
  107. \parskip \normalparskip
  108. \let\NIS=\nointerlineskip
  109. \def\NIPS{\NIS\parskip 0pc\relax}
  110. \def\removedepth{\ifdim \prevdepth>-1000pt \vskip -\prevdepth\fi}
  111. \def\Vskip #1!{\endgraf
  112. \removedepth
  113. \ifdim \lastskip<#1 \ifdim \lastskip>0pc \removelastskip\fi \vskip#1\NIPS\fi}
  114. \def\VPskip #1 plus #2!{\endgraf
  115. \removedepth
  116. \ifdim \lastskip<#1 \ifdim \lastskip>0pc \removelastskip\fi \vskip#1 plus #2\NIPS\fi}
  117. \def\par{\ifvmode\else\endgraf
  118. \removedepth
  119. \NIS\parskip \normalparskip\relax\fi}
  120. \let\normpar=\par
  121. \def\shortpar{\begingroup\def\par{\endgraf\endgroup\normpar}
  122. \advance\rightskip\leftskip}
  123. \newdimen \fullhsize \fullhsize=40pc
  124. \def\fullline{\hbox to \fullhsize}
  125. \newtoks \headline \newtoks \footline
  126. \countdef\pageno=0 \pageno=-1
  127. \let\chapno = \empty
  128. \newskip\iskip \newskip\iiskip \newskip\iiiskip
  129. \newbox \firstcolbox \newbox \othercolbox
  130. \newwrite \tocfile %\openout \tocfile \jobname.toc
  131. \newwrite \figfile %\openout \figfile \jobname.fig
  132. \newwrite \idxfile %\openout \idxfile \jobname.idx
  133. \newwrite \issfile %\openout \issfile \jobname.iss
  134. \newwrite \reffile %\openout \reffile \jobname.ref
  135. \newwrite \secfile %\openout \secfile \jobname.sec
  136. % \write\issfile{}
  137. % \write\idxfile{}
  138. \newcount\capno \capno=1
  139. \newcount\secn \secn=1
  140. \newcount\ssecn \ssecn=1
  141. \newcount\sssecn \sssecn=1
  142. \newcount\ssssecn \ssssecn=1
  143. \newcount\sssssecn \sssssecn=1
  144. \newcount\ssssssecn \ssssssecn=1
  145. \newbox\comline
  146. %% Used to say "Working Draft American National Standard for Information Systems---xxx"
  147. %% but now we avoid mentioning the status since it might change overnight. Say this
  148. %% longer info only on the cover page.
  149. \def\beginchapter#1#2#3#4{\xbeginchapter{#1}{\bookline}{#2}{#2}{#3}{#4}\par
  150. \endTitlePage}
  151. \def\xbeginchapter #1#2#3#4#5#6{%Open data files
  152. \immediate\openout \tocfile \jobname.toc
  153. \immediate\openout \figfile \jobname.fig
  154. \immediate\openout \idxfile \jobname.idx
  155. \immediate\openout \issfile \jobname.iss
  156. \immediate\openout \reffile \jobname.ref
  157. \immediate\openout \secfile \jobname.sec
  158. \write\issfile{}
  159. \write\idxfile{}
  160. \toctrue
  161. %\toc4{}
  162. \DefineChapter{#5}{#6}{#1}{#3}
  163. \capno=1\ssecn=0\sssecn=0\ssssecn=0\sssssecn=0\ssssssecn=0\relax
  164. \def\chapno{#1}\def\chapline{#4}\setbox\comline\null
  165. \Head {#2}
  166. \HeadI {#1. #3}
  167. \begingroup
  168. \leftskip \normalleftskip \rightskip 6pc plus 2pc
  169. \vfill}
  170. \def\endTitlePage
  171. {\par\endgroup\vskip 2pc\break\eject
  172. \ifshowtoc\else{$ $}\vfill\eject\fi
  173. \normaltype
  174. \pageno=1}
  175. \newinsert \idxins
  176. \dimen\idxins=\maxdimen
  177. \count\idxins=0
  178. \skip\idxins = 0pt
  179. \newif \ifsilent
  180. \newif \ifbold
  181. % output routines
  182. \newif \iffooter % if there a footer
  183. \newif \ifticks % positioning lines for output
  184. \newif \ifcomfirst % header in command chapter
  185. %\hoffset 1.0in
  186. %\voffset 1.0in
  187. \def\llbrac{\lbrack\!\lbrack\,}
  188. \def\rrbrac{\,\rbrack\!\rbrack}
  189. \newif \ifincom \incomfalse
  190. \def\makepagerule{\hrule height1.5pt width \fullhsize}
  191. % The reason this doesn't show you the name at the top of the first page
  192. % is that TeX has already processed the next entry (the one that didn't fit)
  193. % when it does the pagination. So if Foo,Bar,Baz is the sequence, but only Foo
  194. % and Bar would fit, the headline will be Baz even though only Foo and Bar fit.
  195. % --kmp 8-Apr-92
  196. \def\makeheadline{\setbox0=\fullline{\the\headline}\ht0=1pc\dp0=4.5pt\box0}
  197. \headline={\prbfourteen\ifcomfirst\else
  198. \ifodd\pageno\hss\copy\comline\else\copy\comline\hss\fi\fi}
  199. \def\makefootline{\iffooter\setbox0=\fullline{\the\footline}\dp0=.5pc\box0\fi}
  200. \footline={\normaltype
  201. \ifodd\pageno\hss\chapline\quad\folio\else\folio\quad\bookline\hss\fi}
  202. %Was:
  203. %\ifodd\pageno\hss\chapline\ \ \folio\else\folio\ \ \bookline\hss\fi
  204. %but the "\ \ " seems to work poorly when in a \code...\endcode context,
  205. %where "\ " has a locally bizarre meaning.
  206. \def\folio{{\bf\pagenumber}}
  207. \def\pagenumber
  208. {\ifnum\pageno>0 \chapno--\the\pageno\else\romannumeral-\pageno\fi}
  209. \def\advancepageno{\ifnum\pageno<0 \global\advance\pageno -1
  210. \else\global\advance\pageno 1\fi}
  211. \def\normalpage{\unvbox255\relax}
  212. \def\onecolumnReally{\output{\closout\normalpage}}
  213. \let\onecolumn=\onecolumnReally
  214. \def\thedraftcomment{}
  215. \def\draftcomment#1{\def\thedraftcomment{, #1}}
  216. \def\closout#1{\shipout\vbox
  217. {\ifdraft
  218. \vbox to 0pt {\vss\baselineskip 12pt
  219. \hbox{\prmeleven Version \rev\thedraftcomment}\hbox{\prmeleven \timestamp}
  220. \vskip 2pc}
  221. \fi
  222. \offinterlineskip
  223. \ifticks\topticks\fi
  224. \makeheadline
  225. \makepagerule
  226. \vbox to 47pc {#1\vss\makefootline} %was 45pc -kmp 8-Apr-92
  227. \ifticks\botticks\fi
  228. }
  229. \advancepageno
  230. \global\comfirstfalse
  231. \ifincom\else\global\setbox\comline\null\fi
  232. }
  233. %% This stuff is taken with modification from the TeX manual (8th printing, Aug86), p257 -kmp
  234. \let\lr=L
  235. \newbox\leftcolumn
  236. \def\columnbox{\leftline{\pagebody}}
  237. \def\twocolumn{\hsize 18pc\output{%
  238. \if L\lr
  239. \global\setbox\leftcolumn=\columnbox \global\let\lr=R
  240. \else
  241. \doubleformat
  242. \global\let\lr=L\fi
  243. \ifnum\outputpenalty>-20000 \else\dosupereject\fi}%
  244. \def\onecolumn{\hsize 40pc%
  245. \if R\lr\doubleformat\global\let\lr=L\fi
  246. \global\let\onecolumn=\onecolumnReally
  247. \onecolumnReally}}
  248. \def\doubleformat{\shipout\vbox
  249. {\ifdraft
  250. \vbox to 0pt {\vss\baselineskip 12pt
  251. \hbox{\prmeleven Version \rev\thedraftcomment}\hbox{\prmeleven \timestamp}
  252. \vskip 2pc}
  253. \fi
  254. \offinterlineskip
  255. \ifticks\topticks\fi
  256. \makeheadline
  257. \makepagerule
  258. \vbox to 47pc {\hbox to 40pc{\vbox to 43pc{\box\leftcolumn\vfil}\hfil\vbox{\columnbox\vfil}}\vss\makefootline} %was 45pc -kmp 8-Apr-92
  259. \ifticks\botticks\fi
  260. }
  261. \advancepageno
  262. \global\comfirstfalse
  263. \ifincom\else\global\setbox\comline\null\fi
  264. }
  265. \onecolumn
  266. %% This gets defined in setup-version, so it will be consistent across all chapters.
  267. %
  268. % {
  269. % \count0=\time
  270. % \count2=\time\divide\count2 by 60\multiply\count2by60\advance\count0by-\count2
  271. % \count2=\time\divide\count2 by 60
  272. %
  273. % \xdef\timestamp{\ifcase\month\or
  274. % Jan\or Feb\or Mar\or Apr\or May\or Jun\or Jul\or Aug\or
  275. % Sep\or Oct\or Nov\or Dec\fi\space\number\day, \number\year\space\space
  276. % \the\count2:\ifnum\count0<10\relax0\fi\the\count0}
  277. % }
  278. \def\topticks
  279. {\setbox0=\fullline{\hskip-1pc\vrule height .2pt width 1pc\relax
  280. \hskip -.2pt\vrule height 1pc width .2pt\hfil
  281. \vrule height 1pc width .2pt\hskip -.2pt\relax
  282. \vrule height .2pt width 1pc\hskip -1pc}\ht0=0pc\box0}
  283. \def\botticks
  284. {\setbox0=\fullline{\hskip-1pc\vrule height 0pt depth .2pt width 1pc\relax
  285. \hskip -.2pt\vrule height 0pt depth 1pc width .2pt\hfil
  286. \vrule height 0pt depth 1pc width .2pt\hskip -.2pt\relax
  287. \vrule height 0pt depth .2pt width 1pc\hskip -1pc}\dp0=0pc\box0}
  288. \def\pageticks{\tickstrue}
  289. \def\nopageticks{\ticksfalse}
  290. \def\footers{\footertrue}
  291. \def\nofooters{\footerfalse}
  292. \setbox\comline \null \let\chapline\empty
  293. \footers \nopageticks
  294. % Tables of Contents
  295. \def\dotleader{\leaders\hbox to 6pt {\hfil\prmfive.\hfil}\hfill}
  296. % start \numitem
  297. \def\numhangsize{25pt}
  298. \def\yskip{\penalty-50\vskip 3pt plus 3pt minus 2pt}
  299. \def\numtextindent#1{\noindent\hbox to \numhangsize{\hskip 0pt plus 1000pt minus 1000pt#1\ }}
  300. \def\numhang{\hangindent \numhangsize}
  301. \def\numitem#1{\yskip\numhang\numtextindent{#1}}
  302. % end \numitem
  303. % {\obeylines
  304. % \gdef\Czero#1
  305. % {\Vskip1pc!\bbf #1\par}
  306. % \gdef\Cone#1\!#2
  307. % {\Vskip1pc!\bbf #1\dotleader#2\hskip-5pc\null\par}
  308. % \gdef\Ctwo#1\!#2
  309. % {\hangindent1pc\rm #1\dotleader#2\hskip-5pc\null\par}
  310. % \gdef\Cthree#1
  311. % {}
  312. % \global\let\Cfour\Cthree
  313. % \global\let\Pzero\Cthree
  314. % \global\let\Pone \Cthree
  315. % \gdef\Ptwo#1\!#2
  316. % {\leftskip 0pt\hangindent 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  317. % \gdef\Pthree#1\!#2
  318. % {\leftskip 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  319. % \global\let\Pfour\Cthree
  320. % \gdef\Pfive#1\!#2
  321. % {\leftskip 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  322. % \gdef\Psix#1\!#2
  323. % {\leftskip 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  324. % }
  325. {\obeylines
  326. \gdef\Czero#1
  327. {\Vskip1pc!\bbf #1\par}
  328. \gdef\Cone#1\!#2
  329. {\Vskip1pc!\bbf #1\dotleader#2\hskip-5pc\null\par}
  330. \gdef\Ctwo#1\!#2
  331. {\hangindent1pc\rm #1\dotleader#2\hskip-5pc\null\par}
  332. \global\let\Cthree\Ctwo
  333. \global\let\Cfour\Ctwo
  334. \global\let\Cfive\Ctwo
  335. \global\let\Csix\Ctwo
  336. \gdef\Pempty#1
  337. {}
  338. \global\let\Pzero\Pempty
  339. \global\let\Pone \Pempty
  340. % \gdef\Ptwo#1\!#2
  341. % {\leftskip 0pt\hangindent 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  342. % \gdef\Pthree#1\!#2
  343. % {\leftskip 1pc\rm#1\dotleader#2\hskip-5pc\null\par}
  344. \gdef\Ptwo#1\!#2
  345. {\leftskip 0pt\rm #1\dotleader#2\hskip-5pc\null\par}
  346. \gdef\Pthree#1\!#2
  347. {\leftskip 0pt\hangindent1pc\rm #1\dotleader#2\hskip-5pc\null\par}
  348. \global\let\Pfour\Pthree
  349. \global\let\Pfive\Pthree
  350. \global\let\Psix\Pthree
  351. \gdef\Pnine#1:#2\!#3
  352. {\leftskip 0pt\rightskip 0pt\hangindent 1pc%
  353. \ifx#1R{\clref{#2}}\else
  354. \ifx#1C{\f{#2}}\else
  355. \ifx#1K{\kwd{#2}}\else
  356. \ifx#1T{{\rm #2}}\else
  357. \ifx#1G{\term{#2}}\else
  358. \ifx#1E{\f{#2}{\rm example}}\else
  359. \ifx#1P{\packref{#2} \term{package}}\fi\fi\fi\fi\fi\fi\fi\quad#3\hfil\null\par}
  360. }
  361. %\tracingcommands=1
  362. % These are new in an attempt to allow us to make index entries
  363. % not just for function names, but for other things as well. -kmp 25-Apr-93
  364. \def\idxref#1{\logidx{R}{#1}}
  365. \def\idxkeyref#1{\logidx{R}{\&#1}}
  366. \def\idxcode#1{\logidx{C}{#1}}
  367. \def\idxkwd#1{\logidx{K}{#1}}
  368. \def\idxtext#1{\logidx{T}{#1}}
  369. \def\idxterm#1{\logidx{G}{#1}} % G = Glossary
  370. \def\idxexample#1{\logidx{E}{#1}}
  371. \def\idxpackref#1{\logidx{P}{#1}}
  372. \newif \iftoc \tocfalse
  373. \newif \ifshowtoc \showtoctrue
  374. \def\ThisSection{$mm$.$nn$}
  375. \def\toc#1#2{\gdef\ThisSection{#2}\iftoc{\let\break=\empty
  376. \xdef\writeit{\write\tocfile{!#1#2 !!\noexpand\pagenumber}}\writeit}\fi}
  377. %Was \PTOC
  378. \def\ShowContents{\ifshowtoc\iftoc\immediate\closeout\tocfile\global\tocfalse\fi\def\chapline{Contents}%
  379. \Head{Table of Contents}%\HeadII{ CONTENTS}
  380. {\let\0\Pzero\let\1\Pone\let\2\Ptwo\let\3\Pthree\let\4\Pfour\let\5\Pfive\let\6\Psix
  381. \let\par=\endgraf\parskip 0pt\parfillskip 0pt
  382. \rightskip 5pc plus 15pc\hangindent1pc
  383. \obeylines\catcode`\!=0\relax\input\jobname.toc\relax}
  384. \vfil\break\ifodd\pageno\else\null\vfil\break\fi\fi
  385. }
  386. \def\ShowIndex#1{\iftoc\immediate\closeout\idxfile\fi\def\chapline{#1}\Head{#1}%\HeadII{ INDEX}
  387. {\let\0\Pzero\let\1\Pone\let\2\Ptwo\let\3\Pthree\let\4\Pfour\let\5\Pfive\let\6\Psix
  388. \let\par=\endgraf\parskip 0pt\parfillskip 0pt
  389. \rightskip 5pc plus 15pc\hangindent1pc
  390. \obeylines\catcode`\!=0\relax\input\jobname.idx\relax}
  391. \vfil\break\ifodd\pageno\else\null\vfil\break\fi
  392. }
  393. % Headers
  394. % note: Head Levels 0 and 1 should appear only at the top of a page.
  395. % note: same for \altHeadII
  396. % \endSection does the page breaking, not \beginSection
  397. \def\afterheaderbreak{\penalty100000 }
  398. \def\beforeheaderbreak#1{\par\vskip 0pt plus #1pt minus 8pt\penalty-1000 }
  399. \def\Head #1{\toc0{#1}{\bfeighteen\beforeheaderbreak{18}
  400. \baselineskip 20pt\leftskip 0pt plus 1fill \rightskip 0pt
  401. \vglue -10pt\null #1\par}%
  402. \afterheaderbreak\Vskip 5pc!\afterheaderbreak}
  403. \def\HeadI #1{\toc1{#1}{\bfeighteen\beforeheaderbreak{18}
  404. \baselineskip 20pt\leftskip 0pt plus 1fill \rightskip 0pt
  405. \vglue -10pt\null #1\par}%
  406. \afterheaderbreak\Vskip 5pc!\afterheaderbreak}
  407. \def\HeadIL #1{\toc1{#1}{\bfeighteen\beforeheaderbreak{18}
  408. \baselineskip 20pt\leftskip 0pt \rightskip 0pt
  409. \vglue -10pt\null#1\hfil\par}%
  410. \afterheaderbreak\Vskip 5pc!\afterheaderbreak}
  411. % Used to skip 3pc before, 2pc afterward!
  412. \def\HeadII #1{\Vskip 2.5pc!%
  413. \toc2{\chapno.\the\ssecn #1}{\bfsixteen\beforeheaderbreak{16}
  414. \baselineskip 18pt\leftskip 0pt \rightskip 0pt plus 1fil
  415. \setbox0=\hbox{\chapno.\the\ssecn\ }\hangindent\wd0{$ $}\box0\ignorespaces #1\par}
  416. %\chapno.\the\ssecn \relax #1\par}%
  417. \afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  418. % Used to skip 2pc before!
  419. \def\HeadIII #1{\Vskip 1.5pc!%
  420. \toc3{\chapno.\the\ssecn.\the\sssecn #1}{\bffourteen\beforeheaderbreak{14}
  421. \baselineskip 16pt\leftskip 0pt \rightskip 0pt plus 1fil
  422. \setbox0=\hbox{\chapno.\the\ssecn.\the\sssecn\ }\hangindent\wd0{$ $}\box0\ignorespaces #1\par}
  423. %\chapno.\the\ssecn.\the\sssecn \relax #1\par}%
  424. \afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  425. % Used to skip 2pc before!
  426. \def\HeadIV #1{\Vskip 1.5pc!%
  427. \toc4{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn #1}{\bftwelve\beforeheaderbreak{12}
  428. \baselineskip 13pt \leftskip 0pt \rightskip 0pt plus 1fil
  429. \setbox0=\hbox{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn\ }\hangindent\wd0{$ $}\box0\ignorespaces #1\par}
  430. %\chapno.\the\ssecn.\the\sssecn.\the\ssssecn \relax #1\par}%
  431. \afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  432. % Used to skip 1.5pc before!
  433. \def\HeadV #1{\Vskip 1.25pc!%
  434. \toc5{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn #1}%
  435. {\bfeleven\beforeheaderbreak{11}
  436. \baselineskip 12pt \leftskip 0pt \rightskip 0pt plus 1fil
  437. \setbox0=\hbox{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn\ }\hangindent\wd0{$ $}\box0\ignorespaces #1\par}
  438. %\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn \relax #1\par}%
  439. \afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  440. % Used to skip 1.2pc before!
  441. \def\HeadVI #1{\Vskip 1pc!%
  442. \toc6{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn.\the\ssssssecn #1}%
  443. {\bften\beforeheaderbreak{10}
  444. \baselineskip 11pt \leftskip 0pt \rightskip 0pt plus 1fil
  445. \setbox0=\hbox{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn.\the\ssssssecn\ }\hangindent\wd0{$ $}\box0\ignorespaces #1\par}
  446. %\chapno.\the\ssecn.\the\sssecn.\the\ssssecn.\the\sssssecn.\the\ssssssecn \relax #1\par}%
  447. \afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  448. %\def\HeadVI #1{\Vskip1.5pc!{\elevenpoint\bf\beforeheaderbreak{11}
  449. %\leftskip 4pc \rightskip 0pt plus 1fil
  450. %\relax #1\par}%
  451. %\afterheaderbreak\Vskip 1pc!\afterheaderbreak}
  452. %% This is apparently not used. -kmp 9-Oct-91
  453. % \def\altHeadII #1{\refalt\toc2{\chapno.\the\ssecn #1}{\bfsixteen\beforeheaderbreak{16}
  454. % \baselineskip 18pt \leftskip \normalleftskip \rightskip 0pt plus 1fil
  455. % \chapno.\the\ssecn \relax #1\par}%
  456. % \afterheaderbreak\Vskip 4pc!\afterheaderbreak}
  457. %
  458. % Ditto for this. -kmp 24-Oct-91
  459. % \let\refalt\empty
  460. %
  461. % \def\refHeadIV #1{\Vskip 1pc!
  462. % \toc4{\chapno.\the\ssecn.\the\sssecn.\the\ssssecn #1}{\bftwelve\beforeheaderbreak{12}
  463. % \baselineskip 13pt \leftskip 0pt \rightskip 0pt plus 1fil
  464. % \chapno.\the\ssecn.\the\sssecn.\the\ssssecn \relax #1\par}%
  465. % \afterheaderbreak\Vskip \normalparskip!\afterheaderbreak}
  466. % Lists
  467. \def\bull
  468. {\ifmmode\bullet\else{$\bullet$}\fi}
  469. \def\listlabel
  470. #1{\noindent\hbox to 0pc{\hskip -1.5pc #1\hss}{\penalty20000}\ignorespaces}
  471. % \def\item #1{\par\leftskip\iskip \listlabel{#1}}
  472. % \def\itemitem #1{\par\leftskip\iiskip \listlabel{#1}}
  473. % \def\itemitemitem #1{\par\leftskip\iiiskip\listlabel{#1}}
  474. % These used to do \bigbreak,\medbreak,\smallbreak instead of \itemskip.
  475. \def\itemskip#1#2#3{\endgraf\penalty #1\vskip #2 plus #3 minus #3}
  476. \def\item #1{\itemskip{-200}{5pt}{3pt}\leftskip\iskip \listlabel{#1}}
  477. \def\itemitem #1{\itemskip{-100}{4pt}{2pt}\leftskip\iiskip \listlabel{#1}}
  478. \def\itemitemitem #1{\itemskip{ -50}{3pt}{1pt}\leftskip\iiiskip\listlabel{#1}}
  479. \def\beginlist
  480. {\begingroup\iiiskip=\leftskip \advance\iiiskip 1.5pc\iskip =\iiiskip
  481. \advance\iiiskip 1.5pc\iiskip =\iiiskip \advance\iiiskip 1.5pc
  482. \Vskip 1pc!}
  483. \def\endlist
  484. {\par\endgroup\Vskip 1pc!}
  485. % screen text examples
  486. {\obeylines\gdef\eatcr#1
  487. {}}
  488. \chardef\bslash=`\\
  489. \def\prompt{>}
  490. \chardef\other=12
  491. {\obeyspaces\global\let =\ }
  492. \def\catothers
  493. {\catcode`\&=\other \catcode`\#=\other
  494. %\catcode`\^=\other \catcode`\^^A=\other
  495. %\catcode`\^^X=\other
  496. \catcode`\%=\other}
  497. \def\screen!{\ifvmode\Vskip\normalparskip!\fi\begingroup
  498. \baselineskip 11pt\tt
  499. \parfillskip 0pt plus1fil
  500. \parskip 0pt
  501. \def\par{\leavevmode\endgraf}%
  502. \def\ {{}}
  503. \catcode`\$=\other
  504. \let\>=\prompt
  505. %!!! Experimentally making { and } have their normal TeX meaning here. -kmp 7-May-91
  506. %\catcode `\{=\other \catcode`\}=\other
  507. %!!! Experimentally making [ and ] normal alphabetic. -kmp 7-May-91
  508. %\catcode `\[=\other \catcode`\]=\other
  509. \obeyspaces\obeylines\eatcr}
  510. \def\endscreen!{\endgraf\endgroup\Vskip\normalparskip!}
  511. \def\widescreen{\Vskip \normalparskip!\begingroup
  512. \leftskip 0pc
  513. \baselineskip 11pt\tt
  514. \parfillskip 0pt plus1fil
  515. \parskip 0pt
  516. \def\par{\leavevmode\endgraf}
  517. \catcode`\$=\other
  518. \let\>=\prompt
  519. \catcode `\{=\other \catcode`\}=\other
  520. \obeyspaces\obeylines\eatcr}
  521. % notes
  522. \def\note{\Vskip 1pc!{\bf Note:} }
  523. \def\longnote{\Vskip 1pc!\begingroup \advance\leftskip 1.5pc {\bf Note:} }
  524. \def\notes{\Vskip 1pc!{\bf Notes:}\par\beginlist}
  525. \let\endlongnote=\endlist \let\endnotes =\endlist
  526. % Figures
  527. %Syntax:
  528. % \boxfig (or \cboxfig) (or \rulefig) (or \fig)
  529. % { }
  530. % \caption{ }
  531. % \endfig
  532. \gdef\figtype{0}
  533. \def\fig
  534. {\gdef\figtype{0}
  535. \begingroup\leftskip0pt
  536. \global\setbox1=\vbox}
  537. \def\finishfig
  538. {\endgroup
  539. \Vskip1pc!
  540. \moveright\leftskip\box1
  541. {\penalty20000}
  542. \vskip 1pc
  543. {\penalty20000}
  544. \docaption
  545. \smallbreak
  546. \Vskip1pc!
  547. }
  548. \def\rulefig
  549. {\gdef\figtype{1}
  550. \begingroup\leftskip0pt
  551. \global\setbox1=\vbox}
  552. \def\finishrulefig
  553. {\endgroup
  554. \Vskip1pc!
  555. \fullline{\hskip\leftskip\leaders\hrule height1pt depth0pt\hfil}
  556. \Vskip1.5pc!
  557. \moveright\leftskip\box1
  558. {\penalty20000}
  559. \Vskip1pc!
  560. {\penalty20000}
  561. \docaption
  562. \smallbreak
  563. \Vskip1pc!
  564. \fullline{\hskip\leftskip\leaders\hrule height1pt depth0pt\hfil}
  565. \Vskip1pc!}
  566. \def\boxfig
  567. {\gdef\figtype{2}
  568. \begingroup
  569. \advance\hsize by -\leftskip\advance\hsize by -\rightskip
  570. \advance\hsize -2pt
  571. \leftskip 1pc
  572. \rightskip 1pc plus 2pc
  573. \global\setbox1=\vbox}
  574. \def\kcnocboxfig
  575. {\gdef\figtype{2}
  576. \begingroup
  577. \advance\hsize by -2\leftskip
  578. \advance\hsize -2pt
  579. \leftskip 2pc
  580. \rightskip 2pc plus 2pc
  581. \global\setbox1=\vbox}
  582. \def\kcfinishboxfig
  583. {\wd1=\hsize
  584. \endgroup
  585. \Vskip1pc!
  586. \vglue 0pt
  587. \moveright\leftskip\vbox
  588. \Vskip1pc!
  589. \Vskip1pc!
  590. }
  591. \def\kcendfig
  592. {\ifcase\figtype\relax\finishfig\or\finishrulefig\or\finishboxfig\fi}
  593. \def\caption#1{\gdef\captext{\chapno--\the\capno. #1}}
  594. \def\cboxfig
  595. {\gdef\figtype{2}
  596. \begingroup
  597. \advance\hsize by -2\leftskip
  598. \advance\hsize -2pt
  599. \leftskip 2pc
  600. \rightskip 2pc plus 2pc
  601. \global\setbox1=\vbox}
  602. \def\finishboxfig
  603. {\wd1=\hsize
  604. \endgroup
  605. \Vskip1pc!
  606. \vglue 0pt
  607. \moveright\leftskip\vbox{\hrule height1pt
  608. \hbox{\vrule width 1pt
  609. \vbox{\hrule height0pt width \wd1\vskip1pc\unvbox1\Vskip1pc!}\vrule width1pt}
  610. \NIS\hrule height1pt}
  611. {\penalty20000}
  612. \Vskip1pc!
  613. {\penalty20000}
  614. \docaption
  615. \smallbreak
  616. \Vskip1pc!
  617. }
  618. \def\endfig
  619. {\ifcase\figtype\relax\finishfig\or\finishrulefig\or\finishboxfig\fi}
  620. \def\caption#1{\gdef\captext{\chapno--\the\capno. #1}}
  621. \let\captext=\empty
  622. \def\makecapline
  623. {\vbox{\leftskip 0pt\noindent\prbnine Figure \captext}\figlist2\global\advance\capno 1\relax}
  624. \def\docaption
  625. {\ifx\captext\empty
  626. \else\moveright\leftskip\makecapline\smallbreak\fi\global\let\captext\empty}
  627. \def\figlist
  628. #1{\xdef\writeit{\write\figfile{!#1\captext!!\noexpand\pagenumber}}\writeit}
  629. %\figlist4
  630. % \simplecaption lets you put captions on things that are not
  631. % set up formally as figures.
  632. \def\simplecaption#1{\caption{#1}
  633. \vskip 1pc
  634. \docaption
  635. \Vskip1pc!}
  636. \def\startSection{\advance\ssecn 1\sssecn=0\ssssecn=0\sssssecn=0\ssssssecn=0}
  637. \def\beginSection #1{\startSection\leftskip\normalleftskip\HeadII{\ #1}}
  638. %Dictionary sections don't start with a banner line announcing their section name.
  639. \def\includeDictionary #1{\startSection\toc2{\chapno.\the\ssecn\ {\chapline} Dictionary}
  640. \input #1
  641. \endSection}
  642. \def\startSubsection{\advance\sssecn 1\ssssecn=0\sssssecn=0\ssssssecn=0}
  643. \def\beginSubsection #1{\startSubsection\HeadIII{\ #1}}
  644. \def\startsubsubsection{\advance\ssssecn 1\sssssecn=0\ssssssecn=0}
  645. \def\beginsubsubsection #1{\startsubsubsection\HeadIV{\ #1}}
  646. \def\startsubsubsubsection{\advance\sssssecn 1\ssssssecn=0}
  647. \def\beginsubsubsubsection #1{\startsubsubsubsection\HeadV{\ #1}}
  648. \def\startsubsubsubsubsection{\advance\ssssssecn 1}
  649. \def\beginsubsubsubsubsection #1{\advance\ssssssecn 1\HeadVI{\ #1}}
  650. \let\beginsection\beginSection
  651. \let\endsection\endSection
  652. \let\endSubsection\empty
  653. \let\endsubsubsection\empty
  654. \let\endsubsubsubsection\empty
  655. \let\endsubsubsubsubsection\empty
  656. \let\beginSubSection=\beginSubsection
  657. \let\beginsubSection=\beginSubsection
  658. \let\beginsubsection=\beginSubsection
  659. \let\endSubSection=\endSubsection
  660. \let\endsubSection=\endSubsection
  661. \let\endsubsection=\endSubsection
  662. \def\endchapter{\endSimpleChapter
  663. \normaltype
  664. \pageno=-2
  665. \ShowContents}%was \PTOC
  666. \def\beginSimpleChapter#1{\HeadI{#1}
  667. \pageno=-1
  668. \def\chapline{#1}}
  669. \def\beginSimpleChapterLeft#1{\HeadIL{#1}
  670. \pageno=-1
  671. \def\chapline{#1}}
  672. \def\endSimpleChapter
  673. {\endSection\ifodd\pageno\else\global\setbox\comline\null\null\vfil\break\fi}
  674. \let\endAppendix\endchapter
  675. %Switch these to get Sections on new pages
  676. \def\endSection{\ifdim \pagetotal>0pc \vfil\break\fi}
  677. %\let\endSection\empty
  678. \let\endsection=\endSection
  679. %\def\endcom{\global\incomfalse\Vskip 1pc!\hrule\hrule\hrule\hrule}
  680. \def\endcom{\global\incomfalse\penalty20000\VPskip 1pc plus 3pc!\penalty20000\hrule\hrule\hrule\hrule\goodbreak}
  681. % \def\label
  682. % #1:{\bigbreak
  683. % \noindent\hbox to 0pc{\bf\hskip-\comleftskip #1:\hss}
  684. % \penalty20000
  685. % \vskip 2pt
  686. % \penalty20000
  687. % \ignorespaces}
  688. % \def\methodlabel
  689. % #1:{\bigbreak
  690. % \noindent\hbox to 0pc{\bf\hskip-\hcomleftskip #1:\hss}
  691. % \penalty20000
  692. % \vskip 2pt
  693. % \penalty20000
  694. % \ignorespaces}
  695. % \def\methodrule{\bigbreak
  696. % \Vskip 1pc!
  697. % \penalty20000
  698. % \line{\hbox to \hcomleftskip{}\leaders\hrule\hfill\hbox to \hcomleftskip{}}
  699. % \penalty20000
  700. % \Vskip 1pc!
  701. % \penalty20000{}}
  702. %!!! Sandra complained that this sometimes lets names get hyphenated even
  703. % in a code-font context. e.g., see the entry for SUBSTITUTE, which gets typeset as:
  704. %
  705. % substitute, substitute-if, substitute-if-not, nsubsti-
  706. % tute, nsubstitute-if, nsubstitute-if-not Function
  707. \def\begincom
  708. {\begingroup\catcode`\,=\active\catcode`\-=\active\dobegincom}
  709. \def\obegincom
  710. {\begingroup\catcode`\,=\active\catcode`\-=\active\doobegincom}
  711. \newdimen \dotw
  712. \setbox0=\hbox{\prbfourteen, $\ldots$}
  713. \global\dotw=\wd0
  714. \def\hyphen{-}
  715. \def\comma{,}
  716. \def\specialcomma
  717. {\discretionary{\kern\dotw\vrule width0pt}{}{,\kern\fontdimen2
  718. \prbfourteen}\ignorespaces}
  719. {\catcode`\,\active\catcode`\-=\active
  720. \gdef\dospecialcomma{\let,\specialcomma\sphytrue}
  721. \gdef\donormalcomma{\let,\comma}
  722. \gdef\begincomindex#1{\global\let\NEXT\bcindex\bcindex #1, \endit, \relax}
  723. \gdef\bcindex#1, {\ifx\endit#1\global\let\NEXT\empty
  724. \else\silenttrue\boldtrue\xref{#1}\fi\NEXT}}
  725. \donormalcomma
  726. \def\dobegincom
  727. #1\ftype #2{\leftskip0pc\rightskip0pc plus10pc\bfsixteen
  728. \baselineskip 16pt
  729. \dospecialcomma\let\break=\ignorespaces
  730. \global\setbox1=\vbox{\hsize 40pc\lowercase{#1}}
  731. \vbadness 10000
  732. \setbox0=\vsplit1 to 16pt
  733. \setbox0=\vbox{\unvbox0\global\setbox3\lastbox}
  734. \global\setbox1\hbox{\unhbox3\relax\ifdim\ht1>0pt\llap{, $\ldots$}\fi}
  735. \global\incomtrue
  736. \global\setbox\comline\box1
  737. \endgroup
  738. \comfirsttrue
  739. \leftskip \comleftskip
  740. \Vskip 1pc!
  741. \goodbreak
  742. \idxref{#1}%\toc2{#1}
  743. %!!! ACW is bugged that sometimes a carriage return is generated in the
  744. % middle of arg2 (the \ftype). Maybe change "\pritwelve #2" to be in "\hbox{...}"
  745. {\raggedright\catcode`\-=\active\bfsixteen #1
  746. \hfill\pritwelve #2}
  747. \penalty20000
  748. \Vskip 1pc!
  749. \penalty20000
  750. \hrule height \combarht
  751. \penalty20000
  752. \parskip \normalparskip
  753. \penalty20000
  754. \vbox to 0pc{}
  755. }
  756. \def\doobegincom
  757. #1{\leftskip0pc\rightskip0pc plus10pc\bffourteen
  758. \baselineskip 16pt
  759. \dospecialcomma\let\break=\ignorespaces
  760. \global\setbox1=\vbox{\hsize 40pc\lowercase{#1}}
  761. \vbadness 10000
  762. \setbox0=\vsplit1 to 16pt
  763. \setbox0=\vbox{\unvbox0\global\setbox3\lastbox}
  764. \global\setbox1\hbox{\unhbox3\relax\ifdim\ht1>0pt\llap{, $\ldots$}\fi}
  765. \global\incomtrue
  766. \global\setbox\comline\box1
  767. \endgroup
  768. \comfirsttrue
  769. \goodbreak
  770. \leftskip \comleftskip
  771. \penalty20000
  772. \Vskip 3pc!
  773. \penalty20000
  774. \hbox to \fullhsize{\idxref{#1}%\toc2{#1}
  775. \bfsixteen #1\hfil}
  776. \penalty20000
  777. \Vskip 2pc!
  778. \penalty20000
  779. \hrule height \combarht
  780. \penalty20000
  781. \parskip \normalparskip
  782. \penalty20000
  783. \vbox to 0pc{}
  784. \penalty20000
  785. }
  786. \normaltype
  787. \newdimen \changedepth
  788. \changedepth=0.15\baselineskip
  789. % character hacks
  790. \let\barunderaccent=\b %So that \b is free for other things (e.g., bold)
  791. \let\dotlessi=\i %So that \i is free for other things (e.g., italic)
  792. \mathchardef \spLT "373C % <
  793. \mathchardef \spGT "373E % >
  794. \mathchardef \spST "2803 % *
  795. \mathchardef \spBS "086E % \
  796. \mathchardef \spMI "2800 % -
  797. \mathchardef \spVB "386A % |
  798. \mathchardef \spTI "3818 % ~
  799. \def\LT{\ifmmode\spLT\else\iftt<\else{$\spLT$}\fi\fi}
  800. \def\GT{\ifmmode\spGT\else\iftt>\else{$\spGT$}\fi\fi}
  801. \def\ST{\ifmmode\spST\else\ifbf{$\spST$}\else*\fi\fi}
  802. \def\BSlash{\ifmmode\spBS\else\iftt\bslash\else{$\spBS$}\fi\fi}
  803. %\def\VB{\ifmmode\spVB\else\iftt|\else{$\spVB$}\fi\fi}
  804. \def\VB{\ifmmode\spVB\else\iftt|\else{$\vert$}\fi\fi}
  805. \def\US{\iftt\_\fi}
  806. \def\MI{\ifbf\ifmmode\spMI\else\ifsphy\hbox{-}\else-\fi\fi\else-\fi}
  807. % !!! Disabled again. -kmp 7-May-91
  808. % %!!! Experimentally making @ normal alphabetic. -kmp 7-May-91 (was commented out)
  809. % \def\AT{\iftt\hbox to.5em{\hss\prmseven@\hskip.5pt\hss}\else@\fi}
  810. \def\TI{\iftt\char'176\relax\else\penalty10000\ \fi}
  811. \let\LB=\{
  812. \let\RB=\}
  813. \def\{{\iftt\char'173\relax\else\LB\fi}
  814. \def\}{\iftt\char'175\relax\else\RB\fi}
  815. \def\ngt{>}
  816. \def\nlt{<}
  817. \def\nst{*}
  818. \let\\=\BSlash
  819. \catcode `\_=9\relax
  820. \def\tilde{\ifbf$\spTI$\else{\tt\char126\relax}\fi}
  821. \catcode `\<=\active \global\let<=\LT
  822. \catcode `\>=\active \global\let>=\GT
  823. \catcode `\|=\active \global\let|=\VB
  824. \catcode `\*=\active \global\let*=\ST
  825. % !!! Disabled again. -kmp 7-May-91
  826. % %!!! Experimentally making @ normal alphabetic. -kmp 7-May-91 (was commented out)
  827. % \catcode `\@=\active \global\let@=\AT
  828. \catcode `\_=\active \global\let_=\US
  829. \catcode `\-=\active \global\let-=\MI
  830. \global\let~=\TI
  831. \gdef\setspecialdefs
  832. {\let-=\hyphen \let>=\ngt \let<=\nlt \let*=\nst
  833. \def\bf{\string\bf}\def\\{\string\\}\def\it{\string\it}\def\tt{\string\tt}}
  834. %\catcode `\^ = \active
  835. \def\uspace{{\tentt\char'40}}
  836. \normalleftskip= 4pc
  837. \comleftskip = 4pc
  838. \hcomleftskip = 2pc
  839. \let\normaltype=\tenpoint
  840. \normaltype
  841. %!!! The idea here is to let the user write either:
  842. %
  843. % \label Foo Bar::
  844. %
  845. % This is text for the "Foo Bar" section.
  846. %
  847. % or else
  848. %
  849. % \label Foo Bar:\None.
  850. % or \label Foo Bar:\None!
  851. % or \label Foo Bar:\None?
  852. %
  853. % Currently the punctuation is not managed formally, but the intent is to provide
  854. % a level of confidence that the absence of information is purposeful.
  855. % "?" means unsure or questionable.
  856. % "." is neutral--no information content.
  857. % "!" means pretty sure this is right.
  858. %
  859. % In the latter case, no text will appear.
  860. \newif \ifnullabel \nullabelfalse % might be overridden in setup-options
  861. \def\None{None.}
  862. \def\EatPunc #1{} % Takes care of eating a trailing "." or "!"
  863. \def\label #1:#2{\ifx#2:\truelabel{#1}\else\labelNone{#1}\fi}
  864. \def\labelNone#1{\ifnullabel\nullabel{#1}\fi\expandafter\EatPunc}
  865. \newif \ifsmallab \smallabfalse
  866. \long\def\ignorepar #1{#1}
  867. \def\truelabel#1{\rm\Vskip \normalparskip!
  868. \bigbreak
  869. \ifsmallab
  870. \noindent\hskip -4pc \hbox to 4pc{{\prbseven #1 }\hss}\expandafter\ignorepar
  871. \else
  872. \hbox{\prbtwelve #1:}
  873. \penalty20000
  874. \vskip 2pt plus 2pt
  875. \penalty20000
  876. \fi}
  877. \def\nullabel#1{\rm\Vskip \normalparskip!
  878. \bigbreak
  879. \hbox{{\tenpoint\bf (#1: \rm None.)}}
  880. \bigbreak
  881. }
  882. \newif \ifexamples \examplestrue % might be overridden in setup-options
  883. \newif \ifnotes \notestrue % might be overridden in setup-options
  884. % This implementation had some problems, but I'd like to do something like this. -kmp
  885. %
  886. % \def\Examples{\ifexamples\label Examples::\else\expandafter\eatExamples\fi}
  887. % \def\Notes{\ifnotes\label Notes::\else\expandafter\eatNotes\fi}
  888. %
  889. % \long\def\eatExamples #1\label{\label}
  890. % \long\def\eatNotes #1\endcom{\endcom}
  891. %% I'm having troubles with \HeadIV. Could this have been the problem?
  892. %% Removed experimentally. -kmp 9-Oct-91
  893. % \let\HeadIV=\refHeadIV
  894. % \def\refalt{\vglue -8pt\null}
  895. %\hoffset 1in
  896. \advance\voffset by .5in
  897. \newif \ifdraft % put \drafttrue at beginning of a draft
  898. %!!! Moon notes his concern about the introduction of extra whitespace
  899. % in the vicinity of issue markers.
  900. % I experimentally added "\ignorespaces" here. Did that fix it? -kmp 18-Dec-91
  901. \newif \ifissdisp
  902. \newif \ifisslog
  903. \def\issue #1{\ifisslog\logissue1{#1}\fi
  904. \ifissdisp\par\leftskip\iskip {\bf The following is from issue: } #1\par\fi
  905. \ignorespaces}
  906. \def\endissue #1{\ifisslog\logissue0{#1}\fi
  907. \ifissdisp\par\leftskip\iskip {\bf End of issue: } #1\par\fi
  908. \ignorespaces}
  909. % \def\issue #1{\logissue1{#1}}
  910. % \def\endissue #1{\logissue0{#1}}
  911. % % \def\issue #1{\par\leftskip\iskip {\bf The following is from issue: } #1\par}
  912. % % \def\endissue #1{\par\leftskip\iskip {\bf End of issue: } #1\par}%\indent
  913. % Use \logissue1 to start an issue, or \logissue0 to end one.
  914. % Puts in the file:
  915. % !1<issue> !!<page> for start of issue
  916. % !0<issue> !!<page> for end of issue
  917. \def\logissue
  918. #1#2{{\let\break=\empty
  919. \xdef\writeit{\write\issfile{!#1#2 !!\noexpand\pagenumber}}\writeit}}
  920. \def\logidx#1#2{{\let\break=\empty
  921. \xdef\writeit{\write\idxfile{!2#1:#2!!\noexpand\pagenumber}}\writeit}}
  922. \def\DefineFigure#1{{\let\break=\empty
  923. \xdef\writeit{\write\reffile{!#1 \chapno--\the\capno}}\writeit}}
  924. \def\deffigrefs#1{\def\figref##1{{\def##1{\message{Figure ``\string##1'' is not defined.}%
  925. Figure $nn$--$mm$ (\string##1)}#1##1}}}
  926. % Stylistically, ``\Figref'' goes at start of sentence or ``\figref'' in middle,
  927. % but since "Figure xxx" always comes out capitalized, they're implementationally
  928. % just synonyms.
  929. \def\Figref#1{\figref#1}
  930. \def\DefineSection#1{{\let\break=\empty
  931. \xdef\writeit{\write\secfile{!#1 Section \ThisSection}}\writeit}}
  932. %Maybe replace with more complicated self-reference one day.
  933. \def\Thissection{This section}
  934. \def\thissection{this section}
  935. \def\DefineChapter#1#2#3#4{{\let\break=\empty
  936. \xdef\writeit{\write\secfile{!#1 Chapter #3 #4}}\writeit
  937. \xdef\writeit{\write\secfile{!#2 Chapter #3 #4}}\writeit}}
  938. \def\defsecrefs#1{\def\secref##1{{\def##1{\message{Section ``\string##1'' is not defined.}%
  939. Section $mm$.$nn$ (\string##1)}#1##1}}\let\chapref=\secref}
  940. \tolerance=2500