1 %% TeX macros to handle texinfo files
3 % Copyright (C) 1985, 1986, 1988 Richard M. Stallman
7 % BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
8 %NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
9 %WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
10 %RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
11 %WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
12 %BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
13 %FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
14 %AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
15 %DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
18 % IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
19 %STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
20 %WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
21 %LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
22 %OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
23 %USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
24 %DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
25 %A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
26 %PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
27 %DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
29 % GENERAL PUBLIC LICENSE TO COPY
31 % 1. You may copy and distribute verbatim copies of this source file
32 %as you receive it, in any medium, provided that you conspicuously
33 %and appropriately publish on each copy a valid copyright notice
34 %"Copyright (C) 1986 Richard M. Stallman"; and include
35 %following the copyright notice a verbatim copy of the above disclaimer
36 %of warranty and of this License.
38 % 2. You may modify your copy or copies of this source file or
39 %any portion of it, and copy and distribute such modifications under
40 %the terms of Paragraph 1 above, provided that you also do the following:
42 % a) cause the modified files to carry prominent notices stating
43 % that you changed the files and the date of any change; and
45 % b) cause the whole of any work that you distribute or publish,
46 % that in whole or in part contains or is a derivative of this
47 % program or any part thereof, to be licensed at no charge to all
48 % third parties on terms identical to those contained in this
49 % License Agreement (except that you may choose to grant more extensive
50 % warranty protection to some or all third parties, at your option).
52 % c) You may charge a distribution fee for the physical act of
53 % transferring a copy, and you may at your option offer warranty
54 % protection in exchange for a fee.
56 %Mere aggregation of another unrelated program with this program (or its
57 %derivative) on a volume of a storage or distribution medium does not bring
58 %the other program under the scope of these terms.
60 % 3. You may copy and distribute this program (or a portion or derivative
61 %of it, under Paragraph 2) in object code or executable form under the terms
62 %of Paragraphs 1 and 2 above provided that you also do one of the following:
64 % a) accompany it with the complete corresponding machine-readable
65 % source code, which must be distributed under the terms of
66 % Paragraphs 1 and 2 above; or,
68 % b) accompany it with a written offer, valid for at least three
69 % years, to give any third party free (except for a nominal
70 % shipping charge) a complete machine-readable copy of the
71 % corresponding source code, to be distributed under the terms of
72 % Paragraphs 1 and 2 above; or,
74 % c) accompany it with the information you received as to where the
75 % corresponding source code may be obtained. (This alternative is
76 % allowed only for noncommercial distribution and only if you
77 % received the program in object code or executable form alone.)
79 %For an executable file, complete source code means all the source code for
80 %all modules it contains; but, as a special exception, it need not include
81 %source code for modules which are standard libraries that accompany the
82 %operating system on which the executable file runs.
84 % 4. You may not copy, sublicense, distribute or transfer this program
85 %except as expressly provided under this License Agreement. Any attempt
86 %otherwise to copy, sublicense, distribute or transfer this program is void and
87 %your rights to use the program under this License agreement shall be
88 %automatically terminated. However, parties who have received computer
89 %software programs from you with this License Agreement will not have
90 %their licenses terminated so long as such parties remain in full compliance.
92 % 5. If you wish to incorporate parts of this program into other free
93 %programs whose distribution conditions are different, write to the Free
94 %Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
95 %worked out a simple rule that can be stated here, but we will often permit
96 %this. We will be guided by the two goals of preserving the free status of
97 %all derivatives of our free software and of promoting the sharing and reuse of
100 %In other words, you are welcome to use, share and improve this program.
101 %You are forbidden to forbid anyone else to use, share and improve
102 %what you give them. Help stamp out software-hoarding!
104 \def\texinfoversion{1.18}
105 \message{Loading texinfo package [Version \texinfoversion]:}
108 % Save some parts of plain tex whose names we will redefine.
115 \let\ptexbullet=\bullet
123 \def\tie{\penalty 10000\ } % Save plain tex definition of ~.
128 \hyphenation{ap-pen-dix}
129 \hyphenation{mini-buf-fer mini-buf-fers}
132 % Margin to add to right of even pages, to left of odd pages.
133 \newdimen \bindingoffset \bindingoffset=0pt
134 \newdimen \normaloffset \normaloffset=\hoffset
135 \newdimen\pagewidth \newdimen\pageheight
136 \pagewidth=\hsize \pageheight=\vsize
138 %---------------------Begin change-----------------------
140 % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
142 \newdimen\cornerlong \newdimen\cornerthick
143 \newdimen \topandbottommargin
144 \newdimen \outerhsize \newdimen \outervsize
145 \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
148 \topandbottommargin=.75in
150 %---------------------End change-----------------------
152 % \onepageout takes a vbox as an argument. Note that \pagecontents
153 % does insertions itself, but you have to call it yourself.
154 \chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
155 \def\onepageout#1{\hoffset=\normaloffset
156 \ifodd\pageno \advance\hoffset by \bindingoffset
157 \else \advance\hoffset by -\bindingoffset\fi
158 \shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
159 {\let\hsize=\pagewidth \makefootline}}
160 \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
163 % Here is a modification of the main output routine for Near East Publications
164 % This provides right-angle cropmarks at all four corners.
165 % The contents of the page are centerlined into the cropmarks,
166 % and any desired binding offset is added as an \hskip on either
167 % site of the centerlined box. (P. A. MacKay, 12 November, 1986)
169 \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
171 \vbox to \outervsize{\hsize=\outerhsize
172 \vbox{\line{\ewtop\hfill\ewtop}}
174 \line{\vbox{\moveleft\cornerthick\nstop}
176 \vbox{\moveright\cornerthick\nstop}}
177 \vskip \topandbottommargin
178 \centerline{\ifodd\pageno\hskip\bindingoffset\fi
180 {\let\hsize=\pagewidth \makeheadline}
182 {\let\hsize=\pagewidth \makefootline}}
183 \ifodd\pageno\else\hskip\bindingoffset\fi}
184 \vskip \topandbottommargin plus1fill minus1fill
185 \boxmaxdepth\cornerthick
186 \line{\vbox{\moveleft\cornerthick\nsbot}
188 \vbox{\moveright\cornerthick\nsbot}}
190 \vbox{\line{\ewbot\hfill\ewbot}}
193 \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
195 % Do @cropmarks to get crop marks
196 \def\cropmarks{\let\onepageout=\croppageout }
198 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
200 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
201 \dimen@=\dp#1 \unvbox#1
202 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
203 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
207 % Here are the rules for the cropmarks. Note that they are
208 % offset so that the space between them is truly \outerhsize or \outervsize
209 % (P. A. MacKay, 12 November, 1986)
211 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
213 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
214 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
216 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
218 % Parse an argument, then pass it to #1.
219 % The argument can be delimited with [...] or with "..." or braces
220 % or it can be a whole line.
221 % #1 should be a macro which expects
222 % an ordinary undelimited TeX argument.
224 \def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
227 \ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
228 \aftergroup \parseargline %
232 \gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
234 \gdef\obeyedspace{\ }
236 \def\parseargline{\begingroup \obeylines \parsearglinex}
238 \gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
240 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
242 %% These are used to keep @begin/@end levels from running away
243 %% Call \inENV within environments (after a \begingroup)
244 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
246 \ifENV\errmessage{Still within an environment. Type Return to continue.}
247 \endgroup\fi} % This is not perfect, but it should reduce lossage
249 % @begin foo is the same as @foo, for now.
250 \newhelp\EMsimple{Type <Return> to continue}
252 \outer\def\begin{\parsearg\beginxxx}
255 \expandafter\ifx\csname #1\endcsname\relax
256 {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
257 \csname #1\endcsname\fi}
259 %% @end foo executes the definition of \Efoo.
260 %% foo can be delimited by doublequotes or brackets.
262 \def\end{\parsearg\endxxx}
265 \expandafter\ifx\csname E#1\endcsname\relax
266 \expandafter\ifx\csname #1\endcsname\relax
267 \errmessage{Undefined command @end #1}\else
269 \csname E#1\endcsname}
271 {\errhelp=\EMsimple \errmessage{@end #1 not within #1 environment}}}
273 % Single-spacing is done by various environments.
275 \newskip\singlespaceskip \singlespaceskip = \baselineskip
277 {\advance \baselineskip by -\singlespaceskip
278 \kern \baselineskip}%
279 \baselineskip=\singlespaceskip
282 %% Simple single-character @ commands
285 % Kludge this until the fonts are right (grr).
286 \def\@{{\sf \char '100}}
288 % Define @` and @' to be the same as ` and '
289 % but suppressing ligatures.
293 % Used to generate quoted braces.
295 \def\mylbrace {{\tt \char '173}}
296 \def\myrbrace {{\tt \char '175}}
300 % @: forces normal size whitespace following.
301 \def\:{\spacefactor=1000 }
303 % @* forces a line break.
306 % @. is an end-of-sentence period.
307 \def\.{.\spacefactor=3000 }
309 % @w prevents a word break
312 % @group ... @end group forces ... to be all on one page.
314 \def\group{\begingroup% \inENV ???
315 \def \Egroup{\egroup\endgroup}
318 % @br forces paragraph break
322 % @dots{} output some dots
326 % @page forces the start of a new page
328 \def\page{\par\vfill\supereject}
331 % outputs text on separate line in roman font, starting at standard page margin
333 \def\exdent{\errmessage{@exdent in filled text}}
334 % @lisp, etc, define \exdent locally from \internalexdent
337 \gdef\internalexdent{\parsearg\exdentzzz}}
339 \def\exdentzzz #1{{\advance \leftskip by -\lispnarrowing
340 \advance \hsize by -\leftskip
341 \advance \hsize by -\rightskip
344 % @include file insert text of that file as input.
346 \def\include{\parsearg\includezzz}
347 \def\includezzz #1{{\def\thisfile{#1}\input #1
352 % @center line outputs that line, centered
354 \def\center{\parsearg\centerzzz}
355 \def\centerzzz #1{{\advance\hsize by -\leftskip
356 \advance\hsize by -\rightskip
359 % @sp n outputs n lines of vertical space
361 \def\sp{\parsearg\spxxx}
362 \def\spxxx #1{\par \vskip #1\baselineskip}
364 % @comment ...line which is ignored...
365 % @c is the same as @comment
366 % @ignore ... @end ignore is another way to write a comment
368 \def\comment{\parsearg \commentxxx}
374 \long\def\ignore #1\end ignore{}
376 \outer\def\ifset{\parsearg\ifsetxxx}
378 \def\ifsetxxx #1#2\end ifset{%
379 \expandafter\ifx\csname IF#1\endcsname\relax \else #2\fi}
381 \outer\def\ifclear{\parsearg\ifclearxxx}
383 \def\ifclearxxx #1#2\end ifclear{%
384 \expandafter\ifx\csname IF#1\endcsname\relax #2\fi}
386 % Some texinfo constructs that are trivial in tex
390 \long\def\ifinfo #1\end ifinfo{}
391 \long\def\menu #1\end menu{}
394 \def\node{\parsearg\nodezzz}
395 \def\nodezzz#1{\nodexxx [#1,]}
396 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
399 \def\donoderef{\ifx\lastnode\relax\else
400 \expandafter\expandafter\expandafter\setref{\lastnode}\fi
401 \let\lastnode=\relax}
403 \def\unnumbnoderef{\ifx\lastnode\relax\else
404 \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
405 \let\lastnode=\relax}
409 \let\setfilename=\comment
411 \def\inforef #1{\inforefzzz #1,,,,**}
412 \def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}}, node `\losespace#1{}'}
413 \def\losespace #1{#1}
417 % Font-change commands.
419 %% Try out Computer Modern fonts at \magstephalf
420 \font\tenrm=cmr10 scaled \magstephalf
421 \font\tentt=cmtt10 scaled \magstephalf
422 % Instead of cmb10, you many want to use cmbx10.
423 % cmbx10 is a prettier font on its own, but cmb10
424 % looks better when embedded in a line with cmr10.
425 \font\tenbf=cmb10 scaled \magstephalf
426 \font\tenit=cmti10 scaled \magstephalf
427 \font\tensl=cmsl10 scaled \magstephalf
428 \font\tensf=cmss10 scaled \magstephalf
430 \font\tensc=cmcsc10 scaled \magstephalf
432 % Fonts for @defun, etc.
433 \font\defbf=cmbx10 scaled \magstep1 %was 1314
435 \def\df{\let\tt=\deftt \defbf}
438 \font\titlerm = cmbx10 scaled \magstep5
441 \font\indit=cmti9 \font\indrm=cmr9
442 \def\indbf{\indrm} \def\indsl{\indit}
443 \def\indexfonts{\let\it=\indit \let\sl=\indsl \let\bf=\indbf \let\rm=\indrm}
446 \font\chaprm=cmbx10 scaled \magstep3
447 \font\chapit=cmti10 scaled \magstep3
448 \font\chapsl=cmsl10 scaled \magstep3
449 \font\chaptt=cmtt10 scaled \magstep3
450 \font\chapsf=cmss10 scaled \magstep3
453 \font\secrm=cmbx10 scaled \magstep2
454 \font\secit=cmti10 scaled \magstep2
455 \font\secsl=cmsl10 scaled \magstep2
456 \font\sectt=cmtt10 scaled \magstep2
457 \font\secsf=cmss10 scaled \magstep2
460 \font\ssecrm=cmbx10 scaled \magstep1
461 \font\ssecit=cmti10 scaled \magstep1
462 \font\ssecsl=cmsl10 scaled \magstep1
463 \font\ssectt=cmtt10 scaled \magstep1
464 \font\ssecsf=cmss10 scaled \magstep1
467 \def\textfonts{\let\rm=\tenrm\let\it=\tenit\let\sl=\tensl\let\bf=\tenbf%
468 \let\sc=\tensc\let\sf=\tensf}
469 \def\chapfonts{\let\rm=\chaprm\let\it=\chapit\let\sl=\chapsl\let\bf=\chapbf\let\tt=\chaptt\let\sf=\chapsf}
470 \def\secfonts{\let\rm=\secrm\let\it=\secit\let\sl=\secsl\let\bf=\secbf\let\tt=\sectt\let\sf=\secsf}
471 \def\subsecfonts{\let\rm=\ssecrm\let\it=\ssecit\let\sl=\ssecsl\let\bf=\ssecbf\let\tt=\ssectt\let\sf=\ssecsf}
472 % Count depth in font-changes, for error checks
473 \newcount\fontdepth \fontdepth=0
475 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
476 %% serif) and @ii for TeX italic
487 \def\t#1{{\tt \rawbackslash \frenchspacing #1}\null}
491 \def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
492 \def\key #1{{\tt \uppercase{#1}}\null}
493 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
497 \def\l#1{{\li #1}\null}
503 \def\titlefont#1{{\titlerm #1}}
505 \def\titlepage{\begingroup \parindent=0pt \hbox{}%
507 \def\page{\oldpage \hbox{}}}
509 \def\Etitlepage{\endgroup\page\HEADINGSon}
511 % Make altmode in file print out right
513 \catcode `\^^[=\active \def^^[{$\diamondsuit$}
515 \message{page headings,}
517 %%% Set up page headings and footings.
521 \newtoks \evenheadline % Token sequence for heading line of even pages
522 \newtoks \oddheadline % Token sequence for heading line of odd pages
523 \newtoks \evenfootline % Token sequence for footing line of even pages
524 \newtoks \oddfootline % Token sequence for footing line of odd pages
526 % Now make Tex use those variables
527 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}}
528 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}}
530 % Commands to set those variables.
531 % For example, this is what @headings on does
532 % @evenheading @thistitle|@thispage|@thischapter
533 % @oddheading @thischapter|@thispage|@thistitle
534 % @evenfooting @thisfile||
535 % @oddfooting ||@thisfile
537 \def\evenheading{\parsearg\evenheadingxxx}
538 \def\oddheading{\parsearg\oddheadingxxx}
539 \def\everyheading{\parsearg\everyheadingxxx}
541 \def\evenfooting{\parsearg\evenfootingxxx}
542 \def\oddfooting{\parsearg\oddfootingxxx}
543 \def\everyfooting{\parsearg\everyfootingxxx}
547 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
548 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
549 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
551 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
552 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
553 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
555 \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
556 \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
557 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
558 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
560 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
561 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
562 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
564 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
565 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
566 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
568 \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
569 \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
570 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
571 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
573 }% unbind the catcode of @.
575 % @headings on turns them on.
576 % @headings off turns them off.
577 % By default, they are off.
579 \def\headings #1 {\csname HEADINGS#1\endcsname}
582 \global\evenheadline={\hfil} \global\evenfootline={\hfil}
583 \global\oddheadline={\hfil} \global\oddfootline={\hfil}}
585 % When we turn headings on, set the page number to 1,
586 % Put current file name in lower left corner,
587 % Put chapter name on inside top of right hand pages, document
588 % title on inside top of left hand pages, and page numbers on outside top
593 \global\evenfootline={\hfil}
594 \global\oddfootline={\hfil}
595 \global\evenheadline={\line{\folio\hfil\thistitle}}
596 \global\oddheadline={\line{\thischapter\hfil\folio}}
599 % Subroutines used in generating headings
600 % Produces Day Month Year style of output.
601 \def\today{\number\day\space
603 January\or February\or March\or April\or May\or June\or
604 July\or August\or September\or October\or November\or December\fi
607 % Use this if you want the Month Day, Year style of output.
608 %\def\today{\ifcase\month\or
609 %January\or February\or March\or April\or May\or June\or
610 %July\or August\or September\or October\or November\or December\fi
611 %\space\number\day, \number\year}
613 % @settitle line... specifies the title of the document, for headings
614 % It generates no output of its own
616 \def\thistitle{No Title}
617 \def\settitle{\parsearg\settitlezzz}
618 \def\settitlezzz #1{\gdef\thistitle{#1}}
622 % Tables -- @table, @ftable, @item(x), @kitem(x), @xitem(x).
624 % default indentation of table text
625 \newdimen\tableindent \tableindent=.8in
626 % default indentation of @itemize and @enumerate text
627 \newdimen\itemindent \itemindent=.3in
628 % margin between end of table item and start of table text.
629 \newdimen\itemmargin \itemmargin=.1in
631 % used internally for \itemindent minus \itemmargin
634 % Note @table and @ftable define @item, @itemx, etc., with these defs.
635 % They also define \itemindex
636 % to index the item name in whatever manner is desired (perhaps none).
638 \def\internalBitem{\smallbreak \parsearg\itemzzz}
639 \def\internalBitemx{\par \parsearg\itemzzz}
641 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
642 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz}
644 \def\internalBkitem{\smallbreak \parsearg\kitemzzz}
645 \def\internalBkitemx{\par \parsearg\kitemzzz}
647 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}\itemzzz {#1}}
649 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}\itemzzz {#1}}
651 \def\itemzzz #1{\begingroup %
652 \advance \hsize by -\rightskip %
653 \advance \hsize by -\leftskip %
654 \setbox0=\hbox{\itemfont{#1}}%
658 \ifdim \wd0>\itemmax %
659 \vadjust{\penalty 10000}%
660 \hbox to \hsize{\hskip -\tableindent\box0\hss}\ %
662 \hbox to 0pt{\hskip -\tableindent\box0\hss}%
667 \def\item{\errmessage{@item while not in a table}}
668 \def\itemx{\errmessage{@itemx while not in a table}}
669 \def\kitem{\errmessage{@kitem while not in a table}}
670 \def\kitemx{\errmessage{@kitemx while not in a table}}
671 \def\xitem{\errmessage{@xitem while not in a table}}
672 \def\xitemx{\errmessage{@xitemx while not in a table}}
674 %% Contains a kludge to get @end[description] to work
675 \def\description{\tablez{\dontindex}{1}{}{}{}{}}
677 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
678 {\obeylines\obeyspaces%
680 \tabley\dontindex#1 \endtabley}}
682 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
683 {\obeylines\obeyspaces%
684 \gdef\ftablex #1^^M{%
685 \tabley\fnitemindex#1 \endtabley}}
688 \def\fnitemindex #1{\doind {fn}{\code{#1}}}%
691 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
692 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
694 \def\tablez #1#2#3#4#5#6{%
697 \def\Edescription{\Etable}% Neccessary kludge.
699 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
700 \ifnum 0#4>0 \tableindent=#4\mil \fi %
701 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
703 \itemmax=\tableindent %
704 \advance \itemmax by -\itemmargin %
705 \advance \leftskip by \tableindent %
707 \parskip = \smallskipamount
708 \ifdim \parskip=0pt \parskip=2pt \fi%
709 \def\Etable{\endgraf\endgroup\afterenvbreak}%
710 \let\item = \internalBitem %
711 \let\itemx = \internalBitemx %
712 \let\kitem = \internalBkitem %
713 \let\kitemx = \internalBkitemx %
714 \let\xitem = \internalBxitem %
715 \let\xitemx = \internalBxitemx %
718 % This is the counter used by @enumerate, which is really @itemize
722 \def\itemize{\parsearg\itemizezzz}
724 \def\itemizezzz #1{\itemizey {#1}{\Eitemize}}
730 \itemmax=\itemindent %
731 \advance \itemmax by -\itemmargin %
732 \advance \leftskip by \itemindent %
734 \parskip = \smallskipamount
735 \ifdim \parskip=0pt \parskip=2pt \fi%
736 \def#2{\endgraf\endgroup\afterenvbreak}%
737 \def\itemcontents{#1}%
738 \let\item=\itemizeitem}
740 \def\bullet{$\ptexbullet$}
743 \def\enumerate{\itemizey{\the\itemno.}\Eenumerate\flushcr}
745 % Definition of @item while inside @itemize.
749 {\let\par=\endgraf \smallbreak}%
750 \ifhmode \errmessage{\in hmode at itemizeitem}\fi
751 {\parskip=0in \hskip 0pt
752 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
753 \vadjust{\penalty 300}}%
757 % Index generation facilities
759 % Define \newwrite to be identical to plain tex's \newwrite
760 % except not \outer, so it can be used within \newindex.
762 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
764 % \newindex {foo} defines an index named foo.
765 % It automatically defines \fooindex such that
766 % \fooindex ...rest of line... puts an entry in the index foo.
767 % It also defines \fooindfile to be the number of the output channel for
768 % the file that accumulates this index. The file's extension is foo.
769 % The name of an index should be no more than 2 characters long
770 % for the sake of vms.
773 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
774 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
775 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
776 \noexpand\doindex {#1}}
779 % @defindex foo == \newindex{foo}
781 \def\defindex{\parsearg\newindex}
783 % Define @defcodeindex, like @defindex except put all entries in @code.
785 \def\newcodeindex #1{
786 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
787 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
788 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
789 \noexpand\docodeindex {#1}}
792 \def\defcodeindex{\parsearg\newcodeindex}
794 % @synindex foo bar makes index foo feed into index bar.
795 % Do this instead of @defindex foo if you don't want it as a separate index.
796 \def\synindex #1 #2 {%
797 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
798 \noexpand\doindex {#2}}%
801 % @syncodeindex foo bar similar, but put all entries made for index foo
803 \def\syncodeindex #1 #2 {%
804 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
805 \noexpand\docodeindex {#2}}%
808 % Define \doindex, the driver for all \fooindex macros.
809 % Argument #1 is generated by the calling \fooindex macro,
810 % and it is "foo", the name of the index.
812 % \doindex just uses \parsearg; it calls \doind for the actual work.
813 % This is because \doind is more useful to call from other macros.
815 % There is also \dosubind {index}{topic}{subtopic}
816 % which makes an entry in a two-level index such as the operation index.
818 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
819 \def\singleindexer #1{\doind{\indexname}{#1}}
821 % like the previous two, but they put @code around the argument.
822 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
823 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
826 \def\bf{\realbackslash bf }%
827 \def\rm{\realbackslash rm }%
828 \def\sl{\realbackslash sl }%
829 \def\dots{\realbackslash dots }%
830 \def\copyright{\realbackslash copyright }%
833 % \indexnofonts no-ops all font-change commands.
834 % This is used when outputting the strings to sort the index by.
835 \def\indexdummyfont#1{#1}
837 \let\code=\indexdummyfont
838 \let\samp=\indexdummyfont
839 \let\kbd=\indexdummyfont
840 \let\key=\indexdummyfont
841 \let\var=\indexdummyfont
844 % To define \realbackslash, we must make \ not be an escape.
845 % We must first make another character (@) an escape
846 % so we do not become unable to do a definition.
848 {\catcode`\@=0 \catcode`\\=\other
849 @gdef@realbackslash{\}}
851 \let\indexbackslash=0 %overridden during \printindex.
854 {\indexdummies % Must do this here, since \bf, etc expand at this stage
855 \count10=\lastpenalty %
857 {\let\folio=0% Expand all macros now EXCEPT \folio
858 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
859 % so it will be output as is; and it will print as backslash in the indx.
861 % Now process the index-string once, with all font commands turned off,
862 % to get the string to sort the index by.
866 % Now produce the complete index entry. We process the index-string again,
867 % this time with font commands expanded, to get what to print in the index.
869 \write \csname#1indfile\endcsname{%
870 \realbackslash entry {\temp1}{\folio}{#2}}}%
874 \def\dosubind #1#2#3{%
875 {\indexdummies % Must do this here, since \bf, etc expand at this stage
876 \count10=\lastpenalty %
879 \def\rawbackslashxx{\indexbackslash}%
881 % Now process the index-string once, with all font commands turned off,
882 % to get the string to sort the index by.
886 % Now produce the complete index entry. We process the index-string again,
887 % this time with font commands expanded, to get what to print in the index.
889 \write \csname#1indfile\endcsname{%
890 \realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
894 % The index entry written in the file actually looks like
895 % \entry {sortstring}{page}{topic}
897 % \entry {sortstring}{page}{topic}{subtopic}
898 % The texindex program reads in these files and writes files
899 % containing these kinds of lines:
901 % before the first topic whose initial is c
902 % \entry {topic}{pagelist}
903 % for a topic that is used without subtopics
905 % for the beginning of a topic that is used with subtopics
906 % \secondary {subtopic}{pagelist}
909 % Define the user-accessible indexing commands
910 % @findex, @vindex, @kindex, @cindex.
912 \def\findex {\fnindex}
913 \def\kindex {\kyindex}
914 \def\cindex {\cpindex}
915 \def\vindex {\vrindex}
916 \def\tindex {\tpindex}
917 \def\pindex {\pgindex}
919 \def\cindexsub {\begingroup\obeylines\cindexsub}
921 \gdef\cindexsub "#1" #2^^M{\endgroup %
922 \dosubind{cp}{#2}{#1}}}
924 % Define the macros used in formatting output of the sorted index material.
926 % This is what you call to cause a particular index to get printed.
928 % @unnumbered Function Index
931 \def\printindex{\parsearg\doprintindex}
933 \def\doprintindex#1{\tex %
934 \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
935 \catcode`\$=\other\catcode`\_=\other
937 \def\indexbackslash{\rawbackslashxx}
938 \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
940 \openin 1 \jobname.#1s
941 \ifeof 1 \else \closein 1 \input \jobname.#1s
946 % These macros are used by the sorted index file itself.
947 % Change them to control the appearance of the index.
949 % Same as \bigskipamount except no shrink.
950 % \balancecolumns gets confused if there is any shrink.
951 \newskip\initialskipamount \initialskipamount 12pt plus4pt
953 \outer\def\initial #1{%
954 {\let\tentt=\sectt \let\sf=\sectt
955 \ifdim\lastskip<\initialskipamount
956 \removelastskip \penalty-200 \vskip \initialskipamount\fi
957 \line{\secbf#1\hfill}\kern 2pt\penalty3000}}
959 \outer\def\entry #1#2{
960 {\parfillskip=0in \parskip=0in \parindent=0in
961 \hangindent=1in \hangafter=1%
962 \noindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll #2\par
965 \def\primary #1{\line{#1\hfil}}
967 \newskip\secondaryindent \secondaryindent=0.5cm
970 {\parfillskip=0in \parskip=0in
971 \hangindent =1in \hangafter=1
972 \noindent\hskip\secondaryindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
975 %% Define two-column mode, which is used in indexes.
976 %% Adapted from the TeXBook, page 416
981 \newdimen\doublecolumnhsize \doublecolumnhsize = 3.11in
982 \newdimen\doublecolumnvsize \doublecolumnvsize = 19.1in
984 \def\begindoublecolumns{\begingroup
985 \output={\global\setbox\partialpage=\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}\eject
986 \output={\doublecolumnout} \hsize=\doublecolumnhsize \vsize=\doublecolumnvsize}
987 \def\enddoublecolumns{\output={\balancecolumns}\eject
988 \endgroup \pagegoal=\vsize}
990 \def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth
991 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
992 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
993 \onepageout\pagesofar \unvbox255 \penalty\outputpenalty}
994 \def\pagesofar{\unvbox\partialpage %
995 \hsize=\doublecolumnhsize % have to restore this since output routine
996 % changes it to set cropmarks (P. A. MacKay, 12 Nov. 1986)
997 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
998 \def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0
999 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
1000 \divide\dimen@ by2 \splittopskip=\topskip
1001 {\vbadness=10000 \loop \global\setbox3=\copy0
1002 \global\setbox1=\vsplit3 to\dimen@
1003 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}
1004 \setbox0=\vbox to\dimen@{\unvbox1} \setbox2=\vbox to\dimen@{\unvbox3}
1008 \message{sectioning,}
1009 % Define chapters, sections, etc.
1014 \newcount \subsubsecno
1016 % This counter is funny since it counts through charcodes of letters A, B, ...
1017 \newcount \appendixno \appendixno = `\@
1018 \def\appendixletter{\char\the\appendixno}
1020 \newwrite \contentsfile
1021 \openout \contentsfile = \jobname.toc
1023 % Each @chapter defines this as the name of the chapter.
1024 % page headings and footings can use it. @section does likewise
1026 \def\thischapter{} \def\thissection{}
1027 \def\seccheck#1{\if \pageno<0 %
1028 \errmessage{@#1 not allowed after generating table of contents}\fi
1032 \outer\def\chapter{\parsearg\chapterzzz}
1033 \def\chapterzzz #1{\seccheck{chapter}%
1034 \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{Chapter \the\chapno}%
1035 \chapmacro {#1}{\the\chapno}%
1036 \gdef\thissection{#1}\gdef\thischapter{#1}%
1037 \let\rawbackslash=\relax%
1038 \let\frenchspacing=\relax%
1039 \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
1041 \write \contentsfile \temp %
1045 \outer\def\appendix{\parsearg\appendixzzz}
1046 \def\appendixzzz #1{\seccheck{appendix}%
1047 \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{Appendix \appendixletter}%
1048 \chapmacro {#1}{Appendix \appendixletter}%
1049 \gdef\thischapter{#1}\gdef\thissection{#1}%
1050 \let\rawbackslash=\relax%
1051 \let\frenchspacing=\relax%
1052 \edef\temp{{\realbackslash chapentry {#1}{Appendix \appendixletter}{\noexpand\folio}}}%
1054 \write \contentsfile \temp %
1058 \outer\def\unnumbered{\parsearg\unnumberedzzz}
1059 \def\unnumberedzzz #1{\seccheck{unnumbered}%
1060 \secno=0 \subsecno=0 \subsubsecno=0 \message{(#1)}
1061 \unnumbchapmacro {#1}%
1062 \gdef\thischapter{#1}\gdef\thissection{#1}%
1063 \let\rawbackslash=\relax%
1064 \let\frenchspacing=\relax%
1065 \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
1067 \write \contentsfile \temp %
1071 \outer\def\section{\parsearg\sectionzzz}
1072 \def\sectionzzz #1{\seccheck{section}%
1073 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
1074 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
1075 \let\rawbackslash=\relax%
1076 \let\frenchspacing=\relax%
1077 \edef\temp{{\realbackslash secentry %
1078 {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
1080 \write \contentsfile \temp %
1085 \outer\def\appendixsection{\parsearg\appendixsectionzzz}
1086 \outer\def\appendixsec{\parsearg\appendixsectionzzz}
1087 \def\appendixsectionzzz #1{\seccheck{appendixsection}%
1088 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
1089 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
1090 \let\rawbackslash=\relax%
1091 \let\frenchspacing=\relax%
1092 \edef\temp{{\realbackslash secentry %
1093 {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
1095 \write \contentsfile \temp %
1100 \outer\def\unnumberedsec{\parsearg\unnumberedseczzz}
1101 \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
1102 \plainsecheading {#1}\gdef\thissection{#1}%
1103 \let\rawbackslash=\relax%
1104 \let\frenchspacing=\relax%
1105 \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
1107 \write \contentsfile \temp %
1112 \outer\def\subsection{\parsearg\subsectionzzz}
1113 \def\subsectionzzz #1{\seccheck{subsection}%
1114 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
1115 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
1116 \let\rawbackslash=\relax%
1117 \let\frenchspacing=\relax%
1118 \edef\temp{{\realbackslash subsecentry %
1119 {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
1121 \write \contentsfile \temp %
1126 \outer\def\appendixsubsec{\parsearg\appendixsubseczzz}
1127 \def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
1128 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
1129 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
1130 \let\rawbackslash=\relax%
1131 \let\frenchspacing=\relax%
1132 \edef\temp{{\realbackslash subsecentry %
1133 {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
1135 \write \contentsfile \temp %
1140 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubseczzz}
1141 \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
1142 \plainsecheading {#1}\gdef\thissection{#1}%
1143 \let\rawbackslash=\relax%
1144 \let\frenchspacing=\relax%
1145 \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
1147 \write \contentsfile \temp %
1152 \outer\def\subsubsection{\parsearg\subsubsectionzzz}
1153 \def\subsubsectionzzz #1{\seccheck{subsubsection}%
1154 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
1155 \subsubsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
1156 \let\rawbackslash=\relax%
1157 \let\frenchspacing=\relax%
1158 \edef\temp{{\realbackslash subsubsecentry %
1159 {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
1161 \write \contentsfile \temp %
1166 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubseczzz}
1167 \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
1168 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
1169 \subsubsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
1170 \let\rawbackslash=\relax%
1171 \let\frenchspacing=\relax%
1172 \edef\temp{{\realbackslash subsubsecentry{#1}%
1173 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
1175 \write \contentsfile \temp %
1180 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
1181 \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
1182 \plainsecheading {#1}\gdef\thissection{#1}%
1183 \let\rawbackslash=\relax%
1184 \let\frenchspacing=\relax%
1185 \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
1187 \write \contentsfile \temp %
1192 % Define @majorheading, @heading and @subheading
1194 \outer\def\majorheading #1{%
1195 {\advance\chapheadingskip by 10pt \chapbreak }%
1196 {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
1198 \outer\def\chapheading #1{\chapbreak %
1199 {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
1201 \let\heading=\secheadingi
1202 \let\subheading=\subsecheadingi
1203 \let\subsubheading=\subsubsecheadingi
1205 % These macros generate a chapter, section, etc. heading only
1206 % (including whitespace, linebreaking, etc. around it),
1207 % given all the information in convenient, parsed form.
1209 %%% Args are the skip and penalty (usually negative)
1210 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
1212 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
1214 %%% Define plain chapter starts, and page on/off switching for it
1215 % Parameter controlling skip before chapter headings (if needed)
1217 \newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
1219 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
1220 \def\chappager{\par\vfill\supereject}
1221 \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
1223 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
1226 \global\let\pchapsepmacro=\chapbreak
1227 \global\let\pagealignmacro=\chappager}
1230 \global\let\pchapsepmacro=\chappager
1231 \global\let\pagealignmacro=\chappager}
1234 \global\let\pchapsepmacro=\chapoddpage
1235 \global\let\pagealignmacro=\chapoddpage}
1240 \global\let\chapmacro=\chfplain
1241 \global\let\unnumbchapmacro=\unnchfplain}
1243 \def\chfplain #1#2{%
1245 {\chapfonts \line{\chaprm #2.\enspace #1\hfill}}\bigskip \par\penalty 5000 %
1248 \def\unnchfplain #1{%
1250 {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
1252 \CHAPFplain % The default
1254 \def\unnchfopen #1{%
1255 \chapoddpage {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
1258 \def\chfopen #1#2{\chapoddpage {\chapfonts
1259 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
1264 \global\let\chapmacro=\chfopen
1265 \global\let\unnumbchapmacro=\unnchfopen}
1267 % Parameter controlling skip before section headings.
1269 \newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt
1270 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
1272 \newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt
1273 \def\secheadingbreak{\dobreak \secheadingskip {-1000}}
1275 \def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
1276 \def\plainsecheading #1{\secheadingi {#1}}
1277 \def\secheadingi #1{{\advance \secheadingskip by \parskip %
1279 {\secfonts \line{\secrm #1\hfill}}%
1280 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
1282 \def\subsecheading #1#2#3#4{{\advance \subsecheadingskip by \parskip %
1283 \subsecheadingbreak}%
1284 {\secfonts \line{\secrm#2.#3.#4\enspace #1\hfill}}%
1285 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
1287 \def\subsubsecfonts{\subsecfonts} % Maybe this should change
1289 \def\subsubsecheading #1#2#3#4#5{{\advance \subsecheadingskip by \parskip %
1290 \subsecheadingbreak}%
1291 {\secfonts \line{\secrm#2.#3.#4.#5\enspace #1\hfill}}%
1292 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
1294 \message{toc printing,}
1296 \def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
1298 \def\finishcontents{%
1301 \immediate\closeout \contentsfile%
1302 \pageno=-1 % Request roman numbered pages
1305 \outer\def\contents{%
1307 \unnumbchapmacro{Table of Contents}
1308 \def\thischapter{Table of Contents}
1310 \catcode`\{=1 % Set up to handle contents files properly
1317 \outer\def\summarycontents{%
1319 \unnumbchapmacro{Summary Table of Contents}
1320 \def\thischapter{Summary Table of Contents}
1322 \catcode`\{=1 % Set up to handle contents files properly
1326 \def\secentry ##1##2##3##4{}
1327 \def\subsecentry ##1##2##3##4##5{}
1328 \def\subsubsecentry ##1##2##3##4##5##6{}
1329 \def\unnumbsecentry ##1##2{}
1330 \def\unnumbsubsecentry ##1##2{}
1331 \def\unnumbsubsubsecentry ##1##2{}
1332 \let\medbreak=\smallbreak
1337 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1339 % These macros generate individual entries in the table of contents
1340 % The first argument is the chapter or section name.
1341 % The last argument is the page number.
1342 % The arguments in between are the chapter number, section number, ...
1344 \def\chapentry #1#2#3{%
1346 \line{#2.\space#1\leaders\hbox to 1em{\hss.\hss}\hfill #3}
1349 \def\unnumbchapentry #1#2{%
1351 \line{#1\leaders\Dotsbox\hfill #2}
1354 \def\secentry #1#2#3#4{%
1355 \line{\enspace\enspace#2.#3\space#1\leaders\Dotsbox\hfill#4}
1358 \def\unnumbsecentry #1#2{%
1359 \line{\enspace\enspace#1\leaders\Dotsbox\hfill #2}
1362 \def\subsecentry #1#2#3#4#5{%
1363 \line{\enspace\enspace\enspace\enspace
1364 #2.#3.#4\space#1\leaders\Dotsbox\hfill #5}
1367 \def\unnumbsubsecentry #1#2{%
1368 \line{\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
1371 \def\subsubsecentry #1#2#3#4#5#6{%
1372 \line{\enspace\enspace\enspace\enspace\enspace\enspace
1373 #2.#3.#4.#5\space#1\leaders\Dotsbox\hfill #6}
1376 \def\unnumbsubsubsecentry #1#2{%
1377 \line{\enspace\enspace\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
1380 \message{environments,}
1382 % @tex ... @end tex escapes into raw Tex temporarily.
1383 % One exception: @ is still an escape character, so that @end tex works.
1384 % But \@ or @@ will get a plain tex @ character.
1386 \def\tex{\begingroup
1387 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
1388 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
1389 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
1402 \let\bullet=\ptexbullet
1403 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
1406 \let\Etex=\endgroup}
1408 % Define @lisp ... @endlisp.
1409 % @lisp does a \begingroup so it can rebind things,
1410 % including the definition of @endlisp (which normally is erroneous).
1412 % Amount to narrow the margins by for @lisp.
1413 \newskip\lispnarrowing \lispnarrowing=0.4in
1415 % This is the definition that ^M gets inside @lisp
1416 % phr: changed space to \null, to avoid overfull hbox problems.
1418 \gdef\lisppar{\null\endgraf}}
1420 % Cause \obeyspaces to make each Space cause a word-separation
1421 % rather than the default which is that it acts punctuation.
1422 % This is because space in tt font looks funny.
1424 \gdef\sepspaces{\def {\ }}}
1426 \newskip\aboveenvskipamount \aboveenvskipamount= 0pt
1427 \def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
1428 \endgraf \ifdim\lastskip<\aboveenvskipamount
1429 \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
1431 \def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
1432 \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
1434 \def\lisp{\aboveenvbreak\begingroup\inENV %This group ends at the end of the @lisp body
1435 \hfuzz=12truept % Don't be fussy
1436 % Make spaces be word-separators rather than space tokens.
1438 % Single space lines
1440 % The following causes blank lines not to be ignored
1441 % by adding a space to the end of each line.
1443 \def\Elisp{\endgroup\afterenvbreak}%
1444 \parskip=0pt \advance \rightskip by \lispnarrowing
1445 \advance \leftskip by \lispnarrowing
1447 \let\exdent=\internalexdent
1448 \obeyspaces \obeylines \tt \rawbackslash
1449 \def\next##1{}\next}
1453 \def\Eexample{\Elisp}
1455 \let\smallexample=\lisp
1456 \def\Esmallexample{\Elisp}
1458 % Macro for 9 pt. examples, necessary to print with 5" lines.
1459 % From Pavel@xerox. This is not really used unless the
1460 % @smallbook command is given.
1462 \def\smalllispx{\aboveenvbreak\begingroup\inENV
1463 % This group ends at the end of the @lisp body
1464 \hfuzz=12truept % Don't be fussy
1465 % Make spaces be word-separators rather than space tokens.
1467 % Single space lines
1469 % The following causes blank lines not to be ignored
1470 % by adding a space to the end of each line.
1472 \def\Esmalllisp{\endgroup\afterenvbreak}%
1473 \parskip=0pt \advance \rightskip by \lispnarrowing
1474 \advance \leftskip by \lispnarrowing
1476 \let\exdent=\internalexdent
1477 \obeyspaces \obeylines \ninett \rawbackslash
1478 \def\next##1{}\next}
1480 % This is @display; same as @lisp except use roman font.
1482 \def\display{\begingroup\inENV %This group ends at the end of the @display body
1484 % Make spaces be word-separators rather than space tokens.
1486 % Single space lines
1488 % The following causes blank lines not to be ignored
1489 % by adding a space to the end of each line.
1491 \def\Edisplay{\endgroup\afterenvbreak}%
1492 \parskip=0pt \advance \rightskip by \lispnarrowing
1493 \advance \leftskip by \lispnarrowing
1495 \let\exdent=\internalexdent
1496 \obeyspaces \obeylines
1497 \def\next##1{}\next}
1499 % This is @format; same as @lisp except use roman font and don't narrow margins
1501 \def\format{\begingroup\inENV %This group ends at the end of the @format body
1503 % Make spaces be word-separators rather than space tokens.
1506 % The following causes blank lines not to be ignored
1507 % by adding a space to the end of each line.
1509 \def\Eformat{\endgroup\afterenvbreak}
1510 \parskip=0pt \parindent=0pt
1511 \obeyspaces \obeylines
1512 \def\next##1{}\next}
1514 % @flushleft and @flushright
1516 \def\flushleft{\begingroup\inENV %This group ends at the end of the @format body
1518 % Make spaces be word-separators rather than space tokens.
1520 % The following causes blank lines not to be ignored
1521 % by adding a space to the end of each line.
1522 % This also causes @ to work when the directive name
1523 % is terminated by end of line.
1525 \def\Eflushleft{\endgroup\afterenvbreak}%
1526 \parskip=0pt \parindent=0pt
1527 \obeyspaces \obeylines
1528 \def\next##1{}\next}
1530 \def\flushright{\begingroup\inENV %This group ends at the end of the @format body
1532 % Make spaces be word-separators rather than space tokens.
1534 % The following causes blank lines not to be ignored
1535 % by adding a space to the end of each line.
1536 % This also causes @ to work when the directive name
1537 % is terminated by end of line.
1539 \def\Eflushright{\endgroup\afterenvbreak}%
1540 \parskip=0pt \parindent=0pt
1541 \advance \leftskip by 0pt plus 1fill
1542 \obeyspaces \obeylines
1543 \def\next##1{}\next}
1545 % @quotation - narrow the margins.
1547 \def\quotation{\begingroup\inENV %This group ends at the end of the @quotation body
1548 {\parskip=0pt % because we will skip by \parskip too, later
1552 \def\Equotation{\par\endgroup\afterenvbreak}%
1553 \advance \rightskip by \lispnarrowing
1554 \advance \leftskip by \lispnarrowing}
1557 % Define formatter for defuns
1558 % First, allow user to change definition object font (\df) internally
1559 \def\setdeffont #1 {\csname DEF#1\endcsname}
1561 \newskip\defbodyindent \defbodyindent=36pt
1562 \newskip\defargsindent \defargsindent=50pt
1563 \newskip\deftypemargin \deftypemargin=12pt
1564 \newskip\deflastargmargin \deflastargmargin=18pt
1566 \newcount\parencount
1567 % define \functionparens, which makes ( and ) and & do special things.
1568 % \functionparens affects the group it is contained in.
1570 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
1571 \catcode`\[=\active \catcode`\]=\active}
1572 {\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
1573 \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
1574 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
1576 % Definitions of (, ) and & used in args for functions.
1577 % This is the definition of ( outside of all parentheses.
1578 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
1579 \global\advance\parencount by 1 }
1581 % This is the definition of ( when already inside a level of parens.
1582 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
1584 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
1585 % also in that case restore the outer-level definition of (.
1586 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
1587 \global\advance \parencount by -1 }
1588 % If we encounter &foo, then turn on ()-hacking afterwards
1589 \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ }
1591 \gdef\normalparens{\boldbrax\let&=\ampnr}
1592 } % End of definition inside \activeparens
1593 %% These parens (in \boldbrax) actually are a little bolder than the
1594 %% contained text. This is especially needed for [ and ]
1595 \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
1596 \def\lbrb{{\tt\char`\[}} \def\rbrb{{\tt\char`\]}}
1598 % First, defname, which formats the header line itself.
1599 % #1 should be the function name.
1600 % #2 should be the type of definition, such as "Function".
1605 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
1606 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
1607 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
1608 \parshape 2 0in \dimen0 \defargsindent \dimen1 %
1609 % Now output arg 2 ("Function" or some such)
1610 % ending at \deftypemargin from the right margin,
1611 % but stuck inside a box of width 0 so it does not interfere with linebreaking
1612 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}%
1613 \tolerance=10000 \hbadness=10000 % Make all lines underfull and no complaints
1614 {\df #1}\enskip % Generate function name
1617 % Actually process the body of a definition
1618 % #1 should be the terminating control sequence, such as \Edefun.
1619 % #2 should be the "another name" control sequence, such as \defunx.
1620 % #3 should be the control sequence that actually processes the header,
1621 % such as \defunheader.
1623 \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
1625 % Define the end token that this defining construct specifies
1626 % so that it will exit this group.
1627 \def#1{\endgraf\endgroup\medbreak}%
1628 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
1629 \parindent=0in \leftskip=\defbodyindent %
1630 \begingroup\obeylines\activeparens\spacesplit#3}
1632 \def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
1634 % Define the end token that this defining construct specifies
1635 % so that it will exit this group.
1636 \def#1{\endgraf\endgroup\medbreak}%
1637 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
1638 \parindent=0in \leftskip=\defbodyindent %
1639 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
1641 % Split up #2 at the first space token.
1642 % call #1 with two arguments:
1643 % the first is all of #2 before the space token,
1644 % the second is all of #2 after that space token.
1645 % If #2 contains no space token, all of it is passed as the first arg
1646 % and the second is passed as empty.
1649 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
1650 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
1652 #1{#2}{}\else #1{#2}{#3#4}\fi}}
1654 % So much for the things common to all kinds of definitions.
1658 % First, define the processing that is wanted for arguments of \defun
1659 % Use this to expand the args and terminate the paragraph they make up
1661 \def\defunargs #1{\functionparens \sl #1%
1662 \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
1663 \interlinepenalty=10000
1664 \endgraf\vskip -\parskip \penalty 10000}
1666 % Do complete processing of one @defun or @defunx line already parsed.
1668 % @deffn Command forward-char nchars
1670 \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
1672 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
1673 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup}
1675 % @defun == @deffn Function
1677 \def\defun{\defparsebody\Edefun\defunx\defunheader}
1679 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
1680 \begingroup\defname {#1}{Function}%
1681 \defunargs {#2}\endgroup %
1684 % @defmac == @deffn Macro
1686 \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
1688 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
1689 \begingroup\defname {#1}{Macro}%
1690 \defunargs {#2}\endgroup %
1693 % @defspec == @deffn Special Form
1695 \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
1697 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
1698 \begingroup\defname {#1}{Special form}%
1699 \defunargs {#2}\endgroup %
1702 % This definition is run if you use @defunx
1703 % anywhere other than immediately after a @defun or @defunx.
1705 \def\deffnx #1 {\errmessage{@deffnx in invalid context}}
1706 \def\defunx #1 {\errmessage{@defunx in invalid context}}
1707 \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
1708 \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
1710 % @defmethod, and so on
1712 % @defop {Funny Method} foo-class frobnicate argument
1714 \def\defop #1 {\def\defoptype{#1}%
1715 \defmethparsebody\Edefop\defopx\defopheader}
1717 \def\defopheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
1718 \begingroup\defname {#2}{\defoptype{} on #1}%
1719 \defunargs {#3}\endgroup %
1722 % @defmethod == @defop Method
1724 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
1726 \def\defmethodheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% entry in function index
1727 \begingroup\defname {#2}{Operation on #1}%
1728 \defunargs {#3}\endgroup %
1731 % @defcv {Class Option} foo-class foo-flag
1733 \def\defcv #1 {\def\defcvtype{#1}%
1734 \defmethparsebody\Edefcv\defcvx\defcvheader}
1736 \def\defcvarheader #1#2#3{%
1737 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
1738 \begingroup\defname {#2}{\defcvtype of #1}%
1739 \defvarargs {#3}\endgroup %
1742 % @defivar == @defcv {Instance Variable}
1744 \def\defivar{\defmethparsebody\Edefivar\defivarx\defivarheader}
1746 \def\defivarheader #1#2#3{%
1747 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
1748 \begingroup\defname {#2}{Instance variable of #1}%
1749 \defvarargs {#3}\endgroup %
1752 % These definitions are run if you use @defmethodx, etc.,
1753 % anywhere other than immediately after a @defmethod, etc.
1755 \def\defopx #1 {\errmessage{@defopx in invalid context}}
1756 \def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
1757 \def\defcvx #1 {\errmessage{@defcvx in invalid context}}
1758 \def\defivarx #1 {\errmessage{@defivarx in invalid context}}
1762 % First, define the processing that is wanted for arguments of @defvar.
1763 % This is actually simple: just print them in roman.
1764 % This must expand the args and terminate the paragraph they make up
1765 \def\defvarargs #1{\normalparens #1%
1766 \interlinepenalty=10000
1767 \endgraf\vskip -\parskip \penalty 10000}
1769 % @defvr Counter foo-count
1771 \def\defvr{\defmethparsebody\Edefvr\defvrx\defvrheader}
1773 \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
1774 \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
1776 % @defvar == @defvr Variable
1778 \def\defvar{\defparsebody\Edefvar\defvarx\defvarheader}
1780 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
1781 \begingroup\defname {#1}{Variable}%
1782 \defvarargs {#2}\endgroup %
1785 % @defopt == @defvr {User Option}
1787 \def\defopt{\defparsebody\Edefopt\defoptx\defoptheader}
1789 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
1790 \begingroup\defname {#1}{User Option}%
1791 \defvarargs {#2}\endgroup %
1794 % This definition is run if you use @defvarx
1795 % anywhere other than immediately after a @defvar or @defvarx.
1797 \def\defvrx #1 {\errmessage{@defvrx in invalid context}}
1798 \def\defvarx #1 {\errmessage{@defvarx in invalid context}}
1799 \def\defoptx #1 {\errmessage{@defoptx in invalid context}}
1802 % Args are printed in bold, a slight difference from @defvar.
1804 \def\deftpargs #1{\bf \defvarargs{#1}}
1806 % @deftp Class window height width ...
1808 \def\deftp{\defmethparsebody\Edeftp\deftpx\deftpheader}
1810 \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
1811 \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
1813 % This definition is run if you use @deftpx, etc
1814 % anywhere other than immediately after a @deftp, etc.
1816 \def\deftpx #1 {\errmessage{@deftpx in invalid context}}
1818 \message{cross reference,}
1819 % Define cross-reference macros
1822 % \setref{foo} defines a cross-reference point named foo.
1825 \dosetq{#1-pg}{Ypagenumber}%
1826 \dosetq{#1-snt}{Ysectionnumberandtype}}
1828 \def\unnumbsetref#1{%
1829 \dosetq{#1-pg}{Ypagenumber}%
1830 \dosetq{#1-snt}{Ynothing}}
1832 % \xref and \pxref generate cross references to specified points.
1834 \def\pxref #1{see \xrefX [#1,,,,,,,]}
1835 \def\xref #1{See \xrefX [#1,,,,,,,]}
1836 \def\xrefX [#1,#2,#3,#4,#5,#6]{%
1837 \setbox1=\hbox{\i{\losespace#5{}}}%
1838 \setbox0=\hbox{\losespace#3{}}%
1839 \ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
1841 section \unhbox0{} in \unhbox1%
1843 \refx{#1-snt} [\unhbox0], page\tie \refx{#1-pg}%
1846 % \dosetq is the interface for calls from other macros
1848 \def\dosetq #1#2{{\let\folio=0%
1849 \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
1852 % \internalsetq {foo}{page} expands into CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
1853 % When the aux file is read, ' is the escape character
1855 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
1857 % Things to be expanded by \internalsetq
1859 \def\Ypagenumber{\folio}
1863 \def\Ysectionnumberandtype{%
1864 \ifnum\secno=0 chapter\xreftie\the\chapno %
1865 \else \ifnum \subsecno=0 section\xreftie\the\chapno.\the\secno %
1866 \else \ifnum \subsubsecno=0 %
1867 section\xreftie\the\chapno.\the\secno.\the\subsecno %
1869 section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
1874 % Define @refx to reference a specific cross-reference string.
1878 \expandafter\ifx\csname X#1\endcsname\relax
1879 % If not defined, say something at least.
1880 \expandafter\gdef\csname X#1\endcsname {$<$undefined$>$}%
1881 \message {WARNING: Cross-reference "#1" used but not yet defined}%
1884 \csname X#1\endcsname %It's defined, so just use it.
1887 % Read the last existing aux file, if any. No error if none exists.
1889 % This is the macro invoked by entries in the aux file.
1891 {\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
1894 \catcode `\^^@=\other
1895 \catcode `\
\ 1=\other
1896 \catcode `\
\ 2=\other
1897 \catcode `\^^C=\other
1898 \catcode `\^^D=\other
1899 \catcode `\^^E=\other
1900 \catcode `\^^F=\other
1901 \catcode `\^^G=\other
1902 \catcode `\^^H=\other
1903 \catcode `\
\v=\other
1904 \catcode `\^^L=\other
1905 \catcode `\
\ e=\other
1906 \catcode `\
\ f=\other
1907 \catcode `\
\10=\other
1908 \catcode `\
\11=\other
1909 \catcode `\
\12=\other
1910 \catcode `\
\13=\other
1911 \catcode `\
\14=\other
1912 \catcode `\
\15=\other
1913 \catcode `\
\16=\other
1914 \catcode `\
\17=\other
1915 \catcode `\
\18=\other
1916 \catcode `\
\19=\other
1917 \catcode `\
\1a=\other
1918 \catcode `\^^[=\other
1919 \catcode `\^^\=\other
1920 \catcode `\^^]=\other
1921 \catcode `\^^^=\other
1922 \catcode `\^^_=\other
1937 % the aux file uses ' as the escape.
1938 % Turn off \ as an escape so we do not lose on
1939 % entries which were dumped with control sequences in their names.
1940 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
1941 % Reference to such entries still does not work the way one would wish,
1942 % but at least they do not bomb out when the aux file is read in.
1944 \catcode `\{=1 \catcode `\}=2
1949 'openin 1 'jobname.aux
1950 'ifeof 1 'else 'closein 1 'input 'jobname.aux
1954 % Open the new aux file. Tex will close it automatically at exit.
1956 \openout \auxfile=\jobname.aux
1960 \newcount \footnoteno
1962 \def\supereject{\par\penalty -20000\footnoteno =0 }
1964 \let\ptexfootnote=\footnote
1967 \gdef\footnote{\global\advance \footnoteno by \@ne
1968 \edef\thisfootno{$^{\the\footnoteno}$}%
1970 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
1971 \thisfootno\@sf\parsearg\footnotezzz}
1973 \gdef\footnotezzz #1{\insert\footins{
1974 \interlinepenalty\interfootnotelinepenalty
1975 \splittopskip\ht\strutbox % top baseline for broken footnotes
1976 \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
1977 \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
1978 \footstrut\hang\textindent{\thisfootno}#1\strut}}
1980 }%end \catcode `\@=11
1982 % End of control word definitions.
1984 \message{and turning on texinfo input format.}
1993 % Set some numeric style parameters, for 8.5 x 11 format.
1997 \parskip 18pt plus 1pt
1999 \advance\topskip by 1.2cm
2001 % Prevent underfull vbox error messages.
2004 % Use @smallbook to reset parameters for 7x9.5 format
2006 \global\lispnarrowing = 0.3in
2007 \global\baselineskip 12pt
2008 \global\parskip 3pt plus 1pt
2010 \global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
2012 \global\tolerance=700
2015 \global\pagewidth=\hsize
2016 \global\pageheight=\vsize
2017 \global\font\ninett=cmtt9
2019 \global\let\smalllisp=\smalllispx
2020 \global\let\smallexample=\smalllispx
2021 \global\def\Esmallexample{\Esmalllisp}
2024 %% For a final copy, take out the rectangles
2025 %% that mark overfull boxes (in case you have decided
2026 %% that the text looks ok even though it passes the margin).
2027 \def\finalout{\overfullrule=0pt}
2029 % Turn off all special characters except @
2030 % (and those which the user can use as if they were ordinary)
2031 % Define certain chars to be always in tt font.
2034 \def\activedoublequote{{\tt \char '042}}
2035 \let"=\activedoublequote
2037 \def~{{\tt \char '176}}
2042 \def_{{\tt \char '137}}
2044 \def|{{\tt \char '174}}
2054 % \rawbackslashxx output one backslash character in current font
2056 @gdef@rawbackslashxx{\}}
2058 % \rawbackslash redefines \ as input to do \rawbackslashxx.
2059 {\catcode`\\=\active
2060 @gdef@rawbackslash{@let\=@rawbackslashxx }}
2062 % \normalbackslash outputs one backslash in fixed width font.
2063 \def\normalbackslash{{\tt\rawbackslashxx}}
2065 % Say @foo, not \foo, in error messages.
2068 %% These look ok in all fonts, so just make them not special. The @rm below
2069 %% makes sure that the current font starts out as the newly loaded cmr10
2070 \catcode`\$=\other \catcode`\%=\other \catcode`\&=\other \catcode`\#=\other
2072 \catcode 17=0 @c Define control-q
2074 @let\=@normalbackslash