| 1 |
% Macros for The TeXbook |
| 2 |
|
| 3 |
\catcode`@=11 % borrow the private macros of PLAIN (with care) |
| 4 |
|
| 5 |
\font\tentex=cmtex10 |
| 6 |
|
| 7 |
\font\inchhigh=cminch |
| 8 |
\font\titlefont=cmssdc10 at 40pt |
| 9 |
|
| 10 |
\font\ninerm=cmr9 |
| 11 |
\font\eightrm=cmr8 |
| 12 |
\font\sixrm=cmr6 |
| 13 |
|
| 14 |
\font\ninei=cmmi9 |
| 15 |
\font\eighti=cmmi8 |
| 16 |
\font\sixi=cmmi6 |
| 17 |
\skewchar\ninei='177 \skewchar\eighti='177 \skewchar\sixi='177 |
| 18 |
|
| 19 |
\font\ninesy=cmsy9 |
| 20 |
\font\eightsy=cmsy8 |
| 21 |
\font\sixsy=cmsy6 |
| 22 |
\skewchar\ninesy='60 \skewchar\eightsy='60 \skewchar\sixsy='60 |
| 23 |
|
| 24 |
\font\eightss=cmssq8 |
| 25 |
|
| 26 |
\font\eightssi=cmssqi8 |
| 27 |
|
| 28 |
\font\ninebf=cmbx9 |
| 29 |
\font\eightbf=cmbx8 |
| 30 |
\font\sixbf=cmbx6 |
| 31 |
|
| 32 |
\font\ninett=cmtt9 |
| 33 |
\font\eighttt=cmtt8 |
| 34 |
|
| 35 |
\hyphenchar\tentt=-1 % inhibit hyphenation in typewriter type |
| 36 |
\hyphenchar\ninett=-1 |
| 37 |
\hyphenchar\eighttt=-1 |
| 38 |
|
| 39 |
\font\ninesl=cmsl9 |
| 40 |
\font\eightsl=cmsl8 |
| 41 |
|
| 42 |
\font\nineit=cmti9 |
| 43 |
\font\eightit=cmti8 |
| 44 |
|
| 45 |
\font\tenu=cmu10 % unslanted text italic |
| 46 |
\font\magnifiedfiverm=cmr5 at 10pt |
| 47 |
\font\manual=manfnt % font used for the METAFONT logo, etc. |
| 48 |
\font\cmman=cmman % font used for miscellaneous Computer Modern variations |
| 49 |
|
| 50 |
\newskip\ttglue |
| 51 |
\def\tenpoint{\def\rm{\fam0\tenrm}% |
| 52 |
\textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm |
| 53 |
\textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei |
| 54 |
\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy |
| 55 |
\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex |
| 56 |
\def\it{\fam\itfam\tenit}% |
| 57 |
\textfont\itfam=\tenit |
| 58 |
\def\sl{\fam\slfam\tensl}% |
| 59 |
\textfont\slfam=\tensl |
| 60 |
\def\bf{\fam\bffam\tenbf}% |
| 61 |
\textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf |
| 62 |
\scriptscriptfont\bffam=\fivebf |
| 63 |
\def\tt{\fam\ttfam\tentt}% |
| 64 |
\textfont\ttfam=\tentt |
| 65 |
\tt \ttglue=.5em plus.25em minus.15em |
| 66 |
\normalbaselineskip=12pt |
| 67 |
\def\MF{{\manual META}\-{\manual FONT}}% |
| 68 |
\let\sc=\eightrm |
| 69 |
\let\big=\tenbig |
| 70 |
\setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}% |
| 71 |
\normalbaselines\rm} |
| 72 |
|
| 73 |
\def\ninepoint{\def\rm{\fam0\ninerm}% |
| 74 |
\textfont0=\ninerm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm |
| 75 |
\textfont1=\ninei \scriptfont1=\sixi \scriptscriptfont1=\fivei |
| 76 |
\textfont2=\ninesy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy |
| 77 |
\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex |
| 78 |
\def\it{\fam\itfam\nineit}% |
| 79 |
\textfont\itfam=\nineit |
| 80 |
\def\sl{\fam\slfam\ninesl}% |
| 81 |
\textfont\slfam=\ninesl |
| 82 |
\def\bf{\fam\bffam\ninebf}% |
| 83 |
\textfont\bffam=\ninebf \scriptfont\bffam=\sixbf |
| 84 |
\scriptscriptfont\bffam=\fivebf |
| 85 |
\def\tt{\fam\ttfam\ninett}% |
| 86 |
\textfont\ttfam=\ninett |
| 87 |
\tt \ttglue=.5em plus.25em minus.15em |
| 88 |
\normalbaselineskip=11pt |
| 89 |
\def\MF{{\manual hijk}\-{\manual lmnj}}% |
| 90 |
\let\sc=\sevenrm |
| 91 |
\let\big=\ninebig |
| 92 |
\setbox\strutbox=\hbox{\vrule height8pt depth3pt width\z@}% |
| 93 |
\normalbaselines\rm} |
| 94 |
|
| 95 |
\def\eightpoint{\def\rm{\fam0\eightrm}% |
| 96 |
\textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm |
| 97 |
\textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei |
| 98 |
\textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy |
| 99 |
\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex |
| 100 |
\def\it{\fam\itfam\eightit}% |
| 101 |
\textfont\itfam=\eightit |
| 102 |
\def\sl{\fam\slfam\eightsl}% |
| 103 |
\textfont\slfam=\eightsl |
| 104 |
\def\bf{\fam\bffam\eightbf}% |
| 105 |
\textfont\bffam=\eightbf \scriptfont\bffam=\sixbf |
| 106 |
\scriptscriptfont\bffam=\fivebf |
| 107 |
\def\tt{\fam\ttfam\eighttt}% |
| 108 |
\textfont\ttfam=\eighttt |
| 109 |
\tt \ttglue=.5em plus.25em minus.15em |
| 110 |
\normalbaselineskip=9pt |
| 111 |
\def\MF{{\manual opqr}\-{\manual stuq}}% |
| 112 |
\let\sc=\sixrm |
| 113 |
\let\big=\eightbig |
| 114 |
\setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}% |
| 115 |
\normalbaselines\rm} |
| 116 |
|
| 117 |
\def\tenmath{\tenpoint\fam-1 } % use after $ in ninepoint sections |
| 118 |
\def\tenbig#1{{\hbox{$\left#1\vbox to8.5pt{}\right.\n@space$}}} |
| 119 |
\def\ninebig#1{{\hbox{$\textfont0=\tenrm\textfont2=\tensy |
| 120 |
\left#1\vbox to7.25pt{}\right.\n@space$}}} |
| 121 |
\def\eightbig#1{{\hbox{$\textfont0=\ninerm\textfont2=\ninesy |
| 122 |
\left#1\vbox to6.5pt{}\right.\n@space$}}} |
| 123 |
|
| 124 |
% Page layout |
| 125 |
\newdimen\pagewidth \newdimen\pageheight \newdimen\ruleht |
| 126 |
\hsize=29pc \vsize=44pc \maxdepth=2.2pt \parindent=3pc |
| 127 |
\pagewidth=\hsize \pageheight=\vsize \ruleht=.5pt |
| 128 |
\abovedisplayskip=6pt plus 3pt minus 1pt |
| 129 |
\belowdisplayskip=6pt plus 3pt minus 1pt |
| 130 |
\abovedisplayshortskip=0pt plus 3pt |
| 131 |
\belowdisplayshortskip=4pt plus 3pt |
| 132 |
|
| 133 |
%\newinsert\footins |
| 134 |
\def\footnote#1{\edef\@sf{\spacefactor\the\spacefactor}#1\@sf |
| 135 |
\insert\footins\bgroup\eightpoint |
| 136 |
\interlinepenalty100 \let\par=\endgraf |
| 137 |
\leftskip=\z@skip \rightskip=\z@skip |
| 138 |
\splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000 |
| 139 |
\smallskip\item{#1}\bgroup\strut\aftergroup\@foot\let\next} |
| 140 |
\skip\footins=12pt plus 2pt minus 4pt % space added when footnote is present |
| 141 |
%\count\footins=1000 % footnote magnification factor (1 to 1) |
| 142 |
\dimen\footins=30pc % maximum footnotes per page |
| 143 |
|
| 144 |
\newinsert\margin |
| 145 |
\dimen\margin=\maxdimen |
| 146 |
%\count\margin=0 \skip\margin=0pt % marginal inserts take up no space |
| 147 |
|
| 148 |
\newif\iftitle |
| 149 |
\def\titlepage{\global\titletrue} % for pages without headlines |
| 150 |
\def\rhead{} % \rhead contains the running headline |
| 151 |
|
| 152 |
\def\leftheadline{\hbox to \pagewidth{\spaceskip=0pt |
| 153 |
\vbox to 10pt{}% strut to position the baseline |
| 154 |
\llap{\tenbf\folio\kern1pc}% folio to left of text |
| 155 |
\tenit\rhead\hfil% running head flush left |
| 156 |
}} |
| 157 |
\def\rightheadline{\hbox to \pagewidth{\spaceskip=0pt |
| 158 |
\vbox to 10pt{}% strut to position the baseline |
| 159 |
\hfil\tenit\rhead\/% running head flush right |
| 160 |
\rlap{\kern1pc\tenbf\folio}% folio to right of text |
| 161 |
}} |
| 162 |
|
| 163 |
\def\onepageout#1{\shipout\vbox{ % here we define one page of output |
| 164 |
\offinterlineskip % butt the boxes together |
| 165 |
\vbox to 3pc{ % this part goes on top of the 44pc pages |
| 166 |
\iftitle % the next is used for title pages |
| 167 |
\global\titlefalse % reset the titlepage switch |
| 168 |
\setcornerrules % for camera alignment |
| 169 |
\else\ifodd\pageno \rightheadline\else\leftheadline\fi\fi |
| 170 |
\vfill} % this completes the \vbox to 3pc |
| 171 |
\vbox to \pageheight{ |
| 172 |
\ifvoid\margin\else % marginal info is present |
| 173 |
\rlap{\kern31pc\vbox to\z@{\kern4pt\box\margin \vss}}\fi |
| 174 |
#1 % now insert the main information |
| 175 |
\ifvoid\footins\else % footnote info is present |
| 176 |
\vskip\skip\footins \kern-3pt |
| 177 |
\hrule height\ruleht width\pagewidth \kern-\ruleht \kern3pt |
| 178 |
\unvbox\footins\fi |
| 179 |
\boxmaxdepth=\maxdepth |
| 180 |
} % this completes the \vbox to \pageheight |
| 181 |
} |
| 182 |
\advancepageno} |
| 183 |
|
| 184 |
\def\setcornerrules{\hbox to \pagewidth{\vrule width 1pc height\ruleht |
| 185 |
\hfil \vrule width 1pc} |
| 186 |
\hbox to \pagewidth{\llap{\sevenrm(page \folio)\kern1pc}% |
| 187 |
\vrule height1pc width\ruleht depth\z@ |
| 188 |
\hfil \vrule width\ruleht depth\z@}} |
| 189 |
|
| 190 |
\output{\onepageout{\unvbox255}} |
| 191 |
|
| 192 |
\newbox\partialpage |
| 193 |
\def\begindoublecolumns{\begingroup |
| 194 |
\output={\global\setbox\partialpage=\vbox{\unvbox255\bigskip}}\eject |
| 195 |
\output={\doublecolumnout} \hsize=14pc \vsize=89pc} |
| 196 |
\def\enddoublecolumns{\output={\balancecolumns}\eject |
| 197 |
\endgroup \pagegoal=\vsize} |
| 198 |
|
| 199 |
\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 200 |
\dimen@=44pc \advance\dimen@ by-\ht\partialpage |
| 201 |
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ |
| 202 |
\onepageout\pagesofar |
| 203 |
\unvbox255 \penalty\outputpenalty} |
| 204 |
\def\pagesofar{\unvbox\partialpage |
| 205 |
\wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} |
| 206 |
\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0 |
| 207 |
\advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip |
| 208 |
\divide\dimen@ by2 \splittopskip=\topskip |
| 209 |
{\vbadness=10000 \loop \global\setbox3=\copy0 |
| 210 |
\global\setbox1=\vsplit3 to\dimen@ |
| 211 |
\ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat} |
| 212 |
\setbox0=\vbox to\dimen@{\unvbox1} |
| 213 |
\setbox2=\vbox to\dimen@{\unvbox3} |
| 214 |
\pagesofar} |
| 215 |
|
| 216 |
% To produce only a subset of pages, put the page numbers on separate |
| 217 |
% lines in a file called pages.tex |
| 218 |
\let\Shipout=\shipout |
| 219 |
\newread\pages \newcount\nextpage \openin\pages=pages |
| 220 |
\def\getnextpage{\ifeof\pages\else |
| 221 |
{\endlinechar=-1\read\pages to\next |
| 222 |
\ifx\next\empty % in this case we should have eof now |
| 223 |
\else\global\nextpage=\next\fi}\fi} |
| 224 |
\ifeof\pages\else\message{OK, I'll ship only the requested pages!} |
| 225 |
\getnextpage\fi |
| 226 |
\def\shipout{\ifeof\pages\let\next=\Shipout |
| 227 |
\else\ifnum\pageno=\nextpage\getnextpage\let\next=\Shipout |
| 228 |
\else\let\next=\Tosspage\fi\fi \next} |
| 229 |
\newbox\garbage \def\Tosspage{\deadcycles=0\setbox\garbage=} |
| 230 |
|
| 231 |
% Chapter formatting |
| 232 |
% The preface and table of contents are formatted in place, not here |
| 233 |
|
| 234 |
\newcount\exno % for the number of exercises in the current chapter |
| 235 |
\newcount\subsecno % for the number of subsections in the current chapter |
| 236 |
|
| 237 |
\def\beginchapter#1 #2#3. #4\par{\global\exno=0 |
| 238 |
\subsecno=0 |
| 239 |
\def\chapno{#2#3} |
| 240 |
\ifodd\pageno |
| 241 |
\errmessage{You had too much text on that last page; I'm backing up} |
| 242 |
\advance\pageno by-1 \fi |
| 243 |
\titlepage |
| 244 |
\def\\{ } % \\'s in the title will be treated as spaces |
| 245 |
\message{#1 #2#3:} % show the chapter title on the terminal |
| 246 |
\def\MF{{\manual 89:;<=>:}} % slant the logo |
| 247 |
\xdef\rhead{#1 #2#3: #4\unskip} |
| 248 |
{\def\TeX{T\kern-.2em\lower.5ex\hbox{E}\kern-.06em X} |
| 249 |
\def\MF{{\vbox to30pt{}\manual ()*+,-.*}} |
| 250 |
\def\\{#3} \advance\hsize by -18mm |
| 251 |
\ifx\empty\\ \rightline{\inchhigh #2\kern-.04em} |
| 252 |
\else\rightline{\inchhigh #2\kern-.06em#3\kern-.04em}\fi |
| 253 |
\vskip 1.75pc |
| 254 |
\baselineskip 36pt \lineskiplimit \titlelsl \lineskip 12pt |
| 255 |
\let\\=\cr % now the \\'s are line dividers |
| 256 |
\halign{\line{\titlefont\hss##}\\#4\unskip\\} |
| 257 |
\vfill\eject} % output the chapter title page |
| 258 |
\tenpoint |
| 259 |
\noindent\ignorespaces} % the first paragraph of a chapter is not indented |
| 260 |
\newdimen\titlelsl \titlelsl=1pt |
| 261 |
|
| 262 |
\outer\def\endchapter{\ifodd\pageno \else\vfill\eject\null\fi |
| 263 |
\begingroup\bigskip\vfill % beginning of the quotes |
| 264 |
\def\eject{\endgroup\eject} |
| 265 |
\def\par{\ifhmode\/\endgraf\fi}\obeylines |
| 266 |
\def\TeX{T\kern-.2em\lower.5ex\hbox{E}\kern-.000em X} |
| 267 |
\def\MF{{\manual opqr}\-{\manual stuq}} |
| 268 |
\eightpoint \let\tt=\ninett |
| 269 |
\baselineskip 10pt |
| 270 |
\parfillskip \z@ |
| 271 |
\interlinepenalty 10000 |
| 272 |
\leftskip \z@ plus 40pc minus \parindent |
| 273 |
\let\rm=\eightss \let\sl=\eightssi |
| 274 |
\everypar{\sl}} |
| 275 |
\def\author#1(#2){\smallskip\noindent\rm--- #1\unskip\enspace(#2)} |
| 276 |
|
| 277 |
\def\dbend{{\manual\char127}} % dangerous bend sign |
| 278 |
\def\d@nger{\medbreak\begingroup\clubpenalty=10000 |
| 279 |
\def\par{\endgraf\endgroup\medbreak} \noindent\hang\hangafter=-2 |
| 280 |
\hbox to0pt{\hskip-\hangindent\dbend\hfill}\ninepoint} |
| 281 |
\outer\def\danger{\d@nger} |
| 282 |
\def\dd@nger{\medbreak\begingroup\clubpenalty=10000 |
| 283 |
\def\par{\endgraf\endgroup\medbreak} \noindent\hang\hangafter=-2 |
| 284 |
\hbox to0pt{\hskip-\hangindent\dbend\kern1pt\dbend\hfill}\ninepoint} |
| 285 |
\outer\def\ddanger{\dd@nger} |
| 286 |
\def\enddanger{\endgraf\endgroup} % omits the \medbreak |
| 287 |
|
| 288 |
\outer\def\subsection#1. {\medbreak\advance\subsecno by 1 |
| 289 |
\noindent{\it \the\subsecno.\enspace#1.\enspace}} |
| 290 |
\def\ansno#1.#2:{\medbreak\noindent |
| 291 |
\hbox to\parindent{\bf\hss#1.#2.\enspace}\ignorespaces} |
| 292 |
|
| 293 |
% Composition macros |
| 294 |
\hyphenation{man-u-script man-u-scripts ap-pen-dix xscaled} |
| 295 |
|
| 296 |
\def\AmSTeX{$\cal A\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.075em |
| 297 |
S$-\TeX} |
| 298 |
\def\bull{\vrule height .9ex width .8ex depth -.1ex } % square bullet |
| 299 |
\def\SS{{\it SS}} % scriptscript style |
| 300 |
\def\|{\leavevmode\hbox{\tt\char`\|}} % vertical line |
| 301 |
\def\dn{\leavevmode\hbox{\tt\char'14}} % downward arrow |
| 302 |
\def\up{\leavevmode\hbox{\tt\char'13}} % upward arrow |
| 303 |
\def\]{\leavevmode\hbox{\tt\char`\ }} % visible space |
| 304 |
|
| 305 |
\def\pt{\,{\rm pt}} % units of points, in math formulas |
| 306 |
\def\em{\,{\rm em}} % units of ems, in math formulas |
| 307 |
\def\<#1>{\leavevmode\hbox{$\langle$#1\/$\rangle$}} % syntactic quantity |
| 308 |
\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant |
| 309 |
\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant |
| 310 |
\def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt |
| 311 |
\hbox{\vphantom{\tt/}\thinspace{\tt#1}\thinspace}} |
| 312 |
\kern1pt\hrule}\vrule}\thinspace} % control sequence token |
| 313 |
|
| 314 |
{\obeyspaces\gdef {\ }} |
| 315 |
\def\parbreak{\hfil\break\indent\strut} |
| 316 |
\def\stretch{\nobreak\hskip0pt plus2pt\relax} |
| 317 |
|
| 318 |
% macros for non-centered displays |
| 319 |
\outer\def\begindisplay{\obeylines\startdisplay} |
| 320 |
{\obeylines\gdef\startdisplay#1 |
| 321 |
{\catcode`\^^M=5$$#1\halign\bgroup\indent##\hfil&&\qquad##\hfil\cr}} |
| 322 |
\outer\def\enddisplay{\crcr\egroup$$} |
| 323 |
|
| 324 |
% (the following \begin...\end-type macros do not appear in Appendix E) |
| 325 |
% macros for demonstrating math constructions |
| 326 |
\outer\def\beginmathdemo{$$\advance\baselineskip by2pt |
| 327 |
\halign\bgroup\indent\hbox to 160pt{##\hfil}&$##$\hfil\cr\noalign{\vskip-2pt}} |
| 328 |
\outer\def\begindisplaymathdemo {$$\advance\baselineskip by15pt |
| 329 |
\halign\bgroup\indent\hbox to 160pt{##\hfil}&$\displaystyle{##}$\hfil\cr |
| 330 |
\noalign{\vskip-15pt}} |
| 331 |
\outer\def\beginlongmathdemo{$$\advance\baselineskip by2pt |
| 332 |
\halign\bgroup\indent\hbox to 210pt{##\hfil}&$##$\hfil\cr\noalign{\vskip-2pt}} |
| 333 |
\outer\def\beginlongdisplaymathdemo {$$\advance\baselineskip by15pt |
| 334 |
\halign\bgroup\indent\hbox to 210pt{##\hfil}&$\displaystyle{##}$\hfil\cr |
| 335 |
\noalign{\vskip-15pt}} |
| 336 |
\outer\def\endmathdemo{\egroup$$} |
| 337 |
|
| 338 |
% macros for font tables |
| 339 |
\def\oddline#1{\cr |
| 340 |
\noalign{\nointerlineskip} |
| 341 |
\multispan{19}\hrulefill& |
| 342 |
\setbox0=\hbox{\lower 2.3pt\hbox{\hex{#1x}}}\smash{\box0}\cr |
| 343 |
\noalign{\nointerlineskip}} |
| 344 |
\def\evenline{\cr\noalign{\hrule}} |
| 345 |
\def\chartstrut{\lower4.5pt\vbox to14pt{}} |
| 346 |
\def\beginchart#1{$$\postdisplaypenalty=-10000 \global\count@=0 #1 |
| 347 |
\halign to\hsize\bgroup |
| 348 |
\chartstrut##\tabskip0pt plus10pt& |
| 349 |
&\hfil##\hfil&\vrule##\cr |
| 350 |
\lower6.5pt\null |
| 351 |
&&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline} |
| 352 |
\def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B& |
| 353 |
&\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$} |
| 354 |
\def\:{\setbox0=\hbox{\char\count@}% |
| 355 |
\ifdim\ht0>7.5pt\reposition |
| 356 |
\else\ifdim\dp0>2.5pt\reposition\fi\fi |
| 357 |
\box0\global\advance\count@ by1 } |
| 358 |
\def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}} |
| 359 |
\def\normalchart{% |
| 360 |
&\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0 |
| 361 |
&\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 362 |
&\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1 |
| 363 |
&\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 364 |
&\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2 |
| 365 |
&\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 366 |
&\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3 |
| 367 |
&\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 368 |
&\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4 |
| 369 |
&\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 370 |
&\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5 |
| 371 |
&\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 372 |
&\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6 |
| 373 |
&\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 374 |
&\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7 |
| 375 |
&\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline} |
| 376 |
|
| 377 |
% (now Appendix E resumes again) |
| 378 |
% macros for verbatim scanning |
| 379 |
\chardef\other=12 |
| 380 |
\def\ttverbatim{\begingroup |
| 381 |
\catcode`\\=\other |
| 382 |
\catcode`\{=\other |
| 383 |
\catcode`\}=\other |
| 384 |
\catcode`\$=\other |
| 385 |
\catcode`\&=\other |
| 386 |
\catcode`\#=\other |
| 387 |
\catcode`\%=\other |
| 388 |
\catcode`\~=\other |
| 389 |
\catcode`\_=\other |
| 390 |
\catcode`\^=\other |
| 391 |
\obeyspaces \obeylines \tt} |
| 392 |
|
| 393 |
\outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=\z@ |
| 394 |
\catcode`\|=0 \rightskip-5pc \ttfinish} |
| 395 |
{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character |
| 396 |
|obeylines % end of line is active |
| 397 |
|gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}} |
| 398 |
|
| 399 |
\catcode`\|=\active |
| 400 |
{\obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\ \let|=\endgroup}} |
| 401 |
|
| 402 |
% macros for syntax rules (again, not in Appendix E) |
| 403 |
\def\[#1]{\silenttrue\xref|#1|\thinspace{\tt#1}\thinspace} % keyword in syntax |
| 404 |
\def\beginsyntax{\endgraf\nobreak\medskip |
| 405 |
\begingroup \catcode`<=13 \catcode`[=13 |
| 406 |
\let\par=\endsyntaxline \obeylines} |
| 407 |
\def\endsyntaxline{\futurelet\next\syntaxswitch} |
| 408 |
\def\syntaxswitch{\ifx\next\<\let\next=\syntaxrule |
| 409 |
\else\ifx\next\endsyntax\let\next=\endgroup |
| 410 |
\else\let\next=\continuerule\fi\fi \next} |
| 411 |
\def\continuerule{\hfil\break\indent\qquad} |
| 412 |
\def\endsyntax{\medbreak\noindent} |
| 413 |
{\catcode`<=13 \catcode`[=13 |
| 414 |
\global\let<=\< \global\let[=\[ |
| 415 |
\gdef\syntaxrule<#1>{\endgraf\indent\silentfalse\xref\<#1>}} |
| 416 |
\def\is{\ $\longrightarrow$ } |
| 417 |
\def\alt{\ $\vert$ } |
| 418 |
|
| 419 |
% macros to demarcate lines quoted from TeX source files |
| 420 |
\def\beginlines{\par\begingroup\nobreak\medskip\parindent\z@ \obeylines |
| 421 |
\hrule\kern1pt\nobreak \everypar{\strut}} |
| 422 |
\def\endlines{\kern1pt\hrule\endgroup\medbreak\noindent} |
| 423 |
\def\weakendlines{\kern1pt\hrule\endgroup\medskip\noindent} |
| 424 |
\def\finalendlines{\kern1pt\hrule\endgroup\medbreak} |
| 425 |
|
| 426 |
\outer\def\exercise{\medbreak |
| 427 |
\global\advance\exno by 1 |
| 428 |
\noindent\llap{\manual\char'170\rm\kern.15em}% triangle in margin |
| 429 |
{\ninebf EXERCISE \bf\chapno.\the\exno}\par\nobreak\noindent} |
| 430 |
\def\dexercise{\global\advance\exno by 1 |
| 431 |
\llap{\manual\char'170\rm\kern.15em}% triangle in indented space |
| 432 |
{\eightbf EXERCISE \bf\chapno.\the\exno}\hfil\break} |
| 433 |
\outer\def\dangerexercise{\d@nger \dexercise} |
| 434 |
\outer\def\ddangerexercise{\dd@nger \dexercise} |
| 435 |
|
| 436 |
\newwrite\ans |
| 437 |
\immediate\openout\ans=answers % file for answers to exercises |
| 438 |
\outer\def\answer{\par\medbreak |
| 439 |
\immediate\write\ans{} |
| 440 |
\immediate\write\ans{\string\ansno\chapno.\the\exno:} |
| 441 |
\copytoblankline} |
| 442 |
\def\copytoblankline{\begingroup\setupcopy\copyans} |
| 443 |
\def\setupcopy{\def\do##1{\catcode`##1=\other}\dospecials |
| 444 |
\catcode`\|=\other \obeylines} |
| 445 |
{\obeylines \gdef\copyans#1 |
| 446 |
{\def\next{#1}% |
| 447 |
\ifx\next\empty\let\next=\endgroup % |
| 448 |
\else\immediate\write\ans{\next} \let\next=\copyans\fi\next}} |
| 449 |
|
| 450 |
% Editorial notes: some things to watch for. |
| 451 |
|
| 452 |
% f |\ and f ^|\ => insert \/ [e.g., if\/ |\hbox|...] |
| 453 |
% appendi => check for \null [e.g., Appendix~B\null.] |
| 454 |
% ly- => the hyphen is probably omittable |
| 455 |
% ''. and '', => transpose to .'' and ,'' |
| 456 |
% dgement => dgment |
| 457 |
% in MFbook: f@' and \MF, and \MF. |
| 458 |
|
| 459 |
% Macros for drawing figures (not in Appendix E) |
| 460 |
\def\hidehrule#1#2{\kern-#1\hrule height#1 depth#2 \kern-#2 } |
| 461 |
\def\hidevrule#1#2{\kern-#1{\dimen0=#1 |
| 462 |
\advance\dimen0 by#2\vrule width\dimen0}\kern-#2 } |
| 463 |
% \makeblankbox puts rules at the edges of a blank box |
| 464 |
% whose dimensions are those of \box0 (assuming nonnegative wd,ht,dp) |
| 465 |
% #1 is rule thickness outside, #2 is rule thickness inside |
| 466 |
\def\makeblankbox#1#2{\hbox{\lower\dp0\vbox{\hidehrule{#1}{#2}% |
| 467 |
\kern-#1% overlap the rules at the corners |
| 468 |
\hbox to\wd0{\hidevrule{#1}{#2}% |
| 469 |
\raise\ht0\vbox to #1{}% set the vrule height |
| 470 |
\lower\dp0\vtop to #1{}% set the vrule depth |
| 471 |
\hfil\hidevrule{#2}{#1}}% |
| 472 |
\kern-#1\hidehrule{#2}{#1}}}} |
| 473 |
\def\maketypebox{\makeblankbox{0pt}{1pt}} |
| 474 |
\def\makelightbox{\makeblankbox{.2pt}{.2pt}} |
| 475 |
|
| 476 |
% \box\bigdot is a null box with a bullet at its reference point |
| 477 |
\newbox\bigdot \newbox\smalldot |
| 478 |
\setbox0=\hbox{$\vcenter{}$} % \ht0 is the axis height |
| 479 |
\setbox1=\hbox to\z@{$\hss\bullet\hss$} % bullet is centered on the axis |
| 480 |
\setbox\bigdot=\vbox to\z@{\kern-\ht1 \kern\ht0 \box1 \vss} |
| 481 |
\setbox1=\hbox to\z@{$\hss\cdot\hss$} % cdot is centered on the axis |
| 482 |
\setbox\smalldot=\vbox to\z@{\kern-\ht1 \kern\ht0 \box1 \vss} |
| 483 |
|
| 484 |
% \arrows makes things like <--- text ---> |
| 485 |
\def\arrows#1#2{% #1=width, #2=text |
| 486 |
{\setbox0=\hbox{$\mkern-2mu\mathord-\mkern-2mu$} |
| 487 |
\hbox to #1{\kern-.055556em$\leftarrow\mkern-6mu$% |
| 488 |
\cleaders\copy0\hfil |
| 489 |
\kern.4em #2\kern.4em |
| 490 |
\cleaders\copy0\hfil |
| 491 |
$\mkern-6mu\rightarrow$\kern-.055556em}}} |
| 492 |
|
| 493 |
% \samplebox makes the outline of a box, with big dot at reference point |
| 494 |
\def\samplebox#1#2#3#4{% #1=ht, #2=dp, #3=wd, #4=text |
| 495 |
{\setbox0=\vtop{\vbox to #1{\hbox to #3{}\vss} |
| 496 |
\nointerlineskip |
| 497 |
\vbox to #2{}}% now \box0 has the desired ht, dp, and wd |
| 498 |
\hbox{\copy\bigdot |
| 499 |
\vrule height.2pt depth.2pt width#3% |
| 500 |
\kern-#3% |
| 501 |
\makelightbox |
| 502 |
\kern-#3% |
| 503 |
\raise#1\vbox{\hbox to #3{\hss#4\hss} |
| 504 |
\kern 3pt}}}} |
| 505 |
|
| 506 |
% \sampleglue makes glue between sample boxes |
| 507 |
\newdimen\varunit |
| 508 |
\varunit=\hsize \advance\varunit by-2\parindent |
| 509 |
\divide\varunit by 58 % illustrations in Chapter 12 |
| 510 |
\def\sampleglue#1#2{% #1=width, #2=text |
| 511 |
\vtop{\hbox to #1{\xleaders\hbox to .5\varunit{\hss\copy\smalldot\hss}\hfil} |
| 512 |
\kern3pt |
| 513 |
\tabskip \z@ plus 1fil |
| 514 |
\halign to #1{\hfil##\cr#2\cr}}} |
| 515 |
|
| 516 |
% Indexing macros |
| 517 |
\newif\ifproofmode |
| 518 |
\proofmodetrue % this should be false when making camera-ready copy |
| 519 |
\newwrite\inx |
| 520 |
\immediate\openout\inx=index % file for index reminders |
| 521 |
\newif\ifsilent |
| 522 |
\def\specialhat{\ifmmode\def\next{^}\else\let\next=\beginxref\fi\next} |
| 523 |
\def\beginxref{\futurelet\next\beginxrefswitch} |
| 524 |
\def\beginxrefswitch{\ifx\next\specialhat\let\next=\silentxref |
| 525 |
\else\silentfalse\let\next=\xref\fi \next} |
| 526 |
\catcode`\^=\active \let ^=\specialhat |
| 527 |
\def\silentxref^{\silenttrue\xref} |
| 528 |
|
| 529 |
\def\marginstyle{\vrule height6pt depth2pt width\z@ \sevenrm} |
| 530 |
|
| 531 |
\chardef\bslash=`\\ |
| 532 |
\def\xref{\futurelet\next\xrefswitch} |
| 533 |
\def\xrefswitch{\begingroup |
| 534 |
\ifx\next|\aftergroup\vxref % case 1 or 2, |arg| or |\arg| |
| 535 |
\else\ifx\next\<\aftergroup\anglexref % case 3, "\<arg>" means angle brackets |
| 536 |
\else\aftergroup\normalxref \fi\fi\endgroup} % case 0, "{arg}" |
| 537 |
\def\vxref|{\catcode`\\=\active \futurelet\next\vxrefswitch} |
| 538 |
\def\vxrefswitch#1|{\catcode`\\=0 |
| 539 |
\ifx\next\empty\def\xreftype{2}% |
| 540 |
\def\next{{\tt\bslash\text}}% type 2, |\arg| |
| 541 |
\else\def\xreftype{1}\def\next{{\tt\text}}\fi % type 1, |arg| |
| 542 |
\edef\text{#1}\makexref} |
| 543 |
{\catcode`\|=0 \catcode`\\=\active |gdef\{}} |
| 544 |
\def\anglexref\<#1>{\def\xreftype{3}\def\text{#1}% |
| 545 |
\def\next{\<\text>}\makexref} |
| 546 |
\def\normalxref#1{\def\xreftype{0}\def\text{#1}\let\next=\text\makexref} |
| 547 |
\def\makexref{\ifproofmode\insert\margin{\hbox{\marginstyle\text}}% |
| 548 |
\xdef\writeit{\write\inx{\text\space!\xreftype\space |
| 549 |
\noexpand\number\pageno.}}\writeit |
| 550 |
\else\ifhmode\kern\z@\fi\fi |
| 551 |
\ifsilent\ignorespaces\else\next\fi} |
| 552 |
% the \insert (which is done in proofmode only) suppresses hyphenation, |
| 553 |
% so the \kern\z@ is put in to give the same effect in non-proofmode. |
| 554 |
|
| 555 |
% Internal cross references that may change |
| 556 |
\def\sesame{61} % page number for Sesame Street quote |
| 557 |
\def\bmiexno{20} % exercise number for bold math italic |
| 558 |
\def\punishexno{1} % exercise number for `punishment' |
| 559 |
\def\fracexno{6} % exercise number for `\frac' |
| 560 |
\def\vshippage{31} % error message from `\vship' |
| 561 |
\def\storypage{24} % listing of story.tex |
| 562 |
\def\metaT{4} % exercise number for T of METAFONT |
| 563 |
\def\xwhat{2} % exercise number for x3:=whatever |
| 564 |
\def\Xwhat{2} % exercise number for whatever itself |
| 565 |
|
| 566 |
\def\checkequals#1#2{\ifnum#1=#2\else |
| 567 |
\errmessage{Redefine \string#1 to be \the#2}\fi} |
| 568 |
|
| 569 |
% Things for The METAFONTbook only |
| 570 |
\ifx\MFmanual\!\else\endinput\fi |
| 571 |
|
| 572 |
\def\!{\kern-.03em\relax} |
| 573 |
|
| 574 |
\def\frac#1/#2{\leavevmode\kern.1em |
| 575 |
\raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em |
| 576 |
/\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}} |
| 577 |
|
| 578 |
\outer\def\displayfig #1 (#2){$$\advance\abovedisplayskip by 3pt |
| 579 |
\leftline{\indent\figbox{#1}{3in}{#2}\vbox}$$} |
| 580 |
\def\rightfig #1 (#2 x #3) ^#4 {% #2 wide and #3 deep, raised #4 |
| 581 |
\strut\vadjust{\setbox0=\vbox to 0pt{\vss |
| 582 |
\hbox to\pagewidth{\hfil |
| 583 |
\raise #4\figbox{#1}{#2}{#3}\vtop \quad}} |
| 584 |
\dp0=0pt \box0}} |
| 585 |
\def\figbox#1#2#3#4{#4to#3{ % makes a box #2 wide and #3 deep |
| 586 |
\ifproofmode\kern0pt\hrule\vfill |
| 587 |
\hsize=#2 \baselineskip 6pt \fiverm\noindent\raggedright |
| 588 |
(Figure #1 will be inserted here; too bad you can't see it now.) |
| 589 |
\endgraf\vfill\hrule |
| 590 |
\else\vfill\hbox to#2{}\fi}} |
| 591 |
|
| 592 |
\def\endsyntax{\begingroup\let\par=\endgraf\medbreak\endgroup\noindent} |
| 593 |
|
| 594 |
\let\BEGINCHAPTER=\beginchapter |
| 595 |
\def\beginchapter{\titlelsl=1pt \BEGINCHAPTER} |
| 596 |
\def\beginChapter{\titlelsl=2pt \BEGINCHAPTER} |
| 597 |
|
| 598 |
\def\decreasehsize #1 {\advance\hsize-#1} |
| 599 |
\def\restorehsize{\hsize=\pagewidth} |
| 600 |
|
| 601 |
\catcode`\@=\active |
| 602 |
\catcode`\"=\active |
| 603 |
\def\ttverbatim{\begingroup \catcode`\@=\other \catcode`\"=\other |
| 604 |
\catcode`\\=\other |
| 605 |
\catcode`\{=\other |
| 606 |
\catcode`\}=\other |
| 607 |
\catcode`\$=\other |
| 608 |
\catcode`\&=\other |
| 609 |
\catcode`\#=\other |
| 610 |
\catcode`\%=\other |
| 611 |
\catcode`\~=\other |
| 612 |
\catcode`\_=\other |
| 613 |
\catcode`\^=\other |
| 614 |
\obeyspaces \obeylines \tt} |
| 615 |
\def\setupcopy{\def\do##1{\catcode`##1=\other}\dospecials |
| 616 |
\catcode`\|=\other \catcode`\@=\other \catcode`\"=\other \obeylines} |
| 617 |
\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em}} |
| 618 |
\def@#1@{\begingroup\def\_{\kern.04em |
| 619 |
\vbox{\hrule width.3em height .6pt}\kern.08em}% |
| 620 |
\ifmmode\mathop{\bf#1}\else\hbox{\bf#1\/}\fi\endgroup} |
| 621 |
\def"#1"{\hbox{\it#1\/\kern.05em}} % italic type for identifiers |
| 622 |
\def\xrefswitch{\begingroup |
| 623 |
\ifx\next|\aftergroup\vxref % case 1, |arg| or |\arg| |
| 624 |
\else\ifx\next@\aftergroup\boldxref % case 2, "@arg@" means boldface |
| 625 |
\else\ifx\next"\aftergroup\italxref % case 4, ""arg"" means boldface |
| 626 |
\else\ifx\next\<\aftergroup\anglexref % case 3, "\<arg>" means angle brackets |
| 627 |
\else\aftergroup\normalxref \fi\fi\fi\fi\endgroup} % case 0, "{arg}" |
| 628 |
\def\boldxref@#1@{\def\xreftype{2}\def\text{#1}% |
| 629 |
\def\next{@\text@}\makexref} |
| 630 |
\def\italxref"#1"{\def\xreftype{4}\def\text{#1}% |
| 631 |
\def\next{"\text"}\makexref} |
| 632 |
|
| 633 |
\def\pyth+{\mathbin{++}} |
| 634 |
\def\0{\raise.7ex\hbox{$\scriptstyle\#$}} |
| 635 |
\def\to{\mathrel{\ldotp\ldotp}} |
| 636 |
\def\dashto{\mathrel{\hbox{-\thinspace-\kern-.05em}}} |
| 637 |
\def\ddashto{\mathrel{\hbox{-\thinspace-\thinspace-\kern-.05em}}} |
| 638 |
\def\round{\mathop{\rm round}} |
| 639 |
\def\angle{\mathop{\rm angle}} |
| 640 |
\def\rmsqrt{\mathop{\rm sqrt}} |
| 641 |
\def\reverse{\mathop{\rm reverse}} |
| 642 |
\def\curl{\mathop{\rm curl}} |
| 643 |
\def\tension{\mathop{\rm tension}} |
| 644 |
\def\atleast{\mathop{\rm atleast}} |
| 645 |
\def\controls{\mathop{\rm controls}} |
| 646 |
\def\and{\,{\rm and}\,} |
| 647 |
\def\cycle{{\rm cycle}} |
| 648 |
\def\pickup{@pickup@ \thinspace} |
| 649 |
\def\penpos#1{\hbox{\it penpos}_{#1}} |
| 650 |
\def\pentaper#1{\hbox{\it pentaper}_{#1}} |
| 651 |
|
| 652 |
\chardef\hexa=1 % first hex |
| 653 |
\chardef\hexb=2 % top and bot adjusted |
| 654 |
\chardef\hexc=3 % same, bold |
| 655 |
\chardef\hexd=4 % same, confined to box |
| 656 |
\chardef\hexe=5 % penstroked hex |
| 657 |
\chardef\Aa=6 % stick-figure A, golden ratio |
| 658 |
\def\sevenAs{\char7\char8\char9\char10\char11\char12\char13} % same, variants |
| 659 |
\chardef\Az=14 % same, with crooked bar |
| 660 |
\chardef\Ab=15 % \Aa with rectilinear elliptical pen |
| 661 |
\chardef\Ac=16 % same, with the ellipse tilted |
| 662 |
\chardef\beana=17 % kidney bean, default pen |
| 663 |
\chardef\beanb=18 % same, twice as bold |
| 664 |
\chardef\beanc=19 % same, rectilinear elliptical pen |
| 665 |
\chardef\beand=20 % same, with the ellipse tilted |
| 666 |
\chardef\niba=21 % 10x rectilinear ellipse |
| 667 |
\chardef\nibb=22 % same, with the ellipse tilted |
| 668 |
\chardef\nibc=23 % same, 90 degrees titled |
| 669 |
\chardef\IOT=24 % Ionian T |
| 670 |
\chardef\IOS=25 % Ionian S |
| 671 |
\chardef\IOO=26 % Ionian O |
| 672 |
\chardef\IOI=27 % Ionian I |
| 673 |
\chardef\cubea=28 % possible cube |
| 674 |
\chardef\cubeb=29 % impossible cube |
| 675 |
\chardef\bicentennial=30 % star with overlapping strokes |
| 676 |
\chardef\oneu=31 % 1/4 of uuuu ornament |
| 677 |
\chardef\circa=32 % quartercircle |
| 678 |
\chardef\circb=33 % filled quartercircle |
| 679 |
\chardef\circc=34 % rotated quartercircle |
| 680 |
\chardef\circd=35 % cone |
| 681 |
\chardef\circe=36 % concentric circles |
| 682 |
\chardef\circf=37 % concentric diamonds |
| 683 |
\chardef\fouru=38 % uuuu ornament |
| 684 |
\chardef\fourc=39 % same, rotated |
| 685 |
\chardef\seventh='140 % 1/7, to go with cmssqi8 |
| 686 |
|
| 687 |
\newdimen\apspix |
| 688 |
\apspix=31448sp % 8 APS pixels = 52413.64sp, and I'm taking 60% of this |
| 689 |
% to crude approximation, there are about 2\apspix per pt |
| 690 |
\newdimen\blankpix \newdimen\Blankpix |
| 691 |
\setbox0=\hbox{\manual P} \blankpix=\wd0 % approximately 1pt blank pixel |
| 692 |
\setbox0=\hbox{\manual R} \Blankpix=\wd0 % approximately 3pt blank pixel |
| 693 |
|
| 694 |
\def\leftheadline{\hbox to \pagewidth{% |
| 695 |
\vbox to 10pt{}% strut to position the baseline |
| 696 |
\llap{\tenbf\folio\kern1pc}% folio to left of text |
| 697 |
\def\MF{{\manual 89:;<=>:}}% slanted 10pt |
| 698 |
\tenit\rhead\hfil% running head flush left |
| 699 |
}} |
| 700 |
\def\rightheadline{\hbox to \pagewidth{% |
| 701 |
\vbox to 10pt{}% strut to position the baseline |
| 702 |
\def\MF{{\manual 89:;<=>:}}% slanted 10pt |
| 703 |
\hfil\tenit\rhead\/% running head flush right |
| 704 |
\rlap{\kern1pc\tenbf\folio}% folio to right of text |
| 705 |
}} |
| 706 |
\def\ttok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt |
| 707 |
\hbox{\vphantom{\tt(j}\thinspace{\tt#1}\thinspace}} |
| 708 |
\kern1pt\hrule}\vrule}\thinspace} % token |
| 709 |
|
| 710 |
\newdimen\tinypix \setbox0=\hbox{\sixrm0} \tinypix=5pt |
| 711 |
\newdimen\pixcorr \pixcorr=\tinypix \advance\pixcorr by-\wd0 |
| 712 |
\def\pixpat#1#2#3#4{\vcenter{\sixrm\baselineskip=\tinypix |
| 713 |
\hbox{#1\kern\pixcorr#2}\hbox{#3\kern\pixcorr#4}}} |
| 714 |
|
| 715 |
\font\rand=random |