Imported from ../bash-1.14.7.tar.gz.
[platform/upstream/bash.git] / lib / termcap / grot / texinfo.tex
1 %% TeX macros to handle texinfo files
2
3 %   Copyright (C) 1985, 86, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
4
5 %This texinfo.tex file is free software; you can redistribute it and/or
6 %modify it under the terms of the GNU General Public License as
7 %published by the Free Software Foundation; either version 2, or (at
8 %your option) any later version.
9
10 %This texinfo.tex file is distributed in the hope that it will be
11 %useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 %of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 %General Public License for more details.
14
15 %You should have received a copy of the GNU General Public License
16 %along with this texinfo.tex file; see the file COPYING.  If not, write
17 %to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
18 %USA.
19
20
21 %In other words, you are welcome to use, share and improve this program.
22 %You are forbidden to forbid anyone else to use, share and improve
23 %what you give them.   Help stamp out software-hoarding!
24
25 \def\texinfoversion{2.104}
26 \message{Loading texinfo package [Version \texinfoversion]:}
27 \message{}
28
29 % Print the version number if in a .fmt file.
30 \everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
31
32 % Save some parts of plain tex whose names we will redefine.
33
34 \let\ptexlbrace=\{
35 \let\ptexrbrace=\}
36 \let\ptexdots=\dots
37 \let\ptexdot=\.
38 \let\ptexstar=\*
39 \let\ptexend=\end
40 \let\ptexbullet=\bullet
41 \let\ptexb=\b
42 \let\ptexc=\c
43 \let\ptexi=\i
44 \let\ptext=\t
45 \let\ptexl=\l
46 \let\ptexL=\L
47
48 \def\tie{\penalty 10000\ }     % Save plain tex definition of ~.
49
50 \message{Basics,}
51 \chardef\other=12
52
53 % If this character appears in an error message or help string, it
54 % starts a new line in the output.
55 \newlinechar = `^^J
56
57 % Ignore a token.
58
59 \def\gobble#1{}
60
61 \hyphenation{ap-pen-dix}
62 \hyphenation{mini-buf-fer mini-buf-fers}
63 \hyphenation{eshell}
64
65 % Margin to add to right of even pages, to left of odd pages.
66 \newdimen \bindingoffset  \bindingoffset=0pt
67 \newdimen \normaloffset   \normaloffset=\hoffset
68 \newdimen\pagewidth \newdimen\pageheight
69 \pagewidth=\hsize \pageheight=\vsize
70
71 % Sometimes it is convenient to have everything in the transcript file
72 % and nothing on the terminal.  We don't just call \tracingall here,
73 % since that produces some useless output on the terminal.
74 %
75 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
76 \def\loggingall{\tracingcommands2 \tracingstats2 
77    \tracingpages1 \tracingoutput1 \tracinglostchars1 
78    \tracingmacros2 \tracingparagraphs1 \tracingrestores1 
79    \showboxbreadth\maxdimen\showboxdepth\maxdimen
80 }%
81
82 %---------------------Begin change-----------------------
83 %
84 %%%% For @cropmarks command.
85 % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
86 %
87 \newdimen\cornerlong \newdimen\cornerthick
88 \newdimen \topandbottommargin
89 \newdimen \outerhsize \newdimen \outervsize
90 \cornerlong=1pc\cornerthick=.3pt        % These set size of cropmarks
91 \outerhsize=7in
92 %\outervsize=9.5in
93 % Alternative @smallbook page size is 9.25in
94 \outervsize=9.25in
95 \topandbottommargin=.75in
96 %
97 %---------------------End change-----------------------
98
99 % \onepageout takes a vbox as an argument.  Note that \pagecontents
100 % does insertions itself, but you have to call it yourself.
101 \chardef\PAGE=255  \output={\onepageout{\pagecontents\PAGE}}
102 \def\onepageout#1{\hoffset=\normaloffset
103 \ifodd\pageno  \advance\hoffset by \bindingoffset
104 \else \advance\hoffset by -\bindingoffset\fi
105 {\escapechar=`\\\relax % makes sure backslash is used in output files.
106 \shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
107 {\let\hsize=\pagewidth \makefootline}}}%
108 \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
109
110 %%%% For @cropmarks command %%%%
111
112 % Here is a modification of the main output routine for Near East Publications
113 % This provides right-angle cropmarks at all four corners.
114 % The contents of the page are centerlined into the cropmarks,
115 % and any desired binding offset is added as an \hskip on either
116 % site of the centerlined box.  (P. A. MacKay, 12 November, 1986)
117 %
118 \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
119 {\escapechar=`\\\relax % makes sure backslash is used in output files.
120                  \shipout
121                  \vbox to \outervsize{\hsize=\outerhsize
122                  \vbox{\line{\ewtop\hfill\ewtop}}
123                  \nointerlineskip
124                  \line{\vbox{\moveleft\cornerthick\nstop}
125                        \hfill
126                        \vbox{\moveright\cornerthick\nstop}}
127                  \vskip \topandbottommargin
128                  \centerline{\ifodd\pageno\hskip\bindingoffset\fi
129                         \vbox{
130                         {\let\hsize=\pagewidth \makeheadline}
131                         \pagebody{#1}
132                         {\let\hsize=\pagewidth \makefootline}}
133                         \ifodd\pageno\else\hskip\bindingoffset\fi}
134                  \vskip \topandbottommargin plus1fill minus1fill
135                  \boxmaxdepth\cornerthick
136                  \line{\vbox{\moveleft\cornerthick\nsbot}
137                        \hfill
138                        \vbox{\moveright\cornerthick\nsbot}}
139                  \nointerlineskip
140                  \vbox{\line{\ewbot\hfill\ewbot}}
141         }}
142   \advancepageno 
143   \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
144 %
145 % Do @cropmarks to get crop marks
146 \def\cropmarks{\let\onepageout=\croppageout }
147
148 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
149 {\catcode`\@ =11
150 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
151 \dimen@=\dp#1 \unvbox#1
152 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
153 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
154 }
155
156 %
157 % Here are the rules for the cropmarks.  Note that they are
158 % offset so that the space between them is truly \outerhsize or \outervsize
159 % (P. A. MacKay, 12 November, 1986)
160 %
161 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
162 \def\nstop{\vbox
163   {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
164 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
165 \def\nsbot{\vbox
166   {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
167
168 % Parse an argument, then pass it to #1.  The argument is the rest of
169 % the input line (except we remove a trailing comment).  #1 should be a
170 % macro which expects an ordinary undelimited TeX argument.
171 %
172 \def\parsearg#1{%
173   \let\next = #1%
174   \begingroup
175     \obeylines
176     \futurelet\temp\parseargx
177 }
178
179 % If the next token is an obeyed space (from an @example environment or
180 % the like), remove it and recurse.  Otherwise, we're done.
181 \def\parseargx{%
182   % \obeyedspace is defined far below, after the definition of \sepspaces.
183   \ifx\obeyedspace\temp
184     \expandafter\parseargdiscardspace
185   \else
186     \expandafter\parseargline
187   \fi
188 }
189
190 % Remove a single space (as the delimiter token to the macro call).
191 {\obeyspaces %
192  \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
193
194 {\obeylines %
195   \gdef\parseargline#1^^M{%
196     \endgroup % End of the group started in \parsearg.
197     %
198     % First remove any @c comment, then any @comment.
199     % Result of each macro is put in \toks0.
200     \argremovec #1\c\relax %
201     \expandafter\argremovecomment \the\toks0 \comment\relax %
202     %
203     % Call the caller's macro, saved as \next in \parsearg.
204     \expandafter\next\expandafter{\the\toks0}%
205   }%
206 }
207
208 % Since all \c{,omment} does is throw away the argument, we can let TeX
209 % do that for us.  The \relax here is matched by the \relax in the call
210 % in \parseargline; it could be more or less anything, its purpose is
211 % just to delimit the argument to the \c.
212 \def\argremovec#1\c#2\relax{\toks0 = {#1}}
213 \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
214
215 % \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
216 %    @end itemize  @c foo
217 % will have two active spaces as part of the argument with the
218 % `itemize'.  Here we remove all active spaces from #1, and assign the
219 % result to \toks0.
220 %
221 % This loses if there are any *other* active characters besides spaces
222 % in the argument -- _ ^ +, for example -- since they get expanded.
223 % Fortunately, Texinfo does not define any such commands.  (If it ever
224 % does, the catcode of the characters in questionwill have to be changed
225 % here.)  But this means we cannot call \removeactivespaces as part of
226 % \argremovec{,omment}, since @c uses \parsearg, and thus the argument
227 % that \parsearg gets might well have any character at all in it.
228
229 \def\removeactivespaces#1{%
230   \begingroup
231     \ignoreactivespaces
232     \edef\temp{#1}%
233     \global\toks0 = \expandafter{\temp}%
234   \endgroup
235 }
236
237 % Change the active space to expand to nothing.
238
239 \begingroup
240   \obeyspaces
241   \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
242 \endgroup
243
244
245 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
246
247 %% These are used to keep @begin/@end levels from running away
248 %% Call \inENV within environments (after a \begingroup)
249 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
250 \def\ENVcheck{%
251 \ifENV\errmessage{Still within an environment.  Type Return to continue.}
252 \endgroup\fi} % This is not perfect, but it should reduce lossage
253
254 % @begin foo  is the same as @foo, for now.
255 \newhelp\EMsimple{Type <Return> to continue.}
256
257 \outer\def\begin{\parsearg\beginxxx}
258
259 \def\beginxxx #1{%
260 \expandafter\ifx\csname #1\endcsname\relax
261 {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
262 \csname #1\endcsname\fi}
263
264 % @end foo executes the definition of \Efoo.
265 %
266 \def\end{\parsearg\endxxx}
267 \def\endxxx #1{%
268   \removeactivespaces{#1}%
269   \edef\endthing{\the\toks0}%
270   %
271   \expandafter\ifx\csname E\endthing\endcsname\relax
272     \expandafter\ifx\csname \endthing\endcsname\relax
273       % There's no \foo, i.e., no ``environment'' foo.
274       \errhelp = \EMsimple
275       \errmessage{Undefined command `@end \endthing'}%
276     \else
277       \unmatchedenderror\endthing
278     \fi
279   \else
280     % Everything's ok; the right environment has been started.
281     \csname E\endthing\endcsname
282   \fi
283 }
284
285 % There is an environment #1, but it hasn't been started.  Give an error.
286
287 \def\unmatchedenderror#1{%
288   \errhelp = \EMsimple
289   \errmessage{This `@end #1' doesn't have a matching `@#1'}%
290 }
291
292 % Define the control sequence \E#1 to give an unmatched @end error.
293
294 \def\defineunmatchedend#1{%
295   \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
296 }
297
298
299 % Single-spacing is done by various environments.
300
301 \newskip\singlespaceskip \singlespaceskip = \baselineskip
302 \def\singlespace{%
303 {\advance \baselineskip by -\singlespaceskip
304 \kern \baselineskip}%
305 \baselineskip=\singlespaceskip
306 }
307
308 %% Simple single-character @ commands
309
310 % @@ prints an @
311 % Kludge this until the fonts are right (grr).
312 \def\@{{\tt \char '100}}
313
314 % This is turned off because it was never documented
315 % and you can use @w{...} around a quote to suppress ligatures.
316 %% Define @` and @' to be the same as ` and '
317 %% but suppressing ligatures.
318 %\def\`{{`}}
319 %\def\'{{'}}
320
321 % Used to generate quoted braces.
322
323 \def\mylbrace {{\tt \char '173}}
324 \def\myrbrace {{\tt \char '175}}
325 \let\{=\mylbrace
326 \let\}=\myrbrace
327
328 % @: forces normal size whitespace following.
329 \def\:{\spacefactor=1000 }
330
331 % @* forces a line break.
332 \def\*{\hfil\break\hbox{}\ignorespaces}
333
334 % @. is an end-of-sentence period.
335 \def\.{.\spacefactor=3000 }
336
337 % @w prevents a word break.  Without the \leavevmode, @w at the
338 % beginning of a paragraph, when TeX is still in vertical mode, would
339 % produce a whole line of output instead of starting the paragraph.
340 \def\w#1{\leavevmode\hbox{#1}}
341
342 % @group ... @end group forces ... to be all on one page, by enclosing
343 % it in a TeX vbox.  We use \vtop instead of \vbox to construct the box
344 % to keep its height that of a normal line.  According to the rules for
345 % \topskip (p.114 of the TeXbook), the glue inserted is
346 % max (\topskip - \ht (first item), 0).  If that height is large,
347 % therefore, no glue is inserted, and the space between the headline and
348 % the text is small, which looks bad.
349
350 \def\group{\begingroup
351   \ifnum\catcode13=\active \else
352     \errhelp = \groupinvalidhelp
353     \errmessage{@group invalid in context where filling is enabled}%
354   \fi
355   %
356   % The \vtop we start below produces a box with normal height and large
357   % depth; thus, TeX puts \baselineskip glue before it, and (when the
358   % next line of text is done) \lineskip glue after it.  (See p.82 of
359   % the TeXbook.)  But the next line of text also gets us \parskip glue.
360   % Final result: space below is slightly more than space above.
361   \def\Egroup{%
362     \egroup           % End the \vtop.
363     \endgroup         % End the \group.
364   }%
365   %
366   \vtop\bgroup
367     % We have to put a strut on the last line in case the @group is in
368     % the midst of an example, rather than completely enclosing it.
369     % Otherwise, the interline space between the last line of the group
370     % and the first line afterwards is too small.  But we can't put the
371     % strut in \Egroup, since there it would be on a line by itself.
372     % Hence this just inserts a strut at the beginning of each line.
373     \everypar = {\strut}%
374     %
375     % We do @comment here in case we are called inside an environment,
376     % such as @example, where each end-of-line in the input causes an
377     % end-of-line in the output.  We don't want the end-of-line after
378     % the `@group' to put extra space in the output.  Since @group
379     % should appear on a line by itself (according to the Texinfo
380     % manual), we don't worry about eating any user text.
381     \comment
382 }
383 %
384 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
385 % message, so this ends up printing `@group can only ...'.
386
387 \newhelp\groupinvalidhelp{%
388 group can only be used in environments such as @example,^^J%
389 where each line of input produces a line of output.}
390
391 % @need space-in-mils
392 % forces a page break if there is not space-in-mils remaining.
393
394 \newdimen\mil  \mil=0.001in
395
396 \def\need{\parsearg\needx}
397
398 % Old definition--didn't work.
399 %\def\needx #1{\par %
400 %% This method tries to make TeX break the page naturally
401 %% if the depth of the box does not fit.
402 %{\baselineskip=0pt%
403 %\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
404 %\prevdepth=-1000pt
405 %}}
406
407 \def\needx#1{%
408   % Go into vertical mode, so we don't make a big box in the middle of a
409   % paragraph.
410   \par
411   %
412   % Don't add any leading before our big empty box, but allow a page
413   % break, since the best break might be right here.
414   \allowbreak
415   \nointerlineskip
416   \vtop to #1\mil{\vfil}%
417   % 
418   % TeX does not even consider page breaks if a penalty added to the
419   % main vertical list is 10000 or more.  But in order to see if the
420   % empty box we just added fits on the page, we must make it consider
421   % page breaks.  On the other hand, we don't want to actually break the
422   % page after the empty box.  So we use a penalty of 9999.
423   % 
424   % There is an extremely small chance that TeX will actually break the
425   % page at this \penalty, if there are no other feasible breakpoints in
426   % sight.  (If the user is using lots of big @group commands, which
427   % almost-but-not-quite fill up a page, TeX will have a hard time doing
428   % good page breaking, for example.)  However, I could not construct an
429   % example where a page broke at this \penalty; if it happens in a real
430   % document, then we can reconsider our strategy.
431   \penalty9999
432   %
433   % Back up by the size of the box, whether we did a page break or not.
434   \kern -#1\mil
435   %
436   % Do not allow a page break right after this kern.
437   \nobreak
438 }
439
440 % @br   forces paragraph break
441
442 \let\br = \par
443
444 % @dots{}  output some dots
445
446 \def\dots{$\ldots$}
447
448 % @page    forces the start of a new page
449
450 \def\page{\par\vfill\supereject}
451
452 % @exdent text....
453 % outputs text on separate line in roman font, starting at standard page margin
454
455 % This records the amount of indent in the innermost environment.
456 % That's how much \exdent should take out.
457 \newskip\exdentamount
458
459 % This defn is used inside fill environments such as @defun.
460 \def\exdent{\parsearg\exdentyyy}
461 \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
462
463 % This defn is used inside nofill environments such as @example.
464 \def\nofillexdent{\parsearg\nofillexdentyyy}
465 \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
466 \leftline{\hskip\leftskip{\rm#1}}}}
467
468 %\hbox{{\rm#1}}\hfil\break}}
469
470 % @include file    insert text of that file as input.
471
472 \def\include{\parsearg\includezzz}
473 %Use \input\thisfile to avoid blank after \input, which may be an active
474 %char (in which case the blank would become the \input argument).
475 %The grouping keeps the value of \thisfile correct even when @include
476 %is nested.
477 \def\includezzz #1{\begingroup
478 \def\thisfile{#1}\input\thisfile
479 \endgroup}
480
481 \def\thisfile{}
482
483 % @center line   outputs that line, centered
484
485 \def\center{\parsearg\centerzzz}
486 \def\centerzzz #1{{\advance\hsize by -\leftskip
487 \advance\hsize by -\rightskip
488 \centerline{#1}}}
489
490 % @sp n   outputs n lines of vertical space
491
492 \def\sp{\parsearg\spxxx}
493 \def\spxxx #1{\par \vskip #1\baselineskip}
494
495 % @comment ...line which is ignored...
496 % @c is the same as @comment
497 % @ignore ... @end ignore  is another way to write a comment
498
499 \def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
500 \parsearg \commentxxx}
501
502 \def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
503
504 \let\c=\comment
505
506 % Prevent errors for section commands.
507 % Used in @ignore and in failing conditionals.
508 \def\ignoresections{%
509 \let\chapter=\relax
510 \let\unnumbered=\relax
511 \let\top=\relax
512 \let\unnumberedsec=\relax
513 \let\unnumberedsection=\relax
514 \let\unnumberedsubsec=\relax
515 \let\unnumberedsubsection=\relax
516 \let\unnumberedsubsubsec=\relax
517 \let\unnumberedsubsubsection=\relax
518 \let\section=\relax
519 \let\subsec=\relax
520 \let\subsubsec=\relax
521 \let\subsection=\relax
522 \let\subsubsection=\relax
523 \let\appendix=\relax
524 \let\appendixsec=\relax
525 \let\appendixsection=\relax
526 \let\appendixsubsec=\relax
527 \let\appendixsubsection=\relax
528 \let\appendixsubsubsec=\relax
529 \let\appendixsubsubsection=\relax
530 \let\contents=\relax
531 \let\smallbook=\relax
532 \let\titlepage=\relax
533 }
534
535 % Used in nested conditionals, where we have to parse the Texinfo source
536 % and so want to turn off most commands, in case they are used
537 % incorrectly.  
538
539 \def\ignoremorecommands{%
540   \let\defcv = \relax
541   \let\deffn = \relax
542   \let\deffnx = \relax
543   \let\defindex = \relax
544   \let\defivar = \relax
545   \let\defmac = \relax
546   \let\defmethod = \relax
547   \let\defop = \relax
548   \let\defopt = \relax
549   \let\defspec = \relax
550   \let\deftp = \relax
551   \let\deftypefn = \relax
552   \let\deftypefun = \relax
553   \let\deftypevar = \relax
554   \let\deftypevr = \relax
555   \let\defun = \relax
556   \let\defvar = \relax
557   \let\defvr = \relax
558   \let\ref = \relax
559   \let\xref = \relax
560   \let\printindex = \relax
561   \let\pxref = \relax
562   \let\settitle = \relax
563   \let\include = \relax
564 }
565
566 % Ignore @ignore ... @end ignore.
567
568 \def\ignore{\doignore{ignore}}
569
570 % Also ignore @ifinfo, @menu, and @direntry text.
571
572 \def\ifinfo{\doignore{ifinfo}}
573 \def\menu{\doignore{menu}}
574 \def\direntry{\doignore{direntry}}
575
576 % Ignore text until a line `@end #1'.
577
578 \def\doignore#1{\begingroup
579   % Don't complain about control sequences we have declared \outer.
580   \ignoresections
581   %
582   % Define a command to swallow text until we reach `@end #1'.
583   \long\def\doignoretext##1\end #1{\enddoignore}%
584   %
585   % Make sure that spaces turn into tokens that match what \doignoretext wants.
586   \catcode32 = 10
587   %
588   % And now expand that command.
589   \doignoretext
590 }
591
592 % What we do to finish off ignored text.
593
594 \def\enddoignore{\endgroup\ignorespaces}%
595
596 \newif\ifwarnedobs\warnedobsfalse
597 \def\obstexwarn{%
598   \ifwarnedobs\relax\else
599   % We need to warn folks that they may have trouble with TeX 3.0.
600   % This uses \immediate\write16 rather than \message to get newlines.
601     \immediate\write16{}
602     \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
603     \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
604     \immediate\write16{If you are running another version of TeX, relax.}
605     \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
606     \immediate\write16{  Then upgrade your TeX installation if you can.}
607     \immediate\write16{If you are stuck with version 3.0, run the}
608     \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}
609     \immediate\write16{  to use a workaround.}
610     \immediate\write16{}
611     \warnedobstrue
612     \fi
613 }
614
615 % **In TeX 3.0, setting text in \nullfont hangs tex.  For a
616 % workaround (which requires the file ``dummy.tfm'' to be installed),
617 % uncomment the following line:
618 %%%%%\font\nullfont=dummy\let\obstexwarn=\relax
619
620 % Ignore text, except that we keep track of conditional commands for
621 % purposes of nesting, up to an `@end #1' command.
622
623 \def\nestedignore#1{%
624   \obstexwarn
625   % We must actually expand the ignored text to look for the @end
626   % command, so that nested ignore constructs work.  Thus, we put the
627   % text into a \vbox and then do nothing with the result.  To minimize
628   % the change of memory overflow, we follow the approach outlined on
629   % page 401 of the TeXbook: make the current font be a dummy font.
630   % 
631   \setbox0 = \vbox\bgroup
632     % Don't complain about control sequences we have declared \outer.
633     \ignoresections
634     %
635     % Define `@end #1' to end the box, which will in turn undefine the
636     % @end command again.
637     \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
638     %
639     % We are going to be parsing Texinfo commands.  Most cause no
640     % trouble when they are used incorrectly, but some commands do
641     % complicated argument parsing or otherwise get confused, so we
642     % undefine them.
643     %
644     % We can't do anything about stray @-signs, unfortunately;
645     % they'll produce `undefined control sequence' errors.
646     \ignoremorecommands
647     % 
648     % Set the current font to be \nullfont, a TeX primitive, and define
649     % all the font commands to also use \nullfont.  We don't use
650     % dummy.tfm, as suggested in the TeXbook, because not all sites
651     % might have that installed.  Therefore, math mode will still
652     % produce output, but that should be an extremely small amount of
653     % stuff compared to the main input.
654     %
655     \nullfont
656     \let\tenrm = \nullfont  \let\tenit = \nullfont  \let\tensl = \nullfont
657     \let\tenbf = \nullfont  \let\tentt = \nullfont  \let\smallcaps = \nullfont
658     \let\tensf = \nullfont
659     %
660     % Don't complain when characters are missing from the fonts.
661     \tracinglostchars = 0
662     %
663     % Don't bother to do space factor calculations.
664     \frenchspacing
665     %
666     % Don't report underfull hboxes.
667     \hbadness = 10000
668     %
669     % Do minimal line-breaking.
670     \pretolerance = 10000
671     %
672     % Do not execute instructions in @tex
673     \def\tex{\doignore{tex}}
674 }
675
676 % @set VAR sets the variable VAR to an empty value.
677 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
678
679 % Since we want to separate VAR from REST-OF-LINE (which might be
680 % empty), we can't just use \parsearg; we have to insert a space of our
681 % own to delimit the rest of the line, and then take it out again if we
682 % didn't need it.
683 %
684 \def\set{\parsearg\setxxx}
685 \def\setxxx#1{\setyyy#1 \endsetyyy}
686 \def\setyyy#1 #2\endsetyyy{%
687   \def\temp{#2}%
688   \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
689   \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
690   \fi
691 }
692 \def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}}
693
694 % @clear VAR clears (i.e., unsets) the variable VAR.
695 %
696 \def\clear{\parsearg\clearxxx}
697 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
698
699 % @value{foo} gets the text saved in variable foo.
700 %
701 \def\value#1{\expandafter
702                 \ifx\csname SET#1\endcsname\relax
703                         {\{No value for ``#1''\}}
704                 \else \csname SET#1\endcsname \fi}
705
706 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
707 % with @set.
708
709 \def\ifset{\parsearg\ifsetxxx}
710 \def\ifsetxxx #1{%
711   \expandafter\ifx\csname SET#1\endcsname\relax
712     \expandafter\ifsetfail
713   \else
714     \expandafter\ifsetsucceed
715   \fi
716 }
717 \def\ifsetsucceed{\conditionalsucceed{ifset}}
718 \def\ifsetfail{\nestedignore{ifset}}
719 \defineunmatchedend{ifset}
720
721 % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
722 % defined with @set, or has been undefined with @clear.
723
724 \def\ifclear{\parsearg\ifclearxxx}
725 \def\ifclearxxx #1{%
726   \expandafter\ifx\csname SET#1\endcsname\relax
727     \expandafter\ifclearsucceed
728   \else
729     \expandafter\ifclearfail
730   \fi
731 }
732 \def\ifclearsucceed{\conditionalsucceed{ifclear}}
733 \def\ifclearfail{\nestedignore{ifclear}}
734 \defineunmatchedend{ifclear}
735
736 % @iftex always succeeds; we read the text following, through @end
737 % iftex).  But `@end iftex' should be valid only after an @iftex.
738
739 \def\iftex{\conditionalsucceed{iftex}}
740 \defineunmatchedend{iftex}
741
742 % We can't just want to start a group at @iftex (for example) and end it
743 % at @end iftex, since then @set commands inside the conditional have no
744 % effect (they'd get reverted at the end of the group).  So we must
745 % define \Eiftex to redefine itself to be its previous value.  (We can't
746 % just define it to fail again with an ``unmatched end'' error, since
747 % the @ifset might be nested.)
748
749 \def\conditionalsucceed#1{%
750   \edef\temp{%
751     % Remember the current value of \E#1.
752     \let\nece{prevE#1} = \nece{E#1}%
753     %
754     % At the `@end #1', redefine \E#1 to be its previous value.
755     \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
756   }%
757   \temp
758 }
759
760 % We need to expand lots of \csname's, but we don't want to expand the
761 % control sequences after we've constructed them.
762 %
763 \def\nece#1{\expandafter\noexpand\csname#1\endcsname}
764
765 % @asis just yields its argument.  Used with @table, for example.
766
767 \def\asis#1{#1}
768
769 % @math means output in math mode.
770 % We don't use $'s directly in the definition of \math because control
771 % sequences like \math are expanded when the toc file is written.  Then,
772 % we read the toc file back, the $'s will be normal characters (as they
773 % should be, according to the definition of Texinfo).  So we must use a
774 % control sequence to switch into and out of math mode.
775
776 % This isn't quite enough for @math to work properly in indices, but it
777 % seems unlikely it will ever be needed there.
778
779 \let\implicitmath = $
780 \def\math#1{\implicitmath #1\implicitmath}
781
782 % @bullet and @minus need the same treatment as @math, just above.
783 \def\bullet{\implicitmath\ptexbullet\implicitmath}
784 \def\minus{\implicitmath-\implicitmath}
785
786 \def\node{\ENVcheck\parsearg\nodezzz}
787 \def\nodezzz#1{\nodexxx [#1,]}
788 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
789 \let\nwnode=\node
790 \let\lastnode=\relax
791
792 \def\donoderef{\ifx\lastnode\relax\else
793 \expandafter\expandafter\expandafter\setref{\lastnode}\fi
794 \let\lastnode=\relax}
795
796 \def\unnumbnoderef{\ifx\lastnode\relax\else
797 \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
798 \let\lastnode=\relax}
799
800 \def\appendixnoderef{\ifx\lastnode\relax\else
801 \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
802 \let\lastnode=\relax}
803
804 \let\refill=\relax
805   
806 % @setfilename is done at the beginning of every texinfo file.
807 % So open here the files we need to have open while reading the input.
808 % This makes it possible to make a .fmt file for texinfo.
809 \def\setfilename{%
810    \readauxfile
811    \opencontents
812    \openindices
813    \fixbackslash  % Turn off hack to swallow `\input texinfo'.
814    \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
815    \comment % Ignore the actual filename.
816 }
817
818 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
819
820 \def\inforef #1{\inforefzzz #1,,,,**}
821 \def\inforefzzz #1,#2,#3,#4**{See Info file \file{\ignorespaces #3{}},
822   node \samp{\ignorespaces#1{}}}
823
824 \message{fonts,}
825
826 % Font-change commands.
827
828 % Texinfo supports the sans serif font style, which plain TeX does not.
829 % So we set up a \sf analogous to plain's \rm, etc.
830 \newfam\sffam
831 \def\sf{\fam=\sffam \tensf}
832 \let\li = \sf % Sometimes we call it \li, not \sf.
833
834 %% Try out Computer Modern fonts at \magstephalf
835 \let\mainmagstep=\magstephalf
836
837 \ifx\bigger\relax
838 \let\mainmagstep=\magstep1
839 \font\textrm=cmr12
840 \font\texttt=cmtt12
841 \else
842 \font\textrm=cmr10 scaled \mainmagstep
843 \font\texttt=cmtt10 scaled \mainmagstep
844 \fi
845 % Instead of cmb10, you many want to use cmbx10.
846 % cmbx10 is a prettier font on its own, but cmb10
847 % looks better when embedded in a line with cmr10.
848 \font\textbf=cmb10 scaled \mainmagstep 
849 \font\textit=cmti10 scaled \mainmagstep
850 \font\textsl=cmsl10 scaled \mainmagstep
851 \font\textsf=cmss10 scaled \mainmagstep
852 \font\textsc=cmcsc10 scaled \mainmagstep
853 \font\texti=cmmi10 scaled \mainmagstep
854 \font\textsy=cmsy10 scaled \mainmagstep
855
856 % A few fonts for @defun, etc.
857 \font\defbf=cmbx10 scaled \magstep1 %was 1314
858 \font\deftt=cmtt10 scaled \magstep1
859 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
860
861 % Fonts for indices and small examples.
862 % We actually use the slanted font rather than the italic, 
863 % because texinfo normally uses the slanted fonts for that.
864 % Do not make many font distinctions in general in the index, since they
865 % aren't very useful.
866 \font\ninett=cmtt9
867 \font\indrm=cmr9
868 \font\indit=cmsl9
869 \let\indsl=\indit
870 \let\indtt=\ninett
871 \let\indsf=\indrm
872 \let\indbf=\indrm
873 \let\indsc=\indrm
874 \font\indi=cmmi9
875 \font\indsy=cmsy9
876
877 % Fonts for headings
878 \font\chaprm=cmbx12 scaled \magstep2
879 \font\chapit=cmti12 scaled \magstep2
880 \font\chapsl=cmsl12 scaled \magstep2
881 \font\chaptt=cmtt12 scaled \magstep2
882 \font\chapsf=cmss12 scaled \magstep2
883 \let\chapbf=\chaprm
884 \font\chapsc=cmcsc10 scaled\magstep3
885 \font\chapi=cmmi12 scaled \magstep2
886 \font\chapsy=cmsy10 scaled \magstep3
887
888 \font\secrm=cmbx12 scaled \magstep1
889 \font\secit=cmti12 scaled \magstep1
890 \font\secsl=cmsl12 scaled \magstep1
891 \font\sectt=cmtt12 scaled \magstep1
892 \font\secsf=cmss12 scaled \magstep1
893 \font\secbf=cmbx12 scaled \magstep1
894 \font\secsc=cmcsc10 scaled\magstep2
895 \font\seci=cmmi12 scaled \magstep1
896 \font\secsy=cmsy10 scaled \magstep2
897
898 % \font\ssecrm=cmbx10 scaled \magstep1    % This size an font looked bad.
899 % \font\ssecit=cmti10 scaled \magstep1    % The letters were too crowded.
900 % \font\ssecsl=cmsl10 scaled \magstep1
901 % \font\ssectt=cmtt10 scaled \magstep1
902 % \font\ssecsf=cmss10 scaled \magstep1
903
904 %\font\ssecrm=cmb10 scaled 1315 % Note the use of cmb rather than cmbx.
905 %\font\ssecit=cmti10 scaled 1315        % Also, the size is a little larger than
906 %\font\ssecsl=cmsl10 scaled 1315        % being scaled magstep1.
907 %\font\ssectt=cmtt10 scaled 1315
908 %\font\ssecsf=cmss10 scaled 1315
909
910 %\let\ssecbf=\ssecrm
911
912 \font\ssecrm=cmbx12 scaled \magstephalf
913 \font\ssecit=cmti12 scaled \magstephalf
914 \font\ssecsl=cmsl12 scaled \magstephalf
915 \font\ssectt=cmtt12 scaled \magstephalf
916 \font\ssecsf=cmss12 scaled \magstephalf
917 \font\ssecbf=cmbx12 scaled \magstephalf
918 \font\ssecsc=cmcsc10 scaled \magstep1 
919 \font\sseci=cmmi12 scaled \magstephalf
920 \font\ssecsy=cmsy10 scaled \magstep1
921 % The smallcaps and symbol fonts should actually be scaled \magstep1.5,
922 % but that is not a standard magnification.
923
924 % Fonts for title page:
925 \font\titlerm = cmbx12 scaled \magstep3
926 \let\authorrm = \secrm
927
928 % In order for the font changes to affect most math symbols and letters,
929 % we have to define the \textfont of the standard families.  Since
930 % texinfo doesn't allow for producing subscripts and superscripts, we
931 % don't bother to reset \scriptfont and \scriptscriptfont (which would
932 % also require loading a lot more fonts).
933
934 \def\resetmathfonts{%
935   \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
936   \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
937   \textfont\ttfam = \tentt \textfont\sffam = \tensf
938 }
939
940
941 % The font-changing commands redefine the meanings of \tenSTYLE, instead
942 % of just \STYLE.  We do this so that font changes will continue to work
943 % in math mode, where it is the current \fam that is relevant in most
944 % cases, not the current.  Plain TeX does, for example,
945 % \def\bf{\fam=\bffam \tenbf}  By redefining \tenbf, we obviate the need
946 % to redefine \bf itself.  
947 \def\textfonts{%
948   \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
949   \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
950   \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
951   \resetmathfonts}
952 \def\chapfonts{%
953   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 
954   \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
955   \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
956   \resetmathfonts}
957 \def\secfonts{%
958   \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
959   \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
960   \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
961   \resetmathfonts}
962 \def\subsecfonts{%
963   \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
964   \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
965   \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
966   \resetmathfonts}
967 \def\indexfonts{%
968   \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
969   \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
970   \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy
971   \resetmathfonts}
972
973 % Set up the default fonts, so we can use them for creating boxes.
974
975 \textfonts
976
977 % Count depth in font-changes, for error checks
978 \newcount\fontdepth \fontdepth=0
979
980 % Fonts for short table of contents.
981 \font\shortcontrm=cmr12
982 \font\shortcontbf=cmbx12
983 \font\shortcontsl=cmsl12
984
985 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
986 %% serif) and @ii for TeX italic
987
988 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
989 % unless the following character is such as not to need one.
990 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
991 \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
992
993 \let\i=\smartitalic
994 \let\var=\smartitalic
995 \let\dfn=\smartitalic
996 \let\emph=\smartitalic
997 \let\cite=\smartitalic
998
999 \def\b#1{{\bf #1}}
1000 \let\strong=\b
1001
1002 % We can't just use \exhyphenpenalty, because that only has effect at
1003 % the end of a paragraph.  Restore normal hyphenation at the end of the
1004 % group within which \nohyphenation is presumably called.
1005
1006 \def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
1007 \def\restorehyphenation{\hyphenchar\font = `- }
1008
1009 \def\t#1{%
1010   {\tt \nohyphenation \rawbackslash \frenchspacing #1}%
1011   \null
1012 }
1013 \let\ttfont = \t
1014 %\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
1015 \def\samp #1{`\tclose{#1}'\null}
1016 \def\key #1{{\tt \nohyphenation \uppercase{#1}}\null}
1017 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
1018
1019 \let\file=\samp
1020
1021 % @code is a modification of @t,
1022 % which makes spaces the same size as normal in the surrounding text.
1023 \def\tclose#1{%
1024   {%
1025     % Change normal interword space to be same as for the current font.
1026     \spaceskip = \fontdimen2\font
1027     %
1028     % Switch to typewriter.
1029     \tt
1030     %
1031     % But `\ ' produces the large typewriter interword space.
1032     \def\ {{\spaceskip = 0pt{} }}%
1033     %
1034     % Turn off hyphenation.
1035     \nohyphenation
1036     % 
1037     \rawbackslash
1038     \frenchspacing
1039     #1%
1040   }%
1041   \null
1042 }
1043 \let\code=\tclose
1044 %\let\exp=\tclose  %Was temporary
1045
1046 % @kbd is like @code, except that if the argument is just one @key command, 
1047 % then @kbd has no effect.
1048
1049 \def\xkey{\key}
1050 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
1051 \ifx\one\xkey\ifx\threex\three \key{#2}%
1052 \else\tclose{\look}\fi
1053 \else\tclose{\look}\fi}
1054
1055 % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
1056 % argument is to make the input look right: @dmn{pt} instead of
1057 % @dmn{}pt.
1058
1059 \def\dmn#1{\thinspace #1}
1060
1061 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
1062
1063 \def\l#1{{\li #1}\null}         % 
1064
1065 \def\r#1{{\rm #1}}              % roman font
1066 % Use of \lowercase was suggested.
1067 \def\sc#1{{\smallcaps#1}}       % smallcaps font
1068 \def\ii#1{{\it #1}}             % italic font
1069
1070 \message{page headings,}
1071
1072 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
1073 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1074
1075 % First the title page.  Must do @settitle before @titlepage.
1076 \def\titlefont#1{{\titlerm #1}}
1077
1078 \newif\ifseenauthor
1079 \newif\iffinishedtitlepage
1080
1081 \def\shorttitlepage{\parsearg\shorttitlepagezzz}
1082 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1083         \endgroup\page\hbox{}\page}
1084
1085 \def\titlepage{\begingroup \parindent=0pt \textfonts
1086    \let\subtitlerm=\tenrm
1087 % I deinstalled the following change because \cmr12 is undefined.
1088 % This change was not in the ChangeLog anyway.  --rms.
1089 %   \let\subtitlerm=\cmr12
1090    \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1091    %
1092    \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
1093    %
1094    % Leave some space at the very top of the page.
1095    \vglue\titlepagetopglue
1096    %
1097    % Now you can print the title using @title.
1098    \def\title{\parsearg\titlezzz}%
1099    \def\titlezzz##1{\leftline{\titlefont{##1}}
1100                     % print a rule at the page bottom also.
1101                     \finishedtitlepagefalse
1102                     \vskip4pt \hrule height 4pt \vskip4pt}%
1103    % No rule at page bottom unless we print one at the top with @title.
1104    \finishedtitlepagetrue
1105    %
1106    % Now you can put text using @subtitle.
1107    \def\subtitle{\parsearg\subtitlezzz}%
1108    \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
1109    %
1110    % @author should come last, but may come many times.
1111    \def\author{\parsearg\authorzzz}%
1112    \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
1113       {\authorfont \leftline{##1}}}%
1114    %  
1115    % Most title ``pages'' are actually two pages long, with space
1116    % at the top of the second.  We don't want the ragged left on the second.
1117    \let\oldpage = \page
1118    \def\page{%
1119       \iffinishedtitlepage\else
1120          \finishtitlepage
1121       \fi
1122       \oldpage
1123       \let\page = \oldpage
1124       \hbox{}}%
1125 %   \def\page{\oldpage \hbox{}}
1126 }
1127
1128 \def\Etitlepage{%
1129    \iffinishedtitlepage\else
1130       \finishtitlepage
1131    \fi
1132    % It is important to do the page break before ending the group,
1133    % because the headline and footline are only empty inside the group.
1134    % If we use the new definition of \page, we always get a blank page
1135    % after the title page, which we certainly don't want.
1136    \oldpage
1137    \endgroup
1138    \HEADINGSon
1139 }
1140
1141 \def\finishtitlepage{%
1142    \vskip4pt \hrule height 2pt
1143    \vskip\titlepagebottomglue
1144    \finishedtitlepagetrue
1145 }
1146
1147 %%% Set up page headings and footings.
1148
1149 \let\thispage=\folio
1150
1151 \newtoks \evenheadline    % Token sequence for heading line of even pages
1152 \newtoks \oddheadline     % Token sequence for heading line of odd pages
1153 \newtoks \evenfootline    % Token sequence for footing line of even pages
1154 \newtoks \oddfootline     % Token sequence for footing line of odd pages
1155
1156 % Now make Tex use those variables
1157 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
1158                             \else \the\evenheadline \fi}}
1159 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
1160                             \else \the\evenfootline \fi}\HEADINGShook}
1161 \let\HEADINGShook=\relax
1162
1163 % Commands to set those variables.
1164 % For example, this is what  @headings on  does
1165 % @evenheading @thistitle|@thispage|@thischapter
1166 % @oddheading @thischapter|@thispage|@thistitle
1167 % @evenfooting @thisfile||
1168 % @oddfooting ||@thisfile
1169
1170 \def\evenheading{\parsearg\evenheadingxxx}
1171 \def\oddheading{\parsearg\oddheadingxxx}
1172 \def\everyheading{\parsearg\everyheadingxxx}
1173
1174 \def\evenfooting{\parsearg\evenfootingxxx}
1175 \def\oddfooting{\parsearg\oddfootingxxx}
1176 \def\everyfooting{\parsearg\everyfootingxxx}
1177
1178 {\catcode`\@=0 %
1179
1180 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
1181 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
1182 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1183
1184 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
1185 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
1186 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1187
1188 \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
1189 \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
1190 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
1191 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1192
1193 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
1194 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
1195 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1196
1197 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
1198 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
1199 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1200
1201 \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
1202 \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
1203 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
1204 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1205 %
1206 }% unbind the catcode of @.
1207
1208 % @headings double      turns headings on for double-sided printing.
1209 % @headings single      turns headings on for single-sided printing.
1210 % @headings off         turns them off.
1211 % @headings on          same as @headings double, retained for compatibility.
1212 % @headings after       turns on double-sided headings after this page.
1213 % @headings doubleafter turns on double-sided headings after this page.
1214 % @headings singleafter turns on single-sided headings after this page.
1215 % By default, they are off.
1216
1217 \def\headings #1 {\csname HEADINGS#1\endcsname}
1218
1219 \def\HEADINGSoff{
1220 \global\evenheadline={\hfil} \global\evenfootline={\hfil}
1221 \global\oddheadline={\hfil} \global\oddfootline={\hfil}}
1222 \HEADINGSoff
1223 % When we turn headings on, set the page number to 1.
1224 % For double-sided printing, put current file name in lower left corner,
1225 % chapter name on inside top of right hand pages, document
1226 % title on inside top of left hand pages, and page numbers on outside top
1227 % edge of all pages.
1228 \def\HEADINGSdouble{
1229 %\pagealignmacro
1230 \global\pageno=1
1231 \global\evenfootline={\hfil}
1232 \global\oddfootline={\hfil}
1233 \global\evenheadline={\line{\folio\hfil\thistitle}}
1234 \global\oddheadline={\line{\thischapter\hfil\folio}}
1235 }
1236 % For single-sided printing, chapter title goes across top left of page,
1237 % page number on top right.
1238 \def\HEADINGSsingle{
1239 %\pagealignmacro
1240 \global\pageno=1
1241 \global\evenfootline={\hfil}
1242 \global\oddfootline={\hfil}
1243 \global\evenheadline={\line{\thischapter\hfil\folio}}
1244 \global\oddheadline={\line{\thischapter\hfil\folio}}
1245 }
1246 \def\HEADINGSon{\HEADINGSdouble}
1247
1248 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
1249 \let\HEADINGSdoubleafter=\HEADINGSafter
1250 \def\HEADINGSdoublex{%
1251 \global\evenfootline={\hfil}
1252 \global\oddfootline={\hfil}
1253 \global\evenheadline={\line{\folio\hfil\thistitle}}
1254 \global\oddheadline={\line{\thischapter\hfil\folio}}
1255 }
1256
1257 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
1258 \def\HEADINGSsinglex{%
1259 \global\evenfootline={\hfil}
1260 \global\oddfootline={\hfil}
1261 \global\evenheadline={\line{\thischapter\hfil\folio}}
1262 \global\oddheadline={\line{\thischapter\hfil\folio}}
1263 }
1264
1265 % Subroutines used in generating headings
1266 % Produces Day Month Year style of output.
1267 \def\today{\number\day\space
1268 \ifcase\month\or
1269 January\or February\or March\or April\or May\or June\or
1270 July\or August\or September\or October\or November\or December\fi
1271 \space\number\year}
1272
1273 % Use this if you want the Month Day, Year style of output.
1274 %\def\today{\ifcase\month\or
1275 %January\or February\or March\or April\or May\or June\or
1276 %July\or August\or September\or October\or November\or December\fi
1277 %\space\number\day, \number\year}
1278
1279 % @settitle line...  specifies the title of the document, for headings
1280 % It generates no output of its own
1281
1282 \def\thistitle{No Title}
1283 \def\settitle{\parsearg\settitlezzz}
1284 \def\settitlezzz #1{\gdef\thistitle{#1}}
1285
1286 \message{tables,}
1287
1288 % @tabs -- simple alignment
1289
1290 % These don't work.  For one thing, \+ is defined as outer.
1291 % So these macros cannot even be defined.
1292
1293 %\def\tabs{\parsearg\tabszzz}
1294 %\def\tabszzz #1{\settabs\+#1\cr}
1295 %\def\tabline{\parsearg\tablinezzz}
1296 %\def\tablinezzz #1{\+#1\cr}
1297 %\def\&{&}
1298
1299 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
1300
1301 % default indentation of table text
1302 \newdimen\tableindent \tableindent=.8in
1303 % default indentation of @itemize and @enumerate text
1304 \newdimen\itemindent  \itemindent=.3in
1305 % margin between end of table item and start of table text.
1306 \newdimen\itemmargin  \itemmargin=.1in
1307
1308 % used internally for \itemindent minus \itemmargin
1309 \newdimen\itemmax
1310
1311 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with
1312 % these defs.
1313 % They also define \itemindex
1314 % to index the item name in whatever manner is desired (perhaps none).
1315
1316 \def\internalBitem{\smallbreak \parsearg\itemzzz}
1317 \def\internalBitemx{\par \parsearg\itemzzz}
1318
1319 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
1320 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz}
1321
1322 \def\internalBkitem{\smallbreak \parsearg\kitemzzz}
1323 \def\internalBkitemx{\par \parsearg\kitemzzz}
1324
1325 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
1326                  \itemzzz {#1}}
1327
1328 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
1329                  \itemzzz {#1}}
1330
1331 \def\itemzzz #1{\begingroup %
1332   \advance\hsize by -\rightskip
1333   \advance\hsize by -\tableindent
1334   \setbox0=\hbox{\itemfont{#1}}%
1335   \itemindex{#1}%
1336   \nobreak % This prevents a break before @itemx.
1337   %
1338   % Be sure we are not still in the middle of a paragraph.
1339   \parskip=0in
1340   \par
1341   %
1342   % If the item text does not fit in the space we have, put it on a line
1343   % by itself, and do not allow a page break either before or after that
1344   % line.  We do not start a paragraph here because then if the next
1345   % command is, e.g., @kindex, the whatsit would get put into the
1346   % horizontal list on a line by itself, resulting in extra blank space.
1347   \ifdim \wd0>\itemmax
1348     \setbox0=\hbox{\hskip \leftskip \hskip -\tableindent \unhbox0}\box0
1349     \nobreak
1350   \else
1351     % The item text fits into the space.  Start a paragraph, so that the
1352     % following text (if any) will end up on the same line.  Since that
1353     % text will be indented by \tableindent, we make the item text be in
1354     % a zero-width box.
1355     \noindent
1356     \rlap{\hskip -\tableindent\box0}%
1357   \fi
1358   \endgroup
1359 }
1360
1361 \def\item{\errmessage{@item while not in a table}}
1362 \def\itemx{\errmessage{@itemx while not in a table}}
1363 \def\kitem{\errmessage{@kitem while not in a table}}
1364 \def\kitemx{\errmessage{@kitemx while not in a table}}
1365 \def\xitem{\errmessage{@xitem while not in a table}}
1366 \def\xitemx{\errmessage{@xitemx while not in a table}}
1367
1368 %% Contains a kludge to get @end[description] to work
1369 \def\description{\tablez{\dontindex}{1}{}{}{}{}}
1370
1371 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
1372 {\obeylines\obeyspaces%
1373 \gdef\tablex #1^^M{%
1374 \tabley\dontindex#1        \endtabley}}
1375
1376 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
1377 {\obeylines\obeyspaces%
1378 \gdef\ftablex #1^^M{%
1379 \tabley\fnitemindex#1        \endtabley
1380 \def\Eftable{\endgraf\endgroup\afterenvbreak}%
1381 \let\Etable=\relax}}
1382
1383 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
1384 {\obeylines\obeyspaces%
1385 \gdef\vtablex #1^^M{%
1386 \tabley\vritemindex#1        \endtabley
1387 \def\Evtable{\endgraf\endgroup\afterenvbreak}%
1388 \let\Etable=\relax}}
1389
1390 \def\dontindex #1{}
1391 \def\fnitemindex #1{\doind {fn}{\code{#1}}}%
1392 \def\vritemindex #1{\doind {vr}{\code{#1}}}%
1393
1394 {\obeyspaces %
1395 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
1396 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
1397
1398 \def\tablez #1#2#3#4#5#6{%
1399 \aboveenvbreak %
1400 \begingroup %
1401 \def\Edescription{\Etable}% Neccessary kludge.
1402 \let\itemindex=#1%
1403 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
1404 \ifnum 0#4>0 \tableindent=#4\mil \fi %
1405 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
1406 \def\itemfont{#2}%
1407 \itemmax=\tableindent %
1408 \advance \itemmax by -\itemmargin %
1409 \advance \leftskip by \tableindent %
1410 \exdentamount=\tableindent
1411 \parindent = 0pt
1412 \parskip = \smallskipamount
1413 \ifdim \parskip=0pt \parskip=2pt \fi%
1414 \def\Etable{\endgraf\endgroup\afterenvbreak}%
1415 \let\item = \internalBitem %
1416 \let\itemx = \internalBitemx %
1417 \let\kitem = \internalBkitem %
1418 \let\kitemx = \internalBkitemx %
1419 \let\xitem = \internalBxitem %
1420 \let\xitemx = \internalBxitemx %
1421 }
1422
1423 % This is the counter used by @enumerate, which is really @itemize
1424
1425 \newcount \itemno
1426
1427 \def\itemize{\parsearg\itemizezzz}
1428
1429 \def\itemizezzz #1{%
1430   \begingroup % ended by the @end itemsize
1431   \itemizey {#1}{\Eitemize}
1432 }
1433
1434 \def\itemizey #1#2{%
1435 \aboveenvbreak %
1436 \itemmax=\itemindent %
1437 \advance \itemmax by -\itemmargin %
1438 \advance \leftskip by \itemindent %
1439 \exdentamount=\itemindent
1440 \parindent = 0pt %
1441 \parskip = \smallskipamount %
1442 \ifdim \parskip=0pt \parskip=2pt \fi%
1443 \def#2{\endgraf\endgroup\afterenvbreak}%
1444 \def\itemcontents{#1}%
1445 \let\item=\itemizeitem}
1446
1447 % Set sfcode to normal for the chars that usually have another value.
1448 % These are `.?!:;,'
1449 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
1450   \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
1451
1452 % \splitoff TOKENS\endmark defines \first to be the first token in
1453 % TOKENS, and \rest to be the remainder.
1454
1455 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
1456
1457 % Allow an optional argument of an uppercase letter, lowercase letter,
1458 % or number, to specify the first label in the enumerated list.  No
1459 % argument is the same as `1'.
1460
1461 \def\enumerate{\parsearg\enumeratezzz}
1462 \def\enumeratezzz #1{\enumeratey #1  \endenumeratey}
1463 \def\enumeratey #1 #2\endenumeratey{%
1464   \begingroup % ended by the @end enumerate
1465   %
1466   % If we were given no argument, pretend we were given `1'.
1467   \def\thearg{#1}%
1468   \ifx\thearg\empty \def\thearg{1}\fi
1469   %
1470   % Detect if the argument is a single token.  If so, it might be a
1471   % letter.  Otherwise, the only valid thing it can be is a number.
1472   % (We will always have one token, because of the test we just made.
1473   % This is a good thing, since \splitoff doesn't work given nothing at
1474   % all -- the first parameter is undelimited.)
1475   \expandafter\splitoff\thearg\endmark
1476   \ifx\rest\empty
1477     % Only one token in the argument.  It could still be anything.
1478     % A ``lowercase letter'' is one whose \lccode is nonzero.
1479     % An ``uppercase letter'' is one whose \lccode is both nonzero, and
1480     %   not equal to itself.
1481     % Otherwise, we assume it's a number.
1482     % 
1483     % We need the \relax at the end of the \ifnum lines to stop TeX from
1484     % continuing to look for a <number>.
1485     % 
1486     \ifnum\lccode\expandafter`\thearg=0\relax 
1487       \numericenumerate % a number (we hope)
1488     \else
1489       % It's a letter.
1490       \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
1491         \lowercaseenumerate % lowercase letter
1492       \else
1493         \uppercaseenumerate % uppercase letter
1494       \fi
1495     \fi
1496   \else
1497     % Multiple tokens in the argument.  We hope it's a number.
1498     \numericenumerate
1499   \fi
1500 }
1501
1502 % An @enumerate whose labels are integers.  The starting integer is
1503 % given in \thearg.
1504
1505 \def\numericenumerate{%
1506   \itemno = \thearg
1507   \startenumeration{\the\itemno}%
1508 }
1509
1510 % The starting (lowercase) letter is in \thearg.
1511 \def\lowercaseenumerate{%
1512   \itemno = \expandafter`\thearg
1513   \startenumeration{%
1514     % Be sure we're not beyond the end of the alphabet.
1515     \ifnum\itemno=0
1516       \errmessage{No more lowercase letters in @enumerate; get a bigger
1517                   alphabet}%
1518     \fi
1519     \char\lccode\itemno
1520   }%
1521 }
1522
1523 % The starting (uppercase) letter is in \thearg.
1524 \def\uppercaseenumerate{%
1525   \itemno = \expandafter`\thearg
1526   \startenumeration{%
1527     % Be sure we're not beyond the end of the alphabet.
1528     \ifnum\itemno=0
1529       \errmessage{No more uppercase letters in @enumerate; get a bigger
1530                   alphabet}
1531     \fi
1532     \char\uccode\itemno
1533   }%
1534 }
1535
1536 % Call itemizey, adding a period to the first argument and supplying the
1537 % common last two arguments.  Also subtract one from the initial value in
1538 % \itemno, since @item increments \itemno.
1539
1540 \def\startenumeration#1{%
1541   \advance\itemno by -1
1542   \itemizey{#1.}\Eenumerate\flushcr
1543 }
1544
1545 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
1546 % to @enumerate.
1547
1548 \def\alphaenumerate{\enumerate{a}}
1549 \def\capsenumerate{\enumerate{A}}
1550 \def\Ealphaenumerate{\Eenumerate}
1551 \def\Ecapsenumerate{\Eenumerate}
1552
1553 % Definition of @item while inside @itemize.
1554
1555 \def\itemizeitem{%
1556 \advance\itemno by 1
1557 {\let\par=\endgraf \smallbreak}%
1558 \ifhmode \errmessage{\in hmode at itemizeitem}\fi
1559 {\parskip=0in \hskip 0pt
1560 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
1561 \vadjust{\penalty 1200}}%
1562 \flushcr}
1563
1564 \message{indexing,}
1565 % Index generation facilities
1566
1567 % Define \newwrite to be identical to plain tex's \newwrite
1568 % except not \outer, so it can be used within \newindex.
1569 {\catcode`\@=11
1570 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
1571
1572 % \newindex {foo} defines an index named foo.
1573 % It automatically defines \fooindex such that
1574 % \fooindex ...rest of line... puts an entry in the index foo.
1575 % It also defines \fooindfile to be the number of the output channel for
1576 % the file that accumulates this index.  The file's extension is foo.
1577 % The name of an index should be no more than 2 characters long
1578 % for the sake of vms.
1579
1580 \def\newindex #1{
1581 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
1582 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
1583 \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex
1584 \noexpand\doindex {#1}}
1585 }
1586
1587 % @defindex foo  ==  \newindex{foo}
1588
1589 \def\defindex{\parsearg\newindex}
1590
1591 % Define @defcodeindex, like @defindex except put all entries in @code.
1592
1593 \def\newcodeindex #1{
1594 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
1595 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
1596 \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex
1597 \noexpand\docodeindex {#1}}
1598 }
1599
1600 \def\defcodeindex{\parsearg\newcodeindex}
1601
1602 % @synindex foo bar    makes index foo feed into index bar.
1603 % Do this instead of @defindex foo if you don't want it as a separate index.
1604 \def\synindex #1 #2 {%
1605 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
1606 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
1607 \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex
1608 \noexpand\doindex {#2}}%
1609 }
1610
1611 % @syncodeindex foo bar   similar, but put all entries made for index foo
1612 % inside @code.
1613 \def\syncodeindex #1 #2 {%
1614 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
1615 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
1616 \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex
1617 \noexpand\docodeindex {#2}}%
1618 }
1619
1620 % Define \doindex, the driver for all \fooindex macros.
1621 % Argument #1 is generated by the calling \fooindex macro,
1622 %  and it is "foo", the name of the index.
1623
1624 % \doindex just uses \parsearg; it calls \doind for the actual work.
1625 % This is because \doind is more useful to call from other macros.
1626
1627 % There is also \dosubind {index}{topic}{subtopic}
1628 % which makes an entry in a two-level index such as the operation index.
1629
1630 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
1631 \def\singleindexer #1{\doind{\indexname}{#1}}
1632
1633 % like the previous two, but they put @code around the argument.
1634 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
1635 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
1636
1637 \def\indexdummies{%
1638 \def\_{{\realbackslash _}}%
1639 \def\w{\realbackslash w }%
1640 \def\bf{\realbackslash bf }%
1641 \def\rm{\realbackslash rm }%
1642 \def\sl{\realbackslash sl }%
1643 \def\sf{\realbackslash sf}%
1644 \def\tt{\realbackslash tt}%
1645 \def\gtr{\realbackslash gtr}%
1646 \def\less{\realbackslash less}%
1647 \def\hat{\realbackslash hat}%
1648 \def\char{\realbackslash char}%
1649 \def\TeX{\realbackslash TeX}%
1650 \def\dots{\realbackslash dots }%
1651 \def\copyright{\realbackslash copyright }%
1652 \def\tclose##1{\realbackslash tclose {##1}}%
1653 \def\code##1{\realbackslash code {##1}}%
1654 \def\samp##1{\realbackslash samp {##1}}%
1655 \def\t##1{\realbackslash r {##1}}%
1656 \def\r##1{\realbackslash r {##1}}%
1657 \def\i##1{\realbackslash i {##1}}%
1658 \def\b##1{\realbackslash b {##1}}%
1659 \def\cite##1{\realbackslash cite {##1}}%
1660 \def\key##1{\realbackslash key {##1}}%
1661 \def\file##1{\realbackslash file {##1}}%
1662 \def\var##1{\realbackslash var {##1}}%
1663 \def\kbd##1{\realbackslash kbd {##1}}%
1664 \def\dfn##1{\realbackslash dfn {##1}}%
1665 \def\emph##1{\realbackslash emph {##1}}%
1666 }
1667
1668 % \indexnofonts no-ops all font-change commands.
1669 % This is used when outputting the strings to sort the index by.
1670 \def\indexdummyfont#1{#1}
1671 \def\indexdummytex{TeX}
1672 \def\indexdummydots{...}
1673
1674 \def\indexnofonts{%
1675 \let\w=\indexdummyfont
1676 \let\t=\indexdummyfont
1677 \let\r=\indexdummyfont
1678 \let\i=\indexdummyfont
1679 \let\b=\indexdummyfont
1680 \let\emph=\indexdummyfont
1681 \let\strong=\indexdummyfont
1682 \let\cite=\indexdummyfont
1683 \let\sc=\indexdummyfont
1684 %Don't no-op \tt, since it isn't a user-level command
1685 % and is used in the definitions of the active chars like <, >, |...
1686 %\let\tt=\indexdummyfont
1687 \let\tclose=\indexdummyfont
1688 \let\code=\indexdummyfont
1689 \let\file=\indexdummyfont
1690 \let\samp=\indexdummyfont
1691 \let\kbd=\indexdummyfont
1692 \let\key=\indexdummyfont
1693 \let\var=\indexdummyfont
1694 \let\TeX=\indexdummytex
1695 \let\dots=\indexdummydots
1696 }
1697
1698 % To define \realbackslash, we must make \ not be an escape.
1699 % We must first make another character (@) an escape
1700 % so we do not become unable to do a definition.
1701
1702 {\catcode`\@=0 \catcode`\\=\other
1703 @gdef@realbackslash{\}}
1704
1705 \let\indexbackslash=0  %overridden during \printindex.
1706
1707 \def\doind #1#2{%
1708 {\count10=\lastpenalty %
1709 {\indexdummies % Must do this here, since \bf, etc expand at this stage
1710 \escapechar=`\\%
1711 {\let\folio=0% Expand all macros now EXCEPT \folio
1712 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
1713 % so it will be output as is; and it will print as backslash in the indx.
1714 %
1715 % Now process the index-string once, with all font commands turned off,
1716 % to get the string to sort the index by.
1717 {\indexnofonts
1718 \xdef\temp1{#2}%
1719 }%
1720 % Now produce the complete index entry.  We process the index-string again,
1721 % this time with font commands expanded, to get what to print in the index.
1722 \edef\temp{%
1723 \write \csname#1indfile\endcsname{%
1724 \realbackslash entry {\temp1}{\folio}{#2}}}%
1725 \temp }%
1726 }\penalty\count10}}
1727
1728 \def\dosubind #1#2#3{%
1729 {\count10=\lastpenalty %
1730 {\indexdummies % Must do this here, since \bf, etc expand at this stage
1731 \escapechar=`\\%
1732 {\let\folio=0%
1733 \def\rawbackslashxx{\indexbackslash}%
1734 %
1735 % Now process the index-string once, with all font commands turned off,
1736 % to get the string to sort the index by.
1737 {\indexnofonts
1738 \xdef\temp1{#2 #3}%
1739 }%
1740 % Now produce the complete index entry.  We process the index-string again,
1741 % this time with font commands expanded, to get what to print in the index.
1742 \edef\temp{%
1743 \write \csname#1indfile\endcsname{%
1744 \realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
1745 \temp }%
1746 }\penalty\count10}}
1747
1748 % The index entry written in the file actually looks like
1749 %  \entry {sortstring}{page}{topic}
1750 % or
1751 %  \entry {sortstring}{page}{topic}{subtopic}
1752 % The texindex program reads in these files and writes files
1753 % containing these kinds of lines:
1754 %  \initial {c}
1755 %     before the first topic whose initial is c
1756 %  \entry {topic}{pagelist}
1757 %     for a topic that is used without subtopics
1758 %  \primary {topic}
1759 %     for the beginning of a topic that is used with subtopics
1760 %  \secondary {subtopic}{pagelist}
1761 %     for each subtopic.
1762
1763 % Define the user-accessible indexing commands 
1764 % @findex, @vindex, @kindex, @cindex.
1765
1766 \def\findex {\fnindex}
1767 \def\kindex {\kyindex}
1768 \def\cindex {\cpindex}
1769 \def\vindex {\vrindex}
1770 \def\tindex {\tpindex}
1771 \def\pindex {\pgindex}
1772
1773 \def\cindexsub {\begingroup\obeylines\cindexsub}
1774 {\obeylines %
1775 \gdef\cindexsub "#1" #2^^M{\endgroup %
1776 \dosubind{cp}{#2}{#1}}}
1777
1778 % Define the macros used in formatting output of the sorted index material.
1779
1780 % This is what you call to cause a particular index to get printed.
1781 % Write
1782 % @unnumbered Function Index
1783 % @printindex fn
1784
1785 \def\printindex{\parsearg\doprintindex}
1786
1787 \def\doprintindex#1{%
1788   \tex
1789   \dobreak \chapheadingskip {10000}
1790   \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
1791   \catcode`\$=\other\catcode`\_=\other
1792   \catcode`\~=\other
1793   %
1794   % The following don't help, since the chars were translated
1795   % when the raw index was written, and their fonts were discarded
1796   % due to \indexnofonts.
1797   %\catcode`\"=\active
1798   %\catcode`\^=\active
1799   %\catcode`\_=\active
1800   %\catcode`\|=\active
1801   %\catcode`\<=\active
1802   %\catcode`\>=\active
1803   % %
1804   \def\indexbackslash{\rawbackslashxx}
1805   \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
1806   \begindoublecolumns
1807   %
1808   % See if the index file exists and is nonempty.
1809   \openin 1 \jobname.#1s
1810   \ifeof 1 
1811     % \enddoublecolumns gets confused if there is no text in the index,
1812     % and it loses the chapter title and the aux file entries for the
1813     % index.  The easiest way to prevent this problem is to make sure
1814     % there is some text.
1815     (Index is nonexistent)
1816     \else
1817     %
1818     % If the index file exists but is empty, then \openin leaves \ifeof
1819     % false.  We have to make TeX try to read something from the file, so
1820     % it can discover if there is anything in it.
1821     \read 1 to \temp
1822     \ifeof 1
1823       (Index is empty)
1824     \else
1825       \input \jobname.#1s
1826     \fi
1827   \fi
1828   \closein 1
1829   \enddoublecolumns
1830   \Etex
1831 }
1832
1833 % These macros are used by the sorted index file itself.
1834 % Change them to control the appearance of the index.
1835
1836 % Same as \bigskipamount except no shrink.
1837 % \balancecolumns gets confused if there is any shrink.
1838 \newskip\initialskipamount \initialskipamount 12pt plus4pt
1839
1840 \def\initial #1{%
1841 {\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
1842 \ifdim\lastskip<\initialskipamount
1843 \removelastskip \penalty-200 \vskip \initialskipamount\fi
1844 \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
1845
1846 % This typesets a paragraph consisting of #1, dot leaders, and then #2
1847 % flush to the right margin.  It is used for index and table of contents
1848 % entries.  The paragraph is indented by \leftskip.
1849
1850 \def\entry #1#2{\begingroup
1851   %
1852   % Start a new paragraph if necessary, so our assignments below can't
1853   % affect previous text.
1854   \par
1855   %
1856   % Do not fill out the last line with white space.
1857   \parfillskip = 0in
1858   %
1859   % No extra space above this paragraph.
1860   \parskip = 0in
1861   %
1862   % Do not prefer a separate line ending with a hyphen to fewer lines.
1863   \finalhyphendemerits = 0
1864   %
1865   % \hangindent is only relevant when the entry text and page number
1866   % don't both fit on one line.  In that case, bob suggests starting the
1867   % dots pretty far over on the line.  Unfortunately, a large
1868   % indentation looks wrong when the entry text itself is broken across
1869   % lines.  So we use a small indentation and put up with long leaders.
1870   % 
1871   % \hangafter is reset to 1 (which is the value we want) at the start
1872   % of each paragraph, so we need not do anything with that.
1873   \hangindent=2em
1874   %
1875   % When the entry text needs to be broken, just fill out the first line
1876   % with blank space.
1877   \rightskip = 0pt plus1fil
1878   %
1879   % Start a ``paragraph'' for the index entry so the line breaking
1880   % parameters we've set above will have an effect.
1881   \noindent
1882   %
1883   % Insert the text of the index entry.  TeX will do line-breaking on it.
1884   #1%
1885   %
1886   % If we must, put the page number on a line of its own, and fill out
1887   % this line with blank space.  (The \hfil is overwhelmed with the
1888   % fill leaders glue in \indexdotfill if the page number does fit.)
1889   \hfil\penalty50
1890   \null\nobreak\indexdotfill % Have leaders before the page number.
1891   %
1892   % The `\ ' here is removed by the implicit \unskip that TeX does as
1893   % part of (the primitive) \par.  Without it, a spurious underfull
1894   % \hbox ensues.
1895   \ #2% The page number ends the paragraph.
1896   \par
1897 \endgroup}
1898
1899 % Like \dotfill except takes at least 1 em.
1900 \def\indexdotfill{\cleaders
1901   \hbox{$\mathsurround=0pt \mkern1.5mu . \mkern1.5mu$}\hskip 1em plus 1fill}
1902
1903 \def\primary #1{\line{#1\hfil}}
1904
1905 \newskip\secondaryindent \secondaryindent=0.5cm
1906
1907 \def\secondary #1#2{
1908 {\parfillskip=0in \parskip=0in
1909 \hangindent =1in \hangafter=1
1910 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
1911 }}
1912
1913 %% Define two-column mode, which is used in indexes.
1914 %% Adapted from the TeXbook, page 416.
1915 \catcode `\@=11
1916
1917 \newbox\partialpage
1918
1919 \newdimen\doublecolumnhsize
1920
1921 \def\begindoublecolumns{\begingroup
1922   % Grab any single-column material above us.
1923   \output = {\global\setbox\partialpage
1924     =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
1925   \eject
1926   %
1927   % Now switch to the double-column output routine.
1928   \output={\doublecolumnout}%
1929   %
1930   % Change the page size parameters.  We could do this once outside this
1931   % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
1932   % format, but then we repeat the same computation.  Repeating a couple
1933   % of assignments once per index is clearly meaningless for the
1934   % execution time, so we may as well do it once.
1935   % 
1936   % First we halve the line length, less a little for the gutter between
1937   % the columns.  We compute the gutter based on the line length, so it
1938   % changes automatically with the paper format.  The magic constant
1939   % below is chosen so that the gutter has the same value (well, +- <
1940   % 1pt) as it did when we hard-coded it.
1941   % 
1942   % We put the result in a separate register, \doublecolumhsize, so we
1943   % can restore it in \pagesofar, after \hsize itself has (potentially)
1944   % been clobbered.
1945   % 
1946   \doublecolumnhsize = \hsize
1947     \advance\doublecolumnhsize by -.04154\hsize
1948     \divide\doublecolumnhsize by 2
1949   \hsize = \doublecolumnhsize
1950   %
1951   % Double the \vsize as well.  (We don't need a separate register here,
1952   % since nobody clobbers \vsize.)
1953   \vsize = 2\vsize
1954   \doublecolumnpagegoal
1955 }
1956
1957 \def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage}
1958
1959 \def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth
1960   \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage
1961   \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1}
1962   \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3}
1963   \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
1964   \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
1965 }
1966 \def\doublecolumnpagegoal{%
1967   \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@
1968 }
1969 \def\pagesofar{\unvbox\partialpage %
1970   \hsize=\doublecolumnhsize % have to restore this since output routine
1971   \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
1972 \def\doublecolumnout{%
1973   \setbox5=\copy255
1974   {\vbadness=10000 \doublecolumnsplit}
1975   \ifvbox255
1976     \setbox0=\vtop to\dimen@{\unvbox0}
1977     \setbox2=\vtop to\dimen@{\unvbox2}
1978     \onepageout\pagesofar \unvbox255 \penalty\outputpenalty
1979   \else
1980     \setbox0=\vbox{\unvbox5}
1981     \ifvbox0
1982       \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
1983       \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth
1984       {\vbadness=10000
1985         \loop \global\setbox5=\copy0
1986           \setbox1=\vsplit5 to\dimen@
1987           \setbox3=\vsplit5 to\dimen@
1988           \ifvbox5 \global\advance\dimen@ by1pt \repeat
1989         \setbox0=\vbox to\dimen@{\unvbox1}
1990         \setbox2=\vbox to\dimen@{\unvbox3}
1991         \global\setbox\partialpage=\vbox{\pagesofar}
1992         \doublecolumnpagegoal
1993       }
1994     \fi
1995   \fi
1996 }
1997
1998 \catcode `\@=\other
1999 \message{sectioning,}
2000 % Define chapters, sections, etc.
2001
2002 \newcount \chapno
2003 \newcount \secno        \secno=0
2004 \newcount \subsecno     \subsecno=0
2005 \newcount \subsubsecno  \subsubsecno=0
2006
2007 % This counter is funny since it counts through charcodes of letters A, B, ...
2008 \newcount \appendixno  \appendixno = `\@
2009 \def\appendixletter{\char\the\appendixno}
2010
2011 \newwrite \contentsfile
2012 % This is called from \setfilename.
2013 \def\opencontents{\openout \contentsfile = \jobname.toc}
2014
2015 % Each @chapter defines this as the name of the chapter.
2016 % page headings and footings can use it.  @section does likewise
2017
2018 \def\thischapter{} \def\thissection{}
2019 \def\seccheck#1{\if \pageno<0 %
2020 \errmessage{@#1 not allowed after generating table of contents}\fi
2021 %
2022 }
2023
2024 \def\chapternofonts{%
2025 \let\rawbackslash=\relax%
2026 \let\frenchspacing=\relax%
2027 \def\result{\realbackslash result}
2028 \def\equiv{\realbackslash equiv}
2029 \def\expansion{\realbackslash expansion}
2030 \def\print{\realbackslash print}
2031 \def\TeX{\realbackslash TeX}
2032 \def\dots{\realbackslash dots}
2033 \def\copyright{\realbackslash copyright}
2034 \def\tt{\realbackslash tt}
2035 \def\bf{\realbackslash bf }
2036 \def\w{\realbackslash w}
2037 \def\less{\realbackslash less}
2038 \def\gtr{\realbackslash gtr}
2039 \def\hat{\realbackslash hat}
2040 \def\char{\realbackslash char}
2041 \def\tclose##1{\realbackslash tclose {##1}}
2042 \def\code##1{\realbackslash code {##1}}
2043 \def\samp##1{\realbackslash samp {##1}}
2044 \def\r##1{\realbackslash r {##1}}
2045 \def\b##1{\realbackslash b {##1}}
2046 \def\key##1{\realbackslash key {##1}}
2047 \def\file##1{\realbackslash file {##1}}
2048 \def\kbd##1{\realbackslash kbd {##1}}
2049 % These are redefined because @smartitalic wouldn't work inside xdef.
2050 \def\i##1{\realbackslash i {##1}}
2051 \def\cite##1{\realbackslash cite {##1}}
2052 \def\var##1{\realbackslash var {##1}}
2053 \def\emph##1{\realbackslash emph {##1}}
2054 \def\dfn##1{\realbackslash dfn {##1}}
2055 }
2056
2057 \newcount\absseclevel % used to calculate proper heading level
2058 \newcount\secbase\secbase=0 % @raise/lowersections modify this count
2059
2060 % @raisesections: treat @section as chapter, @subsection as section, etc.
2061 \def\raisesections{\global\advance\secbase by -1}
2062 \let\up=\raisesections % original BFox name
2063
2064 % @lowersections: treat @chapter as section, @section as subsection, etc.
2065 \def\lowersections{\global\advance\secbase by 1}
2066 \let\down=\lowersections % original BFox name
2067
2068 % Choose a numbered-heading macro
2069 % #1 is heading level if unmodified by @raisesections or @lowersections
2070 % #2 is text for heading
2071 \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2072 \ifcase\absseclevel
2073   \chapterzzz{#2}
2074 \or
2075   \seczzz{#2}
2076 \or
2077   \numberedsubseczzz{#2}
2078 \or
2079   \numberedsubsubseczzz{#2}
2080 \else
2081   \ifnum \absseclevel<0
2082     \chapterzzz{#2}
2083   \else
2084     \numberedsubsubseczzz{#2}
2085   \fi
2086 \fi
2087 }
2088
2089 % like \numhead, but chooses appendix heading levels
2090 \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2091 \ifcase\absseclevel
2092   \appendixzzz{#2}
2093 \or
2094   \appendixsectionzzz{#2}
2095 \or
2096   \appendixsubseczzz{#2}
2097 \or
2098   \appendixsubsubseczzz{#2}
2099 \else
2100   \ifnum \absseclevel<0
2101     \appendixzzz{#2}
2102   \else
2103     \appendixsubsubseczzz{#2}
2104   \fi
2105 \fi
2106 }
2107
2108 % like \numhead, but chooses numberless heading levels
2109 \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2110 \ifcase\absseclevel
2111   \unnumberedzzz{#2}
2112 \or
2113   \unnumberedseczzz{#2}
2114 \or
2115   \unnumberedsubseczzz{#2}
2116 \or
2117   \unnumberedsubsubseczzz{#2}
2118 \else
2119   \ifnum \absseclevel<0
2120     \unnumberedzzz{#2}
2121   \else
2122     \unnumberedsubsubseczzz{#2}
2123   \fi
2124 \fi
2125 }
2126
2127
2128 \def\thischaptername{No Chapter Title}
2129 \outer\def\chapter{\parsearg\chapteryyy}
2130 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
2131 \def\chapterzzz #1{\seccheck{chapter}%
2132 \secno=0 \subsecno=0 \subsubsecno=0
2133 \global\advance \chapno by 1 \message{Chapter \the\chapno}%
2134 \chapmacro {#1}{\the\chapno}%
2135 \gdef\thissection{#1}%
2136 \gdef\thischaptername{#1}%
2137 % We don't substitute the actual chapter name into \thischapter
2138 % because we don't want its macros evaluated now.
2139 \xdef\thischapter{Chapter \the\chapno: \noexpand\thischaptername}%
2140 {\chapternofonts%
2141 \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
2142 \escapechar=`\\%
2143 \write \contentsfile \temp  %
2144 \donoderef %
2145 \global\let\section = \numberedsec
2146 \global\let\subsection = \numberedsubsec
2147 \global\let\subsubsection = \numberedsubsubsec
2148 }}
2149
2150 \outer\def\appendix{\parsearg\appendixyyy}
2151 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
2152 \def\appendixzzz #1{\seccheck{appendix}%
2153 \secno=0 \subsecno=0 \subsubsecno=0
2154 \global\advance \appendixno by 1 \message{Appendix \appendixletter}%
2155 \chapmacro {#1}{Appendix \appendixletter}%
2156 \gdef\thissection{#1}%
2157 \gdef\thischaptername{#1}%
2158 \xdef\thischapter{Appendix \appendixletter: \noexpand\thischaptername}%
2159 {\chapternofonts%
2160 \edef\temp{{\realbackslash chapentry 
2161   {#1}{Appendix \appendixletter}{\noexpand\folio}}}%
2162 \escapechar=`\\%
2163 \write \contentsfile \temp  %
2164 \appendixnoderef %
2165 \global\let\section = \appendixsec
2166 \global\let\subsection = \appendixsubsec
2167 \global\let\subsubsection = \appendixsubsubsec
2168 }}
2169
2170 \outer\def\top{\parsearg\unnumberedyyy}
2171 \outer\def\unnumbered{\parsearg\unnumberedyyy}
2172 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
2173 \def\unnumberedzzz #1{\seccheck{unnumbered}%
2174 \secno=0 \subsecno=0 \subsubsecno=0
2175 %
2176 % This used to be simply \message{#1}, but TeX fully expands the
2177 % argument to \message.  Therefore, if #1 contained @-commands, TeX
2178 % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
2179 % expanded @cite (which turns out to cause errors because \cite is meant
2180 % to be executed, not expanded).  
2181
2182 % Anyway, we don't want the fully-expanded definition of @cite to appear
2183 % as a result of the \message, we just want `@cite' itself.  We use
2184 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
2185 % simply yielding the contents of the <toks register>.
2186 \toks0 = {#1}\message{(\the\toks0)}%
2187 %
2188 \unnumbchapmacro {#1}%
2189 \gdef\thischapter{#1}\gdef\thissection{#1}%
2190 {\chapternofonts%
2191 \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
2192 \escapechar=`\\%
2193 \write \contentsfile \temp  %
2194 \unnumbnoderef %
2195 \global\let\section = \unnumberedsec
2196 \global\let\subsection = \unnumberedsubsec
2197 \global\let\subsubsection = \unnumberedsubsubsec
2198 }}
2199
2200 \outer\def\numberedsec{\parsearg\secyyy}
2201 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
2202 \def\seczzz #1{\seccheck{section}%
2203 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2204 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
2205 {\chapternofonts%
2206 \edef\temp{{\realbackslash secentry %
2207 {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
2208 \escapechar=`\\%
2209 \write \contentsfile \temp %
2210 \donoderef %
2211 \penalty 10000 %
2212 }}
2213
2214 \outer\def\appenixsection{\parsearg\appendixsecyyy}
2215 \outer\def\appendixsec{\parsearg\appendixsecyyy}
2216 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
2217 \def\appendixsectionzzz #1{\seccheck{appendixsection}%
2218 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2219 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
2220 {\chapternofonts%
2221 \edef\temp{{\realbackslash secentry %
2222 {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
2223 \escapechar=`\\%
2224 \write \contentsfile \temp %
2225 \appendixnoderef %
2226 \penalty 10000 %
2227 }}
2228
2229 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
2230 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
2231 \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
2232 \plainsecheading {#1}\gdef\thissection{#1}%
2233 {\chapternofonts%
2234 \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
2235 \escapechar=`\\%
2236 \write \contentsfile \temp %
2237 \unnumbnoderef %
2238 \penalty 10000 %
2239 }}
2240
2241 \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
2242 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
2243 \def\numberedsubseczzz #1{\seccheck{subsection}%
2244 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
2245 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
2246 {\chapternofonts%
2247 \edef\temp{{\realbackslash subsecentry %
2248 {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
2249 \escapechar=`\\%
2250 \write \contentsfile \temp %
2251 \donoderef %
2252 \penalty 10000 %
2253 }}
2254
2255 \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
2256 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
2257 \def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
2258 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
2259 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
2260 {\chapternofonts%
2261 \edef\temp{{\realbackslash subsecentry %
2262 {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
2263 \escapechar=`\\%
2264 \write \contentsfile \temp %
2265 \appendixnoderef %
2266 \penalty 10000 %
2267 }}
2268
2269 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
2270 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
2271 \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
2272 \plainsecheading {#1}\gdef\thissection{#1}%
2273 {\chapternofonts%
2274 \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
2275 \escapechar=`\\%
2276 \write \contentsfile \temp %
2277 \unnumbnoderef %
2278 \penalty 10000 %
2279 }}
2280
2281 \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
2282 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
2283 \def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
2284 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
2285 \subsubsecheading {#1}
2286   {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
2287 {\chapternofonts%
2288 \edef\temp{{\realbackslash subsubsecentry %
2289   {#1}
2290   {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
2291   {\noexpand\folio}}}%
2292 \escapechar=`\\%
2293 \write \contentsfile \temp %
2294 \donoderef %
2295 \penalty 10000 %
2296 }}
2297
2298 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
2299 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
2300 \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
2301 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
2302 \subsubsecheading {#1}
2303   {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
2304 {\chapternofonts%
2305 \edef\temp{{\realbackslash subsubsecentry{#1}%
2306   {\appendixletter}
2307   {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
2308 \escapechar=`\\%
2309 \write \contentsfile \temp %
2310 \appendixnoderef %
2311 \penalty 10000 %
2312 }}
2313
2314 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
2315 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
2316 \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
2317 \plainsecheading {#1}\gdef\thissection{#1}%
2318 {\chapternofonts%
2319 \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
2320 \escapechar=`\\%
2321 \write \contentsfile \temp %
2322 \unnumbnoderef %
2323 \penalty 10000 %
2324 }}
2325
2326 % These are variants which are not "outer", so they can appear in @ifinfo.
2327 % Actually, they should now be obsolete; ordinary section commands should work.
2328 \def\infotop{\parsearg\unnumberedzzz}
2329 \def\infounnumbered{\parsearg\unnumberedzzz}
2330 \def\infounnumberedsec{\parsearg\unnumberedseczzz}
2331 \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
2332 \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
2333
2334 \def\infoappendix{\parsearg\appendixzzz}
2335 \def\infoappendixsec{\parsearg\appendixseczzz}
2336 \def\infoappendixsubsec{\parsearg\appendixsubseczzz}
2337 \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
2338
2339 \def\infochapter{\parsearg\chapterzzz}
2340 \def\infosection{\parsearg\sectionzzz}
2341 \def\infosubsection{\parsearg\subsectionzzz}
2342 \def\infosubsubsection{\parsearg\subsubsectionzzz}
2343
2344 % These macros control what the section commands do, according
2345 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
2346 % Define them by default for a numbered chapter.
2347 \global\let\section = \numberedsec
2348 \global\let\subsection = \numberedsubsec
2349 \global\let\subsubsection = \numberedsubsubsec
2350
2351 % Define @majorheading, @heading and @subheading
2352
2353 % NOTE on use of \vbox for chapter headings, section headings, and
2354 % such:
2355 %       1) We use \vbox rather than the earlier \line to permit
2356 %          overlong headings to fold.
2357 %       2) \hyphenpenalty is set to 10000 because hyphenation in a
2358 %          heading is obnoxious; this forbids it.
2359 %       3) Likewise, headings look best if no \parindent is used, and
2360 %          if justification is not attempted.  Hence \raggedright.
2361
2362
2363 \def\majorheading{\parsearg\majorheadingzzz}
2364 \def\majorheadingzzz #1{%
2365 {\advance\chapheadingskip by 10pt \chapbreak }%
2366 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2367                   \parindent=0pt\raggedright
2368                   \rm #1\hfill}}\bigskip \par\penalty 200}
2369
2370 \def\chapheading{\parsearg\chapheadingzzz}
2371 \def\chapheadingzzz #1{\chapbreak %
2372 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2373                   \parindent=0pt\raggedright
2374                   \rm #1\hfill}}\bigskip \par\penalty 200}
2375
2376 \def\heading{\parsearg\secheadingi}
2377
2378 \def\subheading{\parsearg\subsecheadingi}
2379
2380 \def\subsubheading{\parsearg\subsubsecheadingi}
2381
2382 % These macros generate a chapter, section, etc. heading only
2383 % (including whitespace, linebreaking, etc. around it),
2384 % given all the information in convenient, parsed form.
2385
2386 %%% Args are the skip and penalty (usually negative)
2387 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
2388
2389 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
2390
2391 %%% Define plain chapter starts, and page on/off switching for it
2392 % Parameter controlling skip before chapter headings (if needed)
2393
2394 \newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
2395
2396 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
2397 \def\chappager{\par\vfill\supereject}
2398 \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
2399
2400 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
2401
2402 \def\CHAPPAGoff{
2403 \global\let\pchapsepmacro=\chapbreak
2404 \global\let\pagealignmacro=\chappager}
2405
2406 \def\CHAPPAGon{
2407 \global\let\pchapsepmacro=\chappager
2408 \global\let\pagealignmacro=\chappager
2409 \global\def\HEADINGSon{\HEADINGSsingle}}
2410
2411 \def\CHAPPAGodd{
2412 \global\let\pchapsepmacro=\chapoddpage
2413 \global\let\pagealignmacro=\chapoddpage
2414 \global\def\HEADINGSon{\HEADINGSdouble}}
2415
2416 \CHAPPAGon
2417
2418 \def\CHAPFplain{
2419 \global\let\chapmacro=\chfplain
2420 \global\let\unnumbchapmacro=\unnchfplain}
2421
2422 \def\chfplain #1#2{%
2423   \pchapsepmacro
2424   {%
2425     \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2426                      \parindent=0pt\raggedright
2427                      \rm #2\enspace #1}%
2428   }%
2429   \bigskip
2430   \penalty5000
2431 }
2432
2433 \def\unnchfplain #1{%
2434 \pchapsepmacro %
2435 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2436                   \parindent=0pt\raggedright
2437                   \rm #1\hfill}}\bigskip \par\penalty 10000 %
2438 }
2439 \CHAPFplain % The default
2440
2441 \def\unnchfopen #1{%
2442 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2443                        \parindent=0pt\raggedright
2444                        \rm #1\hfill}}\bigskip \par\penalty 10000 %
2445 }
2446
2447 \def\chfopen #1#2{\chapoddpage {\chapfonts
2448 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
2449 \par\penalty 5000 %
2450 }
2451
2452 \def\CHAPFopen{
2453 \global\let\chapmacro=\chfopen
2454 \global\let\unnumbchapmacro=\unnchfopen}
2455
2456 % Parameter controlling skip before section headings.
2457
2458 \newskip \subsecheadingskip  \subsecheadingskip = 17pt plus 8pt minus 4pt
2459 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
2460
2461 \newskip \secheadingskip  \secheadingskip = 21pt plus 8pt minus 4pt
2462 \def\secheadingbreak{\dobreak \secheadingskip {-1000}}
2463
2464 % @paragraphindent  is defined for the Info formatting commands only.
2465 \let\paragraphindent=\comment
2466
2467 % Section fonts are the base font at magstep2, which produces
2468 % a size a bit more than 14 points in the default situation.    
2469
2470 \def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
2471 \def\plainsecheading #1{\secheadingi {#1}}
2472 \def\secheadingi #1{{\advance \secheadingskip by \parskip %
2473 \secheadingbreak}%
2474 {\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2475                  \parindent=0pt\raggedright
2476                  \rm #1\hfill}}%
2477 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
2478
2479
2480 % Subsection fonts are the base font at magstep1, 
2481 % which produces a size of 12 points.
2482
2483 \def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}}
2484 \def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip %
2485 \subsecheadingbreak}%
2486 {\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2487                      \parindent=0pt\raggedright
2488                      \rm #1\hfill}}%
2489 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
2490
2491 \def\subsubsecfonts{\subsecfonts} % Maybe this should change:
2492                                   % Perhaps make sssec fonts scaled
2493                                   % magstep half
2494 \def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}}
2495 \def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip %
2496 \subsecheadingbreak}%
2497 {\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
2498                        \parindent=0pt\raggedright
2499                        \rm #1\hfill}}%
2500 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
2501
2502
2503 \message{toc printing,}
2504
2505 % Finish up the main text and prepare to read what we've written
2506 % to \contentsfile.
2507
2508 \newskip\contentsrightmargin \contentsrightmargin=1in
2509 \def\startcontents#1{%
2510    \pagealignmacro
2511    \immediate\closeout \contentsfile
2512    \ifnum \pageno>0
2513       \pageno = -1              % Request roman numbered pages.
2514    \fi
2515    % Don't need to put `Contents' or `Short Contents' in the headline. 
2516    % It is abundantly clear what they are.
2517    \unnumbchapmacro{#1}\def\thischapter{}%
2518    \begingroup                  % Set up to handle contents files properly.
2519       \catcode`\\=0  \catcode`\{=1  \catcode`\}=2  \catcode`\@=11
2520       \raggedbottom             % Worry more about breakpoints than the bottom.
2521       \advance\hsize by -\contentsrightmargin % Don't use the full line length.
2522 }
2523
2524   
2525 % Normal (long) toc.
2526 \outer\def\contents{%
2527    \startcontents{Table of Contents}%
2528       \input \jobname.toc
2529    \endgroup
2530    \vfill \eject
2531 }
2532
2533 % And just the chapters.
2534 \outer\def\summarycontents{%
2535    \startcontents{Short Contents}%
2536       %
2537       \let\chapentry = \shortchapentry
2538       \let\unnumbchapentry = \shortunnumberedentry
2539       % We want a true roman here for the page numbers.
2540       \secfonts
2541       \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
2542       \rm
2543       \advance\baselineskip by 1pt % Open it up a little.
2544       \def\secentry ##1##2##3##4{}
2545       \def\unnumbsecentry ##1##2{}
2546       \def\subsecentry ##1##2##3##4##5{}
2547       \def\unnumbsubsecentry ##1##2{}
2548       \def\subsubsecentry ##1##2##3##4##5##6{}
2549       \def\unnumbsubsubsecentry ##1##2{}
2550       \input \jobname.toc
2551    \endgroup
2552    \vfill \eject
2553 }
2554 \let\shortcontents = \summarycontents
2555
2556 % These macros generate individual entries in the table of contents.
2557 % The first argument is the chapter or section name.
2558 % The last argument is the page number.
2559 % The arguments in between are the chapter number, section number, ...
2560
2561 % Chapter-level things, for both the long and short contents.
2562 \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
2563
2564 % See comments in \dochapentry re vbox and related settings
2565 \def\shortchapentry#1#2#3{%
2566   \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
2567 }
2568
2569 % Typeset the label for a chapter or appendix for the short contents.
2570 % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
2571 % We could simplify the code here by writing out an \appendixentry
2572 % command in the toc file for appendices, instead of using \chapentry
2573 % for both, but it doesn't seem worth it.
2574 \setbox0 = \hbox{\shortcontrm Appendix }
2575 \newdimen\shortappendixwidth \shortappendixwidth = \wd0
2576
2577 \def\shortchaplabel#1{%
2578   % We typeset #1 in a box of constant width, regardless of the text of
2579   % #1, so the chapter titles will come out aligned.
2580   \setbox0 = \hbox{#1}%
2581   \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
2582   %
2583   % This space should be plenty, since a single number is .5em, and the
2584   % widest letter (M) is 1em, at least in the Computer Modern fonts.
2585   % (This space doesn't include the extra space that gets added after
2586   % the label; that gets put in in \shortchapentry above.)
2587   \advance\dimen0 by 1.1em
2588   \hbox to \dimen0{#1\hfil}%
2589 }
2590
2591 \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
2592 \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
2593
2594 % Sections.
2595 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
2596 \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
2597
2598 % Subsections.
2599 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
2600 \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
2601
2602 % And subsubsections.
2603 \def\subsubsecentry#1#2#3#4#5#6{%
2604   \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
2605 \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
2606
2607
2608 % This parameter controls the indentation of the various levels.
2609 \newdimen\tocindent \tocindent = 3pc
2610
2611 % Now for the actual typesetting. In all these, #1 is the text and #2 is the 
2612 % page number.
2613 %
2614 % If the toc has to be broken over pages, we would want to be at chapters 
2615 % if at all possible; hence the \penalty.
2616 \def\dochapentry#1#2{%
2617    \penalty-300 \vskip\baselineskip
2618    \begingroup
2619      \chapentryfonts
2620      \tocentry{#1}{\dopageno{#2}}%
2621    \endgroup
2622    \nobreak\vskip .25\baselineskip
2623 }
2624
2625 \def\dosecentry#1#2{\begingroup
2626   \secentryfonts \leftskip=\tocindent
2627   \tocentry{#1}{\dopageno{#2}}%
2628 \endgroup}
2629
2630 \def\dosubsecentry#1#2{\begingroup
2631   \subsecentryfonts \leftskip=2\tocindent
2632   \tocentry{#1}{\dopageno{#2}}%
2633 \endgroup}
2634
2635 \def\dosubsubsecentry#1#2{\begingroup
2636   \subsubsecentryfonts \leftskip=3\tocindent
2637   \tocentry{#1}{\dopageno{#2}}%
2638 \endgroup}
2639
2640 % Final typesetting of a toc entry; we use the same \entry macro as for
2641 % the index entries, but we want to suppress hyphenation here.  (We
2642 % can't do that in the \entry macro, since index entries might consist
2643 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
2644
2645 \def\tocentry#1#2{\begingroup
2646   \hyphenpenalty = 10000
2647   \entry{#1}{#2}%
2648 \endgroup}
2649
2650 % Space between chapter (or whatever) number and the title.
2651 \def\labelspace{\hskip1em \relax}
2652
2653 \def\dopageno#1{{\rm #1}}
2654 \def\doshortpageno#1{{\rm #1}}
2655
2656 \def\chapentryfonts{\secfonts \rm}
2657 \def\secentryfonts{\textfonts}
2658 \let\subsecentryfonts = \textfonts
2659 \let\subsubsecentryfonts = \textfonts
2660
2661
2662 \message{environments,}
2663
2664 % Since these characters are used in examples, it should be an even number of 
2665 % \tt widths. Each \tt character is 1en, so two makes it 1em.
2666 % Furthermore, these definitions must come after we define our fonts.
2667 \newbox\dblarrowbox    \newbox\longdblarrowbox
2668 \newbox\pushcharbox    \newbox\bullbox
2669 \newbox\equivbox       \newbox\errorbox
2670
2671 \let\ptexequiv = \equiv
2672
2673 %{\tentt
2674 %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
2675 %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
2676 %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
2677 %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
2678 % Adapted from the manmac format (p.420 of TeXbook)
2679 %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
2680 %                                      depth .1ex\hfil}
2681 %}
2682
2683 \def\point{$\star$}
2684
2685 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
2686 \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
2687 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
2688
2689 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
2690
2691 % Adapted from the TeXbook's \boxit.
2692 {\tentt \global\dimen0 = 3em}% Width of the box.
2693 \dimen2 = .55pt % Thickness of rules
2694 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
2695 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
2696
2697 \global\setbox\errorbox=\hbox to \dimen0{\hfil
2698    \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
2699    \advance\hsize by -2\dimen2 % Rules.
2700    \vbox{
2701       \hrule height\dimen2
2702       \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
2703          \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
2704          \kern3pt\vrule width\dimen2}% Space to right.
2705       \hrule height\dimen2}
2706     \hfil}
2707
2708 % The @error{} command.
2709 \def\error{\leavevmode\lower.7ex\copy\errorbox}
2710
2711 % @tex ... @end tex    escapes into raw Tex temporarily.
2712 % One exception: @ is still an escape character, so that @end tex works.
2713 % But \@ or @@ will get a plain tex @ character.
2714
2715 \def\tex{\begingroup
2716 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
2717 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
2718 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
2719 \catcode `\%=14
2720 \catcode 43=12
2721 \catcode`\"=12
2722 \catcode`\==12
2723 \catcode`\|=12
2724 \catcode`\<=12
2725 \catcode`\>=12
2726 \escapechar=`\\
2727 %
2728 \let\{=\ptexlbrace
2729 \let\}=\ptexrbrace
2730 \let\.=\ptexdot
2731 \let\*=\ptexstar
2732 \let\dots=\ptexdots
2733 \def\@{@}%
2734 \let\bullet=\ptexbullet
2735 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
2736 \let\L=\ptexL
2737 %
2738 \let\Etex=\endgroup}
2739
2740 % Define @lisp ... @endlisp.
2741 % @lisp does a \begingroup so it can rebind things,
2742 % including the definition of @endlisp (which normally is erroneous).
2743
2744 % Amount to narrow the margins by for @lisp.
2745 \newskip\lispnarrowing \lispnarrowing=0.4in
2746
2747 % This is the definition that ^M gets inside @lisp
2748 % phr: changed space to \null, to avoid overfull hbox problems.
2749 {\obeyspaces%
2750 \gdef\lisppar{\null\endgraf}}
2751
2752 % Make each space character in the input produce a normal interword
2753 % space in the output.  Don't allow a line break at this space, as this
2754 % is used only in environments like @example, where each line of input
2755 % should produce a line of output anyway.
2756
2757 {\obeyspaces %
2758 \gdef\sepspaces{\obeyspaces\let =\tie}}
2759
2760 % Define \obeyedspace to be our active space, whatever it is.  This is
2761 % for use in \parsearg.
2762 {\sepspaces %
2763 \global\let\obeyedspace= }
2764
2765 % This space is always present above and below environments.
2766 \newskip\envskipamount \envskipamount = 0pt
2767
2768 % Make spacing and below environment symmetrical.
2769 \def\aboveenvbreak{{\advance\envskipamount by \parskip
2770 \endgraf \ifdim\lastskip<\envskipamount
2771 \removelastskip \penalty-50 \vskip\envskipamount \fi}}
2772
2773 \let\afterenvbreak = \aboveenvbreak
2774
2775 % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins.
2776 \let\nonarrowing=\relax
2777
2778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2779 % \cartouche: draw rectangle w/rounded corners around argument
2780 \font\circle=lcircle10
2781 \newdimen\circthick
2782 \newdimen\cartouter\newdimen\cartinner
2783 \newskip\normbskip\newskip\normpskip\newskip\normlskip
2784 \circthick=\fontdimen8\circle
2785 %
2786 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
2787 \def\ctr{{\hskip 6pt\circle\char'010}}
2788 \def\cbl{{\circle\char'012\hskip -6pt}}
2789 \def\cbr{{\hskip 6pt\circle\char'011}}
2790 \def\carttop{\hbox to \cartouter{\hskip\lskip
2791         \ctl\leaders\hrule height\circthick\hfil\ctr
2792         \hskip\rskip}}
2793 \def\cartbot{\hbox to \cartouter{\hskip\lskip
2794         \cbl\leaders\hrule height\circthick\hfil\cbr
2795         \hskip\rskip}}
2796 %
2797 \newskip\lskip\newskip\rskip
2798
2799 \long\def\cartouche{%
2800 \begingroup
2801         \lskip=\leftskip \rskip=\rightskip
2802         \leftskip=0pt\rightskip=0pt %we want these *outside*.
2803         \cartinner=\hsize \advance\cartinner by-\lskip 
2804                           \advance\cartinner by-\rskip
2805         \cartouter=\hsize
2806         \advance\cartouter by 18pt % allow for 3pt kerns on either
2807 %                                    side, and for 6pt waste from
2808 %                                    each corner char
2809         \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
2810         % Flag to tell @lisp, etc., not to narrow margin.
2811         \let\nonarrowing=\comment
2812         \vbox\bgroup
2813                 \baselineskip=0pt\parskip=0pt\lineskip=0pt
2814                 \carttop
2815                 \hbox\bgroup
2816                         \hskip\lskip
2817                         \vrule\kern3pt
2818                         \vbox\bgroup
2819                                 \hsize=\cartinner
2820                                 \kern3pt
2821                                 \begingroup
2822                                         \baselineskip=\normbskip
2823                                         \lineskip=\normlskip
2824                                         \parskip=\normpskip
2825                                         \vskip -\parskip
2826 \def\Ecartouche{%
2827                                 \endgroup
2828                                 \kern3pt
2829                         \egroup
2830                         \kern3pt\vrule
2831                         \hskip\rskip
2832                 \egroup
2833                 \cartbot
2834         \egroup
2835 \endgroup
2836 }}      
2837
2838
2839 % This macro is called at the beginning of all the @example variants,
2840 % inside a group.
2841 \def\nonfillstart{%
2842   \aboveenvbreak
2843   \inENV % This group ends at the end of the body
2844   \hfuzz = 12pt % Don't be fussy
2845   \sepspaces % Make spaces be word-separators rather than space tokens.
2846   \singlespace % single space lines
2847   \let\par = \lisppar % don't ignore blank lines
2848   \obeylines % each line of input is a line of output
2849   \parskip = 0pt
2850   \parindent = 0pt
2851   \emergencystretch = 0pt % don't try to avoid overfull boxes
2852   % @cartouche defines \nonarrowing to inhibit narrowing
2853   % at next level down.
2854   \ifx\nonarrowing\relax
2855     \advance \leftskip by \lispnarrowing
2856     \exdentamount=\lispnarrowing
2857     \let\exdent=\nofillexdent
2858     \let\nonarrowing=\relax
2859   \fi
2860 }
2861
2862 \def\Elisp{\endgroup\afterenvbreak}%
2863
2864 \def\lisp{\begingroup
2865   \nonfillstart
2866   \def\Elisp{\endgroup\afterenvbreak}%
2867   \tt
2868   \rawbackslash % output the \ character from the current font
2869   \gobble
2870 }
2871
2872 % Define the \E... control sequence only if we are inside the
2873 % environment, so the error checking in \end will work.
2874
2875 % We must call \lisp last in the definition, since it reads the
2876 % return following the @example (or whatever) command.
2877 %
2878 \def\example{\begingroup \def\Eexample{\Elisp\endgroup}\lisp}
2879 \def\smallexample{\begingroup \def\Esmallexample{\Elisp\endgroup}\lisp}
2880
2881 % Macro for 9 pt. examples, necessary to print with 5" lines.  From
2882 % Pavel@xerox.  This is not used for @smallexamples unless the
2883 % @smallbook command is given.
2884 %
2885 \def\smalllispx{\begingroup
2886   \nonfillstart
2887   \def\Esmalllisp{\endgroup\afterenvbreak}%
2888   %
2889   % Smaller interline space and fonts for small examples.
2890   \baselineskip 10pt
2891   \indexfonts \tt
2892   \rawbackslash % output the \ character from the current font
2893   \gobble
2894 }
2895
2896 % This is @display; same as @lisp except use roman font.
2897 %
2898 \def\display{\begingroup
2899   \nonfillstart
2900   \def\Edisplay{\endgroup\afterenvbreak}%
2901   \gobble
2902 }
2903
2904 % This is @format; same as @display except don't narrow margins.
2905 %
2906 \def\format{\begingroup
2907   \let\nonarrowing = t
2908   \nonfillstart
2909   \def\Eformat{\endgroup\afterenvbreak}
2910   \gobble
2911 }
2912
2913 % @flushleft (same as @format) and @flushright.
2914 %
2915 \def\flushleft{\begingroup
2916   \let\nonarrowing = t
2917   \nonfillstart
2918   \def\Eflushleft{\endgroup\afterenvbreak}%
2919   \gobble
2920 }
2921 \def\flushright{\begingroup
2922   \let\nonarrowing = t
2923   \nonfillstart
2924   \def\Eflushright{\endgroup\afterenvbreak}%
2925   \advance\leftskip by 0pt plus 1fill
2926   \gobble}
2927
2928 % @quotation does normal linebreaking and narrows the margins.
2929 %
2930 \def\quotation{%
2931 \begingroup\inENV %This group ends at the end of the @quotation body
2932 {\parskip=0pt  % because we will skip by \parskip too, later
2933 \aboveenvbreak}%
2934 \singlespace
2935 \parindent=0pt
2936 \def\Equotation{\par\endgroup\afterenvbreak}%
2937 % @cartouche defines \nonarrowing to inhibit narrowing
2938 % at next level down.
2939 \ifx\nonarrowing\relax
2940 \advance \leftskip by \lispnarrowing
2941 \advance \rightskip by \lispnarrowing
2942 \exdentamount=\lispnarrowing
2943 \let\nonarrowing=\relax
2944 \fi}
2945
2946 \message{defuns,}
2947 % Define formatter for defuns
2948 % First, allow user to change definition object font (\df) internally
2949 \def\setdeffont #1 {\csname DEF#1\endcsname}
2950
2951 \newskip\defbodyindent \defbodyindent=.4in
2952 \newskip\defargsindent \defargsindent=50pt
2953 \newskip\deftypemargin \deftypemargin=12pt
2954 \newskip\deflastargmargin \deflastargmargin=18pt
2955
2956 \newcount\parencount
2957 % define \functionparens, which makes ( and ) and & do special things.
2958 % \functionparens affects the group it is contained in.
2959 \def\activeparens{%
2960 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
2961 \catcode`\[=\active \catcode`\]=\active}
2962
2963 % Make control sequences which act like normal parenthesis chars.
2964 \let\lparen = ( \let\rparen = )
2965
2966 {\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
2967
2968 % Be sure that we always have a definition for `(', etc.  For example,
2969 % if the fn name has parens in it, \boldbrax will not be in effect yet,
2970 % so TeX would otherwise complain about undefined control sequence.
2971 \global\let(=\lparen \global\let)=\rparen
2972 \global\let[=\lbrack \global\let]=\rbrack
2973
2974 \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
2975 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
2976
2977 % Definitions of (, ) and & used in args for functions.
2978 % This is the definition of ( outside of all parentheses.
2979 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
2980 \global\advance\parencount by 1 }
2981 %
2982 % This is the definition of ( when already inside a level of parens.
2983 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
2984 %
2985 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
2986 % also in that case restore the outer-level definition of (.
2987 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
2988 \global\advance \parencount by -1 }
2989 % If we encounter &foo, then turn on ()-hacking afterwards
2990 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
2991 %
2992 \gdef\normalparens{\boldbrax\let&=\ampnr}
2993 } % End of definition inside \activeparens
2994 %% These parens (in \boldbrax) actually are a little bolder than the
2995 %% contained text.  This is especially needed for [ and ]
2996 \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
2997 \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}}
2998
2999 % First, defname, which formats the header line itself.
3000 % #1 should be the function name.
3001 % #2 should be the type of definition, such as "Function".
3002
3003 \def\defname #1#2{%
3004 % Get the values of \leftskip and \rightskip as they were
3005 % outside the @def...
3006 \dimen2=\leftskip
3007 \advance\dimen2 by -\defbodyindent
3008 \dimen3=\rightskip
3009 \advance\dimen3 by -\defbodyindent
3010 \noindent        %
3011 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
3012 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
3013 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
3014 \parshape 2 0in \dimen0 \defargsindent \dimen1     %
3015 % Now output arg 2 ("Function" or some such)
3016 % ending at \deftypemargin from the right margin,
3017 % but stuck inside a box of width 0 so it does not interfere with linebreaking
3018 {% Adjust \hsize to exclude the ambient margins,
3019 % so that \rightline will obey them.
3020 \advance \hsize by -\dimen2 \advance \hsize by -\dimen3
3021 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
3022 % Make all lines underfull and no complaints:
3023 \tolerance=10000 \hbadness=10000    
3024 \advance\leftskip by -\defbodyindent
3025 \exdentamount=\defbodyindent
3026 {\df #1}\enskip        % Generate function name
3027 }
3028
3029 % Actually process the body of a definition
3030 % #1 should be the terminating control sequence, such as \Edefun.
3031 % #2 should be the "another name" control sequence, such as \defunx.
3032 % #3 should be the control sequence that actually processes the header,
3033 %    such as \defunheader.
3034
3035 \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
3036 \medbreak %
3037 % Define the end token that this defining construct specifies
3038 % so that it will exit this group.
3039 \def#1{\endgraf\endgroup\medbreak}%
3040 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
3041 \parindent=0in
3042 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3043 \exdentamount=\defbodyindent
3044 \begingroup %
3045 \catcode 61=\active %
3046 \obeylines\activeparens\spacesplit#3}
3047
3048 \def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
3049 \medbreak %
3050 % Define the end token that this defining construct specifies
3051 % so that it will exit this group.
3052 \def#1{\endgraf\endgroup\medbreak}%
3053 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
3054 \parindent=0in
3055 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3056 \exdentamount=\defbodyindent
3057 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
3058
3059 \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
3060 \medbreak %
3061 % Define the end token that this defining construct specifies
3062 % so that it will exit this group.
3063 \def#1{\endgraf\endgroup\medbreak}%
3064 \def#2##1 ##2 {\def#4{##1}%
3065 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
3066 \parindent=0in
3067 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3068 \exdentamount=\defbodyindent
3069 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
3070
3071 % These parsing functions are similar to the preceding ones
3072 % except that they do not make parens into active characters.
3073 % These are used for "variables" since they have no arguments.
3074
3075 \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
3076 \medbreak %
3077 % Define the end token that this defining construct specifies
3078 % so that it will exit this group.
3079 \def#1{\endgraf\endgroup\medbreak}%
3080 \def#2{\begingroup\obeylines\spacesplit#3}%
3081 \parindent=0in
3082 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3083 \exdentamount=\defbodyindent
3084 \begingroup %
3085 \catcode 61=\active %
3086 \obeylines\spacesplit#3}
3087
3088 \def\defvrparsebody #1#2#3#4 {\begingroup\inENV %
3089 \medbreak %
3090 % Define the end token that this defining construct specifies
3091 % so that it will exit this group.
3092 \def#1{\endgraf\endgroup\medbreak}%
3093 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
3094 \parindent=0in
3095 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3096 \exdentamount=\defbodyindent
3097 \begingroup\obeylines\spacesplit{#3{#4}}}
3098
3099 % This seems to work right in all cases.
3100 \let\deftpparsebody=\defvrparsebody
3101 % This fails to work.  When given `@deftp {Data Type} foo_t',
3102 % it thinks the type name is just `f'.
3103 %%% This is the same as all the others except for the last line.  We need
3104 %%% to parse the arguments differently for @deftp, since the ``attributes''
3105 %%% there are optional.
3106 %%% 
3107 %%\def\deftpparsebody #1#2#3#4 {\begingroup\inENV %
3108 %%\medbreak %
3109 %%% Define the end token that this defining construct specifies
3110 %%% so that it will exit this group.
3111 %%\def#1{\endgraf\endgroup\medbreak}%
3112 %%\def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
3113 %%\parindent=0in
3114 %%\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3115 %%\exdentamount=\defbodyindent
3116 %%\begingroup\obeylines\parsetpheaderline{#3{#4}}}
3117
3118 %%{\obeylines %
3119 %%  % Parse the type name and any attributes (field names, etc.).
3120 %%  % #1 is the beginning of the macro call that will produce the output,
3121 %%  %   i.e., \deftpheader{CLASS}; this is passed from \deftpparsebody.
3122 %%  % #2 is the type name, e.g., `struct termios'.
3123 %%  % #3 is the (possibly empty) attribute list.
3124 %%  % 
3125 %%  \gdef\parsetpheaderline#1#2#3^^M{%
3126 %%    \endgroup % Started in \deftpparsebody.
3127 %%    %
3128 %%    % If the attribute list is in fact empty, there will be no space after
3129 %%    % #2; so we can't put a space in our TeX parameter list.  But if it
3130 %%    % isn't empty, then #3 will begin with an unwanted space.
3131 %%    \def\theargs{\ignorespaces #3}%
3132 %%    %
3133 %%    % Call the macro to produce the output.
3134 %%    #1{#2}\theargs %
3135 %%  }%
3136 %%}
3137
3138 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
3139 \medbreak %
3140 % Define the end token that this defining construct specifies
3141 % so that it will exit this group.
3142 \def#1{\endgraf\endgroup\medbreak}%
3143 \def#2##1 ##2 {\def#4{##1}%
3144 \begingroup\obeylines\spacesplit{#3{##2}}}%
3145 \parindent=0in
3146 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3147 \exdentamount=\defbodyindent
3148 \begingroup\obeylines\spacesplit{#3{#5}}}
3149
3150 % Split up #2 at the first space token.
3151 % call #1 with two arguments:
3152 %  the first is all of #2 before the space token,
3153 %  the second is all of #2 after that space token.
3154 % If #2 contains no space token, all of it is passed as the first arg
3155 % and the second is passed as empty.
3156
3157 {\obeylines
3158 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
3159 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
3160 \ifx\relax #3%
3161 #1{#2}{}\else #1{#2}{#3#4}\fi}}
3162
3163 % So much for the things common to all kinds of definitions.
3164
3165 % Define @defun.
3166
3167 % First, define the processing that is wanted for arguments of \defun
3168 % Use this to expand the args and terminate the paragraph they make up
3169
3170 \def\defunargs #1{\functionparens \sl
3171 % Expand, preventing hyphenation at `-' chars.
3172 % Note that groups don't affect changes in \hyphenchar.
3173 \hyphenchar\tensl=0
3174 #1%
3175 \hyphenchar\tensl=45
3176 \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
3177 \interlinepenalty=10000
3178 \advance\rightskip by 0pt plus 1fil
3179 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
3180 }
3181
3182 \def\deftypefunargs #1{%
3183 % Expand, preventing hyphenation at `-' chars.
3184 % Note that groups don't affect changes in \hyphenchar.
3185 \functionparens
3186 \code{#1}%
3187 \interlinepenalty=10000
3188 \advance\rightskip by 0pt plus 1fil
3189 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
3190 }
3191
3192 % Do complete processing of one @defun or @defunx line already parsed.
3193
3194 % @deffn Command forward-char nchars
3195
3196 \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
3197
3198 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
3199 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
3200 \catcode 61=\other % Turn off change made in \defparsebody
3201 }
3202
3203 % @defun == @deffn Function
3204
3205 \def\defun{\defparsebody\Edefun\defunx\defunheader}
3206
3207 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
3208 \begingroup\defname {#1}{Function}%
3209 \defunargs {#2}\endgroup %
3210 \catcode 61=\other % Turn off change made in \defparsebody
3211 }
3212
3213 % @deftypefun int foobar (int @var{foo}, float @var{bar})
3214
3215 \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
3216
3217 % #1 is the data type.  #2 is the name and args.
3218 \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
3219 % #1 is the data type, #2 the name, #3 the args.
3220 \def\deftypefunheaderx #1#2 #3\relax{%
3221 \doind {fn}{\code{#2}}% Make entry in function index
3222 \begingroup\defname {\code{#1} #2}{Function}%
3223 \deftypefunargs {#3}\endgroup %
3224 \catcode 61=\other % Turn off change made in \defparsebody
3225 }
3226
3227 % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
3228
3229 \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
3230
3231 % #1 is the classification.  #2 is the data type.  #3 is the name and args.
3232 \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
3233 % #1 is the classification, #2 the data type, #3 the name, #4 the args.
3234 \def\deftypefnheaderx #1#2#3 #4\relax{%
3235 \doind {fn}{\code{#3}}% Make entry in function index
3236 \begingroup\defname {\code{#2} #3}{#1}%
3237 \deftypefunargs {#4}\endgroup %
3238 \catcode 61=\other % Turn off change made in \defparsebody
3239 }
3240
3241 % @defmac == @deffn Macro
3242
3243 \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
3244
3245 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
3246 \begingroup\defname {#1}{Macro}%
3247 \defunargs {#2}\endgroup %
3248 \catcode 61=\other % Turn off change made in \defparsebody
3249 }
3250
3251 % @defspec == @deffn Special Form
3252
3253 \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
3254
3255 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
3256 \begingroup\defname {#1}{Special Form}%
3257 \defunargs {#2}\endgroup %
3258 \catcode 61=\other % Turn off change made in \defparsebody
3259 }
3260
3261 % This definition is run if you use @defunx
3262 % anywhere other than immediately after a @defun or @defunx.
3263
3264 \def\deffnx #1 {\errmessage{@deffnx in invalid context}}
3265 \def\defunx #1 {\errmessage{@defunx in invalid context}}
3266 \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
3267 \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
3268 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
3269 \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
3270
3271 % @defmethod, and so on
3272
3273 % @defop {Funny Method} foo-class frobnicate argument
3274
3275 \def\defop #1 {\def\defoptype{#1}%
3276 \defopparsebody\Edefop\defopx\defopheader\defoptype}
3277
3278 \def\defopheader #1#2#3{%
3279 \dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
3280 \begingroup\defname {#2}{\defoptype{} on #1}%
3281 \defunargs {#3}\endgroup %
3282 }
3283
3284 % @defmethod == @defop Method
3285
3286 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
3287
3288 \def\defmethodheader #1#2#3{%
3289 \dosubind {fn}{\code{#2}}{on #1}% entry in function index
3290 \begingroup\defname {#2}{Method on #1}%
3291 \defunargs {#3}\endgroup %
3292 }
3293
3294 % @defcv {Class Option} foo-class foo-flag
3295
3296 \def\defcv #1 {\def\defcvtype{#1}%
3297 \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
3298
3299 \def\defcvarheader #1#2#3{%
3300 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
3301 \begingroup\defname {#2}{\defcvtype{} of #1}%
3302 \defvarargs {#3}\endgroup %
3303 }
3304
3305 % @defivar == @defcv {Instance Variable}
3306
3307 \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
3308
3309 \def\defivarheader #1#2#3{%
3310 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
3311 \begingroup\defname {#2}{Instance Variable of #1}%
3312 \defvarargs {#3}\endgroup %
3313 }
3314
3315 % These definitions are run if you use @defmethodx, etc.,
3316 % anywhere other than immediately after a @defmethod, etc.
3317
3318 \def\defopx #1 {\errmessage{@defopx in invalid context}}
3319 \def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
3320 \def\defcvx #1 {\errmessage{@defcvx in invalid context}}
3321 \def\defivarx #1 {\errmessage{@defivarx in invalid context}}
3322
3323 % Now @defvar
3324
3325 % First, define the processing that is wanted for arguments of @defvar.
3326 % This is actually simple: just print them in roman.
3327 % This must expand the args and terminate the paragraph they make up
3328 \def\defvarargs #1{\normalparens #1%
3329 \interlinepenalty=10000
3330 \endgraf\penalty 10000\vskip -\parskip\penalty 10000}
3331
3332 % @defvr Counter foo-count
3333
3334 \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
3335
3336 \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
3337 \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
3338
3339 % @defvar == @defvr Variable
3340
3341 \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
3342
3343 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
3344 \begingroup\defname {#1}{Variable}%
3345 \defvarargs {#2}\endgroup %
3346 }
3347
3348 % @defopt == @defvr {User Option}
3349
3350 \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
3351
3352 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
3353 \begingroup\defname {#1}{User Option}%
3354 \defvarargs {#2}\endgroup %
3355 }
3356
3357 % @deftypevar int foobar
3358
3359 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
3360
3361 % #1 is the data type.  #2 is the name.
3362 \def\deftypevarheader #1#2{%
3363 \doind {vr}{\code{#2}}% Make entry in variables index
3364 \begingroup\defname {\code{#1} #2}{Variable}%
3365 \interlinepenalty=10000
3366 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
3367 \endgroup}
3368
3369 % @deftypevr {Global Flag} int enable
3370
3371 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
3372
3373 \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}%
3374 \begingroup\defname {\code{#2} #3}{#1}
3375 \interlinepenalty=10000
3376 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
3377 \endgroup}
3378
3379 % This definition is run if you use @defvarx
3380 % anywhere other than immediately after a @defvar or @defvarx.
3381
3382 \def\defvrx #1 {\errmessage{@defvrx in invalid context}}
3383 \def\defvarx #1 {\errmessage{@defvarx in invalid context}}
3384 \def\defoptx #1 {\errmessage{@defoptx in invalid context}}
3385 \def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
3386 \def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
3387
3388 % Now define @deftp
3389 % Args are printed in bold, a slight difference from @defvar.
3390
3391 \def\deftpargs #1{\bf \defvarargs{#1}}
3392
3393 % @deftp Class window height width ...
3394
3395 \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
3396
3397 \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
3398 \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
3399
3400 % This definition is run if you use @deftpx, etc
3401 % anywhere other than immediately after a @deftp, etc.
3402
3403 \def\deftpx #1 {\errmessage{@deftpx in invalid context}}
3404
3405 \message{cross reference,}
3406 % Define cross-reference macros
3407 \newwrite \auxfile
3408
3409 \newif\ifhavexrefs  % True if xref values are known.
3410 \newif\ifwarnedxrefs  % True if we warned once that they aren't known.
3411
3412 % \setref{foo} defines a cross-reference point named foo.
3413
3414 \def\setref#1{%
3415 %\dosetq{#1-title}{Ytitle}%
3416 \dosetq{#1-pg}{Ypagenumber}%
3417 \dosetq{#1-snt}{Ysectionnumberandtype}}
3418
3419 \def\unnumbsetref#1{%
3420 %\dosetq{#1-title}{Ytitle}%
3421 \dosetq{#1-pg}{Ypagenumber}%
3422 \dosetq{#1-snt}{Ynothing}}
3423
3424 \def\appendixsetref#1{%
3425 %\dosetq{#1-title}{Ytitle}%
3426 \dosetq{#1-pg}{Ypagenumber}%
3427 \dosetq{#1-snt}{Yappendixletterandtype}}
3428
3429 % \xref, \pxref, and \ref generate cross-references to specified points.
3430 % For \xrefX, #1 is the node name, #2 the name of the Info
3431 % cross-reference, #3 the printed node name, #4 the name of the Info
3432 % file, #5 the name of the printed manual.  All but the node name can be
3433 % omitted.
3434
3435 \def\pxref#1{see \xrefX[#1,,,,,,,]}
3436 \def\xref#1{See \xrefX[#1,,,,,,,]}
3437 \def\ref#1{\xrefX[#1,,,,,,,]}
3438 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup%
3439 \def\printedmanual{\ignorespaces #5}%
3440 \def\printednodename{\ignorespaces #3}%
3441 %
3442 \setbox1=\hbox{\printedmanual}%
3443 \setbox0=\hbox{\printednodename}%
3444 \ifdim \wd0=0pt%
3445 \def\printednodename{\ignorespaces #1}%
3446 %%% Uncommment the following line to make the actual chapter or section title
3447 %%% appear inside the square brackets.
3448 %\def\printednodename{#1-title}%
3449 \fi%
3450 %
3451 %
3452 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does
3453 % not insert empty discretionaries after hyphens, which means that it
3454 % will not find a line break at a hyphen in a node names.  Since some
3455 % manuals are best written with fairly long node names, containing
3456 % hyphens, this is a loss.  Therefore, we simply give the text of
3457 % the node name again, so it is as if TeX is seeing it for the first
3458 % time.
3459 \ifdim \wd1>0pt
3460 section ``\printednodename'' in \cite{\printedmanual}%
3461 \else%
3462 \turnoffactive%
3463 \refx{#1-snt}{} [\printednodename], page\tie\refx{#1-pg}{}%
3464 \fi
3465 \endgroup}
3466
3467 % \dosetq is the interface for calls from other macros
3468
3469 % Use \turnoffactive so that punctuation chars such as underscore
3470 % work in node names.
3471 \def\dosetq #1#2{{\let\folio=0 \turnoffactive%
3472 \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
3473 \next}}
3474
3475 % \internalsetq {foo}{page} expands into
3476 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
3477 % When the aux file is read, ' is the escape character
3478
3479 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
3480
3481 % Things to be expanded by \internalsetq
3482
3483 \def\Ypagenumber{\folio}
3484
3485 \def\Ytitle{\thischapter}
3486
3487 \def\Ynothing{}
3488
3489 \def\Ysectionnumberandtype{%
3490 \ifnum\secno=0 Chapter\xreftie\the\chapno %
3491 \else \ifnum \subsecno=0 Section\xreftie\the\chapno.\the\secno %
3492 \else \ifnum \subsubsecno=0 %
3493 Section\xreftie\the\chapno.\the\secno.\the\subsecno %
3494 \else %
3495 Section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
3496 \fi \fi \fi }
3497
3498 \def\Yappendixletterandtype{%
3499 \ifnum\secno=0 Appendix\xreftie'char\the\appendixno{}%
3500 \else \ifnum \subsecno=0 Section\xreftie'char\the\appendixno.\the\secno %
3501 \else \ifnum \subsubsecno=0 %
3502 Section\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
3503 \else %
3504 Section\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
3505 \fi \fi \fi }
3506
3507 \gdef\xreftie{'tie}
3508
3509 % Use TeX 3.0's \inputlineno to get the line number, for better error
3510 % messages, but if we're using an old version of TeX, don't do anything.
3511
3512 \ifx\inputlineno\thisisundefined
3513   \let\linenumber = \empty % Non-3.0.
3514 \else
3515   \def\linenumber{\the\inputlineno:\space}
3516 \fi
3517
3518 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
3519 % If its value is nonempty, SUFFIX is output afterward.
3520
3521 \def\refx#1#2{%
3522   \expandafter\ifx\csname X#1\endcsname\relax
3523     % If not defined, say something at least.
3524     $\langle$un\-de\-fined$\rangle$%
3525     \ifhavexrefs
3526       \message{\linenumber Undefined cross reference `#1'.}%
3527     \else
3528       \ifwarnedxrefs\else
3529         \global\warnedxrefstrue
3530         \message{Cross reference values unknown; you must run TeX again.}%
3531       \fi
3532     \fi
3533   \else
3534     % It's defined, so just use it.
3535     \csname X#1\endcsname
3536   \fi
3537   #2% Output the suffix in any case.
3538 }
3539
3540 % Read the last existing aux file, if any.  No error if none exists.
3541
3542 % This is the macro invoked by entries in the aux file.
3543 \def\xrdef #1#2{
3544 {\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
3545
3546 \def\readauxfile{%
3547 \begingroup
3548 \catcode `\^^@=\other
3549 \catcode `\\ 1=\other
3550 \catcode `\\ 2=\other
3551 \catcode `\^^C=\other
3552 \catcode `\^^D=\other
3553 \catcode `\^^E=\other
3554 \catcode `\^^F=\other
3555 \catcode `\^^G=\other
3556 \catcode `\^^H=\other
3557 \catcode `\\v=\other
3558 \catcode `\^^L=\other
3559 \catcode `\\ e=\other
3560 \catcode `\\ f=\other
3561 \catcode `\\10=\other
3562 \catcode `\\11=\other
3563 \catcode `\\12=\other
3564 \catcode `\\13=\other
3565 \catcode `\\14=\other
3566 \catcode `\\15=\other
3567 \catcode `\\16=\other
3568 \catcode `\\17=\other
3569 \catcode `\\18=\other
3570 \catcode `\\19=\other
3571 \catcode 26=\other
3572 \catcode `\^^[=\other
3573 \catcode `\^^\=\other
3574 \catcode `\^^]=\other
3575 \catcode `\^^^=\other
3576 \catcode `\^^_=\other
3577 \catcode `\@=\other
3578 \catcode `\^=\other
3579 \catcode `\~=\other
3580 \catcode `\[=\other
3581 \catcode `\]=\other
3582 \catcode`\"=\other
3583 \catcode`\_=\other
3584 \catcode`\|=\other
3585 \catcode`\<=\other
3586 \catcode`\>=\other
3587 \catcode `\$=\other
3588 \catcode `\#=\other
3589 \catcode `\&=\other
3590 % `\+ does not work, so use 43.
3591 \catcode 43=\other
3592 % the aux file uses ' as the escape.
3593 % Turn off \ as an escape so we do not lose on
3594 % entries which were dumped with control sequences in their names.
3595 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
3596 % Reference to such entries still does not work the way one would wish,
3597 % but at least they do not bomb out when the aux file is read in.
3598 \catcode `\{=1 \catcode `\}=2
3599 \catcode `\%=\other
3600 \catcode `\'=0
3601 \catcode `\\=\other
3602 \openin 1 \jobname.aux
3603 \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue
3604 \global\warnedobstrue
3605 \fi
3606 % Open the new aux file.  Tex will close it automatically at exit.
3607 \openout \auxfile=\jobname.aux
3608 \endgroup}
3609
3610
3611 % Footnotes.
3612
3613 \newcount \footnoteno
3614
3615 % The trailing space in the following definition for supereject is
3616 % vital for proper filling; pages come out unaligned when you do a
3617 % pagealignmacro call if that space before the closing brace is
3618 % removed.
3619 \def\supereject{\par\penalty -20000\footnoteno =0 }
3620
3621 % @footnotestyle is meaningful for info output only..
3622 \let\footnotestyle=\comment
3623
3624 \let\ptexfootnote=\footnote
3625
3626 {\catcode `\@=11
3627 %
3628 % Auto-number footnotes.  Otherwise like plain.
3629 \gdef\footnote{%
3630   \global\advance\footnoteno by \@ne
3631   \edef\thisfootno{$^{\the\footnoteno}$}%
3632   %
3633   % In case the footnote comes at the end of a sentence, preserve the
3634   % extra spacing after we do the footnote number.
3635   \let\@sf\empty
3636   \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
3637   %
3638   % Remove inadvertent blank space before typesetting the footnote number.
3639   \unskip
3640   \thisfootno\@sf
3641   \footnotezzz
3642 }%
3643
3644 % Don't bother with the trickery in plain.tex to not require the
3645 % footnote text as a parameter.  Our footnotes don't need to be so general.
3646
3647 \long\gdef\footnotezzz#1{\insert\footins{%
3648   % We want to typeset this text as a normal paragraph, even if the
3649   % footnote reference occurs in (for example) a display environment.
3650   % So reset some parameters.
3651   \interlinepenalty\interfootnotelinepenalty
3652   \splittopskip\ht\strutbox % top baseline for broken footnotes
3653   \splitmaxdepth\dp\strutbox
3654   \floatingpenalty\@MM
3655   \leftskip\z@skip
3656   \rightskip\z@skip
3657   \spaceskip\z@skip
3658   \xspaceskip\z@skip
3659   \parindent\defaultparindent
3660   %
3661   % Hang the footnote text off the number.
3662   \hang
3663   \textindent{\thisfootno}%
3664   %
3665   % Don't crash into the line above the footnote text.  Since this
3666   % expands into a box, it must come within the paragraph, lest it
3667   % provide a place where TeX can split the footnote.
3668   \footstrut
3669   #1\strut}%
3670 }
3671
3672 }%end \catcode `\@=11
3673
3674 % Set the baselineskip to #1, and the lineskip and strut size
3675 % correspondingly.  There is no deep meaning behind these magic numbers
3676 % used as factors; they just match (closely enough) what Knuth defined.
3677
3678 \def\lineskipfactor{.1}
3679 \def\strutheightpercent{.71}
3680 \def\strutdepthpercent{.29}
3681 %
3682 \def\setleading#1{%
3683   \baselineskip = #1\relax
3684   \normalbaselineskip = \baselineskip
3685   \lineskip = \lineskipfactor\baselineskip
3686   \setbox\strutbox =\hbox{%
3687     \vrule width0pt height\strutheightpercent\baselineskip
3688                     depth \strutdepthpercent \baselineskip
3689   }%
3690 }
3691
3692 % @| inserts a changebar to the left of the current line.  It should
3693 % surround any changed text.  This approach does *not* work if the
3694 % change spans more than two lines of output.  To handle that, we would
3695 % have adopt a much more difficult approach (putting marks into the main
3696 % vertical list for the beginning and end of each change).
3697
3698 \def\|{%
3699   % \vadjust can only be used in horizontal mode.
3700   \leavevmode
3701   %
3702   % Append this vertical mode material after the current line in the output.
3703   \vadjust{%
3704     % We want to insert a rule with the height and depth of the current
3705     % leading; that is exactly what \strutbox is supposed to record.
3706     \vskip-\baselineskip
3707     %
3708     % \vadjust-items are inserted at the left edge of the type.  So
3709     % the \llap here moves out into the left-hand margin.
3710     \llap{%
3711       %
3712       % For a thicker or thinner bar, change the `1pt'.
3713       \vrule height\baselineskip width1pt
3714       %
3715       % This is the space between the bar and the text.
3716       \hskip 12pt
3717     }%
3718   }%
3719 }
3720
3721 % For a final copy, take out the rectangles
3722 % that mark overfull boxes (in case you have decided
3723 % that the text looks ok even though it passes the margin).
3724
3725 \def\finalout{\overfullrule=0pt}
3726
3727
3728 % End of control word definitions.
3729
3730 \message{and turning on texinfo input format.}
3731
3732 \def\openindices{%
3733    \newindex{cp}%
3734    \newcodeindex{fn}%
3735    \newcodeindex{vr}%
3736    \newcodeindex{tp}%
3737    \newcodeindex{ky}%
3738    \newcodeindex{pg}%
3739 }
3740
3741 % Set some numeric style parameters, for 8.5 x 11 format.
3742
3743 %\hsize = 6.5in
3744 \newdimen\defaultparindent \defaultparindent = 15pt
3745 \parindent = \defaultparindent
3746 \parskip 18pt plus 1pt
3747 \setleading{15pt}
3748 \advance\topskip by 1.2cm
3749
3750 % Prevent underfull vbox error messages.
3751 \vbadness=10000
3752
3753 % Following George Bush, just get rid of widows and orphans.
3754 \widowpenalty=10000
3755 \clubpenalty=10000
3756
3757 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
3758 % using an old version of TeX, don't do anything.  We want the amount of
3759 % stretch added to depend on the line length, hence the dependence on
3760 % \hsize.  This makes it come to about 9pt for the 8.5x11 format.
3761
3762 \ifx\emergencystretch\thisisundefined
3763   % Allow us to assign to \emergencystretch anyway.
3764   \def\emergencystretch{\dimen0}%
3765 \else
3766   \emergencystretch = \hsize
3767   \divide\emergencystretch by 45
3768 \fi
3769
3770 % Use @smallbook to reset parameters for 7x9.5 format  (or else 7x9.25)
3771 \def\smallbook{
3772
3773 % These values for secheadingskip and subsecheadingskip are
3774 % experiments.  RJC 7 Aug 1992
3775 \global\secheadingskip = 17pt plus 6pt minus 3pt
3776 \global\subsecheadingskip = 14pt plus 6pt minus 3pt
3777
3778 \global\lispnarrowing = 0.3in
3779 \setleading{12pt}
3780 \advance\topskip by -1cm
3781 \global\parskip 3pt plus 1pt
3782 \global\hsize = 5in
3783 \global\vsize=7.5in
3784 \global\tolerance=700
3785 \global\hfuzz=1pt
3786 \global\contentsrightmargin=0pt
3787
3788 \global\pagewidth=\hsize
3789 \global\pageheight=\vsize
3790
3791 \global\let\smalllisp=\smalllispx
3792 \global\let\smallexample=\smalllispx
3793 \global\def\Esmallexample{\Esmalllisp}
3794 }
3795
3796 % Use @afourpaper to print on European A4 paper.
3797 \def\afourpaper{
3798 \global\tolerance=700
3799 \global\hfuzz=1pt
3800 \setleading{12pt}
3801 \global\parskip 15pt plus 1pt
3802
3803 \global\vsize= 53\baselineskip
3804 \advance\vsize by \topskip
3805 %\global\hsize=   5.85in     % A4 wide 10pt
3806 \global\hsize=  6.5in
3807 \global\outerhsize=\hsize
3808 \global\advance\outerhsize by 0.5in
3809 \global\outervsize=\vsize
3810 \global\advance\outervsize by 0.6in
3811
3812 \global\pagewidth=\hsize
3813 \global\pageheight=\vsize
3814 }
3815
3816 % Define macros to output various characters with catcode for normal text.
3817 \catcode`\"=\other
3818 \catcode`\~=\other
3819 \catcode`\^=\other
3820 \catcode`\_=\other
3821 \catcode`\|=\other
3822 \catcode`\<=\other
3823 \catcode`\>=\other
3824 \catcode`\+=\other
3825 \def\normaldoublequote{"}
3826 \def\normaltilde{~}
3827 \def\normalcaret{^}
3828 \def\normalunderscore{_}
3829 \def\normalverticalbar{|}
3830 \def\normalless{<}
3831 \def\normalgreater{>}
3832 \def\normalplus{+}
3833
3834 % This macro is used to make a character print one way in ttfont
3835 % where it can probably just be output, and another way in other fonts,
3836 % where something hairier probably needs to be done.
3837 %
3838 % #1 is what to print if we are indeed using \tt; #2 is what to print
3839 % otherwise.  Since all the Computer Modern typewriter fonts have zero
3840 % interword stretch (and shrink), and it is reasonable to expect all
3841 % typewriter fonts to have this, we can check that font parameter.
3842
3843 \def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
3844
3845 % Turn off all special characters except @
3846 % (and those which the user can use as if they were ordinary).
3847 % Most of these we simply print from the \tt font, but for some, we can
3848 % use math or other variants that look better in normal text.
3849
3850 \catcode`\"=\active
3851 \def\activedoublequote{{\tt \char '042}}
3852 \let"=\activedoublequote
3853 \catcode`\~=\active
3854 \def~{{\tt \char '176}}
3855 \chardef\hat=`\^
3856 \catcode`\^=\active
3857 \def^{{\tt \hat}}
3858
3859 \catcode`\_=\active
3860 \def_{\ifusingtt\normalunderscore\_}
3861 % Subroutine for the previous macro.
3862 \def\_{\lvvmode \kern.06em \vbox{\hrule width.3em height.1ex}}
3863
3864 % \lvvmode is equivalent in function to \leavevmode.
3865 % Using \leavevmode runs into trouble when written out to
3866 % an index file due to the expansion of \leavevmode into ``\unhbox
3867 % \voidb@x'' ---which looks to TeX like ``\unhbox \voidb\x'' due to our
3868 % magic tricks with @.
3869 \def\lvvmode{\vbox to 0pt{}}
3870
3871 \catcode`\|=\active
3872 \def|{{\tt \char '174}}
3873 \chardef \less=`\<
3874 \catcode`\<=\active
3875 \def<{{\tt \less}}
3876 \chardef \gtr=`\>
3877 \catcode`\>=\active
3878 \def>{{\tt \gtr}}
3879 \catcode`\+=\active
3880 \def+{{\tt \char 43}}
3881 %\catcode 27=\active
3882 %\def^^[{$\diamondsuit$}
3883
3884 % Used sometimes to turn off (effectively) the active characters
3885 % even after parsing them.
3886 \def\turnoffactive{\let"=\normaldoublequote
3887 \let~=\normaltilde
3888 \let^=\normalcaret
3889 \let_=\normalunderscore
3890 \let|=\normalverticalbar
3891 \let<=\normalless
3892 \let>=\normalgreater
3893 \let+=\normalplus}
3894
3895 % Set up an active definition for =, but don't enable it most of the time.
3896 {\catcode`\==\active
3897 \global\def={{\tt \char 61}}}
3898
3899 \catcode`\@=0
3900
3901 % \rawbackslashxx output one backslash character in current font
3902 \global\chardef\rawbackslashxx=`\\
3903 %{\catcode`\\=\other
3904 %@gdef@rawbackslashxx{\}}
3905
3906 % \rawbackslash redefines \ as input to do \rawbackslashxx.
3907 {\catcode`\\=\active
3908 @gdef@rawbackslash{@let\=@rawbackslashxx }}
3909
3910 % \normalbackslash outputs one backslash in fixed width font.
3911 \def\normalbackslash{{\tt\rawbackslashxx}}
3912
3913 % Say @foo, not \foo, in error messages.
3914 \escapechar=`\@
3915
3916 % \catcode 17=0   % Define control-q
3917 \catcode`\\=\active
3918
3919 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
3920 % That is what \eatinput is for; after that, the `\' should revert to printing 
3921 % a backslash.
3922 %
3923 @gdef@eatinput input texinfo{@fixbackslash}
3924 @global@let\ = @eatinput
3925
3926 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
3927 % the first `\{ in the file would cause an error. This macro tries to fix 
3928 % that, assuming it is called before the first `\' could plausibly occur.
3929
3930 @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi}
3931
3932 %% These look ok in all fonts, so just make them not special.  The @rm below
3933 %% makes sure that the current font starts out as the newly loaded cmr10
3934 @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
3935
3936 @textfonts
3937 @rm
3938
3939 @c Local variables:
3940 @c page-delimiter: "^\\\\message"
3941 @c End: