setup-document.tex 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. % -*- Mode: TeX -*-
  2. %%%% ===== Fonts, etc. =====
  3. % Concrete
  4. \def\b#1{{\bf #1}} % b = bold
  5. \def\i#1{{\it #1}} % i = italic
  6. \def\j#1{{\it #1\/}} % j = italic + kerning
  7. \def\f#1{{\dummy}\hbox{{\tt #1}}} % f = fixed
  8. \def\ff#1{\hbox{{\tt #1} }} % ff = fixed box w/ trailing space (for use in math mode)
  9. \def\ital#1{{\it #1\/}}
  10. \def\bold#1{{\bf #1}}
  11. \def\ang#1{{$\langle$}{\it #1\/}{$\rangle$\/}}
  12. \def\flr#1{{$\lfloor$}{\it #1\/}{$\rfloor$\/}}
  13. \def\underlined#1{{$\underline{\hbox{#1}}$}}
  14. \def\metavar#1{{$\langle\!\langle$}{\it #1\/}{$\rangle\!\rangle$\/}}
  15. \def\metaparam#1{{$\langle\!\langle$}\param{#1}{$\rangle\!\rangle$\/}}
  16. % Abstract
  17. %!!! Barmar: Code font needs a bigger consing dot.
  18. \def\dummy{{$ $}}
  19. %% Couldn't figure out what's keeping this from working.
  20. %% For now I guess we'll just do without. -kmp 9-Sep-91
  21. %
  22. % \def\TTamp{{\tt\char'046}} % &
  23. % \def\TTpls{{\tt\char'053}} % +
  24. % \def\TTmin{{\tt\char'055}} % -
  25. % \def\TTstr{{\tt\char'052}} % *
  26. % \def\TTsls{{\tt\char`057}} % /
  27. % \def\TTeql{{\tt\char`075}} % =
  28. %
  29. % {\catcode'046=\active%
  30. % \catcode'053=\active\catcode'055=\active%
  31. % \catcode'052=\active\catcode'057=\active%
  32. % %\catcode'075=\active%
  33. % \gdef\clref{\bgroup%
  34. % \catcode'046=\active%
  35. % \catcode'053=\active\catcode'055=\active%
  36. % \catcode'052=\active\catcode'057=\active%
  37. % \catcode'075=\active%
  38. % \let&\TTamp%
  39. % \let+\TTpls%
  40. % \let-\TTmin%
  41. % \let*\TTstr%
  42. % \let/\TTsls%
  43. % \let\=\TTeql%
  44. % \xclref}}
  45. %
  46. % \def\xclref#1{\function #1\egroup}
  47. \def\clref#1{{\dummy}\hbox{{\function #1\/}}}
  48. \def\ttref#1{{\dummy}\hbox{{\tt #1\/}}}
  49. \def\kwd#1{\ttref{:#1}}
  50. \def\kwdref#1{\ttref{:#1}}
  51. \def\packref#1{\ttref{\uppercase{#1}}}
  52. \def\loopref{\ttref}
  53. \def\keyref#1{\clref{\&#1}}
  54. \def\typeref {\clref}
  55. \def\misc {\clref}
  56. \def\miscref {\clref}
  57. \def\declref {\clref}
  58. \def\funref {\clref}
  59. \def\macref {\clref}
  60. \def\specref {\clref}
  61. \def\conref {\clref}
  62. \def\varref {\clref}
  63. %\def\bogusterm#1{{\word $\underline{\hbox{#1\/}}$}}
  64. \def\bogusterm#1{#1}
  65. \def\newterm #1{{\bit #1\/}\idxterm{#1}}
  66. \def\newtermidx #1#2{{\bit #1\/}\idxterm{#2}}
  67. \def\term #1{{\word #1\/}}
  68. \def\param #1{{\arg #1\/}}
  69. %%%% ===== Sections =====
  70. \let\vv=\vtop
  71. \def\NoReturn{\EV\vrule height 8pt depth 2pt width 1pt}
  72. \def\Vtop #1{\setbox0=\vbox{#1}\dimen2=\ht0\setbox2=\null\dp2=\dp0\setbox0=\vv
  73. {\unvbox0}\advance\dimen1 by -\ht0\ht2=\dimen2\vadjust
  74. {\penalty 10000\box2}\dp0=0pt\box0}
  75. \def\Defmac #1 #2{{\let\vtop\Vtop\function #1 {\arg #2} \hfill}
  76. \Vskip\normalparskip!}
  77. \def\DefmacNoReturn #1 #2{{\let\vtop=\Vtop\function #1 {\arg #2}\quad\NoReturn\hfill}
  78. \Vskip\normalparskip!}
  79. \def\DefmacWithValuesNewline
  80. #1 #2 #3{{\let\vtop\Vtop\function #1 {\arg #2}\hfill\break
  81. \indent\quad\EV\ {\arg #3}}
  82. \Vskip\normalparskip!}
  83. \def\DefmacWithValues
  84. #1 #2 #3{{\let\vtop\Vtop\function #1 {\arg #2}\quad\EV\ {\arg #3}\hfill}
  85. \Vskip\normalparskip!}
  86. \def\Defun #1 #2{{\let\vtop=\Vtop\function #1 {\arg #2}\hfill}
  87. \Vskip\normalparskip!}
  88. \def\DefunWithValues
  89. #1 #2 #3{{\let\vtop=\Vtop\function #1 {\arg #2}\quad\EV\ {\arg #3}\hfill}
  90. \Vskip\normalparskip!}
  91. \def\DefunWithValuesNewline
  92. #1 #2 #3{{\let\vtop=\Vtop\function #1 {\arg #2}\hfill\break
  93. \indent\quad\EV\ {\arg #3}}
  94. \Vskip\normalparskip!}
  95. \def\DefunNoReturn
  96. #1 #2{{\let\vtop=\Vtop\function #1 {\arg #2}\quad
  97. \NoReturn\hfill}
  98. \Vskip\normalparskip!}
  99. \def\DefunMultiWithValues
  100. #1 #2 #3{{\let\vtop=\Vtop
  101. \def\entry##1{##1&\cr}
  102. \def\blankline{\vksip 5pt}
  103. \halign{\hskip\leftskip\function ## {\arg #1}\hfil&\quad\EV\ {\arg #2}##\cr#3}}
  104. \Vskip\normalparskip!}
  105. \def\DefunMultiAccessorWithValues
  106. #1 #2 #3 #4{{\let\vtop=\Vtop
  107. \def\blankline{\noalign{\vskip 5pt}}
  108. \hskip\leftskip\hbox{{\def\entry##1{##1&\cr}%
  109. \vbox{\halign{\function ## {\arg #1}\hfil&\quad\EV\ {\arg #2}##\cr#4}}}\qquad\vrule\qquad
  110. {\def\entry##1{##1\cr}%
  111. \vbox{\halign{\function (setf (## {\arg #1}) {\arg #3})\cr#4}}}}\hfill}
  112. \Vskip\normalparskip!}
  113. \def\Defsetf
  114. #1 #2 #3{{\let\vtop=\Vtop\function (setf (#1 {\arg #2}) {\arg #3})\hfill\break}
  115. \Vskip\normalparskip!}
  116. \def\DefsetfMulti
  117. #1 #2 #3{{\let\vtop=\Vtop
  118. \def\entry##1{##1\cr}
  119. \def\blankline{\vksip 5pt}
  120. \halign{\hskip\leftskip\function (setf (## {\arg #1}) {\arg #2})\hfil\cr#3}}
  121. \Vskip\normalparskip!}
  122. \def\Defgen
  123. #1 #2{{\let\vtop=\Vtop\function #1 {\arg #2}}
  124. \Vskip\normalparskip!}
  125. \def\DefgenWithValues
  126. #1 #2 #3{{\let\vtop=\Vtop\function #1 {\arg #2}\quad\EV\ {\arg #3}\hfill}
  127. \Vskip\normalparskip!}
  128. \def\DefgenWithValuesNewline
  129. #1 #2 #3{{\let\vtop=\Vtop\function #1 {\arg #2}}\hfill\break
  130. \indent\quad\EV\ {\arg #3}
  131. \Vskip\normalparskip!}
  132. \def\specparam#1#2{\paren{\param{#1} \typeref{#2}}}
  133. \def\Defmeth
  134. #1 #2{{\let\vtop=\Vtop\function #1 {\arg #2}}
  135. \Vskip\normalparskip!}
  136. \def\Defvar
  137. #1 {{\let\vtop=\Vtop\tt \ST#1\ST}
  138. \Vskip\normalparskip!}
  139. \def\Defvarnoast
  140. #1 {{\let\vtop=\Vtop\function #1}
  141. \Vskip\normalparskip!}
  142. \def\Defcon
  143. #1 {{\let\vtop=\Vtop\function #1}
  144. \Vskip\normalparskip!}
  145. \def\Defspec
  146. #1 #2 {{\let\vtop=\Vtop\function #1 {\arg #2} \hfill}
  147. \Vskip\normalparskip!}
  148. \def\DefspecNoReturn
  149. #1 #2 {{\let\vtop=\Vtop\function #1 {\arg #2}\quad
  150. \NoReturn\hfill}
  151. \Vskip\normalparskip!}
  152. \def\DefspecWithValues
  153. #1 #2 #3{{\let\vtop\Vtop\function #1 {\arg #2}\quad\EV\ {\arg #3}\hfill}
  154. \Vskip\normalparskip!}
  155. \def\DefspecWithValuesNewline
  156. #1 #2 #3{{\let\vtop\Vtop\function #1 {\arg #2}\hfill\break
  157. \indent\quad\EV\ {\arg #3}}
  158. \Vskip\normalparskip!}
  159. % \def\Deftype
  160. % #1 #2 {{\let\vtop=\Vtop\vbox{\halign{\hskip\leftskip{\tt ##}\hfil\cr#1}
  161. % \ifx{##}\empty\else\halign{\hskip\leftskip\hfil\i{##} ::$=$ &##\hfil\cr#2}}\fi}%\hfill\fi
  162. % \Vskip\normalparskip!}
  163. \def\Deftype#1#2{{\let\vtop=\Vtop%
  164. \halign{\hskip\leftskip{\tt (#1} {\arg ##\/}{\tt)}\hfil\cr#2\cr}\hfill}
  165. \Vskip\normalparskip!}
  166. \def\defFormat{\begingroup\catothers\catcode`\$=12\relax\doformat}
  167. \def\doformat
  168. #1 (#2) #3{\Vskip2pc!{#1}\hskip 2pc{\rm ({#2})}\hfill{#3}\par
  169. \endgroup
  170. \Vskip\normalparskip!}
  171. %%%% ===== Special Symbols =====
  172. % Subscripts
  173. \def\ssso{{${}\sub 1$}} % Sub 1
  174. \def\ssst{{${}\sub 2$}} % Sub 2
  175. \def\ssse{{${}\sub 8$}} % Sub 8
  176. \def\ssss{{${}\sub{16}$}} % Sub 16
  177. \def\sssi{{${}\sub i$}} % Sub i
  178. \def\sssk{{${}\sub k$}} % Sub k
  179. \def\sssn{{${}\sub n$}} % Sub n
  180. \def\sssx{{${}\sub x$}} % Sub x
  181. \def\sssy{{${}\sub y$}} % Sub y
  182. \def\sssz{{${}\sub z$}} % Sub z
  183. % Relations
  184. \def\EV{{\penalty20000}{$\rightarrow$}{\penalty20000}}
  185. \def\OV{{\penalty20000}{$\buildrel{or}\over\rightarrow$}{\penalty20000}}
  186. \def\NV{{\penalty20000}{$\buildrel{not}\over\rightarrow$}{\penalty20000}}
  187. \def\EQ{{\penalty20000}{$\equiv$}{\penalty20000}}
  188. % Contexts
  189. \def\OUT{{$\triangleright$}}
  190. \def\IN#1{{$\underline{\hbox{#1}}$}}
  191. % Characters
  192. \def\CRLF{{$\hookleftarrow$}}
  193. \def\NewlineChar{\ang{Newline}}
  194. \def\SpaceChar{\ang{Space}}
  195. \def\TabChar{\ang{Tab}}
  196. \def\ReturnChar{\ang{Return}}
  197. \def\LinefeedChar{\ang{Linefeed}}
  198. \def\BackspaceChar{\ang{Backspace}}
  199. \def\PageChar{\ang{Page}}
  200. \def\RuboutChar{\ang{Rubout}}
  201. \def\WhitespaceChar{\ang{Whitespace}}
  202. \def\bq{`}
  203. \def\ampersand{{\&}}
  204. \def\tilde{{$\sim$}}
  205. \def\bsl{{\tt {\char '134}}}
  206. \def\hat{{\setbox0\hbox{{\tt {\char '136}}}\hbox to \wd0{\lower 4pt\hbox{$^{^\wedge}$}}}}
  207. \def\lbr{{\tt {\char '173}}}
  208. \def\rbr{{\tt {\char '175}}}
  209. \def\dot{{\tt {\char '056}}}
  210. \def\surd{{\tt $\surd$}}
  211. \def\vert{{\tt {\char '174}}}
  212. \def\centerdot{{$\cdot$}}
  213. \def\underscore{{\\_}}
  214. \def\lbracket{{$\lbrack$}}
  215. \def\rbracket{{$\rbrack$}}
  216. \def\minussign{$-$}
  217. %%%% ===== BNF Notation =====
  218. \def\more#1{{\setbox0=\hbox{#1}\hbox to \wd0{\hfil}}}
  219. \def\star #1{#1{\rm *}}
  220. %\def\form {\curly{form}} % No longer used. -kmp 7-Feb-92
  221. %\def\place{\curly{place}} % No longer used. -kmp 7-Feb-92
  222. \def\paren #1{{\rm(}#1\/{\rm)}}
  223. \def\lparen{{\rm (}}
  224. \def\xparen{\more\lparen}
  225. \def\rparen{\/{\rm )}}
  226. \def\brac #1{{\rm[}#1\/{\rm]}}
  227. \def\lbrac{{\rm [}}
  228. \def\xbrac{\more\lbrac}
  229. \def\rbrac{\/{\rm ]}}
  230. \def\bbrac #1{\lower1pt\hbox{{\brfl[}\raise1pt\hbox{#1\/}{\brfl]}}}
  231. \def\ttbrac #1{{\tt[}#1\/{\tt]}}
  232. \def\lttbrac{{\tt [}}
  233. \def\xttbrac{\more\lttbrac}
  234. \def\rttbrac{\/{\tt ]}}
  235. \def\curly #1{{$\{$}#1\/{$\}$}}
  236. \def\lcurly{{$\{$}}
  237. \def\xcurly{\more\lcurly}
  238. \def\rcurly{\/{$\}$}}
  239. \def\plus #1{$\hbox{#1}^+$}
  240. \def\prevplus{$^+$}
  241. \def\upstar #1{$\hbox{#1}^*$}
  242. \def\one #1{$\hbox{#1}^1$}
  243. \def\placeplus{\plus{\curly{\param{place}}}}
  244. \def\begininterleave{{$\lbrack\!\lbrack\,$}}
  245. \def\extrainterleave{\more\begininterleave}
  246. \def\endinterleave{\/{$\,\rbrack\!\rbrack$}}
  247. \def\interleave#1{\begininterleave #1\/\endinterleave}
  248. %\def\DeclsAndDoc{\star{\curly{declaration $\vert$ documentation}}}
  249. \def\DeclsAndDoc{\interleave{\starparam{declaration} $\vert$ \param{documentation}}}
  250. \def\LocalDeclsAndDoc{\interleave{\starparam{local-declaration}
  251. $\vert$ \param{local-documentation}}}
  252. \def\down#1{$\downarrow$\param{#1}}
  253. \def\plusdown#1{\plus{\curly{\down{#1}}}}
  254. \def\plusparam#1{\plus{\curly{\param{#1}}}}
  255. \def\plusparen#1{\plus{\curly{\paren{#1}}}}
  256. \def\stardown#1{\star{\curly{\down{#1}}}}
  257. \def\starparam#1{\star{\curly{\param{#1}}}}
  258. \def\starparen#1{\star{\curly{\paren{#1}}}}
  259. \def\auxbnf#1#2{{\medbreak\vskip 4pt\def\CR{\cr\noalign{\penalty1000\vskip 4pt\penalty1000}&&}\arg
  260. \halign to \hsize{\hskip\leftskip\quad##&\hfil##& ##\hfil\cr
  261. &\param{#1}::$=$& #2\cr}}}
  262. %%%% ===== BNF Shorthand =====
  263. % var
  264. %
  265. % This exists so that some local contexts can override its definition.
  266. % TVar is mnemonic for Terminal Variable, and occurs only a place where
  267. % a list cannot be substituted.
  268. \def\GTVar{\param{var}}
  269. \def\GstarTVar{\starparam{var}}
  270. \let\TVar=\GTVar
  271. \let\starTVar=\GstarTVar
  272. % var | (var [specializer])
  273. \def\SpecializedVar{\curly{\param{var} | \paren{{\TVar} \brac{\param{specializer}}}}}
  274. % var | (var)
  275. \def\JustVar{\curly{\param{var} | \paren{\TVar}}}
  276. % var | (var [value])
  277. \def\VarValue{\curly{\param{var} | \paren{{\TVar} \brac{\param{init-form}}}}}
  278. % var | (var [init [supplied-p]])
  279. \def\VarValueSuppliedP{\curly{\param{var} |
  280. \paren{{\TVar} \brac{init-form \brac{supplied-p-parameter}}}}}
  281. % var | ({var | (keyword-name var)} [init [supplied-p]])
  282. \def\KeyVarValueSuppliedP{\curly{\param{var} |
  283. \paren{\curly{\param{var} |
  284. \paren{\param{keyword-name} {\TVar}}}
  285. \brac{init-form \brac{supplied-p-parameter}}}}}
  286. % var | ({var | (keyword-name var)} [init [supplied-p]])
  287. \def\JustKey{\curly{\param{var} | \paren{\curly{\param{var} |
  288. \paren{\param{keyword-name} {\TVar}}}}}}
  289. % var | (var [init [step]])
  290. \def\VarInitStep{\curly{\param{var} | \paren{{\TVar} \brac{init-form \brac{step-form}}}}}
  291. %%%% ==== Document-related Shorthand =====
  292. \def\Seefun #1{See the \term{function} \funref{#1}}
  293. \def\seefun #1{see the \term{function} \funref{#1}}
  294. \def\Seefuns #1{See the \term{functions} \funref{#1}}
  295. \def\seefuns #1{see the \term{functions} \funref{#1}}
  296. \def\Seespec #1{See the \term{special operator} \specref{#1}}
  297. \def\seespec #1{see the \term{special operator} \specref{#1}}
  298. \def\Seemac #1{See the \term{macro} \macref{#1}}
  299. \def\seemac #1{see the \term{macro} \macref{#1}}
  300. \def\Seevar #1{See the \term{variable} \varref{#1}}
  301. \def\seevar #1{see the \term{variable} \varref{#1}}
  302. \def\Seetype #1{See the \term{type} \typeref{#1}}
  303. \def\seetype #1{see the \term{type} \typeref{#1}}
  304. \def\Seemisc #1{See \miscref{#1}}
  305. \def\seemisc #1{see \miscref{#1}}
  306. \def\Seesection#1{See \secref#1}
  307. \def\seesection#1{see \secref#1}
  308. \def\Seechapter#1{See \chapref#1}
  309. \def\seechapter#1{see \chapref#1}
  310. \def\Seefigure#1{See \figref#1}
  311. \def\seefigure#1{see \figref#1}
  312. \def\Seeterm#1{See \term{#1}}
  313. \def\seeterm#1{see \term{#1}}
  314. \def\SeetermAlso#1{See also \term{#1}}
  315. \def\seetermAlso#1{see also \term{#1}}
  316. \def\noargs{\ang{no \term{arguments}}}
  317. \def\novalues{\ang{no \term{values}}}
  318. \def\eval{evaluated}
  319. \def\noeval{not evaluated}
  320. \def\evalspecial{evaluated as described below}
  321. \def\Thenextfigure{Figure {\chapno--\the\capno}}
  322. \def\thenextfigure{Figure {\chapno--\the\capno}}
  323. %% Apparently not used. -kmp 25-Apr-93
  324. %\def\index #1{{\tt #1}}
  325. \def\code{\screen!}
  326. \def\endcode{\endscreen!}
  327. \newif \ifeditornotes \editornotestrue % might be overridden in setup-options
  328. \def\editornote#1{\ifeditornotes{\bf\lbr{#1}\rbr}\fi\ignorespaces}
  329. \def\reviewer#1{\ifeditornotes{\bf\lbr{#1}\rbr}\fi\ignorespaces}
  330. %%%%% ===== Glossary =====
  331. % Webster's pronunciation support
  332. \def\miscaccent{{\vrule width 1pt height 2pt depth 2pt}}
  333. \def\loaccent{{$\,$\miscaccent$\,$}}
  334. \def\hiaccent{{$\,$\raise 6pt\hbox{\loaccent}$\,$}}
  335. \def\medaccent{{$\,$\miscaccent\kern -1pt\raise 6pt\hbox{\miscaccent}$\,$}}
  336. \def\maybeStress#1{{\medaccent}#1}
  337. \def\Stress#1{{\hiaccent}#1}
  338. \def\stress#1{{\loaccent}#1}
  339. \def\harda{\=a}
  340. \def\nasala{\^a}
  341. \def\softa{\"a}
  342. \def\harde{\=e}
  343. \def\hardi{\=\dotlessi}
  344. \def\hardo{\=o}
  345. \def\hardp{\=p}
  346. \def\nasalo{\^o}
  347. \def\th{$\rlap{th}/$}
  348. \def\softoo{{\edef\next{\the\font}\setbox0=\hbox{\the\mifive\accent"5E}\setbox1=\hbox{\next oo}\dimen255=.5\wd1\advance\dimen255 by -.5\wd0\vbox{\moveright\dimen255\hbox{\lower 30pt\copy0}\copy1}}}
  349. \def\hardoo{{\edef\next{\the\font}\setbox0=\hbox{\the\textfont0\accent"7B}\setbox1=\hbox{\next oo}\dimen255=.5\wd1\advance\dimen255 by -.65\wd0\vbox{\moveright\dimen255\hbox{\lower 20pt\copy0}\copy1}}}
  350. \def\reducede{{$\epsilon$}}
  351. \def\lightaccent{{\rm '}}
  352. \def\schwa{{$\epsilon$}}
  353. \def\TypographyCaveats{,
  354. except that ``{\schwa}'' is used to notate the schwa (upside-down ``e'') character}
  355. \def\pronounced#1{$\lbrack\thinspace\hbox{\b{#1}}\thinspace\rbrack$}
  356. \def\meaning#1{$\sub{#1}$}