* texinfo.tex (\ninettsl): cmsltt10 is not standard, so use
[make.git] / texinfo.tex
blobefd02a5d07c343d5ebc842838b353d4038e23d7b
1 % texinfo.tex -- TeX macros to handle Texinfo files.
2 % $Id: texinfo.tex,v 2.241 1998/06/22 13:00:05 karl Exp $
4 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
5 % Free Software Foundation, Inc.
7 % This texinfo.tex file is free software; you can redistribute it and/or
8 % modify it under the terms of the GNU General Public License as
9 % published by the Free Software Foundation; either version 2, or (at
10 % your option) any later version.
12 % This texinfo.tex file is distributed in the hope that it will be
13 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 % General Public License for more details.
17 % You should have received a copy of the GNU General Public License
18 % along with this texinfo.tex file; see the file COPYING. If not, write
19 % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 % Boston, MA 02111-1307, USA.
22 % In other words, you are welcome to use, share and improve this program.
23 % You are forbidden to forbid anyone else to use, share and improve
24 % what you give them. Help stamp out software-hoarding!
26 % Please try the latest version of texinfo.tex before submitting bug
27 % reports; you can get the latest version from:
28 % ftp://ftp.gnu.org/pub/gnu/texinfo.tex
29 % /home/gd/gnu/doc/texinfo.tex on the GNU machines.
30 % (and all GNU mirrors, see ftp://ftp.gnu.org/pub/gnu/README.mirrors)
31 % ftp://tug.org/tex/texinfo.tex
32 % ftp://ctan.org/macros/texinfo/texinfo.tex
33 % (and all CTAN mirrors, finger ctan@tug.org for a list).
34 % The texinfo.tex in the texinfo distribution itself could well be out
35 % of date, so if that's what you're using, please check.
37 % Send bug reports to bug-texinfo@gnu.org.
38 % Please include a precise test case in each bug report,
39 % including a complete document with which we can reproduce the problem.
41 % To process a Texinfo manual with TeX, it's most reliable to use the
42 % texi2dvi shell script that comes with the distribution. For simple
43 % manuals, you can get away with:
44 % tex foo.texi
45 % texindex foo.??
46 % tex foo.texi
47 % tex foo.texi
48 % dvips foo.dvi -o # or whatever, to process the dvi file.
49 % The extra runs of TeX get the cross-reference information correct.
50 % Sometimes one run after texindex suffices, and sometimes you need more
51 % than two; texi2dvi does it as many times as necessary.
54 % Make it possible to create a .fmt file just by loading this file:
55 % if the underlying format is not loaded, start by loading it now.
56 % Added by gildea November 1993.
57 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
59 % This automatically updates the version number based on RCS.
60 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
61 \deftexinfoversion$Revision: 2.241 $
62 \message{Loading texinfo package [Version \texinfoversion]:}
64 % If in a .fmt file, print the version number
65 % and turn on active characters that we couldn't do earlier because
66 % they might have appeared in the input file name.
67 \everyjob{\message{[Texinfo version \texinfoversion]}\message{}
68 \catcode`+=\active \catcode`\_=\active}
70 % Save some parts of plain tex whose names we will redefine.
72 \let\ptexb=\b
73 \let\ptexbullet=\bullet
74 \let\ptexc=\c
75 \let\ptexcomma=\,
76 \let\ptexdot=\.
77 \let\ptexdots=\dots
78 \let\ptexend=\end
79 \let\ptexequiv=\equiv
80 \let\ptexexclam=\!
81 \let\ptexi=\i
82 \let\ptexlbrace=\{
83 \let\ptexrbrace=\}
84 \let\ptexstar=\*
85 \let\ptext=\t
87 % We never want plain's outer \+ definition in Texinfo.
88 % For @tex, we can use \tabalign.
89 \let\+ = \relax
92 \message{Basics,}
93 \chardef\other=12
95 % If this character appears in an error message or help string, it
96 % starts a new line in the output.
97 \newlinechar = `^^J
99 % Set up fixed words for English if not already set.
100 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
101 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
102 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
103 \ifx\putwordInfo\undefined \gdef\putwordfile{Info}\fi
104 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
105 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
106 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
107 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
108 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
109 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
110 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
111 \ifx\putwordShortContents\undefined \gdef\putwordShortContents{Short Contents}\fi
112 \ifx\putwordTableofContents\undefined\gdef\putwordTableofContents{Table of Contents}\fi
114 % Ignore a token.
116 \def\gobble#1{}
118 \hyphenation{ap-pen-dix}
119 \hyphenation{mini-buf-fer mini-buf-fers}
120 \hyphenation{eshell}
121 \hyphenation{white-space}
123 % Margin to add to right of even pages, to left of odd pages.
124 \newdimen \bindingoffset
125 \newdimen \normaloffset
126 \newdimen\pagewidth \newdimen\pageheight
128 % Sometimes it is convenient to have everything in the transcript file
129 % and nothing on the terminal. We don't just call \tracingall here,
130 % since that produces some useless output on the terminal.
132 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
133 \def\loggingall{\tracingcommands2 \tracingstats2
134 \tracingpages1 \tracingoutput1 \tracinglostchars1
135 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
136 \showboxbreadth\maxdimen\showboxdepth\maxdimen
139 % For @cropmarks command.
140 % Do @cropmarks to get crop marks.
142 \newif\ifcropmarks
143 \let\cropmarks = \cropmarkstrue
145 % Dimensions to add cropmarks at corners.
146 % Added by P. A. MacKay, 12 Nov. 1986
148 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
149 \newdimen\cornerlong \cornerlong=1pc
150 \newdimen\cornerthick \cornerthick=.3pt
151 \newdimen\topandbottommargin \topandbottommargin=.75in
153 % Main output routine.
154 \chardef\PAGE = 255
155 \output = {\onepageout{\pagecontents\PAGE}}
157 \newbox\headlinebox
158 \newbox\footlinebox
160 % \onepageout takes a vbox as an argument. Note that \pagecontents
161 % does insertions, but you have to call it yourself.
162 \def\onepageout#1{%
163 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
165 \ifodd\pageno \advance\hoffset by \bindingoffset
166 \else \advance\hoffset by -\bindingoffset\fi
168 % Do this outside of the \shipout so @code etc. will be expanded in
169 % the headline as they should be, not taken literally (outputting ''code).
170 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
171 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
174 % Have to do this stuff outside the \shipout because we want it to
175 % take effect in \write's, yet the group defined by the \vbox ends
176 % before the \shipout runs.
178 \escapechar = `\\ % use backslash in output files.
179 \indexdummies % don't expand commands in the output.
180 \normalturnoffactive % \ in index entries must not stay \, e.g., if
181 % the page break happens to be in the middle of an example.
182 \shipout\vbox{%
183 \ifcropmarks \vbox to \outervsize\bgroup
184 \hsize = \outerhsize
185 \line{\ewtop\hfil\ewtop}%
186 \nointerlineskip
187 \line{%
188 \vbox{\moveleft\cornerthick\nstop}%
189 \hfill
190 \vbox{\moveright\cornerthick\nstop}%
192 \vskip\topandbottommargin
193 \line\bgroup
194 \hfil % center the page within the outer (page) hsize.
195 \ifodd\pageno\hskip\bindingoffset\fi
196 \vbox\bgroup
199 \unvbox\headlinebox
200 \pagebody{#1}%
201 \ifdim\ht\footlinebox > 0pt
202 % Only leave this space if the footline is nonempty.
203 % (We lessened \vsize for it in \oddfootingxxx.)
204 % The \baselineskip=24pt in plain's \makefootline has no effect.
205 \vskip 2\baselineskip
206 \unvbox\footlinebox
209 \ifcropmarks
210 \egroup % end of \vbox\bgroup
211 \hfil\egroup % end of (centering) \line\bgroup
212 \vskip\topandbottommargin plus1fill minus1fill
213 \boxmaxdepth = \cornerthick
214 \line{%
215 \vbox{\moveleft\cornerthick\nsbot}%
216 \hfill
217 \vbox{\moveright\cornerthick\nsbot}%
219 \nointerlineskip
220 \line{\ewbot\hfil\ewbot}%
221 \egroup % \vbox from first cropmarks clause
223 }% end of \shipout\vbox
224 }% end of group with \turnoffactive
225 \advancepageno
226 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
229 \newinsert\margin \dimen\margin=\maxdimen
231 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
232 {\catcode`\@ =11
233 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
234 % marginal hacks, juha@viisa.uucp (Juha Takala)
235 \ifvoid\margin\else % marginal info is present
236 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
237 \dimen@=\dp#1 \unvbox#1
238 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
239 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
242 % Here are the rules for the cropmarks. Note that they are
243 % offset so that the space between them is truly \outerhsize or \outervsize
244 % (P. A. MacKay, 12 November, 1986)
246 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
247 \def\nstop{\vbox
248 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
249 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
250 \def\nsbot{\vbox
251 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
253 % Parse an argument, then pass it to #1. The argument is the rest of
254 % the input line (except we remove a trailing comment). #1 should be a
255 % macro which expects an ordinary undelimited TeX argument.
257 \def\parsearg#1{%
258 \let\next = #1%
259 \begingroup
260 \obeylines
261 \futurelet\temp\parseargx
264 % If the next token is an obeyed space (from an @example environment or
265 % the like), remove it and recurse. Otherwise, we're done.
266 \def\parseargx{%
267 % \obeyedspace is defined far below, after the definition of \sepspaces.
268 \ifx\obeyedspace\temp
269 \expandafter\parseargdiscardspace
270 \else
271 \expandafter\parseargline
275 % Remove a single space (as the delimiter token to the macro call).
276 {\obeyspaces %
277 \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
279 {\obeylines %
280 \gdef\parseargline#1^^M{%
281 \endgroup % End of the group started in \parsearg.
283 % First remove any @c comment, then any @comment.
284 % Result of each macro is put in \toks0.
285 \argremovec #1\c\relax %
286 \expandafter\argremovecomment \the\toks0 \comment\relax %
288 % Call the caller's macro, saved as \next in \parsearg.
289 \expandafter\next\expandafter{\the\toks0}%
293 % Since all \c{,omment} does is throw away the argument, we can let TeX
294 % do that for us. The \relax here is matched by the \relax in the call
295 % in \parseargline; it could be more or less anything, its purpose is
296 % just to delimit the argument to the \c.
297 \def\argremovec#1\c#2\relax{\toks0 = {#1}}
298 \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
300 % \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
301 % @end itemize @c foo
302 % will have two active spaces as part of the argument with the
303 % `itemize'. Here we remove all active spaces from #1, and assign the
304 % result to \toks0.
306 % This loses if there are any *other* active characters besides spaces
307 % in the argument -- _ ^ +, for example -- since they get expanded.
308 % Fortunately, Texinfo does not define any such commands. (If it ever
309 % does, the catcode of the characters in questionwill have to be changed
310 % here.) But this means we cannot call \removeactivespaces as part of
311 % \argremovec{,omment}, since @c uses \parsearg, and thus the argument
312 % that \parsearg gets might well have any character at all in it.
314 \def\removeactivespaces#1{%
315 \begingroup
316 \ignoreactivespaces
317 \edef\temp{#1}%
318 \global\toks0 = \expandafter{\temp}%
319 \endgroup
322 % Change the active space to expand to nothing.
324 \begingroup
325 \obeyspaces
326 \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
327 \endgroup
330 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
332 %% These are used to keep @begin/@end levels from running away
333 %% Call \inENV within environments (after a \begingroup)
334 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
335 \def\ENVcheck{%
336 \ifENV\errmessage{Still within an environment. Type Return to continue.}
337 \endgroup\fi} % This is not perfect, but it should reduce lossage
339 % @begin foo is the same as @foo, for now.
340 \newhelp\EMsimple{Type <Return> to continue.}
342 \outer\def\begin{\parsearg\beginxxx}
344 \def\beginxxx #1{%
345 \expandafter\ifx\csname #1\endcsname\relax
346 {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
347 \csname #1\endcsname\fi}
349 % @end foo executes the definition of \Efoo.
351 \def\end{\parsearg\endxxx}
352 \def\endxxx #1{%
353 \removeactivespaces{#1}%
354 \edef\endthing{\the\toks0}%
356 \expandafter\ifx\csname E\endthing\endcsname\relax
357 \expandafter\ifx\csname \endthing\endcsname\relax
358 % There's no \foo, i.e., no ``environment'' foo.
359 \errhelp = \EMsimple
360 \errmessage{Undefined command `@end \endthing'}%
361 \else
362 \unmatchedenderror\endthing
364 \else
365 % Everything's ok; the right environment has been started.
366 \csname E\endthing\endcsname
370 % There is an environment #1, but it hasn't been started. Give an error.
372 \def\unmatchedenderror#1{%
373 \errhelp = \EMsimple
374 \errmessage{This `@end #1' doesn't have a matching `@#1'}%
377 % Define the control sequence \E#1 to give an unmatched @end error.
379 \def\defineunmatchedend#1{%
380 \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
384 % Single-spacing is done by various environments (specifically, in
385 % \nonfillstart and \quotations).
386 \newskip\singlespaceskip \singlespaceskip = 12.5pt
387 \def\singlespace{%
388 % Why was this kern here? It messes up equalizing space above and below
389 % environments. --karl, 6may93
390 %{\advance \baselineskip by -\singlespaceskip
391 %\kern \baselineskip}%
392 \setleading \singlespaceskip
395 %% Simple single-character @ commands
397 % @@ prints an @
398 % Kludge this until the fonts are right (grr).
399 \def\@{{\tt\char64}}
401 % This is turned off because it was never documented
402 % and you can use @w{...} around a quote to suppress ligatures.
403 %% Define @` and @' to be the same as ` and '
404 %% but suppressing ligatures.
405 %\def\`{{`}}
406 %\def\'{{'}}
408 % Used to generate quoted braces.
409 \def\mylbrace {{\tt\char123}}
410 \def\myrbrace {{\tt\char125}}
411 \let\{=\mylbrace
412 \let\}=\myrbrace
413 \begingroup
414 % Definitions to produce actual \{ & \} command in an index.
415 \catcode`\{ = 12 \catcode`\} = 12
416 \catcode`\[ = 1 \catcode`\] = 2
417 \catcode`\@ = 0 \catcode`\\ = 12
418 @gdef@lbracecmd[\{]%
419 @gdef@rbracecmd[\}]%
420 @endgroup
422 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
423 % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
424 \let\, = \c
425 \let\dotaccent = \.
426 \def\ringaccent#1{{\accent23 #1}}
427 \let\tieaccent = \t
428 \let\ubaraccent = \b
429 \let\udotaccent = \d
431 % Other special characters: @questiondown @exclamdown
432 % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
433 \def\questiondown{?`}
434 \def\exclamdown{!`}
436 % Dotless i and dotless j, used for accents.
437 \def\imacro{i}
438 \def\jmacro{j}
439 \def\dotless#1{%
440 \def\temp{#1}%
441 \ifx\temp\imacro \ptexi
442 \else\ifx\temp\jmacro \j
443 \else \errmessage{@dotless can be used only with i or j}%
444 \fi\fi
447 % Be sure we're in horizontal mode when doing a tie, since we make space
448 % equivalent to this in @example-like environments. Otherwise, a space
449 % at the beginning of a line will start with \penalty -- and
450 % since \penalty is valid in vertical mode, we'd end up putting the
451 % penalty on the vertical list instead of in the new paragraph.
452 {\catcode`@ = 11
453 % Avoid using \@M directly, because that causes trouble
454 % if the definition is written into an index file.
455 \global\let\tiepenalty = \@M
456 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
459 % @: forces normal size whitespace following.
460 \def\:{\spacefactor=1000 }
462 % @* forces a line break.
463 \def\*{\hfil\break\hbox{}\ignorespaces}
465 % @. is an end-of-sentence period.
466 \def\.{.\spacefactor=3000 }
468 % @! is an end-of-sentence bang.
469 \def\!{!\spacefactor=3000 }
471 % @? is an end-of-sentence query.
472 \def\?{?\spacefactor=3000 }
474 % @w prevents a word break. Without the \leavevmode, @w at the
475 % beginning of a paragraph, when TeX is still in vertical mode, would
476 % produce a whole line of output instead of starting the paragraph.
477 \def\w#1{\leavevmode\hbox{#1}}
479 % @group ... @end group forces ... to be all on one page, by enclosing
480 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
481 % to keep its height that of a normal line. According to the rules for
482 % \topskip (p.114 of the TeXbook), the glue inserted is
483 % max (\topskip - \ht (first item), 0). If that height is large,
484 % therefore, no glue is inserted, and the space between the headline and
485 % the text is small, which looks bad.
487 \def\group{\begingroup
488 \ifnum\catcode13=\active \else
489 \errhelp = \groupinvalidhelp
490 \errmessage{@group invalid in context where filling is enabled}%
493 % The \vtop we start below produces a box with normal height and large
494 % depth; thus, TeX puts \baselineskip glue before it, and (when the
495 % next line of text is done) \lineskip glue after it. (See p.82 of
496 % the TeXbook.) Thus, space below is not quite equal to space
497 % above. But it's pretty close.
498 \def\Egroup{%
499 \egroup % End the \vtop.
500 \endgroup % End the \group.
503 \vtop\bgroup
504 % We have to put a strut on the last line in case the @group is in
505 % the midst of an example, rather than completely enclosing it.
506 % Otherwise, the interline space between the last line of the group
507 % and the first line afterwards is too small. But we can't put the
508 % strut in \Egroup, since there it would be on a line by itself.
509 % Hence this just inserts a strut at the beginning of each line.
510 \everypar = {\strut}%
512 % Since we have a strut on every line, we don't need any of TeX's
513 % normal interline spacing.
514 \offinterlineskip
516 % OK, but now we have to do something about blank
517 % lines in the input in @example-like environments, which normally
518 % just turn into \lisppar, which will insert no space now that we've
519 % turned off the interline space. Simplest is to make them be an
520 % empty paragraph.
521 \ifx\par\lisppar
522 \edef\par{\leavevmode \par}%
524 % Reset ^^M's definition to new definition of \par.
525 \obeylines
528 % Do @comment since we are called inside an environment such as
529 % @example, where each end-of-line in the input causes an
530 % end-of-line in the output. We don't want the end-of-line after
531 % the `@group' to put extra space in the output. Since @group
532 % should appear on a line by itself (according to the Texinfo
533 % manual), we don't worry about eating any user text.
534 \comment
537 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
538 % message, so this ends up printing `@group can only ...'.
540 \newhelp\groupinvalidhelp{%
541 group can only be used in environments such as @example,^^J%
542 where each line of input produces a line of output.}
544 % @need space-in-mils
545 % forces a page break if there is not space-in-mils remaining.
547 \newdimen\mil \mil=0.001in
549 \def\need{\parsearg\needx}
551 % Old definition--didn't work.
552 %\def\needx #1{\par %
553 %% This method tries to make TeX break the page naturally
554 %% if the depth of the box does not fit.
555 %{\baselineskip=0pt%
556 %\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
557 %\prevdepth=-1000pt
560 \def\needx#1{%
561 % Go into vertical mode, so we don't make a big box in the middle of a
562 % paragraph.
563 \par
565 % Don't add any leading before our big empty box, but allow a page
566 % break, since the best break might be right here.
567 \allowbreak
568 \nointerlineskip
569 \vtop to #1\mil{\vfil}%
571 % TeX does not even consider page breaks if a penalty added to the
572 % main vertical list is 10000 or more. But in order to see if the
573 % empty box we just added fits on the page, we must make it consider
574 % page breaks. On the other hand, we don't want to actually break the
575 % page after the empty box. So we use a penalty of 9999.
577 % There is an extremely small chance that TeX will actually break the
578 % page at this \penalty, if there are no other feasible breakpoints in
579 % sight. (If the user is using lots of big @group commands, which
580 % almost-but-not-quite fill up a page, TeX will have a hard time doing
581 % good page breaking, for example.) However, I could not construct an
582 % example where a page broke at this \penalty; if it happens in a real
583 % document, then we can reconsider our strategy.
584 \penalty9999
586 % Back up by the size of the box, whether we did a page break or not.
587 \kern -#1\mil
589 % Do not allow a page break right after this kern.
590 \nobreak
593 % @br forces paragraph break
595 \let\br = \par
597 % @dots{} output an ellipsis using the current font.
598 % We do .5em per period so that it has the same spacing in a typewriter
599 % font as three actual period characters.
601 \def\dots{\hbox to 1.5em{%
602 \hskip 0pt plus 0.25fil minus 0.25fil
603 .\hss.\hss.%
604 \hskip 0pt plus 0.5fil minus 0.5fil
607 % @enddots{} is an end-of-sentence ellipsis.
609 \def\enddots{%
610 \hbox to 2em{%
611 \hskip 0pt plus 0.25fil minus 0.25fil
612 .\hss.\hss.\hss.%
613 \hskip 0pt plus 0.5fil minus 0.5fil
615 \spacefactor=3000
619 % @page forces the start of a new page
621 \def\page{\par\vfill\supereject}
623 % @exdent text....
624 % outputs text on separate line in roman font, starting at standard page margin
626 % This records the amount of indent in the innermost environment.
627 % That's how much \exdent should take out.
628 \newskip\exdentamount
630 % This defn is used inside fill environments such as @defun.
631 \def\exdent{\parsearg\exdentyyy}
632 \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
634 % This defn is used inside nofill environments such as @example.
635 \def\nofillexdent{\parsearg\nofillexdentyyy}
636 \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
637 \leftline{\hskip\leftskip{\rm#1}}}}
639 % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
641 \def\inmargin#1{%
642 \strut\vadjust{\nobreak\kern-\strutdepth
643 \vtop to \strutdepth{\baselineskip\strutdepth\vss
644 \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
645 \newskip\inmarginspacing \inmarginspacing=1cm
646 \def\strutdepth{\dp\strutbox}
648 %\hbox{{\rm#1}}\hfil\break}}
650 % @include file insert text of that file as input.
651 % Allow normal characters that we make active in the argument (a file name).
652 \def\include{\begingroup
653 \catcode`\\=12
654 \catcode`~=12
655 \catcode`^=12
656 \catcode`_=12
657 \catcode`|=12
658 \catcode`<=12
659 \catcode`>=12
660 \catcode`+=12
661 \parsearg\includezzz}
662 % Restore active chars for included file.
663 \def\includezzz#1{\endgroup\begingroup
664 % Read the included file in a group so nested @include's work.
665 \def\thisfile{#1}%
666 \input\thisfile
667 \endgroup}
669 \def\thisfile{}
671 % @center line outputs that line, centered
673 \def\center{\parsearg\centerzzz}
674 \def\centerzzz #1{{\advance\hsize by -\leftskip
675 \advance\hsize by -\rightskip
676 \centerline{#1}}}
678 % @sp n outputs n lines of vertical space
680 \def\sp{\parsearg\spxxx}
681 \def\spxxx #1{\vskip #1\baselineskip}
683 % @comment ...line which is ignored...
684 % @c is the same as @comment
685 % @ignore ... @end ignore is another way to write a comment
687 \def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
688 \parsearg \commentxxx}
690 \def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
692 \let\c=\comment
694 % @paragraphindent is defined for the Info formatting commands only.
695 \let\paragraphindent=\comment
697 % Prevent errors for section commands.
698 % Used in @ignore and in failing conditionals.
699 \def\ignoresections{%
700 \let\chapter=\relax
701 \let\unnumbered=\relax
702 \let\top=\relax
703 \let\unnumberedsec=\relax
704 \let\unnumberedsection=\relax
705 \let\unnumberedsubsec=\relax
706 \let\unnumberedsubsection=\relax
707 \let\unnumberedsubsubsec=\relax
708 \let\unnumberedsubsubsection=\relax
709 \let\section=\relax
710 \let\subsec=\relax
711 \let\subsubsec=\relax
712 \let\subsection=\relax
713 \let\subsubsection=\relax
714 \let\appendix=\relax
715 \let\appendixsec=\relax
716 \let\appendixsection=\relax
717 \let\appendixsubsec=\relax
718 \let\appendixsubsection=\relax
719 \let\appendixsubsubsec=\relax
720 \let\appendixsubsubsection=\relax
721 \let\contents=\relax
722 \let\smallbook=\relax
723 \let\titlepage=\relax
726 % Used in nested conditionals, where we have to parse the Texinfo source
727 % and so want to turn off most commands, in case they are used
728 % incorrectly.
730 \def\ignoremorecommands{%
731 \let\defcodeindex = \relax
732 \let\defcv = \relax
733 \let\deffn = \relax
734 \let\deffnx = \relax
735 \let\defindex = \relax
736 \let\defivar = \relax
737 \let\defmac = \relax
738 \let\defmethod = \relax
739 \let\defop = \relax
740 \let\defopt = \relax
741 \let\defspec = \relax
742 \let\deftp = \relax
743 \let\deftypefn = \relax
744 \let\deftypefun = \relax
745 \let\deftypevar = \relax
746 \let\deftypevr = \relax
747 \let\defun = \relax
748 \let\defvar = \relax
749 \let\defvr = \relax
750 \let\ref = \relax
751 \let\xref = \relax
752 \let\printindex = \relax
753 \let\pxref = \relax
754 \let\settitle = \relax
755 \let\setchapternewpage = \relax
756 \let\setchapterstyle = \relax
757 \let\everyheading = \relax
758 \let\evenheading = \relax
759 \let\oddheading = \relax
760 \let\everyfooting = \relax
761 \let\evenfooting = \relax
762 \let\oddfooting = \relax
763 \let\headings = \relax
764 \let\include = \relax
765 \let\lowersections = \relax
766 \let\down = \relax
767 \let\raisesections = \relax
768 \let\up = \relax
769 \let\set = \relax
770 \let\clear = \relax
771 \let\item = \relax
774 % Ignore @ignore ... @end ignore.
776 \def\ignore{\doignore{ignore}}
778 % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
780 \def\ifinfo{\doignore{ifinfo}}
781 \def\ifhtml{\doignore{ifhtml}}
782 \def\ifnottex{\doignore{ifnottex}}
783 \def\html{\doignore{html}}
784 \def\menu{\doignore{menu}}
785 \def\direntry{\doignore{direntry}}
787 % @dircategory CATEGORY -- specify a category of the dir file
788 % which this file should belong to. Ignore this in TeX.
789 \let\dircategory = \comment
791 % Ignore text until a line `@end #1'.
793 \def\doignore#1{\begingroup
794 % Don't complain about control sequences we have declared \outer.
795 \ignoresections
797 % Define a command to swallow text until we reach `@end #1'.
798 % This @ is a catcode 12 token (that is the normal catcode of @ in
799 % this texinfo.tex file). We change the catcode of @ below to match.
800 \long\def\doignoretext##1@end #1{\enddoignore}%
802 % Make sure that spaces turn into tokens that match what \doignoretext wants.
803 \catcode32 = 10
805 % Ignore braces, too, so mismatched braces don't cause trouble.
806 \catcode`\{ = 9
807 \catcode`\} = 9
809 % We must not have @c interpreted as a control sequence.
810 \catcode`\@ = 12
812 % Make the letter c a comment character so that the rest of the line
813 % will be ignored. This way, the document can have (for example)
814 % @c @end ifinfo
815 % and the @end ifinfo will be properly ignored.
816 % (We've just changed @ to catcode 12.)
817 \catcode`\c = 14
819 % And now expand that command.
820 \doignoretext
823 % What we do to finish off ignored text.
825 \def\enddoignore{\endgroup\ignorespaces}%
827 \newif\ifwarnedobs\warnedobsfalse
828 \def\obstexwarn{%
829 \ifwarnedobs\relax\else
830 % We need to warn folks that they may have trouble with TeX 3.0.
831 % This uses \immediate\write16 rather than \message to get newlines.
832 \immediate\write16{}
833 \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
834 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
835 \immediate\write16{If you are running another version of TeX, relax.}
836 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
837 \immediate\write16{ Then upgrade your TeX installation if you can.}
838 \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
839 \immediate\write16{If you are stuck with version 3.0, run the}
840 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
841 \immediate\write16{ to use a workaround.}
842 \immediate\write16{}
843 \global\warnedobstrue
847 % **In TeX 3.0, setting text in \nullfont hangs tex. For a
848 % workaround (which requires the file ``dummy.tfm'' to be installed),
849 % uncomment the following line:
850 %%%%%\font\nullfont=dummy\let\obstexwarn=\relax
852 % Ignore text, except that we keep track of conditional commands for
853 % purposes of nesting, up to an `@end #1' command.
855 \def\nestedignore#1{%
856 \obstexwarn
857 % We must actually expand the ignored text to look for the @end
858 % command, so that nested ignore constructs work. Thus, we put the
859 % text into a \vbox and then do nothing with the result. To minimize
860 % the change of memory overflow, we follow the approach outlined on
861 % page 401 of the TeXbook: make the current font be a dummy font.
863 \setbox0 = \vbox\bgroup
864 % Don't complain about control sequences we have declared \outer.
865 \ignoresections
867 % Define `@end #1' to end the box, which will in turn undefine the
868 % @end command again.
869 \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
871 % We are going to be parsing Texinfo commands. Most cause no
872 % trouble when they are used incorrectly, but some commands do
873 % complicated argument parsing or otherwise get confused, so we
874 % undefine them.
876 % We can't do anything about stray @-signs, unfortunately;
877 % they'll produce `undefined control sequence' errors.
878 \ignoremorecommands
880 % Set the current font to be \nullfont, a TeX primitive, and define
881 % all the font commands to also use \nullfont. We don't use
882 % dummy.tfm, as suggested in the TeXbook, because not all sites
883 % might have that installed. Therefore, math mode will still
884 % produce output, but that should be an extremely small amount of
885 % stuff compared to the main input.
887 \nullfont
888 \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
889 \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
890 \let\tensf = \nullfont
891 % Similarly for index fonts (mostly for their use in
892 % smallexample)
893 \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
894 \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
895 \let\indsf = \nullfont
897 % Don't complain when characters are missing from the fonts.
898 \tracinglostchars = 0
900 % Don't bother to do space factor calculations.
901 \frenchspacing
903 % Don't report underfull hboxes.
904 \hbadness = 10000
906 % Do minimal line-breaking.
907 \pretolerance = 10000
909 % Do not execute instructions in @tex
910 \def\tex{\doignore{tex}}%
913 % @set VAR sets the variable VAR to an empty value.
914 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
916 % Since we want to separate VAR from REST-OF-LINE (which might be
917 % empty), we can't just use \parsearg; we have to insert a space of our
918 % own to delimit the rest of the line, and then take it out again if we
919 % didn't need it. Make sure the catcode of space is correct to avoid
920 % losing inside @example, for instance.
922 \def\set{\begingroup\catcode` =10
923 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
924 \parsearg\setxxx}
925 \def\setxxx#1{\setyyy#1 \endsetyyy}
926 \def\setyyy#1 #2\endsetyyy{%
927 \def\temp{#2}%
928 \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
929 \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
931 \endgroup
933 % Can't use \xdef to pre-expand #2 and save some time, since \temp or
934 % \next or other control sequences that we've defined might get us into
935 % an infinite loop. Consider `@set foo @cite{bar}'.
936 \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
938 % @clear VAR clears (i.e., unsets) the variable VAR.
940 \def\clear{\parsearg\clearxxx}
941 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
943 % @value{foo} gets the text saved in variable foo.
945 \def\value{\begingroup
946 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
947 \valuexxx}
948 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
950 % We have this subroutine so that we can handle at least some @value's
951 % properly in indexes (we \let\value to this in \indexdummies). Ones
952 % whose names contain - or _ still won't work, but we can't do anything
953 % about that. The command has to be fully expandable, since the result
954 % winds up in the index file. This means that if the variable's value
955 % contains other Texinfo commands, it's almost certain it will fail
956 % (although perhaps we could fix that with sufficient work to do a
957 % one-level expansion on the result, instead of complete).
959 \def\expandablevalue#1{%
960 \expandafter\ifx\csname SET#1\endcsname\relax
961 {[No value for ``#1'']v}%
962 \else
963 \csname SET#1\endcsname
967 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
968 % with @set.
970 \def\ifset{\parsearg\ifsetxxx}
971 \def\ifsetxxx #1{%
972 \expandafter\ifx\csname SET#1\endcsname\relax
973 \expandafter\ifsetfail
974 \else
975 \expandafter\ifsetsucceed
978 \def\ifsetsucceed{\conditionalsucceed{ifset}}
979 \def\ifsetfail{\nestedignore{ifset}}
980 \defineunmatchedend{ifset}
982 % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
983 % defined with @set, or has been undefined with @clear.
985 \def\ifclear{\parsearg\ifclearxxx}
986 \def\ifclearxxx #1{%
987 \expandafter\ifx\csname SET#1\endcsname\relax
988 \expandafter\ifclearsucceed
989 \else
990 \expandafter\ifclearfail
993 \def\ifclearsucceed{\conditionalsucceed{ifclear}}
994 \def\ifclearfail{\nestedignore{ifclear}}
995 \defineunmatchedend{ifclear}
997 % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
998 % following, through the first @end iftex (etc.). Make `@end iftex'
999 % (etc.) valid only after an @iftex.
1001 \def\iftex{\conditionalsucceed{iftex}}
1002 \def\ifnothtml{\conditionalsucceed{ifnothtml}}
1003 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
1004 \defineunmatchedend{iftex}
1005 \defineunmatchedend{ifnothtml}
1006 \defineunmatchedend{ifnotinfo}
1008 % We can't just want to start a group at @iftex (for example) and end it
1009 % at @end iftex, since then @set commands inside the conditional have no
1010 % effect (they'd get reverted at the end of the group). So we must
1011 % define \Eiftex to redefine itself to be its previous value. (We can't
1012 % just define it to fail again with an ``unmatched end'' error, since
1013 % the @ifset might be nested.)
1015 \def\conditionalsucceed#1{%
1016 \edef\temp{%
1017 % Remember the current value of \E#1.
1018 \let\nece{prevE#1} = \nece{E#1}%
1020 % At the `@end #1', redefine \E#1 to be its previous value.
1021 \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
1023 \temp
1026 % We need to expand lots of \csname's, but we don't want to expand the
1027 % control sequences after we've constructed them.
1029 \def\nece#1{\expandafter\noexpand\csname#1\endcsname}
1031 % @asis just yields its argument. Used with @table, for example.
1033 \def\asis#1{#1}
1035 % @math means output in math mode.
1036 % We don't use $'s directly in the definition of \math because control
1037 % sequences like \math are expanded when the toc file is written. Then,
1038 % we read the toc file back, the $'s will be normal characters (as they
1039 % should be, according to the definition of Texinfo). So we must use a
1040 % control sequence to switch into and out of math mode.
1042 % This isn't quite enough for @math to work properly in indices, but it
1043 % seems unlikely it will ever be needed there.
1045 \let\implicitmath = $
1046 \def\math#1{\implicitmath #1\implicitmath}
1048 % @bullet and @minus need the same treatment as @math, just above.
1049 \def\bullet{\implicitmath\ptexbullet\implicitmath}
1050 \def\minus{\implicitmath-\implicitmath}
1052 \def\node{\ENVcheck\parsearg\nodezzz}
1053 \def\nodezzz#1{\nodexxx [#1,]}
1054 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
1055 \let\nwnode=\node
1056 \let\lastnode=\relax
1058 \def\donoderef{\ifx\lastnode\relax\else
1059 \expandafter\expandafter\expandafter\setref{\lastnode}\fi
1060 \global\let\lastnode=\relax}
1062 \def\unnumbnoderef{\ifx\lastnode\relax\else
1063 \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
1064 \global\let\lastnode=\relax}
1066 \def\appendixnoderef{\ifx\lastnode\relax\else
1067 \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
1068 \global\let\lastnode=\relax}
1070 % @refill is a no-op.
1071 \let\refill=\relax
1073 % If working on a large document in chapters, it is convenient to
1074 % be able to disable indexing, cross-referencing, and contents, for test runs.
1075 % This is done with @novalidate (before @setfilename).
1077 \newif\iflinks \linkstrue % by default we want the aux files.
1078 \let\novalidate = \linksfalse
1080 % @setfilename is done at the beginning of every texinfo file.
1081 % So open here the files we need to have open while reading the input.
1082 % This makes it possible to make a .fmt file for texinfo.
1083 \def\setfilename{%
1084 \iflinks
1085 \readauxfile
1086 \opencontents
1087 \fi % \openindices needs to do some work in any case.
1088 \openindices
1089 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1090 \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
1092 % If texinfo.cnf is present on the system, read it.
1093 % Useful for site-wide @afourpaper, etc.
1094 % Just to be on the safe side, close the input stream before the \input.
1095 \openin 1 texinfo.cnf
1096 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
1097 \closein1
1098 \temp
1100 \comment % Ignore the actual filename.
1103 % Called from \setfilename.
1105 \def\openindices{%
1106 \newindex{cp}%
1107 \newcodeindex{fn}%
1108 \newcodeindex{vr}%
1109 \newcodeindex{tp}%
1110 \newcodeindex{ky}%
1111 \newcodeindex{pg}%
1114 % @bye.
1115 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1118 \message{fonts,}
1119 % Font-change commands.
1121 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1122 % So we set up a \sf analogous to plain's \rm, etc.
1123 \newfam\sffam
1124 \def\sf{\fam=\sffam \tensf}
1125 \let\li = \sf % Sometimes we call it \li, not \sf.
1127 % We don't need math for this one.
1128 \def\ttsl{\tenttsl}
1130 % Use Computer Modern fonts at \magstephalf (11pt).
1131 \newcount\mainmagstep
1132 \mainmagstep=\magstephalf
1134 % Set the font macro #1 to the font named #2, adding on the
1135 % specified font prefix (normally `cm').
1136 % #3 is the font's design size, #4 is a scale factor
1137 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
1139 % Use cm as the default font prefix.
1140 % To specify the font prefix, you must define \fontprefix
1141 % before you read in texinfo.tex.
1142 \ifx\fontprefix\undefined
1143 \def\fontprefix{cm}
1145 % Support font families that don't use the same naming scheme as CM.
1146 \def\rmshape{r}
1147 \def\rmbshape{bx} %where the normal face is bold
1148 \def\bfshape{b}
1149 \def\bxshape{bx}
1150 \def\ttshape{tt}
1151 \def\ttbshape{tt}
1152 \def\ttslshape{sltt}
1153 \def\itshape{ti}
1154 \def\itbshape{bxti}
1155 \def\slshape{sl}
1156 \def\slbshape{bxsl}
1157 \def\sfshape{ss}
1158 \def\sfbshape{ss}
1159 \def\scshape{csc}
1160 \def\scbshape{csc}
1162 \ifx\bigger\relax
1163 \let\mainmagstep=\magstep1
1164 \setfont\textrm\rmshape{12}{1000}
1165 \setfont\texttt\ttshape{12}{1000}
1166 \else
1167 \setfont\textrm\rmshape{10}{\mainmagstep}
1168 \setfont\texttt\ttshape{10}{\mainmagstep}
1170 % Instead of cmb10, you many want to use cmbx10.
1171 % cmbx10 is a prettier font on its own, but cmb10
1172 % looks better when embedded in a line with cmr10.
1173 \setfont\textbf\bfshape{10}{\mainmagstep}
1174 \setfont\textit\itshape{10}{\mainmagstep}
1175 \setfont\textsl\slshape{10}{\mainmagstep}
1176 \setfont\textsf\sfshape{10}{\mainmagstep}
1177 \setfont\textsc\scshape{10}{\mainmagstep}
1178 \setfont\textttsl\ttslshape{10}{\mainmagstep}
1179 \font\texti=cmmi10 scaled \mainmagstep
1180 \font\textsy=cmsy10 scaled \mainmagstep
1182 % A few fonts for @defun, etc.
1183 \setfont\defbf\bxshape{10}{\magstep1} %was 1314
1184 \setfont\deftt\ttshape{10}{\magstep1}
1185 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
1187 % Fonts for indices and small examples (9pt).
1188 % We actually use the slanted font rather than the italic,
1189 % because texinfo normally uses the slanted fonts for that.
1190 % Do not make many font distinctions in general in the index, since they
1191 % aren't very useful.
1192 \setfont\ninett\ttshape{9}{1000}
1193 \setfont\ninettsl\ttslshape{10}{900}
1194 \setfont\indrm\rmshape{9}{1000}
1195 \setfont\indit\slshape{9}{1000}
1196 \let\indsl=\indit
1197 \let\indtt=\ninett
1198 \let\indttsl=\ninettsl
1199 \let\indsf=\indrm
1200 \let\indbf=\indrm
1201 \setfont\indsc\scshape{10}{900}
1202 \font\indi=cmmi9
1203 \font\indsy=cmsy9
1205 % Fonts for title page:
1206 \setfont\titlerm\rmbshape{12}{\magstep3}
1207 \setfont\titleit\itbshape{10}{\magstep4}
1208 \setfont\titlesl\slbshape{10}{\magstep4}
1209 \setfont\titlett\ttbshape{12}{\magstep3}
1210 \setfont\titlettsl\ttslshape{10}{\magstep4}
1211 \setfont\titlesf\sfbshape{17}{\magstep1}
1212 \let\titlebf=\titlerm
1213 \setfont\titlesc\scbshape{10}{\magstep4}
1214 \font\titlei=cmmi12 scaled \magstep3
1215 \font\titlesy=cmsy10 scaled \magstep4
1216 \def\authorrm{\secrm}
1218 % Chapter (and unnumbered) fonts (17.28pt).
1219 \setfont\chaprm\rmbshape{12}{\magstep2}
1220 \setfont\chapit\itbshape{10}{\magstep3}
1221 \setfont\chapsl\slbshape{10}{\magstep3}
1222 \setfont\chaptt\ttbshape{12}{\magstep2}
1223 \setfont\chapttsl\ttslshape{10}{\magstep3}
1224 \setfont\chapsf\sfbshape{17}{1000}
1225 \let\chapbf=\chaprm
1226 \setfont\chapsc\scbshape{10}{\magstep3}
1227 \font\chapi=cmmi12 scaled \magstep2
1228 \font\chapsy=cmsy10 scaled \magstep3
1230 % Section fonts (14.4pt).
1231 \setfont\secrm\rmbshape{12}{\magstep1}
1232 \setfont\secit\itbshape{10}{\magstep2}
1233 \setfont\secsl\slbshape{10}{\magstep2}
1234 \setfont\sectt\ttbshape{12}{\magstep1}
1235 \setfont\secttsl\ttslshape{10}{\magstep2}
1236 \setfont\secsf\sfbshape{12}{\magstep1}
1237 \let\secbf\secrm
1238 \setfont\secsc\scbshape{10}{\magstep2}
1239 \font\seci=cmmi12 scaled \magstep1
1240 \font\secsy=cmsy10 scaled \magstep2
1242 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
1243 % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
1244 % \setfont\ssecsl\slshape{10}{\magstep1}
1245 % \setfont\ssectt\ttshape{10}{\magstep1}
1246 % \setfont\ssecsf\sfshape{10}{\magstep1}
1248 %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
1249 %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
1250 %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
1251 %\setfont\ssectt\ttshape{10}{1315}
1252 %\setfont\ssecsf\sfshape{10}{1315}
1254 %\let\ssecbf=\ssecrm
1256 % Subsection fonts (13.15pt).
1257 \setfont\ssecrm\rmbshape{12}{\magstephalf}
1258 \setfont\ssecit\itbshape{10}{1315}
1259 \setfont\ssecsl\slbshape{10}{1315}
1260 \setfont\ssectt\ttbshape{12}{\magstephalf}
1261 \setfont\ssecttsl\ttslshape{10}{1315}
1262 \setfont\ssecsf\sfbshape{12}{\magstephalf}
1263 \let\ssecbf\ssecrm
1264 \setfont\ssecsc\scbshape{10}{\magstep1}
1265 \font\sseci=cmmi12 scaled \magstephalf
1266 \font\ssecsy=cmsy10 scaled 1315
1267 % The smallcaps and symbol fonts should actually be scaled \magstep1.5,
1268 % but that is not a standard magnification.
1270 % In order for the font changes to affect most math symbols and letters,
1271 % we have to define the \textfont of the standard families. Since
1272 % texinfo doesn't allow for producing subscripts and superscripts, we
1273 % don't bother to reset \scriptfont and \scriptscriptfont (which would
1274 % also require loading a lot more fonts).
1276 \def\resetmathfonts{%
1277 \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
1278 \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
1279 \textfont\ttfam = \tentt \textfont\sffam = \tensf
1283 % The font-changing commands redefine the meanings of \tenSTYLE, instead
1284 % of just \STYLE. We do this so that font changes will continue to work
1285 % in math mode, where it is the current \fam that is relevant in most
1286 % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam
1287 % \tenbf}, for example. By redefining \tenbf, we obviate the need to
1288 % redefine \bf itself.
1289 \def\textfonts{%
1290 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
1291 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
1292 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
1293 \resetmathfonts}
1294 \def\titlefonts{%
1295 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
1296 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
1297 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
1298 \let\tenttsl=\titlettsl
1299 \resetmathfonts \setleading{25pt}}
1300 \def\titlefont#1{{\titlefonts\rm #1}}
1301 \def\chapfonts{%
1302 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1303 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1304 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1305 \resetmathfonts \setleading{19pt}}
1306 \def\secfonts{%
1307 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
1308 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
1309 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
1310 \resetmathfonts \setleading{16pt}}
1311 \def\subsecfonts{%
1312 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
1313 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
1314 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
1315 \resetmathfonts \setleading{15pt}}
1316 \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
1317 \def\indexfonts{%
1318 \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
1319 \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
1320 \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
1321 \resetmathfonts \setleading{12pt}}
1323 % Set up the default fonts, so we can use them for creating boxes.
1325 \textfonts
1327 % Define these so they can be easily changed for other fonts.
1328 \def\angleleft{$\langle$}
1329 \def\angleright{$\rangle$}
1331 % Count depth in font-changes, for error checks
1332 \newcount\fontdepth \fontdepth=0
1334 % Fonts for short table of contents.
1335 \setfont\shortcontrm\rmshape{12}{1000}
1336 \setfont\shortcontbf\bxshape{12}{1000}
1337 \setfont\shortcontsl\slshape{12}{1000}
1339 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
1340 %% serif) and @ii for TeX italic
1342 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1343 % unless the following character is such as not to need one.
1344 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
1345 \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
1347 \let\i=\smartitalic
1348 \let\var=\smartitalic
1349 \let\dfn=\smartitalic
1350 \let\emph=\smartitalic
1351 \let\cite=\smartitalic
1353 \def\b#1{{\bf #1}}
1354 \let\strong=\b
1356 % We can't just use \exhyphenpenalty, because that only has effect at
1357 % the end of a paragraph. Restore normal hyphenation at the end of the
1358 % group within which \nohyphenation is presumably called.
1360 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
1361 \def\restorehyphenation{\hyphenchar\font = `- }
1363 \def\t#1{%
1364 {\tt \rawbackslash \frenchspacing #1}%
1365 \null
1367 \let\ttfont=\t
1368 \def\samp#1{`\tclose{#1}'\null}
1369 \setfont\smallrm\rmshape{8}{1000}
1370 \font\smallsy=cmsy9
1371 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
1372 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
1373 \vbox{\hrule\kern-0.4pt
1374 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
1375 \kern-0.4pt\hrule}%
1376 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
1377 % The old definition, with no lozenge:
1378 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1379 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
1381 \let\file=\samp
1383 % @code is a modification of @t,
1384 % which makes spaces the same size as normal in the surrounding text.
1385 \def\tclose#1{%
1387 % Change normal interword space to be same as for the current font.
1388 \spaceskip = \fontdimen2\font
1390 % Switch to typewriter.
1393 % But `\ ' produces the large typewriter interword space.
1394 \def\ {{\spaceskip = 0pt{} }}%
1396 % Turn off hyphenation.
1397 \nohyphenation
1399 \rawbackslash
1400 \frenchspacing
1403 \null
1406 % We *must* turn on hyphenation at `-' and `_' in \code.
1407 % Otherwise, it is too hard to avoid overfull hboxes
1408 % in the Emacs manual, the Library manual, etc.
1410 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
1411 % both hyphenation at - and hyphenation within words.
1412 % We must therefore turn them both off (\tclose does that)
1413 % and arrange explicitly to hyphenate at a dash.
1414 % -- rms.
1416 \catcode`\-=\active
1417 \catcode`\_=\active
1418 \catcode`\|=\active
1419 \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
1420 % The following is used by \doprintindex to insure that long function names
1421 % wrap around. It is necessary for - and _ to be active before the index is
1422 % read from the file, as \entry parses the arguments long before \code is
1423 % ever called. -- mycroft
1424 % _ is always active; and it shouldn't be \let = to an _ that is a
1425 % subscript character anyway. Then, @cindex @samp{_} (for example)
1426 % fails. --karl
1427 \global\def\indexbreaks{%
1428 \catcode`\-=\active \let-\realdash
1432 \def\realdash{-}
1433 \def\codedash{-\discretionary{}{}{}}
1434 \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
1435 \def\codex #1{\tclose{#1}\endgroup}
1437 %\let\exp=\tclose %Was temporary
1439 % @kbd is like @code, except that if the argument is just one @key command,
1440 % then @kbd has no effect.
1442 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
1443 % `example' (@kbd uses ttsl only inside of @example and friends),
1444 % or `code' (@kbd uses normal tty font always).
1445 \def\kbdinputstyle{\parsearg\kbdinputstylexxx}
1446 \def\kbdinputstylexxx#1{%
1447 \def\arg{#1}%
1448 \ifx\arg\worddistinct
1449 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
1450 \else\ifx\arg\wordexample
1451 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1452 \else\ifx\arg\wordcode
1453 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1454 \fi\fi\fi
1456 \def\worddistinct{distinct}
1457 \def\wordexample{example}
1458 \def\wordcode{code}
1460 % Default is kbdinputdistinct. (Too much of a hassle to call the macro,
1461 % the catcodes are wrong for parsearg to work.)
1462 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
1464 \def\xkey{\key}
1465 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
1466 \ifx\one\xkey\ifx\threex\three \key{#2}%
1467 \else{\tclose{\kbdfont\look}}\fi
1468 \else{\tclose{\kbdfont\look}}\fi}
1470 % @url. Quotes do not seem necessary, so use \code.
1471 \let\url=\code
1473 % @uref (abbreviation for `urlref') takes an optional second argument
1474 % specifying the text to display. First (mandatory) arg is the url.
1475 % Perhaps eventually put in a hypertex \special here.
1477 \def\uref#1{\urefxxx #1,,\finish}
1478 \def\urefxxx#1,#2,#3\finish{%
1479 \setbox0 = \hbox{\ignorespaces #2}%
1480 \ifdim\wd0 > 0pt
1481 \unhbox0\ (\code{#1})%
1482 \else
1483 \code{#1}%
1487 % rms does not like the angle brackets --karl, 17may97.
1488 % So now @email is just like @uref.
1489 %\def\email#1{\angleleft{\tt #1}\angleright}
1490 \let\email=\uref
1492 % Check if we are currently using a typewriter font. Since all the
1493 % Computer Modern typewriter fonts have zero interword stretch (and
1494 % shrink), and it is reasonable to expect all typewriter fonts to have
1495 % this property, we can check that font parameter.
1497 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
1499 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
1500 % argument is to make the input look right: @dmn{pt} instead of
1501 % @dmn{}pt.
1503 \def\dmn#1{\thinspace #1}
1505 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
1507 % @l was never documented to mean ``switch to the Lisp font'',
1508 % and it is not used as such in any manual I can find. We need it for
1509 % Polish suppressed-l. --karl, 22sep96.
1510 %\def\l#1{{\li #1}\null}
1512 \def\r#1{{\rm #1}} % roman font
1513 % Use of \lowercase was suggested.
1514 \def\sc#1{{\smallcaps#1}} % smallcaps font
1515 \def\ii#1{{\it #1}} % italic font
1517 % @pounds{} is a sterling sign.
1518 \def\pounds{{\it\$}}
1521 \message{page headings,}
1523 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
1524 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1526 % First the title page. Must do @settitle before @titlepage.
1527 \newif\ifseenauthor
1528 \newif\iffinishedtitlepage
1530 \def\shorttitlepage{\parsearg\shorttitlepagezzz}
1531 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1532 \endgroup\page\hbox{}\page}
1534 \def\titlepage{\begingroup \parindent=0pt \textfonts
1535 \let\subtitlerm=\tenrm
1536 % I deinstalled the following change because \cmr12 is undefined.
1537 % This change was not in the ChangeLog anyway. --rms.
1538 % \let\subtitlerm=\cmr12
1539 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1541 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
1543 % Leave some space at the very top of the page.
1544 \vglue\titlepagetopglue
1546 % Now you can print the title using @title.
1547 \def\title{\parsearg\titlezzz}%
1548 \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
1549 % print a rule at the page bottom also.
1550 \finishedtitlepagefalse
1551 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
1552 % No rule at page bottom unless we print one at the top with @title.
1553 \finishedtitlepagetrue
1555 % Now you can put text using @subtitle.
1556 \def\subtitle{\parsearg\subtitlezzz}%
1557 \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
1559 % @author should come last, but may come many times.
1560 \def\author{\parsearg\authorzzz}%
1561 \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
1562 {\authorfont \leftline{##1}}}%
1564 % Most title ``pages'' are actually two pages long, with space
1565 % at the top of the second. We don't want the ragged left on the second.
1566 \let\oldpage = \page
1567 \def\page{%
1568 \iffinishedtitlepage\else
1569 \finishtitlepage
1571 \oldpage
1572 \let\page = \oldpage
1573 \hbox{}}%
1574 % \def\page{\oldpage \hbox{}}
1577 \def\Etitlepage{%
1578 \iffinishedtitlepage\else
1579 \finishtitlepage
1581 % It is important to do the page break before ending the group,
1582 % because the headline and footline are only empty inside the group.
1583 % If we use the new definition of \page, we always get a blank page
1584 % after the title page, which we certainly don't want.
1585 \oldpage
1586 \endgroup
1587 \HEADINGSon
1590 \def\finishtitlepage{%
1591 \vskip4pt \hrule height 2pt width \hsize
1592 \vskip\titlepagebottomglue
1593 \finishedtitlepagetrue
1596 %%% Set up page headings and footings.
1598 \let\thispage=\folio
1600 \newtoks \evenheadline % Token sequence for heading line of even pages
1601 \newtoks \oddheadline % Token sequence for heading line of odd pages
1602 \newtoks \evenfootline % Token sequence for footing line of even pages
1603 \newtoks \oddfootline % Token sequence for footing line of odd pages
1605 % Now make Tex use those variables
1606 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
1607 \else \the\evenheadline \fi}}
1608 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
1609 \else \the\evenfootline \fi}\HEADINGShook}
1610 \let\HEADINGShook=\relax
1612 % Commands to set those variables.
1613 % For example, this is what @headings on does
1614 % @evenheading @thistitle|@thispage|@thischapter
1615 % @oddheading @thischapter|@thispage|@thistitle
1616 % @evenfooting @thisfile||
1617 % @oddfooting ||@thisfile
1619 \def\evenheading{\parsearg\evenheadingxxx}
1620 \def\oddheading{\parsearg\oddheadingxxx}
1621 \def\everyheading{\parsearg\everyheadingxxx}
1623 \def\evenfooting{\parsearg\evenfootingxxx}
1624 \def\oddfooting{\parsearg\oddfootingxxx}
1625 \def\everyfooting{\parsearg\everyfootingxxx}
1627 {\catcode`\@=0 %
1629 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
1630 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
1631 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1633 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
1634 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
1635 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1637 \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
1639 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
1640 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
1641 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1643 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
1644 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
1645 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
1647 % Leave some space for the footline. Hopefully ok to assume
1648 % @evenfooting will not be used by itself.
1649 \global\advance\pageheight by -\baselineskip
1650 \global\advance\vsize by -\baselineskip
1653 \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
1655 }% unbind the catcode of @.
1657 % @headings double turns headings on for double-sided printing.
1658 % @headings single turns headings on for single-sided printing.
1659 % @headings off turns them off.
1660 % @headings on same as @headings double, retained for compatibility.
1661 % @headings after turns on double-sided headings after this page.
1662 % @headings doubleafter turns on double-sided headings after this page.
1663 % @headings singleafter turns on single-sided headings after this page.
1664 % By default, they are off at the start of a document,
1665 % and turned `on' after @end titlepage.
1667 \def\headings #1 {\csname HEADINGS#1\endcsname}
1669 \def\HEADINGSoff{
1670 \global\evenheadline={\hfil} \global\evenfootline={\hfil}
1671 \global\oddheadline={\hfil} \global\oddfootline={\hfil}}
1672 \HEADINGSoff
1673 % When we turn headings on, set the page number to 1.
1674 % For double-sided printing, put current file name in lower left corner,
1675 % chapter name on inside top of right hand pages, document
1676 % title on inside top of left hand pages, and page numbers on outside top
1677 % edge of all pages.
1678 \def\HEADINGSdouble{
1679 \global\pageno=1
1680 \global\evenfootline={\hfil}
1681 \global\oddfootline={\hfil}
1682 \global\evenheadline={\line{\folio\hfil\thistitle}}
1683 \global\oddheadline={\line{\thischapter\hfil\folio}}
1684 \global\let\contentsalignmacro = \chapoddpage
1686 \let\contentsalignmacro = \chappager
1688 % For single-sided printing, chapter title goes across top left of page,
1689 % page number on top right.
1690 \def\HEADINGSsingle{
1691 \global\pageno=1
1692 \global\evenfootline={\hfil}
1693 \global\oddfootline={\hfil}
1694 \global\evenheadline={\line{\thischapter\hfil\folio}}
1695 \global\oddheadline={\line{\thischapter\hfil\folio}}
1696 \global\let\contentsalignmacro = \chappager
1698 \def\HEADINGSon{\HEADINGSdouble}
1700 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
1701 \let\HEADINGSdoubleafter=\HEADINGSafter
1702 \def\HEADINGSdoublex{%
1703 \global\evenfootline={\hfil}
1704 \global\oddfootline={\hfil}
1705 \global\evenheadline={\line{\folio\hfil\thistitle}}
1706 \global\oddheadline={\line{\thischapter\hfil\folio}}
1707 \global\let\contentsalignmacro = \chapoddpage
1710 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
1711 \def\HEADINGSsinglex{%
1712 \global\evenfootline={\hfil}
1713 \global\oddfootline={\hfil}
1714 \global\evenheadline={\line{\thischapter\hfil\folio}}
1715 \global\oddheadline={\line{\thischapter\hfil\folio}}
1716 \global\let\contentsalignmacro = \chappager
1719 % Subroutines used in generating headings
1720 % Produces Day Month Year style of output.
1721 \def\today{\number\day\space
1722 \ifcase\month\or
1723 January\or February\or March\or April\or May\or June\or
1724 July\or August\or September\or October\or November\or December\fi
1725 \space\number\year}
1727 % Use this if you want the Month Day, Year style of output.
1728 %\def\today{\ifcase\month\or
1729 %January\or February\or March\or April\or May\or June\or
1730 %July\or August\or September\or October\or November\or December\fi
1731 %\space\number\day, \number\year}
1733 % @settitle line... specifies the title of the document, for headings
1734 % It generates no output of its own
1736 \def\thistitle{No Title}
1737 \def\settitle{\parsearg\settitlezzz}
1738 \def\settitlezzz #1{\gdef\thistitle{#1}}
1741 \message{tables,}
1742 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
1744 % default indentation of table text
1745 \newdimen\tableindent \tableindent=.8in
1746 % default indentation of @itemize and @enumerate text
1747 \newdimen\itemindent \itemindent=.3in
1748 % margin between end of table item and start of table text.
1749 \newdimen\itemmargin \itemmargin=.1in
1751 % used internally for \itemindent minus \itemmargin
1752 \newdimen\itemmax
1754 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with
1755 % these defs.
1756 % They also define \itemindex
1757 % to index the item name in whatever manner is desired (perhaps none).
1759 \newif\ifitemxneedsnegativevskip
1761 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
1763 \def\internalBitem{\smallbreak \parsearg\itemzzz}
1764 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
1766 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
1767 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
1769 \def\internalBkitem{\smallbreak \parsearg\kitemzzz}
1770 \def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
1772 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
1773 \itemzzz {#1}}
1775 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
1776 \itemzzz {#1}}
1778 \def\itemzzz #1{\begingroup %
1779 \advance\hsize by -\rightskip
1780 \advance\hsize by -\tableindent
1781 \setbox0=\hbox{\itemfont{#1}}%
1782 \itemindex{#1}%
1783 \nobreak % This prevents a break before @itemx.
1785 % Be sure we are not still in the middle of a paragraph.
1786 %{\parskip = 0in
1787 %\par
1790 % If the item text does not fit in the space we have, put it on a line
1791 % by itself, and do not allow a page break either before or after that
1792 % line. We do not start a paragraph here because then if the next
1793 % command is, e.g., @kindex, the whatsit would get put into the
1794 % horizontal list on a line by itself, resulting in extra blank space.
1795 \ifdim \wd0>\itemmax
1797 % Make this a paragraph so we get the \parskip glue and wrapping,
1798 % but leave it ragged-right.
1799 \begingroup
1800 \advance\leftskip by-\tableindent
1801 \advance\hsize by\tableindent
1802 \advance\rightskip by0pt plus1fil
1803 \leavevmode\unhbox0\par
1804 \endgroup
1806 % We're going to be starting a paragraph, but we don't want the
1807 % \parskip glue -- logically it's part of the @item we just started.
1808 \nobreak \vskip-\parskip
1810 % Stop a page break at the \parskip glue coming up. Unfortunately
1811 % we can't prevent a possible page break at the following
1812 % \baselineskip glue.
1813 \nobreak
1814 \endgroup
1815 \itemxneedsnegativevskipfalse
1816 \else
1817 % The item text fits into the space. Start a paragraph, so that the
1818 % following text (if any) will end up on the same line. Since that
1819 % text will be indented by \tableindent, we make the item text be in
1820 % a zero-width box.
1821 \noindent
1822 \rlap{\hskip -\tableindent\box0}\ignorespaces%
1823 \endgroup%
1824 \itemxneedsnegativevskiptrue%
1828 \def\item{\errmessage{@item while not in a table}}
1829 \def\itemx{\errmessage{@itemx while not in a table}}
1830 \def\kitem{\errmessage{@kitem while not in a table}}
1831 \def\kitemx{\errmessage{@kitemx while not in a table}}
1832 \def\xitem{\errmessage{@xitem while not in a table}}
1833 \def\xitemx{\errmessage{@xitemx while not in a table}}
1835 %% Contains a kludge to get @end[description] to work
1836 \def\description{\tablez{\dontindex}{1}{}{}{}{}}
1838 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
1839 {\obeylines\obeyspaces%
1840 \gdef\tablex #1^^M{%
1841 \tabley\dontindex#1 \endtabley}}
1843 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
1844 {\obeylines\obeyspaces%
1845 \gdef\ftablex #1^^M{%
1846 \tabley\fnitemindex#1 \endtabley
1847 \def\Eftable{\endgraf\afterenvbreak\endgroup}%
1848 \let\Etable=\relax}}
1850 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
1851 {\obeylines\obeyspaces%
1852 \gdef\vtablex #1^^M{%
1853 \tabley\vritemindex#1 \endtabley
1854 \def\Evtable{\endgraf\afterenvbreak\endgroup}%
1855 \let\Etable=\relax}}
1857 \def\dontindex #1{}
1858 \def\fnitemindex #1{\doind {fn}{\code{#1}}}%
1859 \def\vritemindex #1{\doind {vr}{\code{#1}}}%
1861 {\obeyspaces %
1862 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
1863 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
1865 \def\tablez #1#2#3#4#5#6{%
1866 \aboveenvbreak %
1867 \begingroup %
1868 \def\Edescription{\Etable}% Necessary kludge.
1869 \let\itemindex=#1%
1870 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
1871 \ifnum 0#4>0 \tableindent=#4\mil \fi %
1872 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
1873 \def\itemfont{#2}%
1874 \itemmax=\tableindent %
1875 \advance \itemmax by -\itemmargin %
1876 \advance \leftskip by \tableindent %
1877 \exdentamount=\tableindent
1878 \parindent = 0pt
1879 \parskip = \smallskipamount
1880 \ifdim \parskip=0pt \parskip=2pt \fi%
1881 \def\Etable{\endgraf\afterenvbreak\endgroup}%
1882 \let\item = \internalBitem %
1883 \let\itemx = \internalBitemx %
1884 \let\kitem = \internalBkitem %
1885 \let\kitemx = \internalBkitemx %
1886 \let\xitem = \internalBxitem %
1887 \let\xitemx = \internalBxitemx %
1890 % This is the counter used by @enumerate, which is really @itemize
1892 \newcount \itemno
1894 \def\itemize{\parsearg\itemizezzz}
1896 \def\itemizezzz #1{%
1897 \begingroup % ended by the @end itemize
1898 \itemizey {#1}{\Eitemize}
1901 \def\itemizey #1#2{%
1902 \aboveenvbreak %
1903 \itemmax=\itemindent %
1904 \advance \itemmax by -\itemmargin %
1905 \advance \leftskip by \itemindent %
1906 \exdentamount=\itemindent
1907 \parindent = 0pt %
1908 \parskip = \smallskipamount %
1909 \ifdim \parskip=0pt \parskip=2pt \fi%
1910 \def#2{\endgraf\afterenvbreak\endgroup}%
1911 \def\itemcontents{#1}%
1912 \let\item=\itemizeitem}
1914 % Set sfcode to normal for the chars that usually have another value.
1915 % These are `.?!:;,'
1916 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
1917 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
1919 % \splitoff TOKENS\endmark defines \first to be the first token in
1920 % TOKENS, and \rest to be the remainder.
1922 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
1924 % Allow an optional argument of an uppercase letter, lowercase letter,
1925 % or number, to specify the first label in the enumerated list. No
1926 % argument is the same as `1'.
1928 \def\enumerate{\parsearg\enumeratezzz}
1929 \def\enumeratezzz #1{\enumeratey #1 \endenumeratey}
1930 \def\enumeratey #1 #2\endenumeratey{%
1931 \begingroup % ended by the @end enumerate
1933 % If we were given no argument, pretend we were given `1'.
1934 \def\thearg{#1}%
1935 \ifx\thearg\empty \def\thearg{1}\fi
1937 % Detect if the argument is a single token. If so, it might be a
1938 % letter. Otherwise, the only valid thing it can be is a number.
1939 % (We will always have one token, because of the test we just made.
1940 % This is a good thing, since \splitoff doesn't work given nothing at
1941 % all -- the first parameter is undelimited.)
1942 \expandafter\splitoff\thearg\endmark
1943 \ifx\rest\empty
1944 % Only one token in the argument. It could still be anything.
1945 % A ``lowercase letter'' is one whose \lccode is nonzero.
1946 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
1947 % not equal to itself.
1948 % Otherwise, we assume it's a number.
1950 % We need the \relax at the end of the \ifnum lines to stop TeX from
1951 % continuing to look for a <number>.
1953 \ifnum\lccode\expandafter`\thearg=0\relax
1954 \numericenumerate % a number (we hope)
1955 \else
1956 % It's a letter.
1957 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
1958 \lowercaseenumerate % lowercase letter
1959 \else
1960 \uppercaseenumerate % uppercase letter
1963 \else
1964 % Multiple tokens in the argument. We hope it's a number.
1965 \numericenumerate
1969 % An @enumerate whose labels are integers. The starting integer is
1970 % given in \thearg.
1972 \def\numericenumerate{%
1973 \itemno = \thearg
1974 \startenumeration{\the\itemno}%
1977 % The starting (lowercase) letter is in \thearg.
1978 \def\lowercaseenumerate{%
1979 \itemno = \expandafter`\thearg
1980 \startenumeration{%
1981 % Be sure we're not beyond the end of the alphabet.
1982 \ifnum\itemno=0
1983 \errmessage{No more lowercase letters in @enumerate; get a bigger
1984 alphabet}%
1986 \char\lccode\itemno
1990 % The starting (uppercase) letter is in \thearg.
1991 \def\uppercaseenumerate{%
1992 \itemno = \expandafter`\thearg
1993 \startenumeration{%
1994 % Be sure we're not beyond the end of the alphabet.
1995 \ifnum\itemno=0
1996 \errmessage{No more uppercase letters in @enumerate; get a bigger
1997 alphabet}
1999 \char\uccode\itemno
2003 % Call itemizey, adding a period to the first argument and supplying the
2004 % common last two arguments. Also subtract one from the initial value in
2005 % \itemno, since @item increments \itemno.
2007 \def\startenumeration#1{%
2008 \advance\itemno by -1
2009 \itemizey{#1.}\Eenumerate\flushcr
2012 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
2013 % to @enumerate.
2015 \def\alphaenumerate{\enumerate{a}}
2016 \def\capsenumerate{\enumerate{A}}
2017 \def\Ealphaenumerate{\Eenumerate}
2018 \def\Ecapsenumerate{\Eenumerate}
2020 % Definition of @item while inside @itemize.
2022 \def\itemizeitem{%
2023 \advance\itemno by 1
2024 {\let\par=\endgraf \smallbreak}%
2025 \ifhmode \errmessage{In hmode at itemizeitem}\fi
2026 {\parskip=0in \hskip 0pt
2027 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
2028 \vadjust{\penalty 1200}}%
2029 \flushcr}
2031 % @multitable macros
2032 % Amy Hendrickson, 8/18/94, 3/6/96
2034 % @multitable ... @end multitable will make as many columns as desired.
2035 % Contents of each column will wrap at width given in preamble. Width
2036 % can be specified either with sample text given in a template line,
2037 % or in percent of \hsize, the current width of text on page.
2039 % Table can continue over pages but will only break between lines.
2041 % To make preamble:
2043 % Either define widths of columns in terms of percent of \hsize:
2044 % @multitable @columnfractions .25 .3 .45
2045 % @item ...
2047 % Numbers following @columnfractions are the percent of the total
2048 % current hsize to be used for each column. You may use as many
2049 % columns as desired.
2052 % Or use a template:
2053 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
2054 % @item ...
2055 % using the widest term desired in each column.
2057 % For those who want to use more than one line's worth of words in
2058 % the preamble, break the line within one argument and it
2059 % will parse correctly, i.e.,
2061 % @multitable {Column 1 template} {Column 2 template} {Column 3
2062 % template}
2063 % Not:
2064 % @multitable {Column 1 template} {Column 2 template}
2065 % {Column 3 template}
2067 % Each new table line starts with @item, each subsequent new column
2068 % starts with @tab. Empty columns may be produced by supplying @tab's
2069 % with nothing between them for as many times as empty columns are needed,
2070 % ie, @tab@tab@tab will produce two empty columns.
2072 % @item, @tab, @multitable or @end multitable do not need to be on their
2073 % own lines, but it will not hurt if they are.
2075 % Sample multitable:
2077 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
2078 % @item first col stuff @tab second col stuff @tab third col
2079 % @item
2080 % first col stuff
2081 % @tab
2082 % second col stuff
2083 % @tab
2084 % third col
2085 % @item first col stuff @tab second col stuff
2086 % @tab Many paragraphs of text may be used in any column.
2088 % They will wrap at the width determined by the template.
2089 % @item@tab@tab This will be in third column.
2090 % @end multitable
2092 % Default dimensions may be reset by user.
2093 % @multitableparskip is vertical space between paragraphs in table.
2094 % @multitableparindent is paragraph indent in table.
2095 % @multitablecolmargin is horizontal space to be left between columns.
2096 % @multitablelinespace is space to leave between table items, baseline
2097 % to baseline.
2098 % 0pt means it depends on current normal line spacing.
2100 \newskip\multitableparskip
2101 \newskip\multitableparindent
2102 \newdimen\multitablecolspace
2103 \newskip\multitablelinespace
2104 \multitableparskip=0pt
2105 \multitableparindent=6pt
2106 \multitablecolspace=12pt
2107 \multitablelinespace=0pt
2109 % Macros used to set up halign preamble:
2111 \let\endsetuptable\relax
2112 \def\xendsetuptable{\endsetuptable}
2113 \let\columnfractions\relax
2114 \def\xcolumnfractions{\columnfractions}
2115 \newif\ifsetpercent
2117 % 2/1/96, to allow fractions to be given with more than one digit.
2118 \def\pickupwholefraction#1 {\global\advance\colcount by1 %
2119 \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
2120 \setuptable}
2122 \newcount\colcount
2123 \def\setuptable#1{\def\firstarg{#1}%
2124 \ifx\firstarg\xendsetuptable\let\go\relax%
2125 \else
2126 \ifx\firstarg\xcolumnfractions\global\setpercenttrue%
2127 \else
2128 \ifsetpercent
2129 \let\go\pickupwholefraction % In this case arg of setuptable
2130 % is the decimal point before the
2131 % number given in percent of hsize.
2132 % We don't need this so we don't use it.
2133 \else
2134 \global\advance\colcount by1
2135 \setbox0=\hbox{#1 }% Add a normal word space as a separator;
2136 % typically that is always in the input, anyway.
2137 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
2138 \fi%
2139 \fi%
2140 \ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
2141 \fi\go}
2143 % multitable syntax
2144 \def\tab{&\hskip1sp\relax} % 2/2/96
2145 % tiny skip here makes sure this column space is
2146 % maintained, even if it is never used.
2148 % @multitable ... @end multitable definitions:
2150 \def\multitable{\parsearg\dotable}
2151 \def\dotable#1{\bgroup
2152 \vskip\parskip
2153 \let\item\crcr
2154 \tolerance=9500
2155 \hbadness=9500
2156 \setmultitablespacing
2157 \parskip=\multitableparskip
2158 \parindent=\multitableparindent
2159 \overfullrule=0pt
2160 \global\colcount=0
2161 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
2163 % To parse everything between @multitable and @item:
2164 \setuptable#1 \endsetuptable
2166 % \everycr will reset column counter, \colcount, at the end of
2167 % each line. Every column entry will cause \colcount to advance by one.
2168 % The table preamble
2169 % looks at the current \colcount to find the correct column width.
2170 \everycr{\noalign{%
2172 % \filbreak%% keeps underfull box messages off when table breaks over pages.
2173 % Maybe so, but it also creates really weird page breaks when the table
2174 % breaks over pages. Wouldn't \vfil be better? Wait until the problem
2175 % manifests itself, so it can be fixed for real --karl.
2176 \global\colcount=0\relax}}%
2178 % This preamble sets up a generic column definition, which will
2179 % be used as many times as user calls for columns.
2180 % \vtop will set a single line and will also let text wrap and
2181 % continue for many paragraphs if desired.
2182 \halign\bgroup&\global\advance\colcount by 1\relax
2183 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2185 % In order to keep entries from bumping into each other
2186 % we will add a \leftskip of \multitablecolspace to all columns after
2187 % the first one.
2189 % If a template has been used, we will add \multitablecolspace
2190 % to the width of each template entry.
2192 % If the user has set preamble in terms of percent of \hsize we will
2193 % use that dimension as the width of the column, and the \leftskip
2194 % will keep entries from bumping into each other. Table will start at
2195 % left margin and final column will justify at right margin.
2197 % Make sure we don't inherit \rightskip from the outer environment.
2198 \rightskip=0pt
2199 \ifnum\colcount=1
2200 % The first column will be indented with the surrounding text.
2201 \advance\hsize by\leftskip
2202 \else
2203 \ifsetpercent \else
2204 % If user has not set preamble in terms of percent of \hsize
2205 % we will advance \hsize by \multitablecolspace.
2206 \advance\hsize by \multitablecolspace
2208 % In either case we will make \leftskip=\multitablecolspace:
2209 \leftskip=\multitablecolspace
2211 % Ignoring space at the beginning and end avoids an occasional spurious
2212 % blank line, when TeX decides to break the line at the space before the
2213 % box from the multistrut, so the strut ends up on a line by itself.
2214 % For example:
2215 % @multitable @columnfractions .11 .89
2216 % @item @code{#}
2217 % @tab Legal holiday which is valid in major parts of the whole country.
2218 % Is automatically provided with highlighting sequences respectively marking
2219 % characters.
2220 \noindent\ignorespaces##\unskip\multistrut}\cr
2223 \def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2224 % If so, do nothing. If not, give it an appropriate dimension based on
2225 % current baselineskip.
2226 \ifdim\multitablelinespace=0pt
2227 %% strut to put in table in case some entry doesn't have descenders,
2228 %% to keep lines equally spaced
2229 \let\multistrut = \strut
2230 %% Test to see if parskip is larger than space between lines of
2231 %% table. If not, do nothing.
2232 %% If so, set to same dimension as multitablelinespace.
2233 \else
2234 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0
2235 width0pt\relax} \fi
2236 \ifdim\multitableparskip>\multitablelinespace
2237 \global\multitableparskip=\multitablelinespace
2238 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
2239 %% than skip between lines in the table.
2240 \fi%
2241 \ifdim\multitableparskip=0pt
2242 \global\multitableparskip=\multitablelinespace
2243 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
2244 %% than skip between lines in the table.
2245 \fi}
2248 \message{indexing,}
2249 % Index generation facilities
2251 % Define \newwrite to be identical to plain tex's \newwrite
2252 % except not \outer, so it can be used within \newindex.
2253 {\catcode`\@=11
2254 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
2256 % \newindex {foo} defines an index named foo.
2257 % It automatically defines \fooindex such that
2258 % \fooindex ...rest of line... puts an entry in the index foo.
2259 % It also defines \fooindfile to be the number of the output channel for
2260 % the file that accumulates this index. The file's extension is foo.
2261 % The name of an index should be no more than 2 characters long
2262 % for the sake of vms.
2264 \def\newindex#1{%
2265 \iflinks
2266 \expandafter\newwrite \csname#1indfile\endcsname
2267 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
2269 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
2270 \noexpand\doindex{#1}}
2273 % @defindex foo == \newindex{foo}
2275 \def\defindex{\parsearg\newindex}
2277 % Define @defcodeindex, like @defindex except put all entries in @code.
2279 \def\newcodeindex#1{%
2280 \iflinks
2281 \expandafter\newwrite \csname#1indfile\endcsname
2282 \openout \csname#1indfile\endcsname \jobname.#1
2284 \expandafter\xdef\csname#1index\endcsname{%
2285 \noexpand\docodeindex{#1}}
2288 \def\defcodeindex{\parsearg\newcodeindex}
2290 % @synindex foo bar makes index foo feed into index bar.
2291 % Do this instead of @defindex foo if you don't want it as a separate index.
2292 % The \closeout helps reduce unnecessary open files; the limit on the
2293 % Acorn RISC OS is a mere 16 files.
2294 \def\synindex#1 #2 {%
2295 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2296 \expandafter\closeout\csname#1indfile\endcsname
2297 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2298 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2299 \noexpand\doindex{#2}}%
2302 % @syncodeindex foo bar similar, but put all entries made for index foo
2303 % inside @code.
2304 \def\syncodeindex#1 #2 {%
2305 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2306 \expandafter\closeout\csname#1indfile\endcsname
2307 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2308 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2309 \noexpand\docodeindex{#2}}%
2312 % Define \doindex, the driver for all \fooindex macros.
2313 % Argument #1 is generated by the calling \fooindex macro,
2314 % and it is "foo", the name of the index.
2316 % \doindex just uses \parsearg; it calls \doind for the actual work.
2317 % This is because \doind is more useful to call from other macros.
2319 % There is also \dosubind {index}{topic}{subtopic}
2320 % which makes an entry in a two-level index such as the operation index.
2322 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
2323 \def\singleindexer #1{\doind{\indexname}{#1}}
2325 % like the previous two, but they put @code around the argument.
2326 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
2327 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
2329 \def\indexdummies{%
2330 \def\ { }%
2331 % Take care of the plain tex accent commands.
2332 \def\"{\realbackslash "}%
2333 \def\`{\realbackslash `}%
2334 \def\'{\realbackslash '}%
2335 \def\^{\realbackslash ^}%
2336 \def\~{\realbackslash ~}%
2337 \def\={\realbackslash =}%
2338 \def\b{\realbackslash b}%
2339 \def\c{\realbackslash c}%
2340 \def\d{\realbackslash d}%
2341 \def\u{\realbackslash u}%
2342 \def\v{\realbackslash v}%
2343 \def\H{\realbackslash H}%
2344 % Take care of the plain tex special European modified letters.
2345 \def\oe{\realbackslash oe}%
2346 \def\ae{\realbackslash ae}%
2347 \def\aa{\realbackslash aa}%
2348 \def\OE{\realbackslash OE}%
2349 \def\AE{\realbackslash AE}%
2350 \def\AA{\realbackslash AA}%
2351 \def\o{\realbackslash o}%
2352 \def\O{\realbackslash O}%
2353 \def\l{\realbackslash l}%
2354 \def\L{\realbackslash L}%
2355 \def\ss{\realbackslash ss}%
2356 % Take care of texinfo commands likely to appear in an index entry.
2357 % (Must be a way to avoid doing expansion at all, and thus not have to
2358 % laboriously list every single command here.)
2359 \def\@{@}% will be @@ when we switch to @ as escape char.
2360 %\let\{ = \lbracecmd
2361 %\let\} = \rbracecmd
2362 \def\_{{\realbackslash _}}%
2363 \def\w{\realbackslash w }%
2364 \def\bf{\realbackslash bf }%
2365 %\def\rm{\realbackslash rm }%
2366 \def\sl{\realbackslash sl }%
2367 \def\sf{\realbackslash sf}%
2368 \def\tt{\realbackslash tt}%
2369 \def\gtr{\realbackslash gtr}%
2370 \def\less{\realbackslash less}%
2371 \def\hat{\realbackslash hat}%
2372 \def\TeX{\realbackslash TeX}%
2373 \def\dots{\realbackslash dots }%
2374 \def\result{\realbackslash result}%
2375 \def\equiv{\realbackslash equiv}%
2376 \def\expansion{\realbackslash expansion}%
2377 \def\print{\realbackslash print}%
2378 \def\error{\realbackslash error}%
2379 \def\point{\realbackslash point}%
2380 \def\copyright{\realbackslash copyright}%
2381 \def\tclose##1{\realbackslash tclose {##1}}%
2382 \def\code##1{\realbackslash code {##1}}%
2383 \def\dotless##1{\realbackslash dotless {##1}}%
2384 \def\samp##1{\realbackslash samp {##1}}%
2385 \def\,##1{\realbackslash ,{##1}}%
2386 \def\t##1{\realbackslash t {##1}}%
2387 \def\r##1{\realbackslash r {##1}}%
2388 \def\i##1{\realbackslash i {##1}}%
2389 \def\b##1{\realbackslash b {##1}}%
2390 \def\sc##1{\realbackslash sc {##1}}%
2391 \def\cite##1{\realbackslash cite {##1}}%
2392 \def\key##1{\realbackslash key {##1}}%
2393 \def\file##1{\realbackslash file {##1}}%
2394 \def\var##1{\realbackslash var {##1}}%
2395 \def\kbd##1{\realbackslash kbd {##1}}%
2396 \def\dfn##1{\realbackslash dfn {##1}}%
2397 \def\emph##1{\realbackslash emph {##1}}%
2399 % Handle some cases of @value -- where the variable name does not
2400 % contain - or _, and the value does not contain any
2401 % (non-fully-expandable) commands.
2402 \let\value = \expandablevalue
2404 \unsepspaces
2407 % If an index command is used in an @example environment, any spaces
2408 % therein should become regular spaces in the raw index file, not the
2409 % expansion of \tie (\\leavevmode \penalty \@M \ ).
2410 {\obeyspaces
2411 \gdef\unsepspaces{\obeyspaces\let =\space}}
2413 % \indexnofonts no-ops all font-change commands.
2414 % This is used when outputting the strings to sort the index by.
2415 \def\indexdummyfont#1{#1}
2416 \def\indexdummytex{TeX}
2417 \def\indexdummydots{...}
2419 \def\indexnofonts{%
2420 % Just ignore accents.
2421 \let\,=\indexdummyfont
2422 \let\"=\indexdummyfont
2423 \let\`=\indexdummyfont
2424 \let\'=\indexdummyfont
2425 \let\^=\indexdummyfont
2426 \let\~=\indexdummyfont
2427 \let\==\indexdummyfont
2428 \let\b=\indexdummyfont
2429 \let\c=\indexdummyfont
2430 \let\d=\indexdummyfont
2431 \let\u=\indexdummyfont
2432 \let\v=\indexdummyfont
2433 \let\H=\indexdummyfont
2434 \let\dotless=\indexdummyfont
2435 % Take care of the plain tex special European modified letters.
2436 \def\oe{oe}%
2437 \def\ae{ae}%
2438 \def\aa{aa}%
2439 \def\OE{OE}%
2440 \def\AE{AE}%
2441 \def\AA{AA}%
2442 \def\o{o}%
2443 \def\O{O}%
2444 \def\l{l}%
2445 \def\L{L}%
2446 \def\ss{ss}%
2447 \let\w=\indexdummyfont
2448 \let\t=\indexdummyfont
2449 \let\r=\indexdummyfont
2450 \let\i=\indexdummyfont
2451 \let\b=\indexdummyfont
2452 \let\emph=\indexdummyfont
2453 \let\strong=\indexdummyfont
2454 \let\cite=\indexdummyfont
2455 \let\sc=\indexdummyfont
2456 %Don't no-op \tt, since it isn't a user-level command
2457 % and is used in the definitions of the active chars like <, >, |...
2458 %\let\tt=\indexdummyfont
2459 \let\tclose=\indexdummyfont
2460 \let\code=\indexdummyfont
2461 \let\file=\indexdummyfont
2462 \let\samp=\indexdummyfont
2463 \let\kbd=\indexdummyfont
2464 \let\key=\indexdummyfont
2465 \let\var=\indexdummyfont
2466 \let\TeX=\indexdummytex
2467 \let\dots=\indexdummydots
2468 \def\@{@}%
2471 % To define \realbackslash, we must make \ not be an escape.
2472 % We must first make another character (@) an escape
2473 % so we do not become unable to do a definition.
2475 {\catcode`\@=0 \catcode`\\=\other
2476 @gdef@realbackslash{\}}
2478 \let\indexbackslash=0 %overridden during \printindex.
2479 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
2481 % For \ifx comparisons.
2482 \def\emptymacro{\empty}
2484 % Most index entries go through here, but \dosubind is the general case.
2486 \def\doind#1#2{\dosubind{#1}{#2}\empty}
2488 % Workhorse for all \fooindexes.
2489 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
2490 % \empty if called from \doind, as we usually are. The main exception
2491 % is with defuns, which call us directly.
2493 \def\dosubind#1#2#3{%
2494 % Put the index entry in the margin if desired.
2495 \ifx\SETmarginindex\relax\else
2496 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
2499 \count255=\lastpenalty
2501 \indexdummies % Must do this here, since \bf, etc expand at this stage
2502 \escapechar=`\\
2504 \let\folio = 0% We will expand all macros now EXCEPT \folio.
2505 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
2506 % so it will be output as is; and it will print as backslash.
2508 \def\thirdarg{#3}%
2510 % If third arg is present, precede it with space in sort key.
2511 \ifx\thirdarg\emptymacro
2512 \let\subentry = \empty
2513 \else
2514 \def\subentry{ #3}%
2517 % First process the index-string with all font commands turned off
2518 % to get the string to sort by.
2519 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
2521 % Now produce the complete index entry, with both the sort key and the
2522 % original text, including any font commands.
2523 \toks0 = {#2}%
2524 \edef\temp{%
2525 \write\csname#1indfile\endcsname{%
2526 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
2529 % If third (subentry) arg is present, add it to the index string.
2530 \ifx\thirdarg\emptymacro \else
2531 \toks0 = {#3}%
2532 \edef\temp{\temp{\the\toks0}}%
2535 % If a skip is the last thing on the list now, preserve it
2536 % by backing up by \lastskip, doing the \write, then inserting
2537 % the skip again. Otherwise, the whatsit generated by the
2538 % \write will make \lastskip zero. The result is that sequences
2539 % like this:
2540 % @end defun
2541 % @tindex whatever
2542 % @defun ...
2543 % will have extra space inserted, because the \medbreak in the
2544 % start of the @defun won't see the skip inserted by the @end of
2545 % the previous defun.
2546 \iflinks
2547 \skip0 = \lastskip \ifdim\lastskip = 0pt \else \vskip-\lastskip \fi
2548 \temp
2549 \ifdim\skip0 = 0pt \else \vskip\skip0 \fi
2553 \penalty\count255
2557 % The index entry written in the file actually looks like
2558 % \entry {sortstring}{page}{topic}
2559 % or
2560 % \entry {sortstring}{page}{topic}{subtopic}
2561 % The texindex program reads in these files and writes files
2562 % containing these kinds of lines:
2563 % \initial {c}
2564 % before the first topic whose initial is c
2565 % \entry {topic}{pagelist}
2566 % for a topic that is used without subtopics
2567 % \primary {topic}
2568 % for the beginning of a topic that is used with subtopics
2569 % \secondary {subtopic}{pagelist}
2570 % for each subtopic.
2572 % Define the user-accessible indexing commands
2573 % @findex, @vindex, @kindex, @cindex.
2575 \def\findex {\fnindex}
2576 \def\kindex {\kyindex}
2577 \def\cindex {\cpindex}
2578 \def\vindex {\vrindex}
2579 \def\tindex {\tpindex}
2580 \def\pindex {\pgindex}
2582 \def\cindexsub {\begingroup\obeylines\cindexsub}
2583 {\obeylines %
2584 \gdef\cindexsub "#1" #2^^M{\endgroup %
2585 \dosubind{cp}{#2}{#1}}}
2587 % Define the macros used in formatting output of the sorted index material.
2589 % @printindex causes a particular index (the ??s file) to get printed.
2590 % It does not print any chapter heading (usually an @unnumbered).
2592 \def\printindex{\parsearg\doprintindex}
2593 \def\doprintindex#1{\begingroup
2594 \dobreak \chapheadingskip{10000}%
2596 \indexfonts \rm
2597 \tolerance = 9500
2598 \indexbreaks
2600 % See if the index file exists and is nonempty.
2601 % Change catcode of @ here so that if the index file contains
2602 % \initial {@}
2603 % as its first line, TeX doesn't complain about mismatched braces
2604 % (because it thinks @} is a control sequence).
2605 \catcode`\@ = 11
2606 \openin 1 \jobname.#1s
2607 \ifeof 1
2608 % \enddoublecolumns gets confused if there is no text in the index,
2609 % and it loses the chapter title and the aux file entries for the
2610 % index. The easiest way to prevent this problem is to make sure
2611 % there is some text.
2612 (Index is nonexistent)
2613 \else
2615 % If the index file exists but is empty, then \openin leaves \ifeof
2616 % false. We have to make TeX try to read something from the file, so
2617 % it can discover if there is anything in it.
2618 \read 1 to \temp
2619 \ifeof 1
2620 (Index is empty)
2621 \else
2622 % Index files are almost Texinfo source, but we use \ as the escape
2623 % character. It would be better to use @, but that's too big a change
2624 % to make right now.
2625 \def\indexbackslash{\rawbackslashxx}%
2626 \catcode`\\ = 0
2627 \escapechar = `\\
2628 \begindoublecolumns
2629 \input \jobname.#1s
2630 \enddoublecolumns
2633 \closein 1
2634 \endgroup}
2636 % These macros are used by the sorted index file itself.
2637 % Change them to control the appearance of the index.
2639 % Same as \bigskipamount except no shrink.
2640 % \balancecolumns gets confused if there is any shrink.
2641 \newskip\initialskipamount \initialskipamount 12pt plus4pt
2643 \def\initial #1{%
2644 {\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
2645 \ifdim\lastskip<\initialskipamount
2646 \removelastskip \penalty-200 \vskip \initialskipamount\fi
2647 \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
2649 % This typesets a paragraph consisting of #1, dot leaders, and then #2
2650 % flush to the right margin. It is used for index and table of contents
2651 % entries. The paragraph is indented by \leftskip.
2653 \def\entry #1#2{\begingroup
2655 % Start a new paragraph if necessary, so our assignments below can't
2656 % affect previous text.
2657 \par
2659 % Do not fill out the last line with white space.
2660 \parfillskip = 0in
2662 % No extra space above this paragraph.
2663 \parskip = 0in
2665 % Do not prefer a separate line ending with a hyphen to fewer lines.
2666 \finalhyphendemerits = 0
2668 % \hangindent is only relevant when the entry text and page number
2669 % don't both fit on one line. In that case, bob suggests starting the
2670 % dots pretty far over on the line. Unfortunately, a large
2671 % indentation looks wrong when the entry text itself is broken across
2672 % lines. So we use a small indentation and put up with long leaders.
2674 % \hangafter is reset to 1 (which is the value we want) at the start
2675 % of each paragraph, so we need not do anything with that.
2676 \hangindent=2em
2678 % When the entry text needs to be broken, just fill out the first line
2679 % with blank space.
2680 \rightskip = 0pt plus1fil
2682 % Start a ``paragraph'' for the index entry so the line breaking
2683 % parameters we've set above will have an effect.
2684 \noindent
2686 % Insert the text of the index entry. TeX will do line-breaking on it.
2688 % The following is kludged to not output a line of dots in the index if
2689 % there are no page numbers. The next person who breaks this will be
2690 % cursed by a Unix daemon.
2691 \def\tempa{{\rm }}%
2692 \def\tempb{#2}%
2693 \edef\tempc{\tempa}%
2694 \edef\tempd{\tempb}%
2695 \ifx\tempc\tempd\ \else%
2697 % If we must, put the page number on a line of its own, and fill out
2698 % this line with blank space. (The \hfil is overwhelmed with the
2699 % fill leaders glue in \indexdotfill if the page number does fit.)
2700 \hfil\penalty50
2701 \null\nobreak\indexdotfill % Have leaders before the page number.
2703 % The `\ ' here is removed by the implicit \unskip that TeX does as
2704 % part of (the primitive) \par. Without it, a spurious underfull
2705 % \hbox ensues.
2706 \ #2% The page number ends the paragraph.
2707 \fi%
2708 \par
2709 \endgroup}
2711 % Like \dotfill except takes at least 1 em.
2712 \def\indexdotfill{\cleaders
2713 \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
2715 \def\primary #1{\line{#1\hfil}}
2717 \newskip\secondaryindent \secondaryindent=0.5cm
2719 \def\secondary #1#2{
2720 {\parfillskip=0in \parskip=0in
2721 \hangindent =1in \hangafter=1
2722 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
2725 % Define two-column mode, which we use to typeset indexes.
2726 % Adapted from the TeXbook, page 416, which is to say,
2727 % the manmac.tex format used to print the TeXbook itself.
2728 \catcode`\@=11
2730 \newbox\partialpage
2731 \newdimen\doublecolumnhsize
2733 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
2734 % Grab any single-column material above us.
2735 \output = {\global\setbox\partialpage = \vbox{%
2737 % Here is a possibility not foreseen in manmac: if we accumulate a
2738 % whole lot of material, we might end up calling this \output
2739 % routine twice in a row (see the doublecol-lose test, which is
2740 % essentially a couple of indexes with @setchapternewpage off). In
2741 % that case, we must prevent the second \partialpage from
2742 % simply overwriting the first, causing us to lose the page.
2743 % This will preserve it until a real output routine can ship it
2744 % out. Generally, \partialpage will be empty when this runs and
2745 % this will be a no-op.
2746 \unvbox\partialpage
2748 % Unvbox the main output page.
2749 \unvbox255
2750 \kern-\topskip \kern\baselineskip
2752 \eject
2754 % Use the double-column output routine for subsequent pages.
2755 \output = {\doublecolumnout}%
2757 % Change the page size parameters. We could do this once outside this
2758 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
2759 % format, but then we repeat the same computation. Repeating a couple
2760 % of assignments once per index is clearly meaningless for the
2761 % execution time, so we may as well do it in one place.
2763 % First we halve the line length, less a little for the gutter between
2764 % the columns. We compute the gutter based on the line length, so it
2765 % changes automatically with the paper format. The magic constant
2766 % below is chosen so that the gutter has the same value (well, +-<1pt)
2767 % as it did when we hard-coded it.
2769 % We put the result in a separate register, \doublecolumhsize, so we
2770 % can restore it in \pagesofar, after \hsize itself has (potentially)
2771 % been clobbered.
2773 \doublecolumnhsize = \hsize
2774 \advance\doublecolumnhsize by -.04154\hsize
2775 \divide\doublecolumnhsize by 2
2776 \hsize = \doublecolumnhsize
2778 % Double the \vsize as well. (We don't need a separate register here,
2779 % since nobody clobbers \vsize.)
2780 \vsize = 2\vsize
2782 \def\doublecolumnout{%
2783 \splittopskip=\topskip \splitmaxdepth=\maxdepth
2784 % Get the available space for the double columns -- the normal
2785 % (undoubled) page height minus any material left over from the
2786 % previous page.
2787 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
2788 % box0 will be the left-hand column, box2 the right.
2789 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
2790 \onepageout\pagesofar
2791 \unvbox255
2792 \penalty\outputpenalty
2794 \def\pagesofar{%
2795 % Re-output the contents of the output page -- any previous material,
2796 % followed by the two boxes we just split.
2797 \unvbox\partialpage
2798 \hsize = \doublecolumnhsize
2799 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
2801 \def\enddoublecolumns{%
2802 \output = {\balancecolumns}\eject % split what we have
2803 \endgroup % started in \begindoublecolumns
2805 % Back to normal single-column typesetting, but take account of the
2806 % fact that we just accumulated some stuff on the output page.
2807 \pagegoal = \vsize
2809 \def\balancecolumns{%
2810 % Called at the end of the double column material.
2811 \setbox0 = \vbox{\unvbox255}%
2812 \dimen@ = \ht0
2813 \advance\dimen@ by \topskip
2814 \advance\dimen@ by-\baselineskip
2815 \divide\dimen@ by 2
2816 \splittopskip = \topskip
2817 % Loop until we get a decent breakpoint.
2818 {\vbadness=10000 \loop
2819 \global\setbox3=\copy0
2820 \global\setbox1=\vsplit3 to\dimen@
2821 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
2822 \repeat}%
2823 \setbox0=\vbox to\dimen@{\unvbox1}%
2824 \setbox2=\vbox to\dimen@{\unvbox3}%
2825 \pagesofar
2827 \catcode`\@ = \other
2830 \message{sectioning,}
2831 % Define chapters, sections, etc.
2833 \newcount\chapno
2834 \newcount\secno \secno=0
2835 \newcount\subsecno \subsecno=0
2836 \newcount\subsubsecno \subsubsecno=0
2838 % This counter is funny since it counts through charcodes of letters A, B, ...
2839 \newcount\appendixno \appendixno = `\@
2840 \def\appendixletter{\char\the\appendixno}
2842 \newwrite\contentsfile
2843 % This is called from \setfilename.
2844 \def\opencontents{\openout\contentsfile = \jobname.toc }
2846 % Each @chapter defines this as the name of the chapter.
2847 % page headings and footings can use it. @section does likewise
2849 \def\thischapter{} \def\thissection{}
2850 \def\seccheck#1{\ifnum \pageno<0
2851 \errmessage{@#1 not allowed after generating table of contents}%
2852 \fi}
2854 \def\chapternofonts{%
2855 \let\rawbackslash=\relax
2856 \let\frenchspacing=\relax
2857 \def\result{\realbackslash result}%
2858 \def\equiv{\realbackslash equiv}%
2859 \def\expansion{\realbackslash expansion}%
2860 \def\print{\realbackslash print}%
2861 \def\TeX{\realbackslash TeX}%
2862 \def\dots{\realbackslash dots}%
2863 \def\result{\realbackslash result}%
2864 \def\equiv{\realbackslash equiv}%
2865 \def\expansion{\realbackslash expansion}%
2866 \def\print{\realbackslash print}%
2867 \def\error{\realbackslash error}%
2868 \def\point{\realbackslash point}%
2869 \def\copyright{\realbackslash copyright}%
2870 \def\tt{\realbackslash tt}%
2871 \def\bf{\realbackslash bf}%
2872 \def\w{\realbackslash w}%
2873 \def\less{\realbackslash less}%
2874 \def\gtr{\realbackslash gtr}%
2875 \def\hat{\realbackslash hat}%
2876 \def\char{\realbackslash char}%
2877 \def\tclose##1{\realbackslash tclose{##1}}%
2878 \def\code##1{\realbackslash code{##1}}%
2879 \def\samp##1{\realbackslash samp{##1}}%
2880 \def\r##1{\realbackslash r{##1}}%
2881 \def\b##1{\realbackslash b{##1}}%
2882 \def\key##1{\realbackslash key{##1}}%
2883 \def\file##1{\realbackslash file{##1}}%
2884 \def\kbd##1{\realbackslash kbd{##1}}%
2885 % These are redefined because @smartitalic wouldn't work inside xdef.
2886 \def\i##1{\realbackslash i{##1}}%
2887 \def\cite##1{\realbackslash cite{##1}}%
2888 \def\var##1{\realbackslash var{##1}}%
2889 \def\emph##1{\realbackslash emph{##1}}%
2890 \def\dfn##1{\realbackslash dfn{##1}}%
2893 \newcount\absseclevel % used to calculate proper heading level
2894 \newcount\secbase\secbase=0 % @raise/lowersections modify this count
2896 % @raisesections: treat @section as chapter, @subsection as section, etc.
2897 \def\raisesections{\global\advance\secbase by -1}
2898 \let\up=\raisesections % original BFox name
2900 % @lowersections: treat @chapter as section, @section as subsection, etc.
2901 \def\lowersections{\global\advance\secbase by 1}
2902 \let\down=\lowersections % original BFox name
2904 % Choose a numbered-heading macro
2905 % #1 is heading level if unmodified by @raisesections or @lowersections
2906 % #2 is text for heading
2907 \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2908 \ifcase\absseclevel
2909 \chapterzzz{#2}
2911 \seczzz{#2}
2913 \numberedsubseczzz{#2}
2915 \numberedsubsubseczzz{#2}
2916 \else
2917 \ifnum \absseclevel<0
2918 \chapterzzz{#2}
2919 \else
2920 \numberedsubsubseczzz{#2}
2925 % like \numhead, but chooses appendix heading levels
2926 \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2927 \ifcase\absseclevel
2928 \appendixzzz{#2}
2930 \appendixsectionzzz{#2}
2932 \appendixsubseczzz{#2}
2934 \appendixsubsubseczzz{#2}
2935 \else
2936 \ifnum \absseclevel<0
2937 \appendixzzz{#2}
2938 \else
2939 \appendixsubsubseczzz{#2}
2944 % like \numhead, but chooses numberless heading levels
2945 \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
2946 \ifcase\absseclevel
2947 \unnumberedzzz{#2}
2949 \unnumberedseczzz{#2}
2951 \unnumberedsubseczzz{#2}
2953 \unnumberedsubsubseczzz{#2}
2954 \else
2955 \ifnum \absseclevel<0
2956 \unnumberedzzz{#2}
2957 \else
2958 \unnumberedsubsubseczzz{#2}
2964 \def\thischaptername{No Chapter Title}
2965 \outer\def\chapter{\parsearg\chapteryyy}
2966 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
2967 \def\chapterzzz #1{\seccheck{chapter}%
2968 \secno=0 \subsecno=0 \subsubsecno=0
2969 \global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
2970 \chapmacro {#1}{\the\chapno}%
2971 \gdef\thissection{#1}%
2972 \gdef\thischaptername{#1}%
2973 % We don't substitute the actual chapter name into \thischapter
2974 % because we don't want its macros evaluated now.
2975 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
2976 {\chapternofonts%
2977 \toks0 = {#1}%
2978 \edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
2979 \escapechar=`\\%
2980 \iflinks \write\contentsfile\temp \fi
2981 \donoderef %
2982 \global\let\section = \numberedsec
2983 \global\let\subsection = \numberedsubsec
2984 \global\let\subsubsection = \numberedsubsubsec
2987 \outer\def\appendix{\parsearg\appendixyyy}
2988 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
2989 \def\appendixzzz #1{\seccheck{appendix}%
2990 \secno=0 \subsecno=0 \subsubsecno=0
2991 \global\advance \appendixno by 1 \message{Appendix \appendixletter}%
2992 \chapmacro {#1}{\putwordAppendix{} \appendixletter}%
2993 \gdef\thissection{#1}%
2994 \gdef\thischaptername{#1}%
2995 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
2996 {\chapternofonts%
2997 \toks0 = {#1}%
2998 \edef\temp{{\realbackslash chapentry{\the\toks0}%
2999 {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
3000 \escapechar=`\\%
3001 \iflinks \write\contentsfile\temp \fi
3002 \appendixnoderef %
3003 \global\let\section = \appendixsec
3004 \global\let\subsection = \appendixsubsec
3005 \global\let\subsubsection = \appendixsubsubsec
3008 % @centerchap is like @unnumbered, but the heading is centered.
3009 \outer\def\centerchap{\parsearg\centerchapyyy}
3010 \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
3012 \outer\def\top{\parsearg\unnumberedyyy}
3013 \outer\def\unnumbered{\parsearg\unnumberedyyy}
3014 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
3015 \def\unnumberedzzz #1{\seccheck{unnumbered}%
3016 \secno=0 \subsecno=0 \subsubsecno=0
3018 % This used to be simply \message{#1}, but TeX fully expands the
3019 % argument to \message. Therefore, if #1 contained @-commands, TeX
3020 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
3021 % expanded @cite (which turns out to cause errors because \cite is meant
3022 % to be executed, not expanded).
3024 % Anyway, we don't want the fully-expanded definition of @cite to appear
3025 % as a result of the \message, we just want `@cite' itself. We use
3026 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
3027 % simply yielding the contents of the <toks register>.
3028 \toks0 = {#1}\message{(\the\toks0)}%
3030 \unnumbchapmacro {#1}%
3031 \gdef\thischapter{#1}\gdef\thissection{#1}%
3032 {\chapternofonts%
3033 \toks0 = {#1}%
3034 \edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
3035 \escapechar=`\\%
3036 \iflinks \write\contentsfile\temp \fi
3037 \unnumbnoderef %
3038 \global\let\section = \unnumberedsec
3039 \global\let\subsection = \unnumberedsubsec
3040 \global\let\subsubsection = \unnumberedsubsubsec
3043 \outer\def\numberedsec{\parsearg\secyyy}
3044 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
3045 \def\seczzz #1{\seccheck{section}%
3046 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3047 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
3048 {\chapternofonts%
3049 \toks0 = {#1}%
3050 \edef\temp{{\realbackslash secentry %
3051 {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
3052 \escapechar=`\\%
3053 \iflinks \write\contentsfile\temp \fi
3054 \donoderef %
3055 \penalty 10000 %
3058 \outer\def\appendixsection{\parsearg\appendixsecyyy}
3059 \outer\def\appendixsec{\parsearg\appendixsecyyy}
3060 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
3061 \def\appendixsectionzzz #1{\seccheck{appendixsection}%
3062 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3063 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
3064 {\chapternofonts%
3065 \toks0 = {#1}%
3066 \edef\temp{{\realbackslash secentry %
3067 {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
3068 \escapechar=`\\%
3069 \iflinks \write\contentsfile\temp \fi
3070 \appendixnoderef %
3071 \penalty 10000 %
3074 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
3075 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
3076 \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
3077 \plainsecheading {#1}\gdef\thissection{#1}%
3078 {\chapternofonts%
3079 \toks0 = {#1}%
3080 \edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
3081 \escapechar=`\\%
3082 \iflinks \write\contentsfile\temp \fi
3083 \unnumbnoderef %
3084 \penalty 10000 %
3087 \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
3088 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
3089 \def\numberedsubseczzz #1{\seccheck{subsection}%
3090 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3091 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
3092 {\chapternofonts%
3093 \toks0 = {#1}%
3094 \edef\temp{{\realbackslash subsecentry %
3095 {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
3096 \escapechar=`\\%
3097 \iflinks \write\contentsfile\temp \fi
3098 \donoderef %
3099 \penalty 10000 %
3102 \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
3103 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
3104 \def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
3105 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3106 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
3107 {\chapternofonts%
3108 \toks0 = {#1}%
3109 \edef\temp{{\realbackslash subsecentry %
3110 {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
3111 \escapechar=`\\%
3112 \iflinks \write\contentsfile\temp \fi
3113 \appendixnoderef %
3114 \penalty 10000 %
3117 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
3118 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
3119 \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
3120 \plainsubsecheading {#1}\gdef\thissection{#1}%
3121 {\chapternofonts%
3122 \toks0 = {#1}%
3123 \edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
3124 \escapechar=`\\%
3125 \iflinks \write\contentsfile\temp \fi
3126 \unnumbnoderef %
3127 \penalty 10000 %
3130 \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
3131 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
3132 \def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
3133 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3134 \subsubsecheading {#1}
3135 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3136 {\chapternofonts%
3137 \toks0 = {#1}%
3138 \edef\temp{{\realbackslash subsubsecentry{\the\toks0}
3139 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
3140 {\noexpand\folio}}}%
3141 \escapechar=`\\%
3142 \iflinks \write\contentsfile\temp \fi
3143 \donoderef %
3144 \penalty 10000 %
3147 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
3148 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
3149 \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
3150 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3151 \subsubsecheading {#1}
3152 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3153 {\chapternofonts%
3154 \toks0 = {#1}%
3155 \edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
3156 {\appendixletter}
3157 {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
3158 \escapechar=`\\%
3159 \iflinks \write\contentsfile\temp \fi
3160 \appendixnoderef %
3161 \penalty 10000 %
3164 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
3165 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
3166 \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
3167 \plainsubsubsecheading {#1}\gdef\thissection{#1}%
3168 {\chapternofonts%
3169 \toks0 = {#1}%
3170 \edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
3171 \escapechar=`\\%
3172 \iflinks \write\contentsfile\temp \fi
3173 \unnumbnoderef %
3174 \penalty 10000 %
3177 % These are variants which are not "outer", so they can appear in @ifinfo.
3178 % Actually, they should now be obsolete; ordinary section commands should work.
3179 \def\infotop{\parsearg\unnumberedzzz}
3180 \def\infounnumbered{\parsearg\unnumberedzzz}
3181 \def\infounnumberedsec{\parsearg\unnumberedseczzz}
3182 \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
3183 \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
3185 \def\infoappendix{\parsearg\appendixzzz}
3186 \def\infoappendixsec{\parsearg\appendixseczzz}
3187 \def\infoappendixsubsec{\parsearg\appendixsubseczzz}
3188 \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
3190 \def\infochapter{\parsearg\chapterzzz}
3191 \def\infosection{\parsearg\sectionzzz}
3192 \def\infosubsection{\parsearg\subsectionzzz}
3193 \def\infosubsubsection{\parsearg\subsubsectionzzz}
3195 % These macros control what the section commands do, according
3196 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
3197 % Define them by default for a numbered chapter.
3198 \global\let\section = \numberedsec
3199 \global\let\subsection = \numberedsubsec
3200 \global\let\subsubsection = \numberedsubsubsec
3202 % Define @majorheading, @heading and @subheading
3204 % NOTE on use of \vbox for chapter headings, section headings, and
3205 % such:
3206 % 1) We use \vbox rather than the earlier \line to permit
3207 % overlong headings to fold.
3208 % 2) \hyphenpenalty is set to 10000 because hyphenation in a
3209 % heading is obnoxious; this forbids it.
3210 % 3) Likewise, headings look best if no \parindent is used, and
3211 % if justification is not attempted. Hence \raggedright.
3214 \def\majorheading{\parsearg\majorheadingzzz}
3215 \def\majorheadingzzz #1{%
3216 {\advance\chapheadingskip by 10pt \chapbreak }%
3217 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3218 \parindent=0pt\raggedright
3219 \rm #1\hfill}}\bigskip \par\penalty 200}
3221 \def\chapheading{\parsearg\chapheadingzzz}
3222 \def\chapheadingzzz #1{\chapbreak %
3223 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3224 \parindent=0pt\raggedright
3225 \rm #1\hfill}}\bigskip \par\penalty 200}
3227 % @heading, @subheading, @subsubheading.
3228 \def\heading{\parsearg\plainsecheading}
3229 \def\subheading{\parsearg\plainsubsecheading}
3230 \def\subsubheading{\parsearg\plainsubsubsecheading}
3232 % These macros generate a chapter, section, etc. heading only
3233 % (including whitespace, linebreaking, etc. around it),
3234 % given all the information in convenient, parsed form.
3236 %%% Args are the skip and penalty (usually negative)
3237 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
3239 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
3241 %%% Define plain chapter starts, and page on/off switching for it
3242 % Parameter controlling skip before chapter headings (if needed)
3244 \newskip\chapheadingskip
3246 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
3247 \def\chappager{\par\vfill\supereject}
3248 \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
3250 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
3252 \def\CHAPPAGoff{
3253 \global\let\contentsalignmacro = \chappager
3254 \global\let\pchapsepmacro=\chapbreak
3255 \global\let\pagealignmacro=\chappager}
3257 \def\CHAPPAGon{
3258 \global\let\contentsalignmacro = \chappager
3259 \global\let\pchapsepmacro=\chappager
3260 \global\let\pagealignmacro=\chappager
3261 \global\def\HEADINGSon{\HEADINGSsingle}}
3263 \def\CHAPPAGodd{
3264 \global\let\contentsalignmacro = \chapoddpage
3265 \global\let\pchapsepmacro=\chapoddpage
3266 \global\let\pagealignmacro=\chapoddpage
3267 \global\def\HEADINGSon{\HEADINGSdouble}}
3269 \CHAPPAGon
3271 \def\CHAPFplain{
3272 \global\let\chapmacro=\chfplain
3273 \global\let\unnumbchapmacro=\unnchfplain
3274 \global\let\centerchapmacro=\centerchfplain}
3276 % Plain chapter opening.
3277 % #1 is the text, #2 the chapter number or empty if unnumbered.
3278 \def\chfplain#1#2{%
3279 \pchapsepmacro
3281 \chapfonts \rm
3282 \def\chapnum{#2}%
3283 \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
3284 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3285 \hangindent = \wd0 \centerparametersmaybe
3286 \unhbox0 #1\par}%
3288 \nobreak\bigskip % no page break after a chapter title
3289 \nobreak
3292 % Plain opening for unnumbered.
3293 \def\unnchfplain#1{\chfplain{#1}{}}
3295 % @centerchap -- centered and unnumbered.
3296 \let\centerparametersmaybe = \relax
3297 \def\centerchfplain#1{{%
3298 \def\centerparametersmaybe{%
3299 \advance\rightskip by 3\rightskip
3300 \leftskip = \rightskip
3301 \parfillskip = 0pt
3303 \chfplain{#1}{}%
3306 \CHAPFplain % The default
3308 \def\unnchfopen #1{%
3309 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3310 \parindent=0pt\raggedright
3311 \rm #1\hfill}}\bigskip \par\penalty 10000 %
3314 \def\chfopen #1#2{\chapoddpage {\chapfonts
3315 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
3316 \par\penalty 5000 %
3319 \def\centerchfopen #1{%
3320 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3321 \parindent=0pt
3322 \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 %
3325 \def\CHAPFopen{
3326 \global\let\chapmacro=\chfopen
3327 \global\let\unnumbchapmacro=\unnchfopen
3328 \global\let\centerchapmacro=\centerchfopen}
3331 % Section titles.
3332 \newskip\secheadingskip
3333 \def\secheadingbreak{\dobreak \secheadingskip {-1000}}
3334 \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
3335 \def\plainsecheading#1{\sectionheading{sec}{}{#1}}
3337 % Subsection titles.
3338 \newskip \subsecheadingskip
3339 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
3340 \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
3341 \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
3343 % Subsubsection titles.
3344 \let\subsubsecheadingskip = \subsecheadingskip
3345 \let\subsubsecheadingbreak = \subsecheadingbreak
3346 \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
3347 \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
3350 % Print any size section title.
3352 % #1 is the section type (sec/subsec/subsubsec), #2 is the section
3353 % number (maybe empty), #3 the text.
3354 \def\sectionheading#1#2#3{%
3356 \expandafter\advance\csname #1headingskip\endcsname by \parskip
3357 \csname #1headingbreak\endcsname
3360 % Switch to the right set of fonts.
3361 \csname #1fonts\endcsname \rm
3363 % Only insert the separating space if we have a section number.
3364 \def\secnum{#2}%
3365 \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
3367 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3368 \hangindent = \wd0 % zero if no section number
3369 \unhbox0 #3}%
3371 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
3375 \message{toc printing,}
3376 % Finish up the main text and prepare to read what we've written
3377 % to \contentsfile.
3379 \newskip\contentsrightmargin \contentsrightmargin=1in
3380 \def\startcontents#1{%
3381 % If @setchapternewpage on, and @headings double, the contents should
3382 % start on an odd page, unlike chapters. Thus, we maintain
3383 % \contentsalignmacro in parallel with \pagealignmacro.
3384 % From: Torbjorn Granlund <tege@matematik.su.se>
3385 \contentsalignmacro
3386 \immediate\closeout \contentsfile
3387 \ifnum \pageno>0
3388 \pageno = -1 % Request roman numbered pages.
3390 % Don't need to put `Contents' or `Short Contents' in the headline.
3391 % It is abundantly clear what they are.
3392 \unnumbchapmacro{#1}\def\thischapter{}%
3393 \begingroup % Set up to handle contents files properly.
3394 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
3395 % We can't do this, because then an actual ^ in a section
3396 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
3397 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
3398 \raggedbottom % Worry more about breakpoints than the bottom.
3399 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
3403 % Normal (long) toc.
3404 \outer\def\contents{%
3405 \startcontents{\putwordTableofContents}%
3406 \input \jobname.toc
3407 \endgroup
3408 \vfill \eject
3411 % And just the chapters.
3412 \outer\def\summarycontents{%
3413 \startcontents{\putwordShortContents}%
3415 \let\chapentry = \shortchapentry
3416 \let\unnumbchapentry = \shortunnumberedentry
3417 % We want a true roman here for the page numbers.
3418 \secfonts
3419 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
3421 \hyphenpenalty = 10000
3422 \advance\baselineskip by 1pt % Open it up a little.
3423 \def\secentry ##1##2##3##4{}
3424 \def\unnumbsecentry ##1##2{}
3425 \def\subsecentry ##1##2##3##4##5{}
3426 \def\unnumbsubsecentry ##1##2{}
3427 \def\subsubsecentry ##1##2##3##4##5##6{}
3428 \def\unnumbsubsubsecentry ##1##2{}
3429 \input \jobname.toc
3430 \endgroup
3431 \vfill \eject
3433 \let\shortcontents = \summarycontents
3435 % These macros generate individual entries in the table of contents.
3436 % The first argument is the chapter or section name.
3437 % The last argument is the page number.
3438 % The arguments in between are the chapter number, section number, ...
3440 % Chapter-level things, for both the long and short contents.
3441 \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
3443 % See comments in \dochapentry re vbox and related settings
3444 \def\shortchapentry#1#2#3{%
3445 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
3448 % Typeset the label for a chapter or appendix for the short contents.
3449 % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
3450 % We could simplify the code here by writing out an \appendixentry
3451 % command in the toc file for appendices, instead of using \chapentry
3452 % for both, but it doesn't seem worth it.
3453 \setbox0 = \hbox{\shortcontrm \putwordAppendix }
3454 \newdimen\shortappendixwidth \shortappendixwidth = \wd0
3456 \def\shortchaplabel#1{%
3457 % We typeset #1 in a box of constant width, regardless of the text of
3458 % #1, so the chapter titles will come out aligned.
3459 \setbox0 = \hbox{#1}%
3460 \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
3462 % This space should be plenty, since a single number is .5em, and the
3463 % widest letter (M) is 1em, at least in the Computer Modern fonts.
3464 % (This space doesn't include the extra space that gets added after
3465 % the label; that gets put in by \shortchapentry above.)
3466 \advance\dimen0 by 1.1em
3467 \hbox to \dimen0{#1\hfil}%
3470 \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
3471 \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
3473 % Sections.
3474 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
3475 \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
3477 % Subsections.
3478 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
3479 \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
3481 % And subsubsections.
3482 \def\subsubsecentry#1#2#3#4#5#6{%
3483 \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
3484 \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
3486 % This parameter controls the indentation of the various levels.
3487 \newdimen\tocindent \tocindent = 3pc
3489 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
3490 % page number.
3492 % If the toc has to be broken over pages, we want it to be at chapters
3493 % if at all possible; hence the \penalty.
3494 \def\dochapentry#1#2{%
3495 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
3496 \begingroup
3497 \chapentryfonts
3498 \tocentry{#1}{\dopageno{#2}}%
3499 \endgroup
3500 \nobreak\vskip .25\baselineskip plus.1\baselineskip
3503 \def\dosecentry#1#2{\begingroup
3504 \secentryfonts \leftskip=\tocindent
3505 \tocentry{#1}{\dopageno{#2}}%
3506 \endgroup}
3508 \def\dosubsecentry#1#2{\begingroup
3509 \subsecentryfonts \leftskip=2\tocindent
3510 \tocentry{#1}{\dopageno{#2}}%
3511 \endgroup}
3513 \def\dosubsubsecentry#1#2{\begingroup
3514 \subsubsecentryfonts \leftskip=3\tocindent
3515 \tocentry{#1}{\dopageno{#2}}%
3516 \endgroup}
3518 % Final typesetting of a toc entry; we use the same \entry macro as for
3519 % the index entries, but we want to suppress hyphenation here. (We
3520 % can't do that in the \entry macro, since index entries might consist
3521 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
3522 \def\tocentry#1#2{\begingroup
3523 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
3524 % Do not use \turnoffactive in these arguments. Since the toc is
3525 % typeset in cmr, so characters such as _ would come out wrong; we
3526 % have to do the usual translation tricks.
3527 \entry{#1}{#2}%
3528 \endgroup}
3530 % Space between chapter (or whatever) number and the title.
3531 \def\labelspace{\hskip1em \relax}
3533 \def\dopageno#1{{\rm #1}}
3534 \def\doshortpageno#1{{\rm #1}}
3536 \def\chapentryfonts{\secfonts \rm}
3537 \def\secentryfonts{\textfonts}
3538 \let\subsecentryfonts = \textfonts
3539 \let\subsubsecentryfonts = \textfonts
3542 \message{environments,}
3544 % Since these characters are used in examples, it should be an even number of
3545 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3546 % Furthermore, these definitions must come after we define our fonts.
3547 \newbox\dblarrowbox \newbox\longdblarrowbox
3548 \newbox\pushcharbox \newbox\bullbox
3549 \newbox\equivbox \newbox\errorbox
3551 %{\tentt
3552 %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
3553 %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
3554 %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
3555 %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
3556 % Adapted from the manmac format (p.420 of TeXbook)
3557 %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
3558 % depth .1ex\hfil}
3561 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3562 \def\point{$\star$}
3563 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3564 \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
3565 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
3566 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3568 % Adapted from the TeXbook's \boxit.
3569 {\tentt \global\dimen0 = 3em}% Width of the box.
3570 \dimen2 = .55pt % Thickness of rules
3571 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3572 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
3574 \global\setbox\errorbox=\hbox to \dimen0{\hfil
3575 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
3576 \advance\hsize by -2\dimen2 % Rules.
3577 \vbox{
3578 \hrule height\dimen2
3579 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
3580 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
3581 \kern3pt\vrule width\dimen2}% Space to right.
3582 \hrule height\dimen2}
3583 \hfil}
3585 % The @error{} command.
3586 \def\error{\leavevmode\lower.7ex\copy\errorbox}
3588 % @tex ... @end tex escapes into raw Tex temporarily.
3589 % One exception: @ is still an escape character, so that @end tex works.
3590 % But \@ or @@ will get a plain tex @ character.
3592 \def\tex{\begingroup
3593 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
3594 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
3595 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
3596 \catcode `\%=14
3597 \catcode 43=12 % plus
3598 \catcode`\"=12
3599 \catcode`\==12
3600 \catcode`\|=12
3601 \catcode`\<=12
3602 \catcode`\>=12
3603 \escapechar=`\\
3605 \let\b=\ptexb
3606 \let\bullet=\ptexbullet
3607 \let\c=\ptexc
3608 \let\,=\ptexcomma
3609 \let\.=\ptexdot
3610 \let\dots=\ptexdots
3611 \let\equiv=\ptexequiv
3612 \let\!=\ptexexclam
3613 \let\i=\ptexi
3614 \let\{=\ptexlbrace
3615 \let\+=\tabalign
3616 \let\}=\ptexrbrace
3617 \let\*=\ptexstar
3618 \let\t=\ptext
3620 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3621 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3622 \def\@{@}%
3623 \let\Etex=\endgroup}
3625 % Define @lisp ... @endlisp.
3626 % @lisp does a \begingroup so it can rebind things,
3627 % including the definition of @endlisp (which normally is erroneous).
3629 % Amount to narrow the margins by for @lisp.
3630 \newskip\lispnarrowing \lispnarrowing=0.4in
3632 % This is the definition that ^^M gets inside @lisp, @example, and other
3633 % such environments. \null is better than a space, since it doesn't
3634 % have any width.
3635 \def\lisppar{\null\endgraf}
3637 % Make each space character in the input produce a normal interword
3638 % space in the output. Don't allow a line break at this space, as this
3639 % is used only in environments like @example, where each line of input
3640 % should produce a line of output anyway.
3642 {\obeyspaces %
3643 \gdef\sepspaces{\obeyspaces\let =\tie}}
3645 % Define \obeyedspace to be our active space, whatever it is. This is
3646 % for use in \parsearg.
3647 {\sepspaces%
3648 \global\let\obeyedspace= }
3650 % This space is always present above and below environments.
3651 \newskip\envskipamount \envskipamount = 0pt
3653 % Make spacing and below environment symmetrical. We use \parskip here
3654 % to help in doing that, since in @example-like environments \parskip
3655 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
3656 % start of the next paragraph will insert \parskip
3658 \def\aboveenvbreak{{\advance\envskipamount by \parskip
3659 \endgraf \ifdim\lastskip<\envskipamount
3660 \removelastskip \penalty-50 \vskip\envskipamount \fi}}
3662 \let\afterenvbreak = \aboveenvbreak
3664 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
3665 \let\nonarrowing=\relax
3667 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
3668 % environment contents.
3669 \font\circle=lcircle10
3670 \newdimen\circthick
3671 \newdimen\cartouter\newdimen\cartinner
3672 \newskip\normbskip\newskip\normpskip\newskip\normlskip
3673 \circthick=\fontdimen8\circle
3675 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
3676 \def\ctr{{\hskip 6pt\circle\char'010}}
3677 \def\cbl{{\circle\char'012\hskip -6pt}}
3678 \def\cbr{{\hskip 6pt\circle\char'011}}
3679 \def\carttop{\hbox to \cartouter{\hskip\lskip
3680 \ctl\leaders\hrule height\circthick\hfil\ctr
3681 \hskip\rskip}}
3682 \def\cartbot{\hbox to \cartouter{\hskip\lskip
3683 \cbl\leaders\hrule height\circthick\hfil\cbr
3684 \hskip\rskip}}
3686 \newskip\lskip\newskip\rskip
3688 \long\def\cartouche{%
3689 \begingroup
3690 \lskip=\leftskip \rskip=\rightskip
3691 \leftskip=0pt\rightskip=0pt %we want these *outside*.
3692 \cartinner=\hsize \advance\cartinner by-\lskip
3693 \advance\cartinner by-\rskip
3694 \cartouter=\hsize
3695 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
3696 % side, and for 6pt waste from
3697 % each corner char, and rule thickness
3698 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
3699 % Flag to tell @lisp, etc., not to narrow margin.
3700 \let\nonarrowing=\comment
3701 \vbox\bgroup
3702 \baselineskip=0pt\parskip=0pt\lineskip=0pt
3703 \carttop
3704 \hbox\bgroup
3705 \hskip\lskip
3706 \vrule\kern3pt
3707 \vbox\bgroup
3708 \hsize=\cartinner
3709 \kern3pt
3710 \begingroup
3711 \baselineskip=\normbskip
3712 \lineskip=\normlskip
3713 \parskip=\normpskip
3714 \vskip -\parskip
3715 \def\Ecartouche{%
3716 \endgroup
3717 \kern3pt
3718 \egroup
3719 \kern3pt\vrule
3720 \hskip\rskip
3721 \egroup
3722 \cartbot
3723 \egroup
3724 \endgroup
3728 % This macro is called at the beginning of all the @example variants,
3729 % inside a group.
3730 \def\nonfillstart{%
3731 \aboveenvbreak
3732 \inENV % This group ends at the end of the body
3733 \hfuzz = 12pt % Don't be fussy
3734 \sepspaces % Make spaces be word-separators rather than space tokens.
3735 \singlespace
3736 \let\par = \lisppar % don't ignore blank lines
3737 \obeylines % each line of input is a line of output
3738 \parskip = 0pt
3739 \parindent = 0pt
3740 \emergencystretch = 0pt % don't try to avoid overfull boxes
3741 % @cartouche defines \nonarrowing to inhibit narrowing
3742 % at next level down.
3743 \ifx\nonarrowing\relax
3744 \advance \leftskip by \lispnarrowing
3745 \exdentamount=\lispnarrowing
3746 \let\exdent=\nofillexdent
3747 \let\nonarrowing=\relax
3751 % Define the \E... control sequence only if we are inside the particular
3752 % environment, so the error checking in \end will work.
3754 % To end an @example-like environment, we first end the paragraph (via
3755 % \afterenvbreak's vertical glue), and then the group. That way we keep
3756 % the zero \parskip that the environments set -- \parskip glue will be
3757 % inserted at the beginning of the next paragraph in the document, after
3758 % the environment.
3760 \def\nonfillfinish{\afterenvbreak\endgroup}
3762 % @lisp: indented, narrowed, typewriter font.
3763 \def\lisp{\begingroup
3764 \nonfillstart
3765 \let\Elisp = \nonfillfinish
3767 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
3768 \gobble % eat return
3771 % @example: Same as @lisp.
3772 \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
3774 % @small... is usually equivalent to the non-small (@smallbook
3775 % redefines). We must call \example (or whatever) last in the
3776 % definition, since it reads the return following the @example (or
3777 % whatever) command.
3779 % This actually allows (for example) @end display inside an
3780 % @smalldisplay. Too bad, but makeinfo will catch the error anyway.
3782 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display}
3783 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp}
3784 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format}
3785 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
3787 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts.
3788 % Originally contributed by Pavel@xerox.
3789 \def\smalllispx{\begingroup
3790 \def\Esmalllisp{\nonfillfinish\endgroup}%
3791 \def\Esmallexample{\nonfillfinish\endgroup}%
3792 \indexfonts
3793 \lisp
3796 % @display: same as @lisp except keep current font.
3798 \def\display{\begingroup
3799 \nonfillstart
3800 \let\Edisplay = \nonfillfinish
3801 \gobble
3804 % @smalldisplay (when @smallbook): @display plus smaller fonts.
3806 \def\smalldisplayx{\begingroup
3807 \def\Esmalldisplay{\nonfillfinish\endgroup}%
3808 \indexfonts \rm
3809 \display
3812 % @format: same as @display except don't narrow margins.
3814 \def\format{\begingroup
3815 \let\nonarrowing = t
3816 \nonfillstart
3817 \let\Eformat = \nonfillfinish
3818 \gobble
3821 % @smallformat (when @smallbook): @format plus smaller fonts.
3823 \def\smallformatx{\begingroup
3824 \def\Esmallformat{\nonfillfinish\endgroup}%
3825 \indexfonts \rm
3826 \format
3829 % @flushleft (same as @format).
3831 \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format}
3833 % @flushright.
3835 \def\flushright{\begingroup
3836 \let\nonarrowing = t
3837 \nonfillstart
3838 \let\Eflushright = \nonfillfinish
3839 \advance\leftskip by 0pt plus 1fill
3840 \gobble
3843 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
3844 % and narrows the margins.
3846 \def\quotation{%
3847 \begingroup\inENV %This group ends at the end of the @quotation body
3848 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
3849 \singlespace
3850 \parindent=0pt
3851 % We have retained a nonzero parskip for the environment, since we're
3852 % doing normal filling. So to avoid extra space below the environment...
3853 \def\Equotation{\parskip = 0pt \nonfillfinish}%
3855 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
3856 \ifx\nonarrowing\relax
3857 \advance\leftskip by \lispnarrowing
3858 \advance\rightskip by \lispnarrowing
3859 \exdentamount = \lispnarrowing
3860 \let\nonarrowing = \relax
3865 \message{defuns,}
3866 % Define formatter for defuns
3867 % First, allow user to change definition object font (\df) internally
3868 \def\setdeffont #1 {\csname DEF#1\endcsname}
3870 \newskip\defbodyindent \defbodyindent=.4in
3871 \newskip\defargsindent \defargsindent=50pt
3872 \newskip\deftypemargin \deftypemargin=12pt
3873 \newskip\deflastargmargin \deflastargmargin=18pt
3875 \newcount\parencount
3876 % define \functionparens, which makes ( and ) and & do special things.
3877 % \functionparens affects the group it is contained in.
3878 \def\activeparens{%
3879 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
3880 \catcode`\[=\active \catcode`\]=\active}
3882 % Make control sequences which act like normal parenthesis chars.
3883 \let\lparen = ( \let\rparen = )
3885 {\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
3887 % Be sure that we always have a definition for `(', etc. For example,
3888 % if the fn name has parens in it, \boldbrax will not be in effect yet,
3889 % so TeX would otherwise complain about undefined control sequence.
3890 \global\let(=\lparen \global\let)=\rparen
3891 \global\let[=\lbrack \global\let]=\rbrack
3893 \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
3894 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
3895 % This is used to turn on special parens
3896 % but make & act ordinary (given that it's active).
3897 \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
3899 % Definitions of (, ) and & used in args for functions.
3900 % This is the definition of ( outside of all parentheses.
3901 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
3902 \global\advance\parencount by 1
3905 % This is the definition of ( when already inside a level of parens.
3906 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
3908 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
3909 % also in that case restore the outer-level definition of (.
3910 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
3911 \global\advance \parencount by -1 }
3912 % If we encounter &foo, then turn on ()-hacking afterwards
3913 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
3915 \gdef\normalparens{\boldbrax\let&=\ampnr}
3916 } % End of definition inside \activeparens
3917 %% These parens (in \boldbrax) actually are a little bolder than the
3918 %% contained text. This is especially needed for [ and ]
3919 \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
3920 \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
3921 \def\ampnr{\&}
3922 \def\lbrb{{\bf\char`\[}}
3923 \def\rbrb{{\bf\char`\]}}
3925 % First, defname, which formats the header line itself.
3926 % #1 should be the function name.
3927 % #2 should be the type of definition, such as "Function".
3929 \def\defname #1#2{%
3930 % Get the values of \leftskip and \rightskip as they were
3931 % outside the @def...
3932 \dimen2=\leftskip
3933 \advance\dimen2 by -\defbodyindent
3934 \dimen3=\rightskip
3935 \advance\dimen3 by -\defbodyindent
3936 \noindent %
3937 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
3938 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
3939 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
3940 \parshape 2 0in \dimen0 \defargsindent \dimen1 %
3941 % Now output arg 2 ("Function" or some such)
3942 % ending at \deftypemargin from the right margin,
3943 % but stuck inside a box of width 0 so it does not interfere with linebreaking
3944 {% Adjust \hsize to exclude the ambient margins,
3945 % so that \rightline will obey them.
3946 \advance \hsize by -\dimen2 \advance \hsize by -\dimen3
3947 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
3948 % Make all lines underfull and no complaints:
3949 \tolerance=10000 \hbadness=10000
3950 \advance\leftskip by -\defbodyindent
3951 \exdentamount=\defbodyindent
3952 {\df #1}\enskip % Generate function name
3955 % Actually process the body of a definition
3956 % #1 should be the terminating control sequence, such as \Edefun.
3957 % #2 should be the "another name" control sequence, such as \defunx.
3958 % #3 should be the control sequence that actually processes the header,
3959 % such as \defunheader.
3961 \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
3962 \medbreak %
3963 % Define the end token that this defining construct specifies
3964 % so that it will exit this group.
3965 \def#1{\endgraf\endgroup\medbreak}%
3966 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
3967 \parindent=0in
3968 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3969 \exdentamount=\defbodyindent
3970 \begingroup %
3971 \catcode 61=\active % 61 is `='
3972 \obeylines\activeparens\spacesplit#3}
3974 % #1 is the \E... control sequence to end the definition (which we define).
3975 % #2 is the \...x control sequence for consecutive fns (which we define).
3976 % #3 is the control sequence to call to resume processing.
3977 % #4, delimited by the space, is the class name.
3979 \def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
3980 \medbreak %
3981 % Define the end token that this defining construct specifies
3982 % so that it will exit this group.
3983 \def#1{\endgraf\endgroup\medbreak}%
3984 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
3985 \parindent=0in
3986 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
3987 \exdentamount=\defbodyindent
3988 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
3990 % @deftypemethod has an extra argument that nothing else does. Sigh.
3991 % #1 is the \E... control sequence to end the definition (which we define).
3992 % #2 is the \...x control sequence for consecutive fns (which we define).
3993 % #3 is the control sequence to call to resume processing.
3994 % #4, delimited by the space, is the class name.
3995 % #5 is the method's return type.
3997 \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
3998 \medbreak %
3999 % Define the end token that this defining construct specifies
4000 % so that it will exit this group.
4001 \def#1{\endgraf\endgroup\medbreak}%
4002 \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
4003 \parindent=0in
4004 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4005 \exdentamount=\defbodyindent
4006 \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
4008 \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
4009 \medbreak %
4010 % Define the end token that this defining construct specifies
4011 % so that it will exit this group.
4012 \def#1{\endgraf\endgroup\medbreak}%
4013 \def#2##1 ##2 {\def#4{##1}%
4014 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
4015 \parindent=0in
4016 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4017 \exdentamount=\defbodyindent
4018 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
4020 % These parsing functions are similar to the preceding ones
4021 % except that they do not make parens into active characters.
4022 % These are used for "variables" since they have no arguments.
4024 \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
4025 \medbreak %
4026 % Define the end token that this defining construct specifies
4027 % so that it will exit this group.
4028 \def#1{\endgraf\endgroup\medbreak}%
4029 \def#2{\begingroup\obeylines\spacesplit#3}%
4030 \parindent=0in
4031 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4032 \exdentamount=\defbodyindent
4033 \begingroup %
4034 \catcode 61=\active %
4035 \obeylines\spacesplit#3}
4037 % This is used for \def{tp,vr}parsebody. It could probably be used for
4038 % some of the others, too, with some judicious conditionals.
4040 \def\parsebodycommon#1#2#3{%
4041 \begingroup\inENV %
4042 \medbreak %
4043 % Define the end token that this defining construct specifies
4044 % so that it will exit this group.
4045 \def#1{\endgraf\endgroup\medbreak}%
4046 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
4047 \parindent=0in
4048 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4049 \exdentamount=\defbodyindent
4050 \begingroup\obeylines
4053 \def\defvrparsebody#1#2#3#4 {%
4054 \parsebodycommon{#1}{#2}{#3}%
4055 \spacesplit{#3{#4}}%
4058 % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the
4059 % type is just `struct', because we lose the braces in `{struct
4060 % termios}' when \spacesplit reads its undelimited argument. Sigh.
4061 % \let\deftpparsebody=\defvrparsebody
4063 % So, to get around this, we put \empty in with the type name. That
4064 % way, TeX won't find exactly `{...}' as an undelimited argument, and
4065 % won't strip off the braces.
4067 \def\deftpparsebody #1#2#3#4 {%
4068 \parsebodycommon{#1}{#2}{#3}%
4069 \spacesplit{\parsetpheaderline{#3{#4}}}\empty
4072 % Fine, but then we have to eventually remove the \empty *and* the
4073 % braces (if any). That's what this does.
4075 \def\removeemptybraces\empty#1\relax{#1}
4077 % After \spacesplit has done its work, this is called -- #1 is the final
4078 % thing to call, #2 the type name (which starts with \empty), and #3
4079 % (which might be empty) the arguments.
4081 \def\parsetpheaderline#1#2#3{%
4082 #1{\removeemptybraces#2\relax}{#3}%
4085 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
4086 \medbreak %
4087 % Define the end token that this defining construct specifies
4088 % so that it will exit this group.
4089 \def#1{\endgraf\endgroup\medbreak}%
4090 \def#2##1 ##2 {\def#4{##1}%
4091 \begingroup\obeylines\spacesplit{#3{##2}}}%
4092 \parindent=0in
4093 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4094 \exdentamount=\defbodyindent
4095 \begingroup\obeylines\spacesplit{#3{#5}}}
4097 % Split up #2 at the first space token.
4098 % call #1 with two arguments:
4099 % the first is all of #2 before the space token,
4100 % the second is all of #2 after that space token.
4101 % If #2 contains no space token, all of it is passed as the first arg
4102 % and the second is passed as empty.
4104 {\obeylines
4105 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
4106 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
4107 \ifx\relax #3%
4108 #1{#2}{}\else #1{#2}{#3#4}\fi}}
4110 % So much for the things common to all kinds of definitions.
4112 % Define @defun.
4114 % First, define the processing that is wanted for arguments of \defun
4115 % Use this to expand the args and terminate the paragraph they make up
4117 \def\defunargs #1{\functionparens \sl
4118 % Expand, preventing hyphenation at `-' chars.
4119 % Note that groups don't affect changes in \hyphenchar.
4120 \hyphenchar\tensl=0
4122 \hyphenchar\tensl=45
4123 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
4124 \interlinepenalty=10000
4125 \advance\rightskip by 0pt plus 1fil
4126 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
4129 \def\deftypefunargs #1{%
4130 % Expand, preventing hyphenation at `-' chars.
4131 % Note that groups don't affect changes in \hyphenchar.
4132 % Use \boldbraxnoamp, not \functionparens, so that & is not special.
4133 \boldbraxnoamp
4134 \tclose{#1}% avoid \code because of side effects on active chars
4135 \interlinepenalty=10000
4136 \advance\rightskip by 0pt plus 1fil
4137 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
4140 % Do complete processing of one @defun or @defunx line already parsed.
4142 % @deffn Command forward-char nchars
4144 \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
4146 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
4147 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
4148 \catcode 61=\other % Turn off change made in \defparsebody
4151 % @defun == @deffn Function
4153 \def\defun{\defparsebody\Edefun\defunx\defunheader}
4155 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
4156 \begingroup\defname {#1}{Function}%
4157 \defunargs {#2}\endgroup %
4158 \catcode 61=\other % Turn off change made in \defparsebody
4161 % @deftypefun int foobar (int @var{foo}, float @var{bar})
4163 \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
4165 % #1 is the data type. #2 is the name and args.
4166 \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
4167 % #1 is the data type, #2 the name, #3 the args.
4168 \def\deftypefunheaderx #1#2 #3\relax{%
4169 \doind {fn}{\code{#2}}% Make entry in function index
4170 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}%
4171 \deftypefunargs {#3}\endgroup %
4172 \catcode 61=\other % Turn off change made in \defparsebody
4175 % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
4177 \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
4179 % \defheaderxcond#1\relax$$$
4180 % puts #1 in @code, followed by a space, but does nothing if #1 is null.
4181 \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
4183 % #1 is the classification. #2 is the data type. #3 is the name and args.
4184 \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
4185 % #1 is the classification, #2 the data type, #3 the name, #4 the args.
4186 \def\deftypefnheaderx #1#2#3 #4\relax{%
4187 \doind {fn}{\code{#3}}% Make entry in function index
4188 \begingroup
4189 \normalparens % notably, turn off `&' magic, which prevents
4190 % at least some C++ text from working
4191 \defname {\defheaderxcond#2\relax$$$#3}{#1}%
4192 \deftypefunargs {#4}\endgroup %
4193 \catcode 61=\other % Turn off change made in \defparsebody
4196 % @defmac == @deffn Macro
4198 \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
4200 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
4201 \begingroup\defname {#1}{Macro}%
4202 \defunargs {#2}\endgroup %
4203 \catcode 61=\other % Turn off change made in \defparsebody
4206 % @defspec == @deffn Special Form
4208 \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
4210 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
4211 \begingroup\defname {#1}{Special Form}%
4212 \defunargs {#2}\endgroup %
4213 \catcode 61=\other % Turn off change made in \defparsebody
4216 % This definition is run if you use @defunx
4217 % anywhere other than immediately after a @defun or @defunx.
4219 \def\deffnx #1 {\errmessage{@deffnx in invalid context}}
4220 \def\defunx #1 {\errmessage{@defunx in invalid context}}
4221 \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
4222 \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
4223 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
4224 \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
4225 \def\deftypefunx #1 {\errmessage{@deftypefunx in invalid context}}
4227 % @defmethod, and so on
4229 % @defop CATEGORY CLASS OPERATION ARG...
4231 \def\defop #1 {\def\defoptype{#1}%
4232 \defopparsebody\Edefop\defopx\defopheader\defoptype}
4234 \def\defopheader #1#2#3{%
4235 \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
4236 \begingroup\defname {#2}{\defoptype{} on #1}%
4237 \defunargs {#3}\endgroup %
4240 % @deftypemethod CLASS RETURN-TYPE METHOD ARG...
4242 \def\deftypemethod{%
4243 \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
4245 % #1 is the class name, #2 the data type, #3 the method name, #4 the args.
4246 \def\deftypemethodheader#1#2#3#4{%
4247 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
4248 \begingroup
4249 \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
4250 \deftypefunargs{#4}%
4251 \endgroup
4254 % @defmethod == @defop Method
4256 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
4258 % #1 is the class name, #2 the method name, #3 the args.
4259 \def\defmethodheader#1#2#3{%
4260 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index
4261 \begingroup
4262 \defname{#2}{\putwordMethodon\ \code{#1}}%
4263 \defunargs{#3}%
4264 \endgroup
4267 % @defcv {Class Option} foo-class foo-flag
4269 \def\defcv #1 {\def\defcvtype{#1}%
4270 \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
4272 \def\defcvarheader #1#2#3{%
4273 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
4274 \begingroup\defname {#2}{\defcvtype{} of #1}%
4275 \defvarargs {#3}\endgroup %
4278 % @defivar == @defcv {Instance Variable}
4280 \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
4282 \def\defivarheader #1#2#3{%
4283 \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
4284 \begingroup\defname {#2}{Instance Variable of #1}%
4285 \defvarargs {#3}\endgroup %
4288 % These definitions are run if you use @defmethodx, etc.,
4289 % anywhere other than immediately after a @defmethod, etc.
4291 \def\defopx #1 {\errmessage{@defopx in invalid context}}
4292 \def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
4293 \def\defcvx #1 {\errmessage{@defcvx in invalid context}}
4294 \def\defivarx #1 {\errmessage{@defivarx in invalid context}}
4296 % Now @defvar
4298 % First, define the processing that is wanted for arguments of @defvar.
4299 % This is actually simple: just print them in roman.
4300 % This must expand the args and terminate the paragraph they make up
4301 \def\defvarargs #1{\normalparens #1%
4302 \interlinepenalty=10000
4303 \endgraf\penalty 10000\vskip -\parskip\penalty 10000}
4305 % @defvr Counter foo-count
4307 \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
4309 \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
4310 \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
4312 % @defvar == @defvr Variable
4314 \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
4316 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
4317 \begingroup\defname {#1}{Variable}%
4318 \defvarargs {#2}\endgroup %
4321 % @defopt == @defvr {User Option}
4323 \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
4325 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
4326 \begingroup\defname {#1}{User Option}%
4327 \defvarargs {#2}\endgroup %
4330 % @deftypevar int foobar
4332 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
4334 % #1 is the data type. #2 is the name, perhaps followed by text that
4335 % is actually part of the data type, which should not be put into the index.
4336 \def\deftypevarheader #1#2{%
4337 \dovarind#2 \relax% Make entry in variables index
4338 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
4339 \interlinepenalty=10000
4340 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
4341 \endgroup}
4342 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
4344 % @deftypevr {Global Flag} int enable
4346 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
4348 \def\deftypevrheader #1#2#3{\dovarind#3 \relax%
4349 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
4350 \interlinepenalty=10000
4351 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
4352 \endgroup}
4354 % This definition is run if you use @defvarx
4355 % anywhere other than immediately after a @defvar or @defvarx.
4357 \def\defvrx #1 {\errmessage{@defvrx in invalid context}}
4358 \def\defvarx #1 {\errmessage{@defvarx in invalid context}}
4359 \def\defoptx #1 {\errmessage{@defoptx in invalid context}}
4360 \def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
4361 \def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
4363 % Now define @deftp
4364 % Args are printed in bold, a slight difference from @defvar.
4366 \def\deftpargs #1{\bf \defvarargs{#1}}
4368 % @deftp Class window height width ...
4370 \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
4372 \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
4373 \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
4375 % This definition is run if you use @deftpx, etc
4376 % anywhere other than immediately after a @deftp, etc.
4378 \def\deftpx #1 {\errmessage{@deftpx in invalid context}}
4380 \message{macros,}
4381 % @macro.
4383 % To do this right we need a feature of e-TeX, \scantokens,
4384 % which we arrange to emulate with a temporary file in ordinary TeX.
4385 \ifx\eTeXversion\undefined
4386 \newwrite\macscribble
4387 \def\scantokens#1{%
4388 \immediate\openout\macscribble=\jobname.tmp
4389 \immediate\write\macscribble{#1}%
4390 \immediate\closeout\macscribble
4391 \input \jobname.tmp
4395 \newcount\paramno % Count of parameters
4396 \newtoks\macname % Macro name
4397 \newif\ifrecursive % Is it recursive?
4399 % Utility: does \let #1 = #2, except with \csnames.
4400 \def\cslet#1#2{%
4401 \expandafter\expandafter
4402 \expandafter\let
4403 \expandafter\expandafter
4404 \csname#1\endcsname
4405 \csname#2\endcsname}
4407 % Macro bodies are absorbed as an argument in a context where
4408 % all characters are catcode 10, 11 or 12, except \ which is active
4409 % (as in normal texinfo). It is necessary to change the definition of \.
4411 % It's necessary to get hard CRs in the scribble file when using Knuth
4412 % TeX, and it can't hurt with e-TeX. Texinfo sets \newlinechar=`^^J,
4413 % so we redefine the \endlinechar to ^^J when reading the macro body.
4415 \def\macrobodyctxt{%
4416 \catcode`\~=12
4417 \catcode`\^=12
4418 \catcode`\_=12
4419 \catcode`\|=12
4420 \catcode`\<=12
4421 \catcode`\>=12
4422 \catcode`\+=12
4423 \catcode`\{=12
4424 \catcode`\}=12
4425 \catcode`\@=12
4426 \endlinechar`^^J%
4427 \usembodybackslash}
4429 % \mbodybackslash is the definition of \ in @macro bodies.
4430 % It maps \foo\ => \csname macarg.foo\endcsname => #N
4431 % where N is the macro parameter number.
4432 % We define \csname macarg.\endcsname to be \realbackslash, so
4433 % \\ in macro replacement text gets you a backslash.
4435 {\catcode`@=0 @catcode`@\=@active
4436 @gdef@usembodybackslash{@let\=@mbodybackslash}
4437 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
4439 \expandafter\def\csname macarg.\endcsname{\realbackslash}
4441 \def\macro{\recursivefalse\parsearg\macroxxx}
4442 \def\rmacro{\recursivetrue\parsearg\macroxxx}
4444 \def\macroxxx#1{%
4445 \getargs{#1}% now \macname is the macname and \argl the arglist
4446 \ifx\argl\empty % no arguments
4447 \paramno=0%
4448 \else
4449 \expandafter\parsemargdef \argl;%
4451 \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4452 \cslet{macsave.\the\macname}{\the\macname}%
4453 \else
4454 \message{Warning: redefining \the\macname}%
4456 \begingroup \macrobodyctxt
4457 \ifrecursive \expandafter\parsermacbody
4458 \else \expandafter\parsemacbody
4459 \fi}
4461 \def\unmacro{\parsearg\unmacroxxx}
4462 \def\unmacroxxx#1{%
4463 \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4464 \errmessage{Macro \the\macname\ not defined.}%
4465 \else
4466 \cslet{#1}{macsave.#1}%
4467 \expandafter\let \csname macsave.\the\macname\endcsname \undefined
4471 % This makes use of the obscure feature that if the last token of a
4472 % <parameter list> is #, then the preceding argument is delimited by
4473 % an opening brace, and that opening brace is not consumed.
4474 \def\getargs#1{\getargsxxx#1{}}
4475 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
4476 \def\getmacname #1 #2\relax{\macname={#1}}
4477 \def\getmacargs#1{\def\argl{#1}}
4479 % Parse the optional {params} list. Set up \paramno and \paramlist
4480 % so \defmacro knows what to do. Define \macarg.blah for each blah
4481 % in the params list, to be ##N where N is the position in that list.
4482 % That gets used by \mbodybackslash (above).
4484 % We need to get `macro parameter char #' into several definitions.
4485 % The technique used is stolen from LaTeX: let \hash be something
4486 % unexpandable, insert that wherever you need a #, and then redefine
4487 % it to # just before using the token list produced.
4489 \def\parsemargdef#1;{\paramno=0\def\paramlist{}%
4490 \let\hash\relax\parsemargdefxxx#1,;,}
4491 \def\parsemargdefxxx#1,{%
4492 \if#1;\let\next=\relax
4493 \else \let\next=\parsemargdefxxx
4494 \advance\paramno by 1%
4495 \eatspaces#1 \relax% output to \toks0
4496 \expandafter\edef\csname macarg.\the\toks0\endcsname
4497 {\ignorespaces \hash\the\paramno}%
4498 \edef\paramlist{\paramlist\hash\the\paramno,}%
4499 \fi\next}
4500 \def\eatspaces#1 #2\relax{\def\temp{#1}%
4501 \ifx\temp\empty \let\nexteat\eatspaces
4502 \else \toks0={#1}\let\nexteat\eatspacesx \fi
4503 \nexteat#2 \relax}
4504 \def\eatspacesx#1 \relax{}
4506 % These two commands read recursive and nonrecursive macro bodies.
4507 % (They're different since rec and nonrec macros end differently.)
4509 \long\def\parsemacbody#1^^J@end macro^^J%
4510 {\xdef\temp{#1}\endgroup\defmacro}%
4511 \long\def\parsermacbody#1^^J@end rmacro^^J%
4512 {\xdef\temp{#1}\endgroup\defmacro}%
4514 % This defines the macro itself. There are six cases: recursive and
4515 % nonrecursive macros of zero, one, and many arguments.
4516 % Much magic with \expandafter here.
4517 \def\defmacro{%
4518 \let\hash=##% convert placeholders to macro parameter chars
4519 \ifrecursive
4520 \ifcase\paramno
4522 \expandafter\edef\csname\the\macname\endcsname{%
4523 \noexpand\scantokens{\temp}}%
4524 \or % 1
4525 \expandafter\edef\csname\the\macname\endcsname{%
4526 \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4527 \expandafter\edef\csname\the\macname xxx\endcsname##1{%
4528 \noexpand\scantokens{\temp}}%
4529 \else % many
4530 \expandafter\edef\csname\the\macname\endcsname##1{%
4531 \csname\the\macname xxx\endcsname ##1,}%
4532 \expandafter\expandafter
4533 \expandafter\edef
4534 \expandafter\expandafter
4535 \csname\the\macname xxx\endcsname
4536 \paramlist{\noexpand\scantokens{\temp}}%
4538 \else
4539 \ifcase\paramno
4541 \expandafter\edef\csname\the\macname\endcsname{%
4542 \noexpand\norecurse{\the\macname}%
4543 \noexpand\scantokens{\temp}\egroup}%
4544 \or % 1
4545 \expandafter\edef\csname\the\macname\endcsname{%
4546 \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4547 \expandafter\edef\csname\the\macname xxx\endcsname##1{%
4548 \noexpand\norecurse{\the\macname}%
4549 \noexpand\scantokens{\temp}\egroup}%
4550 \else % many
4551 \expandafter\edef\csname\the\macname\endcsname##1{%
4552 \csname\the\macname xxx\endcsname ##1,}%
4553 \expandafter\expandafter
4554 \expandafter\edef
4555 \expandafter\expandafter
4556 \csname\the\macname xxx\endcsname
4557 \paramlist{%
4558 \noexpand\norecurse{\the\macname}%
4559 \noexpand\scantokens{\temp}\egroup}%
4561 \fi}
4563 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
4565 % \braceorline decides whether the next nonwhitespace character is a
4566 % {. If so it reads up to the closing }, if not, it reads the whole
4567 % line. Whatever was read is then fed to the next control sequence
4568 % as an argument (by \parsebrace or \parsearg)
4569 \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
4570 \def\braceorlinexxx{%
4571 \ifx\nchar\bgroup\else
4572 \expandafter\parsearg
4573 \fi \next}
4575 \message{cross references,}
4576 \newwrite\auxfile
4578 \newif\ifhavexrefs % True if xref values are known.
4579 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
4581 % @inforef is relatively simple.
4582 \def\inforef #1{\inforefzzz #1,,,,**}
4583 \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
4584 node \samp{\ignorespaces#1{}}}
4586 % @setref{foo} defines a cross-reference point named foo.
4588 \def\setref#1{%
4589 \dosetq{#1-title}{Ytitle}%
4590 \dosetq{#1-pg}{Ypagenumber}%
4591 \dosetq{#1-snt}{Ysectionnumberandtype}}
4593 \def\unnumbsetref#1{%
4594 \dosetq{#1-title}{Ytitle}%
4595 \dosetq{#1-pg}{Ypagenumber}%
4596 \dosetq{#1-snt}{Ynothing}}
4598 \def\appendixsetref#1{%
4599 \dosetq{#1-title}{Ytitle}%
4600 \dosetq{#1-pg}{Ypagenumber}%
4601 \dosetq{#1-snt}{Yappendixletterandtype}}
4603 % \xref, \pxref, and \ref generate cross-references to specified points.
4604 % For \xrefX, #1 is the node name, #2 the name of the Info
4605 % cross-reference, #3 the printed node name, #4 the name of the Info
4606 % file, #5 the name of the printed manual. All but the node name can be
4607 % omitted.
4609 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
4610 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
4611 \def\ref#1{\xrefX[#1,,,,,,,]}
4612 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
4613 \def\printedmanual{\ignorespaces #5}%
4614 \def\printednodename{\ignorespaces #3}%
4615 \setbox1=\hbox{\printedmanual}%
4616 \setbox0=\hbox{\printednodename}%
4617 \ifdim \wd0 = 0pt
4618 % No printed node name was explicitly given.
4619 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
4620 % Use the node name inside the square brackets.
4621 \def\printednodename{\ignorespaces #1}%
4622 \else
4623 % Use the actual chapter/section title appear inside
4624 % the square brackets. Use the real section title if we have it.
4625 \ifdim \wd1>0pt%
4626 % It is in another manual, so we don't have it.
4627 \def\printednodename{\ignorespaces #1}%
4628 \else
4629 \ifhavexrefs
4630 % We know the real title if we have the xref values.
4631 \def\printednodename{\refx{#1-title}{}}%
4632 \else
4633 % Otherwise just copy the Info node name.
4634 \def\printednodename{\ignorespaces #1}%
4635 \fi%
4640 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
4641 % insert empty discretionaries after hyphens, which means that it will
4642 % not find a line break at a hyphen in a node names. Since some manuals
4643 % are best written with fairly long node names, containing hyphens, this
4644 % is a loss. Therefore, we give the text of the node name again, so it
4645 % is as if TeX is seeing it for the first time.
4646 \ifdim \wd1 > 0pt
4647 \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
4648 \else
4649 % _ (for example) has to be the character _ for the purposes of the
4650 % control sequence corresponding to the node, but it has to expand
4651 % into the usual \leavevmode...\vrule stuff for purposes of
4652 % printing. So we \turnoffactive for the \refx-snt, back on for the
4653 % printing, back off for the \refx-pg.
4654 {\normalturnoffactive \refx{#1-snt}{}}%
4655 \space [\printednodename],\space
4656 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
4658 \endgroup}
4660 % \dosetq is the interface for calls from other macros
4662 % Use \normalturnoffactive so that punctuation chars such as underscore
4663 % and backslash work in node names. (\turnoffactive doesn't do \.)
4664 \def\dosetq#1#2{%
4665 {\let\folio=0
4666 \normalturnoffactive
4667 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
4668 \iflinks
4669 \next
4674 % \internalsetq {foo}{page} expands into
4675 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
4676 % When the aux file is read, ' is the escape character
4678 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
4680 % Things to be expanded by \internalsetq
4682 \def\Ypagenumber{\folio}
4684 \def\Ytitle{\thissection}
4686 \def\Ynothing{}
4688 \def\Ysectionnumberandtype{%
4689 \ifnum\secno=0 \putwordChapter\xreftie\the\chapno %
4690 \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %
4691 \else \ifnum \subsubsecno=0 %
4692 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %
4693 \else %
4694 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
4695 \fi \fi \fi }
4697 \def\Yappendixletterandtype{%
4698 \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
4699 \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
4700 \else \ifnum \subsubsecno=0 %
4701 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
4702 \else %
4703 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
4704 \fi \fi \fi }
4706 \gdef\xreftie{'tie}
4708 % Use TeX 3.0's \inputlineno to get the line number, for better error
4709 % messages, but if we're using an old version of TeX, don't do anything.
4711 \ifx\inputlineno\thisisundefined
4712 \let\linenumber = \empty % Non-3.0.
4713 \else
4714 \def\linenumber{\the\inputlineno:\space}
4717 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
4718 % If its value is nonempty, SUFFIX is output afterward.
4720 \def\refx#1#2{%
4721 \expandafter\ifx\csname X#1\endcsname\relax
4722 % If not defined, say something at least.
4723 \angleleft un\-de\-fined\angleright
4724 \iflinks
4725 \ifhavexrefs
4726 \message{\linenumber Undefined cross reference `#1'.}%
4727 \else
4728 \ifwarnedxrefs\else
4729 \global\warnedxrefstrue
4730 \message{Cross reference values unknown; you must run TeX again.}%
4734 \else
4735 % It's defined, so just use it.
4736 \csname X#1\endcsname
4738 #2% Output the suffix in any case.
4741 % This is the macro invoked by entries in the aux file.
4743 \def\xrdef#1{\begingroup
4744 % Reenable \ as an escape while reading the second argument.
4745 \catcode`\\ = 0
4746 \afterassignment\endgroup
4747 \expandafter\gdef\csname X#1\endcsname
4750 % Read the last existing aux file, if any. No error if none exists.
4751 \def\readauxfile{\begingroup
4752 \catcode`\^^@=\other
4753 \catcode`\^^A=\other
4754 \catcode`\^^B=\other
4755 \catcode`\^^C=\other
4756 \catcode`\^^D=\other
4757 \catcode`\^^E=\other
4758 \catcode`\^^F=\other
4759 \catcode`\^^G=\other
4760 \catcode`\^^H=\other
4761 \catcode`\^^K=\other
4762 \catcode`\^^L=\other
4763 \catcode`\^^N=\other
4764 \catcode`\^^P=\other
4765 \catcode`\^^Q=\other
4766 \catcode`\^^R=\other
4767 \catcode`\^^S=\other
4768 \catcode`\^^T=\other
4769 \catcode`\^^U=\other
4770 \catcode`\^^V=\other
4771 \catcode`\^^W=\other
4772 \catcode`\^^X=\other
4773 \catcode`\^^Z=\other
4774 \catcode`\^^[=\other
4775 \catcode`\^^\=\other
4776 \catcode`\^^]=\other
4777 \catcode`\^^^=\other
4778 \catcode`\^^_=\other
4779 \catcode`\@=\other
4780 \catcode`\^=\other
4781 % It was suggested to define this as 7, which would allow ^^e4 etc.
4782 % in xref tags, i.e., node names. But since ^^e4 notation isn't
4783 % supported in the main text, it doesn't seem desirable. Furthermore,
4784 % that is not enough: for node names that actually contain a ^
4785 % character, we would end up writing a line like this: 'xrdef {'hat
4786 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
4787 % argument, and \hat is not an expandable control sequence. It could
4788 % all be worked out, but why? Either we support ^^ or we don't.
4790 % The other change necessary for this was to define \auxhat:
4791 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
4792 % and then to call \auxhat in \setq.
4794 \catcode`\~=\other
4795 \catcode`\[=\other
4796 \catcode`\]=\other
4797 \catcode`\"=\other
4798 \catcode`\_=\other
4799 \catcode`\|=\other
4800 \catcode`\<=\other
4801 \catcode`\>=\other
4802 \catcode`\$=\other
4803 \catcode`\#=\other
4804 \catcode`\&=\other
4805 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
4806 % Make the characters 128-255 be printing characters
4808 \count 1=128
4809 \def\loop{%
4810 \catcode\count 1=\other
4811 \advance\count 1 by 1
4812 \ifnum \count 1<256 \loop \fi
4815 % The aux file uses ' as the escape (for now).
4816 % Turn off \ as an escape so we do not lose on
4817 % entries which were dumped with control sequences in their names.
4818 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
4819 % Reference to such entries still does not work the way one would wish,
4820 % but at least they do not bomb out when the aux file is read in.
4821 \catcode`\{=1
4822 \catcode`\}=2
4823 \catcode`\%=\other
4824 \catcode`\'=0
4825 \catcode`\\=\other
4827 \openin 1 \jobname.aux
4828 \ifeof 1 \else
4829 \closein 1
4830 \input \jobname.aux
4831 \global\havexrefstrue
4832 \global\warnedobstrue
4834 % Open the new aux file. TeX will close it automatically at exit.
4835 \openout\auxfile=\jobname.aux
4836 \endgroup}
4839 % Footnotes.
4841 \newcount \footnoteno
4843 % The trailing space in the following definition for supereject is
4844 % vital for proper filling; pages come out unaligned when you do a
4845 % pagealignmacro call if that space before the closing brace is
4846 % removed. (Generally, numeric constants should always be followed by a
4847 % space to prevent strange expansion errors.)
4848 \def\supereject{\par\penalty -20000\footnoteno =0 }
4850 % @footnotestyle is meaningful for info output only.
4851 \let\footnotestyle=\comment
4853 \let\ptexfootnote=\footnote
4855 {\catcode `\@=11
4857 % Auto-number footnotes. Otherwise like plain.
4858 \gdef\footnote{%
4859 \global\advance\footnoteno by \@ne
4860 \edef\thisfootno{$^{\the\footnoteno}$}%
4862 % In case the footnote comes at the end of a sentence, preserve the
4863 % extra spacing after we do the footnote number.
4864 \let\@sf\empty
4865 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
4867 % Remove inadvertent blank space before typesetting the footnote number.
4868 \unskip
4869 \thisfootno\@sf
4870 \footnotezzz
4873 % Don't bother with the trickery in plain.tex to not require the
4874 % footnote text as a parameter. Our footnotes don't need to be so general.
4876 % Oh yes, they do; otherwise, @ifset and anything else that uses
4877 % \parseargline fail inside footnotes because the tokens are fixed when
4878 % the footnote is read. --karl, 16nov96.
4880 \long\gdef\footnotezzz{\insert\footins\bgroup
4881 % We want to typeset this text as a normal paragraph, even if the
4882 % footnote reference occurs in (for example) a display environment.
4883 % So reset some parameters.
4884 \interlinepenalty\interfootnotelinepenalty
4885 \splittopskip\ht\strutbox % top baseline for broken footnotes
4886 \splitmaxdepth\dp\strutbox
4887 \floatingpenalty\@MM
4888 \leftskip\z@skip
4889 \rightskip\z@skip
4890 \spaceskip\z@skip
4891 \xspaceskip\z@skip
4892 \parindent\defaultparindent
4894 % Hang the footnote text off the number.
4895 \hang
4896 \textindent{\thisfootno}%
4898 % Don't crash into the line above the footnote text. Since this
4899 % expands into a box, it must come within the paragraph, lest it
4900 % provide a place where TeX can split the footnote.
4901 \footstrut
4902 \futurelet\next\fo@t
4904 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
4905 \else\let\next\f@t\fi \next}
4906 \def\f@@t{\bgroup\aftergroup\@foot\let\next}
4907 \def\f@t#1{#1\@foot}
4908 \def\@foot{\strut\egroup}
4910 }%end \catcode `\@=11
4912 % Set the baselineskip to #1, and the lineskip and strut size
4913 % correspondingly. There is no deep meaning behind these magic numbers
4914 % used as factors; they just match (closely enough) what Knuth defined.
4916 \def\lineskipfactor{.08333}
4917 \def\strutheightpercent{.70833}
4918 \def\strutdepthpercent {.29167}
4920 \def\setleading#1{%
4921 \normalbaselineskip = #1\relax
4922 \normallineskip = \lineskipfactor\normalbaselineskip
4923 \normalbaselines
4924 \setbox\strutbox =\hbox{%
4925 \vrule width0pt height\strutheightpercent\baselineskip
4926 depth \strutdepthpercent \baselineskip
4930 % @| inserts a changebar to the left of the current line. It should
4931 % surround any changed text. This approach does *not* work if the
4932 % change spans more than two lines of output. To handle that, we would
4933 % have adopt a much more difficult approach (putting marks into the main
4934 % vertical list for the beginning and end of each change).
4936 \def\|{%
4937 % \vadjust can only be used in horizontal mode.
4938 \leavevmode
4940 % Append this vertical mode material after the current line in the output.
4941 \vadjust{%
4942 % We want to insert a rule with the height and depth of the current
4943 % leading; that is exactly what \strutbox is supposed to record.
4944 \vskip-\baselineskip
4946 % \vadjust-items are inserted at the left edge of the type. So
4947 % the \llap here moves out into the left-hand margin.
4948 \llap{%
4950 % For a thicker or thinner bar, change the `1pt'.
4951 \vrule height\baselineskip width1pt
4953 % This is the space between the bar and the text.
4954 \hskip 12pt
4959 % For a final copy, take out the rectangles
4960 % that mark overfull boxes (in case you have decided
4961 % that the text looks ok even though it passes the margin).
4963 \def\finalout{\overfullrule=0pt}
4965 % @image. We use the macros from epsf.tex to support this.
4966 % If epsf.tex is not installed and @image is used, we complain.
4968 % Check for and read epsf.tex up front. If we read it only at @image
4969 % time, we might be inside a group, and then its definitions would get
4970 % undone and the next image would fail.
4971 \openin 1 = epsf.tex
4972 \ifeof 1 \else
4973 \closein 1
4974 % Do not bother showing banner with post-v2.7 epsf.tex (available in
4975 % doc/epsf.tex until it shows up on ctan).
4976 \def\epsfannounce{\toks0 = }%
4977 \input epsf.tex
4980 \newif\ifwarnednoepsf
4981 \newhelp\noepsfhelp{epsf.tex must be installed for images to
4982 work. It is also included in the Texinfo distribution, or you can get
4983 it from ftp://ftp.tug.org/tex/epsf.tex.}
4985 % Only complain once about lack of epsf.tex.
4986 \def\image#1{%
4987 \ifx\epsfbox\undefined
4988 \ifwarnednoepsf \else
4989 \errhelp = \noepsfhelp
4990 \errmessage{epsf.tex not found, images will be ignored}%
4991 \global\warnednoepsftrue
4993 \else
4994 \imagexxx #1,,,\finish
4998 % Arguments to @image:
4999 % #1 is (mandatory) image filename; we tack on .eps extension.
5000 % #2 is (optional) width, #3 is (optional) height.
5001 % #4 is just the usual extra ignored arg for parsing this stuff.
5002 \def\imagexxx#1,#2,#3,#4\finish{%
5003 % \epsfbox itself resets \epsf?size at each figure.
5004 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
5005 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
5006 % If the image is by itself, center it.
5007 \ifvmode
5008 \centerline{\epsfbox{#1.eps}}%
5009 \else
5010 \epsfbox{#1.eps}%
5015 \message{paper sizes,}
5016 % And other related parameters.
5018 \newdimen\defaultparindent \defaultparindent = 15pt
5020 \chapheadingskip = 15pt plus 4pt minus 2pt
5021 \secheadingskip = 12pt plus 3pt minus 2pt
5022 \subsecheadingskip = 9pt plus 2pt minus 2pt
5024 % Prevent underfull vbox error messages.
5025 \vbadness = 10000
5027 % Following George Bush, just get rid of widows and orphans.
5028 \widowpenalty=10000
5029 \clubpenalty=10000
5031 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
5032 % using an old version of TeX, don't do anything. We want the amount of
5033 % stretch added to depend on the line length, hence the dependence on
5034 % \hsize. This makes it come to about 9pt for the 8.5x11 format. We
5035 % call this whenever the paper size is set.
5037 \def\setemergencystretch{%
5038 \ifx\emergencystretch\thisisundefined
5039 % Allow us to assign to \emergencystretch anyway.
5040 \def\emergencystretch{\dimen0}%
5041 \else
5042 \emergencystretch = \hsize
5043 \divide\emergencystretch by 45
5047 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
5048 % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
5049 % set \parskip and call \setleading for \baselineskip.
5051 \def\internalpagesizes#1#2#3#4#5#6{%
5052 \voffset = #3\relax
5053 \topskip = #6\relax
5054 \splittopskip = \topskip
5056 \vsize = #1\relax
5057 \advance\vsize by \topskip
5058 \outervsize = \vsize
5059 \advance\outervsize by 0.6in
5060 \pageheight = \vsize
5062 \hsize = #2\relax
5063 \outerhsize = \hsize
5064 \advance\outerhsize by 0.5in
5065 \pagewidth = \hsize
5067 \normaloffset = #4\relax
5068 \bindingoffset = #5\relax
5070 \parindent = \defaultparindent
5071 \setemergencystretch
5074 % @letterpaper (the default).
5075 \def\letterpaper{{\globaldefs = 1
5076 \parskip = 3pt plus 2pt minus 1pt
5077 \setleading{13.2pt}%
5079 % If page is nothing but text, make it come out even.
5080 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
5083 % Use @smallbook to reset parameters for 7x9.5 (or so) format.
5084 \def\smallbook{{\globaldefs = 1
5085 \parskip = 2pt plus 1pt
5086 \setleading{12pt}%
5088 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
5090 \lispnarrowing = 0.3in
5091 \tolerance = 700
5092 \hfuzz = 1pt
5093 \contentsrightmargin = 0pt
5094 \deftypemargin = 0pt
5095 \defbodyindent = .5cm
5097 \let\smalldisplay = \smalldisplayx
5098 \let\smallexample = \smalllispx
5099 \let\smallformat = \smallformatx
5100 \let\smalllisp = \smalllispx
5103 % Use @afourpaper to print on European A4 paper.
5104 \def\afourpaper{{\globaldefs = 1
5105 \setleading{12pt}%
5106 \parskip = 3pt plus 2pt minus 1pt
5108 \internalpagesizes{53\baselineskip}{6.5in}{\voffset}{.25in}{\bindingoffset}{44pt}%
5110 \tolerance = 700
5111 \hfuzz = 1pt
5114 % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
5115 % 29mm, hence bottom margin 28mm, nominal side margin 3cm.
5116 \def\afourlatex{{\globaldefs = 1
5117 \setleading{13.6pt}%
5119 \afourpaper
5120 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
5122 \globaldefs = 0
5125 % Use @afourwide to print on European A4 paper in wide format.
5126 \def\afourwide{%
5127 \afourpaper
5128 \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
5130 \globaldefs = 0
5133 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
5134 % Perhaps we should allow setting the margins, \topskip, \parskip,
5135 % and/or leading, also. Or perhaps we should compute them somehow.
5137 \def\pagesizes{\parsearg\pagesizesxxx}
5138 \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
5139 \def\pagesizesyyy#1,#2,#3\finish{{%
5140 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
5141 \globaldefs = 1
5143 \parskip = 3pt plus 2pt minus 1pt
5144 \setleading{13.2pt}%
5146 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
5149 % Set default to letter.
5151 \letterpaper
5153 \message{and turning on texinfo input format.}
5155 % Define macros to output various characters with catcode for normal text.
5156 \catcode`\"=\other
5157 \catcode`\~=\other
5158 \catcode`\^=\other
5159 \catcode`\_=\other
5160 \catcode`\|=\other
5161 \catcode`\<=\other
5162 \catcode`\>=\other
5163 \catcode`\+=\other
5164 \def\normaldoublequote{"}
5165 \def\normaltilde{~}
5166 \def\normalcaret{^}
5167 \def\normalunderscore{_}
5168 \def\normalverticalbar{|}
5169 \def\normalless{<}
5170 \def\normalgreater{>}
5171 \def\normalplus{+}
5173 % This macro is used to make a character print one way in ttfont
5174 % where it can probably just be output, and another way in other fonts,
5175 % where something hairier probably needs to be done.
5177 % #1 is what to print if we are indeed using \tt; #2 is what to print
5178 % otherwise. Since all the Computer Modern typewriter fonts have zero
5179 % interword stretch (and shrink), and it is reasonable to expect all
5180 % typewriter fonts to have this, we can check that font parameter.
5182 \def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
5184 % Turn off all special characters except @
5185 % (and those which the user can use as if they were ordinary).
5186 % Most of these we simply print from the \tt font, but for some, we can
5187 % use math or other variants that look better in normal text.
5189 \catcode`\"=\active
5190 \def\activedoublequote{{\tt\char34}}
5191 \let"=\activedoublequote
5192 \catcode`\~=\active
5193 \def~{{\tt\char126}}
5194 \chardef\hat=`\^
5195 \catcode`\^=\active
5196 \def^{{\tt \hat}}
5198 \catcode`\_=\active
5199 \def_{\ifusingtt\normalunderscore\_}
5200 % Subroutine for the previous macro.
5201 \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
5203 \catcode`\|=\active
5204 \def|{{\tt\char124}}
5205 \chardef \less=`\<
5206 \catcode`\<=\active
5207 \def<{{\tt \less}}
5208 \chardef \gtr=`\>
5209 \catcode`\>=\active
5210 \def>{{\tt \gtr}}
5211 \catcode`\+=\active
5212 \def+{{\tt \char 43}}
5213 %\catcode 27=\active
5214 %\def^^[{$\diamondsuit$}
5216 % Set up an active definition for =, but don't enable it most of the time.
5217 {\catcode`\==\active
5218 \global\def={{\tt \char 61}}}
5220 \catcode`+=\active
5221 \catcode`\_=\active
5223 % If a .fmt file is being used, characters that might appear in a file
5224 % name cannot be active until we have parsed the command line.
5225 % So turn them off again, and have \everyjob (or @setfilename) turn them on.
5226 % \otherifyactive is called near the end of this file.
5227 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
5229 \catcode`\@=0
5231 % \rawbackslashxx output one backslash character in current font
5232 \global\chardef\rawbackslashxx=`\\
5233 %{\catcode`\\=\other
5234 %@gdef@rawbackslashxx{\}}
5236 % \rawbackslash redefines \ as input to do \rawbackslashxx.
5237 {\catcode`\\=\active
5238 @gdef@rawbackslash{@let\=@rawbackslashxx }}
5240 % \normalbackslash outputs one backslash in fixed width font.
5241 \def\normalbackslash{{\tt\rawbackslashxx}}
5243 % Say @foo, not \foo, in error messages.
5244 \escapechar=`\@
5246 % \catcode 17=0 % Define control-q
5247 \catcode`\\=\active
5249 % Used sometimes to turn off (effectively) the active characters
5250 % even after parsing them.
5251 @def@turnoffactive{@let"=@normaldoublequote
5252 @let\=@realbackslash
5253 @let~=@normaltilde
5254 @let^=@normalcaret
5255 @let_=@normalunderscore
5256 @let|=@normalverticalbar
5257 @let<=@normalless
5258 @let>=@normalgreater
5259 @let+=@normalplus}
5261 @def@normalturnoffactive{@let"=@normaldoublequote
5262 @let\=@normalbackslash
5263 @let~=@normaltilde
5264 @let^=@normalcaret
5265 @let_=@normalunderscore
5266 @let|=@normalverticalbar
5267 @let<=@normalless
5268 @let>=@normalgreater
5269 @let+=@normalplus}
5271 % Make _ and + \other characters, temporarily.
5272 % This is canceled by @fixbackslash.
5273 @otherifyactive
5275 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
5276 % That is what \eatinput is for; after that, the `\' should revert to printing
5277 % a backslash.
5279 @gdef@eatinput input texinfo{@fixbackslash}
5280 @global@let\ = @eatinput
5282 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
5283 % the first `\{ in the file would cause an error. This macro tries to fix
5284 % that, assuming it is called before the first `\' could plausibly occur.
5285 % Also back turn on active characters that might appear in the input
5286 % file name, in case not using a pre-dumped format.
5288 @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
5289 @catcode`+=@active @catcode`@_=@active}
5291 % These look ok in all fonts, so just make them not special. The @rm below
5292 % makes sure that the current font starts out as the newly loaded cmr10
5293 @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
5295 @textfonts
5298 @c Local variables:
5299 @c page-delimiter: "^\\\\message"
5300 @c End: