/[emacs]/emacs/lispintro/texinfo.tex
ViewVC logotype

Diff of /emacs/lispintro/texinfo.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by lektu, Tue Feb 4 14:44:45 2003 UTC revision 1.4 by bob, Wed Jul 16 19:00:28 2003 UTC
# Line 3  Line 3 
3  % Load plain if necessary, i.e., if running under initex.  % Load plain if necessary, i.e., if running under initex.
4  \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi  \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5  %  %
6  \def\texinfoversion{2002-06-07.15}  \def\texinfoversion{2003-07-16.18}
7  %  %
8  % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,  % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9  %               2000, 01, 02 Free Software Foundation, Inc.  % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10  %  %
11  % This texinfo.tex file is free software; you can redistribute it and/or  % This texinfo.tex file is free software; you can redistribute it and/or
12  % modify it under the terms of the GNU General Public License as  % modify it under the terms of the GNU General Public License as
# Line 29  Line 29 
29  %  %
30  % Please try the latest version of texinfo.tex before submitting bug  % Please try the latest version of texinfo.tex before submitting bug
31  % reports; you can get the latest version from:  % reports; you can get the latest version from:
32  %   ftp://ftp.gnu.org/gnu/texinfo.tex  %   ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex
33  %     (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)  %     (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
 %   ftp://texinfo.org/texinfo/texinfo.tex  
34  %   ftp://tug.org/tex/texinfo.tex  %   ftp://tug.org/tex/texinfo.tex
35  %     (and all CTAN mirrors, see http://www.ctan.org),  %     (and all CTAN mirrors, see http://www.ctan.org),
36  %   and /home/gd/gnu/doc/texinfo.tex on the GNU machines.  %   and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
37  %  %
38    % The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
39    %
40  % The texinfo.tex in any given Texinfo distribution could well be out  % The texinfo.tex in any given Texinfo distribution could well be out
41  % of date, so if that's what you're using, please check.  % of date, so if that's what you're using, please check.
42  %  %
 % Texinfo has a small home page at http://texinfo.org/ and also  
 % http://www.gnu.org/software/texinfo.  
 %  
43  % Send bug reports to bug-texinfo@gnu.org.  Please include including a  % Send bug reports to bug-texinfo@gnu.org.  Please include including a
44  % complete document in each bug report with which we can reproduce the  % complete document in each bug report with which we can reproduce the
45  % problem.  Patches are, of course, greatly appreciated.  % problem.  Patches are, of course, greatly appreciated.
# Line 58  Line 56 
56  % Sometimes one run after texindex suffices, and sometimes you need more  % Sometimes one run after texindex suffices, and sometimes you need more
57  % than two; texi2dvi does it as many times as necessary.  % than two; texi2dvi does it as many times as necessary.
58  %  %
59  % It is possible to adapt texinfo.tex for other languages.  You can get  % It is possible to adapt texinfo.tex for other languages, to some
60  % the existing language-specific files from the full Texinfo distribution.  % extent.  You can get the existing language-specific files from the
61    % full Texinfo distribution.
62    
63  \message{Loading texinfo [version \texinfoversion]:}  \message{Loading texinfo [version \texinfoversion]:}
64    
# Line 69  Line 68 
68  \everyjob{\message{[Texinfo version \texinfoversion]}%  \everyjob{\message{[Texinfo version \texinfoversion]}%
69    \catcode`+=\active \catcode`\_=\active}    \catcode`+=\active \catcode`\_=\active}
70    
71  % Save some parts of plain tex whose names we will redefine.  \message{Basics,}
72    \chardef\other=12
73    
74    % We never want plain's \outer definition of \+ in Texinfo.
75    % For @tex, we can use \tabalign.
76    \let\+ = \relax
77    
78    % Save some plain tex macros whose names we will redefine.
79  \let\ptexb=\b  \let\ptexb=\b
80  \let\ptexbullet=\bullet  \let\ptexbullet=\bullet
81  \let\ptexc=\c  \let\ptexc=\c
# Line 79  Line 85 
85  \let\ptexend=\end  \let\ptexend=\end
86  \let\ptexequiv=\equiv  \let\ptexequiv=\equiv
87  \let\ptexexclam=\!  \let\ptexexclam=\!
88    \let\ptexgtr=>
89    \let\ptexhat=^
90  \let\ptexi=\i  \let\ptexi=\i
91    \let\ptexindent=\indent
92  \let\ptexlbrace=\{  \let\ptexlbrace=\{
93    \let\ptexless=<
94    \let\ptexplus=+
95  \let\ptexrbrace=\}  \let\ptexrbrace=\}
96    \let\ptexslash=\/
97  \let\ptexstar=\*  \let\ptexstar=\*
98  \let\ptext=\t  \let\ptext=\t
99    
 % We never want plain's outer \+ definition in Texinfo.  
 % For @tex, we can use \tabalign.  
 \let\+ = \relax  
   
 \message{Basics,}  
 \chardef\other=12  
   
100  % If this character appears in an error message or help string, it  % If this character appears in an error message or help string, it
101  % starts a new line in the output.  % starts a new line in the output.
102  \newlinechar = `^^J  \newlinechar = `^^J
# Line 138  Line 143 
143  \ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi  \ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi
144  \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi  \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi
145    
146    % In some macros, we cannot use the `\? notation---the left quote is
147    % in some cases the escape char.
148    \chardef\colonChar = `\:
149    \chardef\commaChar = `\,
150    \chardef\dotChar   = `\.
151    \chardef\equalChar = `\=
152    \chardef\exclamChar= `\!
153    \chardef\questChar = `\?
154    \chardef\semiChar  = `\;
155    \chardef\spaceChar = `\ %
156    \chardef\underChar = `\_
157    
158  % Ignore a token.  % Ignore a token.
159  %  %
160  \def\gobble#1{}  \def\gobble#1{}
161    
162    % True if #1 is the empty string, i.e., called like `\ifempty{}'.
163    %
164    \def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}%
165    \def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}%
166    
167    % Hyphenation fixes.
168  \hyphenation{ap-pen-dix}  \hyphenation{ap-pen-dix}
 \hyphenation{mini-buf-fer mini-buf-fers}  
169  \hyphenation{eshell}  \hyphenation{eshell}
170    \hyphenation{mini-buf-fer mini-buf-fers}
171    \hyphenation{time-stamp}
172  \hyphenation{white-space}  \hyphenation{white-space}
173    
174  % Margin to add to right of even pages, to left of odd pages.  % Margin to add to right of even pages, to left of odd pages.
175  \newdimen \bindingoffset  \newdimen\bindingoffset
176  \newdimen \normaloffset  \newdimen\normaloffset
177  \newdimen\pagewidth \newdimen\pageheight  \newdimen\pagewidth \newdimen\pageheight
178    
179  % Sometimes it is convenient to have everything in the transcript file  % Sometimes it is convenient to have everything in the transcript file
180  % and nothing on the terminal.  We don't just call \tracingall here,  % and nothing on the terminal.  We don't just call \tracingall here,
181  % since that produces some useless output on the terminal.  % since that produces some useless output on the terminal.  We also make
182    % some effort to order the tracing commands to reduce output in the log
183    % file; cf. trace.sty in LaTeX.
184  %  %
185  \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%  \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
186  \ifx\eTeXversion\undefined  \def\loggingall{%
187  \def\loggingall{\tracingcommands2 \tracingstats2    \tracingstats2
188     \tracingpages1 \tracingoutput1 \tracinglostchars1    \tracingpages1
189     \tracingmacros2 \tracingparagraphs1 \tracingrestores1    \tracinglostchars2  % 2 gives us more in etex
190     \showboxbreadth\maxdimen\showboxdepth\maxdimen    \tracingparagraphs1
191  }%    \tracingoutput1
192  \else    \tracingmacros2
193  \def\loggingall{\tracingcommands3 \tracingstats2    \tracingrestores1
194     \tracingpages1 \tracingoutput1 \tracinglostchars1    \showboxbreadth\maxdimen \showboxdepth\maxdimen
195     \tracingmacros2 \tracingparagraphs1 \tracingrestores1    \ifx\eTeXversion\undefined\else % etex gives us more logging
196     \tracingscantokens1 \tracingassigns1 \tracingifs1      \tracingscantokens1
197     \tracinggroups1 \tracingnesting2      \tracingifs1
198     \showboxbreadth\maxdimen\showboxdepth\maxdimen      \tracinggroups1
199        \tracingnesting2
200        \tracingassigns1
201      \fi
202      \tracingcommands3  % 3 gives us more in etex
203      \errorcontextlines\maxdimen
204  }%  }%
 \fi  
205    
206  % add check for \lastpenalty to plain's definitions.  If the last thing  % add check for \lastpenalty to plain's definitions.  If the last thing
207  % we did was a \nobreak, we don't want to insert more space.  % we did was a \nobreak, we don't want to insert more space.
# Line 276  Line 306 
306        \egroup % \vbox from first cropmarks clause        \egroup % \vbox from first cropmarks clause
307        \fi        \fi
308      }% end of \shipout\vbox      }% end of \shipout\vbox
309    }% end of group with \turnoffactive    }% end of group with \normalturnoffactive
310    \advancepageno    \advancepageno
311    \ifnum\outputpenalty>-20000 \else\dosupereject\fi    \ifnum\outputpenalty>-20000 \else\dosupereject\fi
312  }  }
# Line 436  Line 466 
466  }  }
467    
468    
 % Single-spacing is done by various environments (specifically, in  
 % \nonfillstart and \quotations).  
 \newskip\singlespaceskip \singlespaceskip = 12.5pt  
 \def\singlespace{%  
   % Why was this kern here?  It messes up equalizing space above and below  
   % environments.  --karl, 6may93  
   %{\advance \baselineskip by -\singlespaceskip  
   %\kern \baselineskip}%  
   \setleading\singlespaceskip  
 }  
   
469  %% Simple single-character @ commands  %% Simple single-character @ commands
470    
471  % @@ prints an @  % @@ prints an @
# Line 466  Line 485 
485  \let\{=\mylbrace  \let\{=\mylbrace
486  \let\}=\myrbrace  \let\}=\myrbrace
487  \begingroup  \begingroup
488    % Definitions to produce actual \{ & \} command in an index.    % Definitions to produce \{ and \} commands for indices,
489    \catcode`\{ = 12 \catcode`\} = 12    % and @{ and @} for the aux file.
490      \catcode`\{ = \other \catcode`\} = \other
491    \catcode`\[ = 1 \catcode`\] = 2    \catcode`\[ = 1 \catcode`\] = 2
492    \catcode`\@ = 0 \catcode`\\ = 12    \catcode`\! = 0 \catcode`\\ = \other
493    @gdef@lbracecmd[\{]%    !gdef!lbracecmd[\{]%
494    @gdef@rbracecmd[\}]%    !gdef!rbracecmd[\}]%
495  @endgroup    !gdef!lbraceatcmd[@{]%
496      !gdef!rbraceatcmd[@}]%
497    !endgroup
498    
499  % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent  % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
500  % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.  % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
501  \let\, = \c  \let\, = \c
502  \let\dotaccent = \.  \let\dotaccent = \.
503  \def\ringaccent#1{{\accent23 #1}}  \def\ringaccent#1{{\accent23 #1}}
# Line 484  Line 506 
506  \let\udotaccent = \d  \let\udotaccent = \d
507    
508  % Other special characters: @questiondown @exclamdown  % Other special characters: @questiondown @exclamdown
509  % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.  % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
510  \def\questiondown{?`}  \def\questiondown{?`}
511  \def\exclamdown{!`}  \def\exclamdown{!`}
512    
# Line 517  Line 539 
539  % @* forces a line break.  % @* forces a line break.
540  \def\*{\hfil\break\hbox{}\ignorespaces}  \def\*{\hfil\break\hbox{}\ignorespaces}
541    
542    % @/ allows a line break.
543    \let\/=\allowbreak
544    
545  % @. is an end-of-sentence period.  % @. is an end-of-sentence period.
546  \def\.{.\spacefactor=3000 }  \def\.{.\spacefactor=3000 }
547    
# Line 539  Line 564 
564  % therefore, no glue is inserted, and the space between the headline and  % therefore, no glue is inserted, and the space between the headline and
565  % the text is small, which looks bad.  % the text is small, which looks bad.
566  %  %
567    % Another complication is that the group might be very large.  This can
568    % cause the glue on the previous page to be unduly stretched, because it
569    % does not have much material.  In this case, it's better to add an
570    % explicit \vfill so that the extra space is at the bottom.  The
571    % threshold for doing this is if the group is more than \vfilllimit
572    % percent of a page (\vfilllimit can be changed inside of @tex).
573    %
574    \newbox\groupbox
575    \def\vfilllimit{0.7}
576    %
577  \def\group{\begingroup  \def\group{\begingroup
578    \ifnum\catcode13=\active \else    \ifnum\catcode13=\active \else
579      \errhelp = \groupinvalidhelp      \errhelp = \groupinvalidhelp
# Line 552  Line 587 
587    % above.  But it's pretty close.    % above.  But it's pretty close.
588    \def\Egroup{%    \def\Egroup{%
589      \egroup           % End the \vtop.      \egroup           % End the \vtop.
590        % \dimen0 is the vertical size of the group's box.
591        \dimen0 = \ht\groupbox  \advance\dimen0 by \dp\groupbox
592        % \dimen2 is how much space is left on the page (more or less).
593        \dimen2 = \pageheight   \advance\dimen2 by -\pagetotal
594        % if the group doesn't fit on the current page, and it's a big big
595        % group, force a page break.
596        \ifdim \dimen0 > \dimen2
597          \ifdim \pagetotal < \vfilllimit\pageheight
598            \page
599          \fi
600        \fi
601        \copy\groupbox
602      \endgroup         % End the \group.      \endgroup         % End the \group.
603    }%    }%
604    %    %
605    \vtop\bgroup    \setbox\groupbox = \vtop\bgroup
606      % We have to put a strut on the last line in case the @group is in      % We have to put a strut on the last line in case the @group is in
607      % the midst of an example, rather than completely enclosing it.      % the midst of an example, rather than completely enclosing it.
608      % Otherwise, the interline space between the last line of the group      % Otherwise, the interline space between the last line of the group
# Line 680  where each line of input produces a line Line 727  where each line of input produces a line
727    \spacefactor=3000    \spacefactor=3000
728  }  }
729    
730    % @page forces the start of a new page.
 % @page    forces the start of a new page  
731  %  %
732  \def\page{\par\vfill\supereject}  \def\page{\par\vfill\supereject}
733    
# Line 753  where each line of input produces a line Line 799  where each line of input produces a line
799  % @include file    insert text of that file as input.  % @include file    insert text of that file as input.
800  % Allow normal characters that  we make active in the argument (a file name).  % Allow normal characters that  we make active in the argument (a file name).
801  \def\include{\begingroup  \def\include{\begingroup
802    \catcode`\\=12    \catcode`\\=\other
803    \catcode`~=12    \catcode`~=\other
804    \catcode`^=12    \catcode`^=\other
805    \catcode`_=12    \catcode`_=\other
806    \catcode`|=12    \catcode`|=\other
807    \catcode`<=12    \catcode`<=\other
808    \catcode`>=12    \catcode`>=\other
809    \catcode`+=12    \catcode`+=\other
810    \parsearg\includezzz}    \parsearg\includezzz}
811  % Restore active chars for included file.  % Restore active chars for included file.
812  \def\includezzz#1{\endgroup\begingroup  \def\includezzz#1{\endgroup\begingroup
813    % Read the included file in a group so nested @include's work.    % Read the included file in a group so nested @include's work.
814    \def\thisfile{#1}%    \def\thisfile{#1}%
815      \let\value=\expandablevalue
816    \input\thisfile    \input\thisfile
817  \endgroup}  \endgroup}
818    
819  \def\thisfile{}  \def\thisfile{}
820    
821  % @center line   outputs that line, centered  % @center line
822    % outputs that line, centered.
823  \def\center{\parsearg\centerzzz}  %
824  \def\centerzzz #1{{\advance\hsize by -\leftskip  \def\center{\parsearg\docenter}
825  \advance\hsize by -\rightskip  \def\docenter#1{{%
826  \centerline{#1}}}    \ifhmode \hfil\break \fi
827      \advance\hsize by -\leftskip
828      \advance\hsize by -\rightskip
829      \line{\hfil \ignorespaces#1\unskip \hfil}%
830      \ifhmode \break \fi
831    }}
832    
833  % @sp n   outputs n lines of vertical space  % @sp n   outputs n lines of vertical space
834    
# Line 796  where each line of input produces a line Line 848  where each line of input produces a line
848    
849  % @paragraphindent NCHARS  % @paragraphindent NCHARS
850  % We'll use ems for NCHARS, close enough.  % We'll use ems for NCHARS, close enough.
851  % We cannot implement @paragraphindent asis, though.  % NCHARS can also be the word `asis' or `none'.
852    % We cannot feasibly implement @paragraphindent asis, though.
853  %  %
854  \def\asisword{asis} % no translation, these are keywords  \def\asisword{asis} % no translation, these are keywords
855  \def\noneword{none}  \def\noneword{none}
# Line 832  where each line of input produces a line Line 885  where each line of input produces a line
885    \fi    \fi
886  }  }
887    
888    % @firstparagraphindent WORD
889    % If WORD is `none', then suppress indentation of the first paragraph
890    % after a section heading.  If WORD is `insert', then do indentat such
891    % paragraphs.
892    %
893    % The paragraph indentation is suppressed or not by calling
894    % \suppressfirstparagraphindent, which the sectioning commands do.  We
895    % switch the definition of this back and forth according to WORD.  By
896    % default, we suppress indentation.
897    %
898    \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
899    \newdimen\currentparindent
900    %
901    \def\insertword{insert}
902    %
903    \def\firstparagraphindent{\parsearg\dofirstparagraphindent}
904    \def\dofirstparagraphindent#1{%
905      \def\temp{#1}%
906      \ifx\temp\noneword
907        \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
908      \else\ifx\temp\insertword
909        \let\suppressfirstparagraphindent = \relax
910      \else
911        \errhelp = \EMsimple
912        \errmessage{Unknown @firstparagraphindent option `\temp'}%
913      \fi\fi
914    }
915    
916    % Here is how we actually suppress indentation.  Redefine \everypar to
917    % \kern backwards by \parindent, and then reset itself to empty.
918    %
919    % We also make \indent itself not actually do anything until the next
920    % paragraph.
921    %
922    \gdef\dosuppressfirstparagraphindent{%
923      \gdef\indent{%
924        \global\let\indent=\ptexindent
925        \global\everypar = {}%
926      }%
927      \global\everypar = {%
928        \kern-\parindent
929        \global\let\indent=\ptexindent
930        \global\everypar = {}%
931      }%
932    }%
933    
934    
935  % @asis just yields its argument.  Used with @table, for example.  % @asis just yields its argument.  Used with @table, for example.
936  %  %
937  \def\asis#1{#1}  \def\asis#1{#1}
# Line 841  where each line of input produces a line Line 941  where each line of input produces a line
941  % to set catcodes according to plain TeX first, to allow for subscripts,  % to set catcodes according to plain TeX first, to allow for subscripts,
942  % superscripts, special math chars, etc.  % superscripts, special math chars, etc.
943  %  %
 % @math does not do math typesetting in section titles, index  
 % entries, and other such contexts where the catcodes are set before  
 % @math gets a chance to work.  This could perhaps be fixed, but for now  
 % at least we can have real math in the main text, where it's needed most.  
 %  
944  \let\implicitmath = $%$ font-lock fix  \let\implicitmath = $%$ font-lock fix
945  %  %
946  % One complication: _ usually means subscripts, but it could also mean  % One complication: _ usually means subscripts, but it could also mean
# Line 853  where each line of input produces a line Line 948  where each line of input produces a line
948  % _ within @math be active (mathcode "8000), and distinguish by seeing  % _ within @math be active (mathcode "8000), and distinguish by seeing
949  % if the current family is \slfam, which is what @var uses.  % if the current family is \slfam, which is what @var uses.
950  %  %
951  {\catcode95 = \active  % 95 = _  {\catcode\underChar = \active
952  \gdef\mathunderscore{%  \gdef\mathunderscore{%
953    \catcode95=\active    \catcode\underChar=\active
954    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
955  }}  }}
956  %  %
# Line 871  where each line of input produces a line Line 966  where each line of input produces a line
966    \tex    \tex
967    \mathcode`\_="8000 \mathunderscore    \mathcode`\_="8000 \mathunderscore
968    \let\\ = \mathbackslash    \let\\ = \mathbackslash
969      \mathactive
970    \implicitmath\finishmath}    \implicitmath\finishmath}
971  \def\finishmath#1{#1\implicitmath\Etex}  \def\finishmath#1{#1\implicitmath\Etex}
972    
973    % Some active characters (such as <) are spaced differently in math.
974    % We have to reset their definitions in case the @math was an
975    % argument to a command which set the catcodes (such as @item or @section).
976    %
977    {
978      \catcode`^ = \active
979      \catcode`< = \active
980      \catcode`> = \active
981      \catcode`+ = \active
982      \gdef\mathactive{%
983        \let^ = \ptexhat
984        \let< = \ptexless
985        \let> = \ptexgtr
986        \let+ = \ptexplus
987      }
988    }
989    
990  % @bullet and @minus need the same treatment as @math, just above.  % @bullet and @minus need the same treatment as @math, just above.
991  \def\bullet{\implicitmath\ptexbullet\implicitmath}  \def\bullet{\implicitmath\ptexbullet\implicitmath}
992  \def\minus{\implicitmath-\implicitmath}  \def\minus{\implicitmath-\implicitmath}
# Line 965  where each line of input produces a line Line 1078  where each line of input produces a line
1078        \ifx\empty\imagewidth\else width \imagewidth \fi        \ifx\empty\imagewidth\else width \imagewidth \fi
1079        \ifx\empty\imageheight\else height \imageheight \fi        \ifx\empty\imageheight\else height \imageheight \fi
1080        \ifnum\pdftexversion<13        \ifnum\pdftexversion<13
1081           #1.pdf%           #1.pdf%
1082         \else         \else
1083           {#1.pdf}%           {#1.pdf}%
1084         \fi         \fi
# Line 987  where each line of input produces a line Line 1100  where each line of input produces a line
1100      \openin 1 \jobname.toc      \openin 1 \jobname.toc
1101      \ifeof 1\else\begingroup      \ifeof 1\else\begingroup
1102        \closein 1        \closein 1
       \indexnofonts  
       \def\tt{}  
       \let\_ = \normalunderscore  
1103        % Thanh's hack / proper braces in bookmarks        % Thanh's hack / proper braces in bookmarks
1104        \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace        \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
1105        \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace        \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
1106        %        %
1107        \def\chapentry ##1##2##3{}        \def\chapentry ##1##2##3{}
       \let\appendixentry = \chapentry  
       \def\unnumbchapentry ##1##2{}  
1108        \def\secentry ##1##2##3##4{\advancenumber{chap##2}}        \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
       \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}  
1109        \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}        \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
       \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}  
1110        \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}        \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
1111        \def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}        \let\appendixentry = \chapentry
1112          \let\unnumbchapentry = \chapentry
1113          \let\unnumbsecentry = \secentry
1114          \let\unnumbsubsecentry = \subsecentry
1115          \let\unnumbsubsubsecentry = \subsubsecentry
1116        \input \jobname.toc        \input \jobname.toc
1117        \def\chapentry ##1##2##3{%        \def\chapentry ##1##2##3{%
1118          \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}          \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
       \let\appendixentry = \chapentry  
       \def\unnumbchapentry ##1##2{%  
         \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}  
1119        \def\secentry ##1##2##3##4{%        \def\secentry ##1##2##3##4{%
1120          \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}          \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
       \def\unnumbsecentry ##1##2##3{%  
         \pdfoutline goto name{\pdfmkpgn{##3}}{##1}}  
1121        \def\subsecentry ##1##2##3##4##5{%        \def\subsecentry ##1##2##3##4##5{%
1122          \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}          \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
       \def\unnumbsubsecentry ##1##2##3##4{%  
         \pdfoutline goto name{\pdfmkpgn{##4}}{##1}}  
1123        \def\subsubsecentry ##1##2##3##4##5##6{%        \def\subsubsecentry ##1##2##3##4##5##6{%
1124          \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}          \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
1125        \def\unnumbsubsubsecentry ##1##2##3##4##5{%        \let\appendixentry = \chapentry
1126          \pdfoutline goto name{\pdfmkpgn{##5}}{##1}}        \let\unnumbchapentry = \chapentry
1127          \let\unnumbsecentry = \secentry
1128          \let\unnumbsubsecentry = \subsecentry
1129          \let\unnumbsubsubsecentry = \subsubsecentry
1130          %
1131          % Make special characters normal for writing to the pdf file.
1132          %
1133          \indexnofonts
1134          \let\tt=\relax
1135          \turnoffactive
1136        \input \jobname.toc        \input \jobname.toc
1137      \endgroup\fi      \endgroup\fi
1138    }}    }}
# Line 1170  where each line of input produces a line Line 1282  where each line of input produces a line
1282  \newcount\mainmagstep  \newcount\mainmagstep
1283  \ifx\bigger\relax  \ifx\bigger\relax
1284    % not really supported.    % not really supported.
1285    \let\mainmagstep=\magstep1    \mainmagstep=\magstep1
1286    \setfont\textrm\rmshape{12}{1000}    \setfont\textrm\rmshape{12}{1000}
1287    \setfont\texttt\ttshape{12}{1000}    \setfont\texttt\ttshape{12}{1000}
1288  \else  \else
1289  %  \mainmagstep=\magstephalf    \mainmagstep=\magstephalf
   \mainmagstep=\magstep1  
1290    \setfont\textrm\rmshape{10}{\mainmagstep}    \setfont\textrm\rmshape{10}{\mainmagstep}
1291    \setfont\texttt\ttshape{10}{\mainmagstep}    \setfont\texttt\ttshape{10}{\mainmagstep}
1292  \fi  \fi
1293  % Instead of cmb10, you many want to use cmbx10.  % Instead of cmb10, you may want to use cmbx10.
1294  % cmbx10 is a prettier font on its own, but cmb10  % cmbx10 is a prettier font on its own, but cmb10
1295  % looks better when embedded in a line with cmr10.  % looks better when embedded in a line with cmr10
1296    % (in Bob's opinion).
1297  \setfont\textbf\bfshape{10}{\mainmagstep}  \setfont\textbf\bfshape{10}{\mainmagstep}
1298  \setfont\textit\itshape{10}{\mainmagstep}  \setfont\textit\itshape{10}{\mainmagstep}
1299  \setfont\textsl\slshape{10}{\mainmagstep}  \setfont\textsl\slshape{10}{\mainmagstep}
# Line 1232  where each line of input produces a line Line 1344  where each line of input produces a line
1344  \font\titlei=cmmi12 scaled \magstep3  \font\titlei=cmmi12 scaled \magstep3
1345  \font\titlesy=cmsy10 scaled \magstep4  \font\titlesy=cmsy10 scaled \magstep4
1346  \def\authorrm{\secrm}  \def\authorrm{\secrm}
1347    \def\authortt{\sectt}
1348    
1349  % Chapter (and unnumbered) fonts (17.28pt).  % Chapter (and unnumbered) fonts (17.28pt).
1350  \setfont\chaprm\rmbshape{12}{\magstep2}  \setfont\chaprm\rmbshape{12}{\magstep2}
# Line 1329  where each line of input produces a line Line 1442  where each line of input produces a line
1442    \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy    \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
1443    \let\tenttsl=\smallerttsl    \let\tenttsl=\smallerttsl
1444    \resetmathfonts \setleading{9.5pt}}    \resetmathfonts \setleading{9.5pt}}
1445  \let\smallexamplefonts = \smallerfonts  
1446    % Set the fonts to use with the @small... environments.
1447    \let\smallexamplefonts = \smallfonts
1448    
1449    % About \smallexamplefonts.  If we use \smallfonts (9pt), @smallexample
1450    % can fit this many characters:
1451    %   8.5x11=86   smallbook=72  a4=90  a5=69
1452    % If we use \smallerfonts (8pt), then we can fit this many characters:
1453    %   8.5x11=90+  smallbook=80  a4=90+  a5=77
1454    % For me, subjectively, the few extra characters that fit aren't worth
1455    % the additional smallness of 8pt.  So I'm making the default 9pt.
1456    %
1457    % By the way, for comparison, here's what fits with @example (10pt):
1458    %   8.5x11=71  smallbook=60  a4=75  a5=58
1459    %
1460    % I wish we used A4 paper on this side of the Atlantic.
1461    %
1462    % --karl, 24jan03.
1463    
1464    
1465  % Set up the default fonts, so we can use them for creating boxes.  % Set up the default fonts, so we can use them for creating boxes.
1466  %  %
# Line 1346  where each line of input produces a line Line 1477  where each line of input produces a line
1477  \setfont\shortcontrm\rmshape{12}{1000}  \setfont\shortcontrm\rmshape{12}{1000}
1478  \setfont\shortcontbf\bxshape{12}{1000}  \setfont\shortcontbf\bxshape{12}{1000}
1479  \setfont\shortcontsl\slshape{12}{1000}  \setfont\shortcontsl\slshape{12}{1000}
1480    \setfont\shortconttt\ttshape{12}{1000}
1481    
1482  %% Add scribe-like font environments, plus @l for inline lisp (usually sans  %% Add scribe-like font environments, plus @l for inline lisp (usually sans
1483  %% serif) and @ii for TeX italic  %% serif) and @ii for TeX italic
1484    
1485  % \smartitalic{ARG} outputs arg in italics, followed by an italic correction  % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1486  % unless the following character is such as not to need one.  % unless the following character is such as not to need one.
1487  \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}  \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
1488  \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}                      \ptexslash\fi\fi\fi}
1489  \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}  \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
1490    \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
1491    
1492  \let\i=\smartitalic  \let\i=\smartitalic
1493  \let\var=\smartslanted  \let\var=\smartslanted
# Line 1372  where each line of input produces a line Line 1505  where each line of input produces a line
1505  \def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}  \def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
1506  \def\restorehyphenation{\hyphenchar\font = `- }  \def\restorehyphenation{\hyphenchar\font = `- }
1507    
1508    % Set sfcode to normal for the chars that usually have another value.
1509    % Can't use plain's \frenchspacing because it uses the `\x notation, and
1510    % sometimes \x has an active definition that messes things up.
1511    %
1512    \catcode`@=11
1513      \def\frenchspacing{%
1514        \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
1515        \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
1516      }
1517    \catcode`@=\other
1518    
1519  \def\t#1{%  \def\t#1{%
1520    {\tt \rawbackslash \frenchspacing #1}%    {\tt \rawbackslash \frenchspacing #1}%
1521    \null    \null
# Line 1471  where each line of input produces a line Line 1615  where each line of input produces a line
1615      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1616    \else\ifx\arg\wordcode    \else\ifx\arg\wordcode
1617      \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%      \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1618      \else
1619        \errhelp = \EMsimple
1620        \errmessage{Unknown @kbdinputstyle option `\arg'}%
1621    \fi\fi\fi    \fi\fi\fi
1622  }  }
1623  \def\worddistinct{distinct}  \def\worddistinct{distinct}
1624  \def\wordexample{example}  \def\wordexample{example}
1625  \def\wordcode{code}  \def\wordcode{code}
1626    
1627  % Default is kbdinputdistinct.  (Too much of a hassle to call the macro,  % Default is `distinct.'
1628  % the catcodes are wrong for parsearg to work.)  \kbdinputstyle distinct
 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}  
1629    
1630  \def\xkey{\key}  \def\xkey{\key}
1631  \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%  \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
# Line 1567  where each line of input produces a line Line 1713  where each line of input produces a line
1713  % @pounds{} is a sterling sign.  % @pounds{} is a sterling sign.
1714  \def\pounds{{\it\$}}  \def\pounds{{\it\$}}
1715    
1716    % @registeredsymbol - R in a circle.  For now, only works in text size;
1717    % we'd have to redo the font mechanism to change the \scriptstyle and
1718    % \scriptscriptstyle font sizes to make it look right in headings.
1719    % Adapted from the plain.tex definition of \copyright.
1720    %
1721    \def\registeredsymbol{%
1722      $^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}%
1723        }$%
1724    }
1725    
1726    
1727  \message{page headings,}  \message{page headings,}
1728    
# Line 1593  where each line of input produces a line Line 1749  where each line of input produces a line
1749     \let\subtitlerm=\tenrm     \let\subtitlerm=\tenrm
1750     \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%     \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1751     %     %
1752     \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%     \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
1753                       \let\tt=\authortt}%
1754     %     %
1755     % Leave some space at the very top of the page.     % Leave some space at the very top of the page.
1756     \vglue\titlepagetopglue     \vglue\titlepagetopglue
# Line 1874  where each line of input produces a line Line 2031  where each line of input produces a line
2031      % \parskip glue -- logically it's part of the @item we just started.      % \parskip glue -- logically it's part of the @item we just started.
2032      \nobreak \vskip-\parskip      \nobreak \vskip-\parskip
2033      %      %
2034      % Stop a page break at the \parskip glue coming up.  Unfortunately      % Stop a page break at the \parskip glue coming up.  (Unfortunately
2035      % we can't prevent a possible page break at the following      % we can't prevent a possible page break at the following
2036      % \baselineskip glue.      % \baselineskip glue.)  However, if what follows is an environment
2037      \nobreak      % such as @example, there will be no \parskip glue; then
2038        % the negative vskip we just would cause the example and the item to
2039        % crash together.  So we use this bizarre value of 10001 as a signal
2040        % to \aboveenvbreak to insert \parskip glue after all.
2041        % (Possibly there are other commands that could be followed by
2042        % @example which need the same treatment, but not section titles; or
2043        % maybe section titles are the only special case and they should be
2044        % penalty 10001...)
2045        \penalty 10001
2046      \endgroup      \endgroup
2047      \itemxneedsnegativevskipfalse      \itemxneedsnegativevskipfalse
2048    \else    \else
# Line 1970  where each line of input produces a line Line 2135  where each line of input produces a line
2135    \itemizey {#1}{\Eitemize}    \itemizey {#1}{\Eitemize}
2136  }  }
2137    
2138  \def\itemizey #1#2{%  \def\itemizey#1#2{%
2139  \aboveenvbreak %    \aboveenvbreak
2140  \itemmax=\itemindent %    \itemmax=\itemindent
2141  \advance \itemmax by -\itemmargin %    \advance\itemmax by -\itemmargin
2142  \advance \leftskip by \itemindent %    \advance\leftskip by \itemindent
2143  \exdentamount=\itemindent    \exdentamount=\itemindent
2144  \parindent = 0pt %    \parindent=0pt
2145  \parskip = \smallskipamount %    \parskip=\smallskipamount
2146  \ifdim \parskip=0pt \parskip=2pt \fi%    \ifdim\parskip=0pt \parskip=2pt \fi
2147  \def#2{\endgraf\afterenvbreak\endgroup}%    \def#2{\endgraf\afterenvbreak\endgroup}%
2148  \def\itemcontents{#1}%    \def\itemcontents{#1}%
2149  \let\item=\itemizeitem}    % @itemize with no arg is equivalent to @itemize @bullet.
2150      \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
2151  % Set sfcode to normal for the chars that usually have another value.    \let\item=\itemizeitem
2152  % These are `.?!:;,'  }
 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000  
   \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }  
2153    
2154  % \splitoff TOKENS\endmark defines \first to be the first token in  % \splitoff TOKENS\endmark defines \first to be the first token in
2155  % TOKENS, and \rest to be the remainder.  % TOKENS, and \rest to be the remainder.
# Line 2209  where each line of input produces a line Line 2372  where each line of input produces a line
2372           \let\go\pickupwholefraction           \let\go\pickupwholefraction
2373        \else        \else
2374           \global\advance\colcount by 1           \global\advance\colcount by 1
2375           \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;           \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
2376                              % typically that is always in the input, anyway.                     % separator; typically that is always in the input, anyway.
2377           \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%           \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
2378        \fi        \fi
2379      \fi      \fi
# Line 2225  where each line of input produces a line Line 2388  where each line of input produces a line
2388    \go    \go
2389  }  }
2390    
 % This used to have \hskip1sp.  But then the space in a template line is  
 % not enough.  That is bad.  So let's go back to just & until we  
 % encounter the problem it was intended to solve again.  
 % --karl, nathan@acm.org, 20apr99.  
 \def\tab{&}  
   
2391  % @multitable ... @end multitable definitions:  % @multitable ... @end multitable definitions:
2392  %  %
2393  \def\multitable{\parsearg\dotable}  \def\multitable{\parsearg\dotable}
2394  \def\dotable#1{\bgroup  \def\dotable#1{\bgroup
2395    \vskip\parskip    \vskip\parskip
2396    \let\item\crcr    \let\item=\crcrwithfootnotes
2397      % A \tab used to include \hskip1sp.  But then the space in a template
2398      % line is not enough.  That is bad.  So let's go back to just & until
2399      % we encounter the problem it was intended to solve again.  --karl,
2400      % nathan@acm.org, 20apr99.
2401      \let\tab=&%
2402      \let\startfootins=\startsavedfootnote
2403    \tolerance=9500    \tolerance=9500
2404    \hbadness=9500    \hbadness=9500
2405    \setmultitablespacing    \setmultitablespacing
# Line 2244  where each line of input produces a line Line 2407  where each line of input produces a line
2407    \parindent=\multitableparindent    \parindent=\multitableparindent
2408    \overfullrule=0pt    \overfullrule=0pt
2409    \global\colcount=0    \global\colcount=0
2410    \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%    \def\Emultitable{%
2411        \global\setpercentfalse
2412        \crcrwithfootnotes\crcr
2413        \egroup\egroup
2414      }%
2415    %    %
2416    % To parse everything between @multitable and @item:    % To parse everything between @multitable and @item:
2417    \setuptable#1 \endsetuptable    \setuptable#1 \endsetuptable
# Line 2333  width0pt\relax} \fi Line 2500  width0pt\relax} \fi
2500                                        %% than skip between lines in the table.                                        %% than skip between lines in the table.
2501  \fi}  \fi}
2502    
2503    % In case a @footnote appears inside an alignment, save the footnote
2504    % text to a box and make the \insert when a row of the table is
2505    % finished.  Otherwise, the insertion is lost, it never migrates to the
2506    % main vertical list.  --kasal, 22jan03.
2507    %
2508    \newbox\savedfootnotes
2509    %
2510    % \dotable \let's \startfootins to this, so that \dofootnote will call
2511    % it instead of starting the insertion right away.
2512    \def\startsavedfootnote{%
2513      \global\setbox\savedfootnotes = \vbox\bgroup
2514        \unvbox\savedfootnotes
2515    }
2516    \def\crcrwithfootnotes{%
2517      \crcr
2518      \ifvoid\savedfootnotes \else
2519        \noalign{\insert\footins{\box\savedfootnotes}}%
2520      \fi
2521    }
2522    
2523  \message{conditionals,}  \message{conditionals,}
2524  % Prevent errors for section commands.  % Prevent errors for section commands.
# Line 2368  width0pt\relax} \fi Line 2554  width0pt\relax} \fi
2554  % and so want to turn off most commands, in case they are used  % and so want to turn off most commands, in case they are used
2555  % incorrectly.  % incorrectly.
2556  %  %
2557    % We use \empty instead of \relax for the @def... commands, so that \end
2558    % doesn't throw an error.  For instance:
2559    % @ignore
2560    % @deffn ...
2561    % @end deffn
2562    % @end ignore
2563    %
2564    % The @end deffn is going to get expanded, because we're trying to allow
2565    % nested conditionals.  But we don't want to expand the actual @deffn,
2566    % since it might be syntactically correct and intended to be ignored.
2567    % Since \end checks for \relax, using \empty does not cause an error.
2568    %
2569  \def\ignoremorecommands{%  \def\ignoremorecommands{%
2570    \let\defcodeindex = \relax    \let\defcodeindex = \relax
2571    \let\defcv = \relax    \let\defcv = \empty
2572    \let\deffn = \relax    \let\defcvx = \empty
2573    \let\deffnx = \relax    \let\Edefcv = \empty
2574      \let\deffn = \empty
2575      \let\deffnx = \empty
2576      \let\Edeffn = \empty
2577    \let\defindex = \relax    \let\defindex = \relax
2578    \let\defivar = \relax    \let\defivar = \empty
2579    \let\defmac = \relax    \let\defivarx = \empty
2580    \let\defmethod = \relax    \let\Edefivar = \empty
2581    \let\defop = \relax    \let\defmac = \empty
2582    \let\defopt = \relax    \let\defmacx = \empty
2583    \let\defspec = \relax    \let\Edefmac = \empty
2584    \let\deftp = \relax    \let\defmethod = \empty
2585    \let\deftypefn = \relax    \let\defmethodx = \empty
2586    \let\deftypefun = \relax    \let\Edefmethod = \empty
2587    \let\deftypeivar = \relax    \let\defop = \empty
2588    \let\deftypeop = \relax    \let\defopx = \empty
2589    \let\deftypevar = \relax    \let\Edefop = \empty
2590    \let\deftypevr = \relax    \let\defopt = \empty
2591    \let\defun = \relax    \let\defoptx = \empty
2592    \let\defvar = \relax    \let\Edefopt = \empty
2593    \let\defvr = \relax    \let\defspec = \empty
2594    \let\ref = \relax    \let\defspecx = \empty
2595    \let\xref = \relax    \let\Edefspec = \empty
2596    \let\printindex = \relax    \let\deftp = \empty
2597    \let\pxref = \relax    \let\deftpx = \empty
2598    \let\settitle = \relax    \let\Edeftp = \empty
2599    \let\setchapternewpage = \relax    \let\deftypefn = \empty
2600    \let\setchapterstyle = \relax    \let\deftypefnx = \empty
2601    \let\everyheading = \relax    \let\Edeftypefn = \empty
2602      \let\deftypefun = \empty
2603      \let\deftypefunx = \empty
2604      \let\Edeftypefun = \empty
2605      \let\deftypeivar = \empty
2606      \let\deftypeivarx = \empty
2607      \let\Edeftypeivar = \empty
2608      \let\deftypemethod = \empty
2609      \let\deftypemethodx = \empty
2610      \let\Edeftypemethod = \empty
2611      \let\deftypeop = \empty
2612      \let\deftypeopx = \empty
2613      \let\Edeftypeop = \empty
2614      \let\deftypevar = \empty
2615      \let\deftypevarx = \empty
2616      \let\Edeftypevar = \empty
2617      \let\deftypevr = \empty
2618      \let\deftypevrx = \empty
2619      \let\Edeftypevr = \empty
2620      \let\defun = \empty
2621      \let\defunx = \empty
2622      \let\Edefun = \empty
2623      \let\defvar = \empty
2624      \let\defvarx = \empty
2625      \let\Edefvar = \empty
2626      \let\defvr = \empty
2627      \let\defvrx = \empty
2628      \let\Edefvr = \empty
2629      \let\clear = \relax
2630      \let\down = \relax
2631      \let\evenfooting = \relax
2632    \let\evenheading = \relax    \let\evenheading = \relax
   \let\oddheading = \relax  
2633    \let\everyfooting = \relax    \let\everyfooting = \relax
2634    \let\evenfooting = \relax    \let\everyheading = \relax
   \let\oddfooting = \relax  
2635    \let\headings = \relax    \let\headings = \relax
2636    \let\include = \relax    \let\include = \relax
2637      \let\item = \relax
2638    \let\lowersections = \relax    \let\lowersections = \relax
2639    \let\down = \relax    \let\oddfooting = \relax
2640      \let\oddheading = \relax
2641      \let\printindex = \relax
2642      \let\pxref = \relax
2643    \let\raisesections = \relax    \let\raisesections = \relax
2644    \let\up = \relax    \let\ref = \relax
2645    \let\set = \relax    \let\set = \relax
2646    \let\clear = \relax    \let\setchapternewpage = \relax
2647    \let\item = \relax    \let\setchapterstyle = \relax
2648      \let\settitle = \relax
2649      \let\up = \relax
2650      \let\verbatiminclude = \relax
2651      \let\xref = \relax
2652  }  }
2653    
2654  % Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu,  % Ignore @ignore, @ifhtml, @ifinfo, and the like.
 % @direntry, and @documentdescription.  
2655  %  %
2656  \def\ignore{\doignore{ignore}}  \def\direntry{\doignore{direntry}}
2657    \def\documentdescriptionword{documentdescription}
2658    \def\documentdescription{\doignore{documentdescription}}
2659    \def\html{\doignore{html}}
2660  \def\ifhtml{\doignore{ifhtml}}  \def\ifhtml{\doignore{ifhtml}}
2661  \def\ifinfo{\doignore{ifinfo}}  \def\ifinfo{\doignore{ifinfo}}
2662    \def\ifnottex{\nestedignore{ifnottex}}
2663  \def\ifplaintext{\doignore{ifplaintext}}  \def\ifplaintext{\doignore{ifplaintext}}
2664  \def\ifnottex{\doignore{ifnottex}}  \def\ifxml{\doignore{ifxml}}
2665  \def\html{\doignore{html}}  \def\ignore{\doignore{ignore}}
2666  \def\menu{\doignore{menu}}  \def\menu{\doignore{menu}}
2667  \def\direntry{\doignore{direntry}}  \def\xml{\doignore{xml}}
 \def\documentdescription{\doignore{documentdescription}}  
 \def\documentdescriptionword{documentdescription}  
2668    
2669  % @dircategory CATEGORY  -- specify a category of the dir file  % @dircategory CATEGORY  -- specify a category of the dir file
2670  % which this file should belong to.  Ignore this in TeX.  % which this file should belong to.  Ignore this in TeX.
# Line 2444  width0pt\relax} \fi Line 2682  width0pt\relax} \fi
2682    \long\def\doignoretext##1@end #1{\enddoignore}%    \long\def\doignoretext##1@end #1{\enddoignore}%
2683    %    %
2684    % Make sure that spaces turn into tokens that match what \doignoretext wants.    % Make sure that spaces turn into tokens that match what \doignoretext wants.
2685    \catcode32 = 10    \catcode\spaceChar = 10
2686    %    %
2687    % Ignore braces, too, so mismatched braces don't cause trouble.    % Ignore braces, too, so mismatched braces don't cause trouble.
2688    \catcode`\{ = 9    \catcode`\{ = 9
# Line 2486  width0pt\relax} \fi Line 2724  width0pt\relax} \fi
2724      \immediate\write16{If you are running another version of TeX, relax.}      \immediate\write16{If you are running another version of TeX, relax.}
2725      \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}      \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
2726      \immediate\write16{  Then upgrade your TeX installation if you can.}      \immediate\write16{  Then upgrade your TeX installation if you can.}
2727      \immediate\write16{  (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}      \immediate\write16{  (See ftp://ftp.gnu.org/non-gnu/TeX.README.)}
2728      \immediate\write16{If you are stuck with version 3.0, run the}      \immediate\write16{If you are stuck with version 3.0, run the}
2729      \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}      \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}
2730      \immediate\write16{  to use a workaround.}      \immediate\write16{  to use a workaround.}
# Line 2508  width0pt\relax} \fi Line 2746  width0pt\relax} \fi
2746    % We must actually expand the ignored text to look for the @end    % We must actually expand the ignored text to look for the @end
2747    % command, so that nested ignore constructs work.  Thus, we put the    % command, so that nested ignore constructs work.  Thus, we put the
2748    % text into a \vbox and then do nothing with the result.  To minimize    % text into a \vbox and then do nothing with the result.  To minimize
2749    % the change of memory overflow, we follow the approach outlined on    % the chance of memory overflow, we follow the approach outlined on
2750    % page 401 of the TeXbook: make the current font be a dummy font.    % page 401 of the TeXbook.
2751    %    %
2752    \setbox0 = \vbox\bgroup    \setbox0 = \vbox\bgroup
2753      % Don't complain about control sequences we have declared \outer.      % Don't complain about control sequences we have declared \outer.
# Line 2530  width0pt\relax} \fi Line 2768  width0pt\relax} \fi
2768      %      %
2769      % Set the current font to be \nullfont, a TeX primitive, and define      % Set the current font to be \nullfont, a TeX primitive, and define
2770      % all the font commands to also use \nullfont.  We don't use      % all the font commands to also use \nullfont.  We don't use
2771      % dummy.tfm, as suggested in the TeXbook, because not all sites      % dummy.tfm, as suggested in the TeXbook, because some sites
2772      % might have that installed.  Therefore, math mode will still      % might not have that installed.  Therefore, math mode will still
2773      % produce output, but that should be an extremely small amount of      % produce output, but that should be an extremely small amount of
2774      % stuff compared to the main input.      % stuff compared to the main input.
2775      %      %
# Line 2560  width0pt\relax} \fi Line 2798  width0pt\relax} \fi
2798      % Do minimal line-breaking.      % Do minimal line-breaking.
2799      \pretolerance = 10000      \pretolerance = 10000
2800      %      %
2801      % Do not execute instructions in @tex      % Do not execute instructions in @tex.
2802      \def\tex{\doignore{tex}}%      \def\tex{\doignore{tex}}%
2803      % Do not execute macro definitions.      % Do not execute macro definitions.
2804      % `c' is a comment character, so the word `macro' will get cut off.      % `c' is a comment character, so the word `macro' will get cut off.
# Line 2605  width0pt\relax} \fi Line 2843  width0pt\relax} \fi
2843    % we're called from @code, as @code{@value{foo-bar_}}.  So \let any    % we're called from @code, as @code{@value{foo-bar_}}.  So \let any
2844    % such active characters to their normal equivalents.    % such active characters to their normal equivalents.
2845    \gdef\value{\begingroup    \gdef\value{\begingroup
2846      \catcode`\-=12 \catcode`\_=12      \catcode`\-=\other \catcode`\_=\other
2847      \indexbreaks \let_\normalunderscore      \indexbreaks \let_\normalunderscore
2848      \valuexxx}      \valuexxx}
2849  }  }
# Line 2614  width0pt\relax} \fi Line 2852  width0pt\relax} \fi
2852  % We have this subroutine so that we can handle at least some @value's  % We have this subroutine so that we can handle at least some @value's
2853  % properly in indexes (we \let\value to this in \indexdummies).  Ones  % properly in indexes (we \let\value to this in \indexdummies).  Ones
2854  % whose names contain - or _ still won't work, but we can't do anything  % whose names contain - or _ still won't work, but we can't do anything
2855  % about that.  The command has to be fully expandable, since the result  % about that.  The command has to be fully expandable (if the variable
2856  % winds up in the index file.  This means that if the variable's value  % is set), since the result winds up in the index file.  This means that
2857  % contains other Texinfo commands, it's almost certain it will fail  % if the variable's value contains other Texinfo commands, it's almost
2858  % (although perhaps we could fix that with sufficient work to do a  % certain it will fail (although perhaps we could fix that with
2859  % one-level expansion on the result, instead of complete).  % sufficient work to do a one-level expansion on the result, instead of
2860    % complete).
2861  %  %
2862  \def\expandablevalue#1{%  \def\expandablevalue#1{%
2863    \expandafter\ifx\csname SET#1\endcsname\relax    \expandafter\ifx\csname SET#1\endcsname\relax
2864      {[No value for ``#1'']}%      {[No value for ``#1'']}%
2865        \message{Variable `#1', used in @value, is not set.}%
2866    \else    \else
2867      \csname SET#1\endcsname      \csname SET#1\endcsname
2868    \fi    \fi
# Line 2631  width0pt\relax} \fi Line 2871  width0pt\relax} \fi
2871  % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined  % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
2872  % with @set.  % with @set.
2873  %  %
2874  \def\ifset{\parsearg\ifsetxxx}  \def\ifset{\parsearg\doifset}
2875  \def\ifsetxxx #1{%  \def\doifset#1{%
2876    \expandafter\ifx\csname SET#1\endcsname\relax    \expandafter\ifx\csname SET#1\endcsname\relax
2877      \expandafter\ifsetfail      \let\next=\ifsetfail
2878    \else    \else
2879      \expandafter\ifsetsucceed      \let\next=\ifsetsucceed
2880    \fi    \fi
2881      \next
2882  }  }
2883  \def\ifsetsucceed{\conditionalsucceed{ifset}}  \def\ifsetsucceed{\conditionalsucceed{ifset}}
2884  \def\ifsetfail{\nestedignore{ifset}}  \def\ifsetfail{\nestedignore{ifset}}
# Line 2646  width0pt\relax} \fi Line 2887  width0pt\relax} \fi
2887  % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been  % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
2888  % defined with @set, or has been undefined with @clear.  % defined with @set, or has been undefined with @clear.
2889  %  %
2890  \def\ifclear{\parsearg\ifclearxxx}  \def\ifclear{\parsearg\doifclear}
2891  \def\ifclearxxx #1{%  \def\doifclear#1{%
2892    \expandafter\ifx\csname SET#1\endcsname\relax    \expandafter\ifx\csname SET#1\endcsname\relax
2893      \expandafter\ifclearsucceed      \let\next=\ifclearsucceed
2894    \else    \else
2895      \expandafter\ifclearfail      \let\next=\ifclearfail
2896    \fi    \fi
2897      \next
2898  }  }
2899  \def\ifclearsucceed{\conditionalsucceed{ifclear}}  \def\ifclearsucceed{\conditionalsucceed{ifclear}}
2900  \def\ifclearfail{\nestedignore{ifclear}}  \def\ifclearfail{\nestedignore{ifclear}}
# Line 2671  width0pt\relax} \fi Line 2913  width0pt\relax} \fi
2913  \defineunmatchedend{ifnotinfo}  \defineunmatchedend{ifnotinfo}
2914  \defineunmatchedend{ifnotplaintext}  \defineunmatchedend{ifnotplaintext}
2915    
2916  % We can't just want to start a group at @iftex (etc.) and end it at  % True conditional.  Since \set globally defines its variables, we can
2917  % @end iftex, since then @set commands inside the conditional have no  % just start and end a group (to keep the @end definition undefined at
2918  % effect (they'd get reverted at the end of the group).  So we must  % the outer level).
 % define \Eiftex to redefine itself to be its previous value.  (We can't  
 % just define it to fail again with an ``unmatched end'' error, since  
 % the @ifset might be nested.)  
 %  
 \def\conditionalsucceed#1{%  
   \edef\temp{%  
     % Remember the current value of \E#1.  
     \let\nece{prevE#1} = \nece{E#1}%  
     %  
     % At the `@end #1', redefine \E#1 to be its previous value.  
     \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%  
   }%  
   \temp  
 }  
   
 % We need to expand lots of \csname's, but we don't want to expand the  
 % control sequences after we've constructed them.  
2919  %  %
2920  \def\nece#1{\expandafter\noexpand\csname#1\endcsname}  \def\conditionalsucceed#1{\begingroup
2921      \expandafter\def\csname E#1\endcsname{\endgroup}%
2922    }
2923    
2924  % @defininfoenclose.  % @defininfoenclose.
2925  \let\definfoenclose=\comment  \let\definfoenclose=\comment
# Line 2785  width0pt\relax} \fi Line 3012  width0pt\relax} \fi
3012  \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}  \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
3013  \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}  \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
3014    
3015  % Take care of texinfo commands likely to appear in an index entry.  % Take care of Texinfo commands that can appear in an index entry.
3016  % (Must be a way to avoid doing expansion at all, and thus not have to  % Since there are some commands we want to expand, and others we don't,
3017  % laboriously list every single command here.)  % we have to laboriously prevent expansion for those that we don't.
3018  %  %
3019  \def\indexdummies{%  \def\indexdummies{%
3020  \def\ { }%    \def\@{@}% change to @@ when we switch to @ as escape char in index files.
3021  \def\@{@}% change to @@ when we switch to @ as escape char in aux files.    \def\ {\realbackslash\space }%
3022  % Need these in case \tex is in effect and \{ is a \delimiter again.    % Need these in case \tex is in effect and \{ is a \delimiter again.
3023  % But can't use \lbracecmd and \rbracecmd because texindex assumes    % But can't use \lbracecmd and \rbracecmd because texindex assumes
3024  % braces and backslashes are used only as delimiters.    % braces and backslashes are used only as delimiters.
3025  \let\{ = \mylbrace    \let\{ = \mylbrace
3026  \let\} = \myrbrace    \let\} = \myrbrace
3027  \def\_{{\realbackslash _}}%    %
3028  \normalturnoffactive    % \definedummyword defines \#1 as \realbackslash #1\space, thus
3029  %    % effectively preventing its expansion.  This is used only for control
3030  % Take care of the plain tex accent commands.    % words, not control letters, because the \space would be incorrect
3031  \def\,##1{\realbackslash ,{##1}}%    % for control characters, but is needed to separate the control word
3032  \def\"{\realbackslash "}%    % from whatever follows.
3033  \def\`{\realbackslash `}%    %
3034  \def\'{\realbackslash '}%    % For control letters, we have \definedummyletter, which omits the
3035  \def\^{\realbackslash ^}%    % space.
3036  \def\~{\realbackslash ~}%    %
3037  \def\={\realbackslash =}%    % These can be used both for control words that take an argument and
3038  \def\b{\realbackslash b}%    % those that do not.  If it is followed by {arg} in the input, then
3039  \def\c{\realbackslash c}%    % that will dutifully get written to the index (or wherever).
3040  \def\d{\realbackslash d}%    %
3041  \def\u{\realbackslash u}%    \def\definedummyword##1{%
3042  \def\v{\realbackslash v}%      \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
3043  \def\H{\realbackslash H}%    }%
3044  \def\dotless##1{\realbackslash dotless {##1}}%    \def\definedummyletter##1{%
3045  % Take care of the plain tex special European modified letters.      \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
3046  \def\AA{\realbackslash AA}%    }%
3047  \def\AE{\realbackslash AE}%    %
3048  \def\L{\realbackslash L}%    % Do the redefinitions.
3049  \def\OE{\realbackslash OE}%    \commondummies
3050  \def\O{\realbackslash O}%  }
3051  \def\aa{\realbackslash aa}%  
3052  \def\ae{\realbackslash ae}%  % For the aux file, @ is the escape character.  So we want to redefine
3053  \def\l{\realbackslash l}%  % everything using @ instead of \realbackslash.  When everything uses
3054  \def\oe{\realbackslash oe}%  % @, this will be simpler.
3055  \def\o{\realbackslash o}%  %
3056  \def\ss{\realbackslash ss}%  \def\atdummies{%
3057  %    \def\@{@@}%
3058  % Although these internals commands shouldn't show up, sometimes they do.    \def\ {@ }%
3059  \def\bf{\realbackslash bf }%    \let\{ = \lbraceatcmd
3060  \def\gtr{\realbackslash gtr}%    \let\} = \rbraceatcmd
3061  \def\hat{\realbackslash hat}%    %
3062  \def\less{\realbackslash less}%    % (See comments in \indexdummies.)
3063  %\def\rm{\realbackslash rm }%    \def\definedummyword##1{%
3064  \def\sf{\realbackslash sf}%      \expandafter\def\csname ##1\endcsname{@##1\space}%
3065  \def\sl{\realbackslash sl }%    }%
3066  \def\tclose##1{\realbackslash tclose {##1}}%    \def\definedummyletter##1{%
3067  \def\tt{\realbackslash tt}%      \expandafter\def\csname ##1\endcsname{@##1}%
3068  %    }%
3069  \def\b##1{\realbackslash b {##1}}%    %
3070  \def\i##1{\realbackslash i {##1}}%    % Do the redefinitions.
3071  \def\sc##1{\realbackslash sc {##1}}%    \commondummies
3072  \def\t##1{\realbackslash t {##1}}%  }
3073  \def\r##1{\realbackslash r {##1}}%  
3074  %  % Called from \indexdummies and \atdummies.  \definedummyword and
3075  \def\TeX{\realbackslash TeX}%  % \definedummyletter must be defined first.
3076  \def\acronym##1{\realbackslash acronym {##1}}%  %
3077  \def\cite##1{\realbackslash cite {##1}}%  \def\commondummies{%
3078  \def\code##1{\realbackslash code {##1}}%    %
3079  \def\command##1{\realbackslash command {##1}}%    \normalturnoffactive
3080  \def\dfn##1{\realbackslash dfn {##1}}%    %
3081  \def\dots{\realbackslash dots }%    % Control letters and accents.
3082  \def\emph##1{\realbackslash emph {##1}}%    \definedummyletter{_}%
3083  \def\env##1{\realbackslash env {##1}}%    \definedummyletter{,}%
3084  \def\file##1{\realbackslash file {##1}}%    \definedummyletter{"}%
3085  \def\kbd##1{\realbackslash kbd {##1}}%    \definedummyletter{`}%
3086  \def\key##1{\realbackslash key {##1}}%    \definedummyletter{'}%
3087  \def\math##1{\realbackslash math {##1}}%    \definedummyletter{^}%
3088  \def\option##1{\realbackslash option {##1}}%    \definedummyletter{~}%
3089  \def\samp##1{\realbackslash samp {##1}}%    \definedummyletter{=}%
3090  \def\strong##1{\realbackslash strong {##1}}%    \definedummyword{u}%
3091  \def\uref##1{\realbackslash uref {##1}}%    \definedummyword{v}%
3092  \def\url##1{\realbackslash url {##1}}%    \definedummyword{H}%
3093  \def\var##1{\realbackslash var {##1}}%    \definedummyword{dotaccent}%
3094  \def\w{\realbackslash w }%    \definedummyword{ringaccent}%
3095  %    \definedummyword{tieaccent}%
3096  % These math commands don't seem likely to be used in index entries.    \definedummyword{ubaraccent}%
3097  \def\copyright{\realbackslash copyright}%    \definedummyword{udotaccent}%
3098  \def\equiv{\realbackslash equiv}%    \definedummyword{dotless}%
3099  \def\error{\realbackslash error}%    %
3100  \def\expansion{\realbackslash expansion}%    % Other non-English letters.
3101  \def\point{\realbackslash point}%    \definedummyword{AA}%
3102  \def\print{\realbackslash print}%    \definedummyword{AE}%
3103  \def\result{\realbackslash result}%    \definedummyword{L}%
3104  %    \definedummyword{OE}%
3105  % Handle some cases of @value -- where the variable name does not    \definedummyword{O}%
3106  % contain - or _, and the value does not contain any    \definedummyword{aa}%
3107  % (non-fully-expandable) commands.    \definedummyword{ae}%
3108  \let\value = \expandablevalue    \definedummyword{l}%
3109  %    \definedummyword{oe}%
3110  \unsepspaces    \definedummyword{o}%
3111  % Turn off macro expansion    \definedummyword{ss}%
3112  \turnoffmacros    %
3113      % Although these internal commands shouldn't show up, sometimes they do.
3114      \definedummyword{bf}%
3115      \definedummyword{gtr}%
3116      \definedummyword{hat}%
3117      \definedummyword{less}%
3118      \definedummyword{sf}%
3119      \definedummyword{sl}%
3120      \definedummyword{tclose}%
3121      \definedummyword{tt}%
3122      %
3123      % Texinfo font commands.
3124      \definedummyword{b}%
3125      \definedummyword{i}%
3126      \definedummyword{r}%
3127      \definedummyword{sc}%
3128      \definedummyword{t}%
3129      %
3130      \definedummyword{TeX}%
3131      \definedummyword{acronym}%
3132      \definedummyword{cite}%
3133      \definedummyword{code}%
3134      \definedummyword{command}%
3135      \definedummyword{dfn}%
3136      \definedummyword{dots}%
3137      \definedummyword{emph}%
3138      \definedummyword{env}%
3139      \definedummyword{file}%
3140      \definedummyword{kbd}%
3141      \definedummyword{key}%
3142      \definedummyword{math}%
3143      \definedummyword{option}%
3144      \definedummyword{samp}%
3145      \definedummyword{strong}%
3146      \definedummyword{uref}%
3147      \definedummyword{url}%
3148      \definedummyword{var}%
3149      \definedummyword{w}%
3150      %
3151      % Assorted special characters.
3152      \definedummyword{bullet}%
3153      \definedummyword{copyright}%
3154      \definedummyword{dots}%
3155      \definedummyword{enddots}%
3156      \definedummyword{equiv}%
3157      \definedummyword{error}%
3158      \definedummyword{expansion}%
3159      \definedummyword{minus}%
3160      \definedummyword{pounds}%
3161      \definedummyword{point}%
3162      \definedummyword{print}%
3163      \definedummyword{result}%
3164      %
3165      % Handle some cases of @value -- where the variable name does not
3166      % contain - or _, and the value does not contain any
3167      % (non-fully-expandable) commands.
3168      \let\value = \expandablevalue
3169      %
3170      % Normal spaces, not active ones.
3171      \unsepspaces
3172      %
3173      % No macro expansion.
3174      \turnoffmacros
3175  }  }
3176    
3177  % If an index command is used in an @example environment, any spaces  % If an index command is used in an @example environment, any spaces
# Line 2891  width0pt\relax} \fi Line 3180  width0pt\relax} \fi
3180  {\obeyspaces  {\obeyspaces
3181   \gdef\unsepspaces{\obeyspaces\let =\space}}   \gdef\unsepspaces{\obeyspaces\let =\space}}
3182    
3183  % \indexnofonts no-ops all font-change commands.  
3184  % This is used when outputting the strings to sort the index by.  % \indexnofonts is used when outputting the strings to sort the index
3185  \def\indexdummyfont#1{#1}  % by, and when constructing control sequence names.  It eliminates all
3186    % control sequences and just writes whatever the best ASCII sort string
3187    % would be for a given command (usually its argument).
3188    %
3189  \def\indexdummytex{TeX}  \def\indexdummytex{TeX}
3190  \def\indexdummydots{...}  \def\indexdummydots{...}
3191    %
3192  \def\indexnofonts{%  \def\indexnofonts{%
3193  \def\@{@}%    \def\ { }%
3194  % how to handle braces?    \def\@{@}%
3195  \def\_{\normalunderscore}%    % how to handle braces?
3196  %    \def\_{\normalunderscore}%
3197  \let\,=\indexdummyfont    %
3198  \let\"=\indexdummyfont    \let\,=\asis
3199  \let\`=\indexdummyfont    \let\"=\asis
3200  \let\'=\indexdummyfont    \let\`=\asis
3201  \let\^=\indexdummyfont    \let\'=\asis
3202  \let\~=\indexdummyfont    \let\^=\asis
3203  \let\==\indexdummyfont    \let\~=\asis
3204  \let\b=\indexdummyfont    \let\==\asis
3205  \let\c=\indexdummyfont    \let\u=\asis
3206  \let\d=\indexdummyfont    \let\v=\asis
3207  \let\u=\indexdummyfont    \let\H=\asis
3208  \let\v=\indexdummyfont    \let\dotaccent=\asis
3209  \let\H=\indexdummyfont    \let\ringaccent=\asis
3210  \let\dotless=\indexdummyfont    \let\tieaccent=\asis
3211  % Take care of the plain tex special European modified letters.    \let\ubaraccent=\asis
3212  \def\AA{AA}%    \let\udotaccent=\asis
3213  \def\AE{AE}%    \let\dotless=\asis
3214  \def\L{L}%    %
3215  \def\OE{OE}%    % Other non-English letters.
3216  \def\O{O}%    \def\AA{AA}%
3217  \def\aa{aa}%    \def\AE{AE}%
3218  \def\ae{ae}%    \def\L{L}%
3219  \def\l{l}%    \def\OE{OE}%
3220  \def\oe{oe}%    \def\O{O}%
3221  \def\o{o}%    \def\aa{aa}%
3222  \def\ss{ss}%    \def\ae{ae}%
3223  %    \def\l{l}%
3224  % Don't no-op \tt, since it isn't a user-level command    \def\oe{oe}%
3225  % and is used in the definitions of the active chars like <, >, |, etc.    \def\o{o}%
3226  % Likewise with the other plain tex font commands.    \def\ss{ss}%
3227  %\let\tt=\indexdummyfont    \def\exclamdown{!}%
3228  %    \def\questiondown{?}%
3229  \let\b=\indexdummyfont    %
3230  \let\i=\indexdummyfont    % Don't no-op \tt, since it isn't a user-level command
3231  \let\r=\indexdummyfont    % and is used in the definitions of the active chars like <, >, |, etc.
3232  \let\sc=\indexdummyfont    % Likewise with the other plain tex font commands.
3233  \let\t=\indexdummyfont    %\let\tt=\asis
3234  %    %
3235  \let\TeX=\indexdummytex    % Texinfo font commands.
3236  \let\acronym=\indexdummyfont    \let\b=\asis
3237  \let\cite=\indexdummyfont    \let\i=\asis
3238  \let\code=\indexdummyfont    \let\r=\asis
3239  \let\command=\indexdummyfont    \let\sc=\asis
3240  \let\dfn=\indexdummyfont    \let\t=\asis
3241  \let\dots=\indexdummydots    %
3242  \let\emph=\indexdummyfont    \let\TeX=\indexdummytex
3243  \let\env=\indexdummyfont    \let\acronym=\asis
3244  \let\file=\indexdummyfont    \let\cite=\asis
3245  \let\kbd=\indexdummyfont    \let\code=\asis
3246  \let\key=\indexdummyfont    \let\command=\asis
3247  \let\math=\indexdummyfont    \let\dfn=\asis
3248  \let\option=\indexdummyfont    \let\dots=\indexdummydots
3249  \let\samp=\indexdummyfont    \let\emph=\asis
3250  \let\strong=\indexdummyfont    \let\env=\asis
3251  \let\uref=\indexdummyfont    \let\file=\asis
3252  \let\url=\indexdummyfont    \let\kbd=\asis
3253  \let\var=\indexdummyfont    \let\key=\asis
3254  \let\w=\indexdummyfont    \let\math=\asis
3255  }    \let\option=\asis
3256      \let\samp=\asis
3257  % To define \realbackslash, we must make \ not be an escape.    \let\strong=\asis
3258  % We must first make another character (@) an escape    \let\uref=\asis
3259  % so we do not become unable to do a definition.    \let\url=\asis
3260      \let\var=\asis
3261  {\catcode`\@=0 \catcode`\\=\other    \let\w=\asis
3262   @gdef@realbackslash{\}}  }
3263    
3264  \let\indexbackslash=0  %overridden during \printindex.  \let\indexbackslash=0  %overridden during \printindex.
3265  \let\SETmarginindex=\relax % put index entries in margin (undocumented)?  \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
# Line 2999  width0pt\relax} \fi Line 3291  width0pt\relax} \fi
3291          \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now          \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
3292          % so it will be output as is; and it will print as backslash.          % so it will be output as is; and it will print as backslash.
3293          %          %
3294          \def\thirdarg{#3}%          % The main index entry text.
         %  
         % If third arg is present, precede it with space in sort key.  
         \ifx\thirdarg\emptymacro  
           \let\subentry = \empty  
         \else  
           \def\subentry{ #3}%  
         \fi  
         %  
         % First process the index entry with all font commands turned  
         % off to get the string to sort by.  
         {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%  
         %  
         % Now the real index entry with the fonts.  
3295          \toks0 = {#2}%          \toks0 = {#2}%
3296          %          %
3297          % If the third (subentry) arg is present, add it to the index          % If third arg is present, precede it with space in sort key.
3298          % line to write.          \def\thirdarg{#3}%
3299          \ifx\thirdarg\emptymacro \else          \ifx\thirdarg\emptymacro \else
3300            \toks0 = \expandafter{\the\toks0{#3}}%             % If the third (subentry) arg is present, add it to the index
3301               % line to write.
3302              \toks0 = \expandafter{\the\toks0 \space #3}%
3303          \fi          \fi
3304          %          %
3305            % Process the index entry with all font commands turned off, to
3306            % get the string to sort by.
3307            {\indexnofonts
3308             \edef\temp{\the\toks0}% need full expansion
3309             \xdef\indexsorttmp{\temp}%
3310            }%
3311            %
3312          % Set up the complete index entry, with both the sort key and          % Set up the complete index entry, with both the sort key and
3313          % the original text, including any font commands.  We write          % the original text, including any font commands.  We write
3314          % three arguments to \entry to the .?? file (four in the          % three arguments to \entry to the .?? file (four in the
# Line 3051  width0pt\relax} \fi Line 3339  width0pt\relax} \fi
3339          \iflinks          \iflinks
3340            \ifvmode            \ifvmode
3341              \skip0 = \lastskip              \skip0 = \lastskip
3342              \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi              \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi
3343            \fi            \fi
3344            %            %
3345            \temp % do the write            \temp % do the write
3346            %            %
           %  
3347            \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi            \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
3348          \fi          \fi
3349        }%        }%
# Line 3106  width0pt\relax} \fi Line 3393  width0pt\relax} \fi
3393    %    %
3394    \smallfonts \rm    \smallfonts \rm
3395    \tolerance = 9500    \tolerance = 9500
3396      \everypar = {}% don't want the \kern\-parindent from indentation suppression.
3397    \indexbreaks    \indexbreaks
3398    %    %
3399    % See if the index file exists and is nonempty.    % See if the index file exists and is nonempty.
# Line 3487  width0pt\relax} \fi Line 3775  width0pt\relax} \fi
3775      \numberedsubsubseczzz{#2}      \numberedsubsubseczzz{#2}
3776    \fi    \fi
3777  \fi  \fi
3778    \suppressfirstparagraphindent
3779  }  }
3780    
3781  % like \numhead, but chooses appendix heading levels  % like \numhead, but chooses appendix heading levels
# Line 3506  width0pt\relax} \fi Line 3795  width0pt\relax} \fi
3795      \appendixsubsubseczzz{#2}      \appendixsubsubseczzz{#2}
3796    \fi    \fi
3797  \fi  \fi
3798    \suppressfirstparagraphindent
3799  }  }
3800    
3801  % like \numhead, but chooses numberless heading levels  % like \numhead, but chooses numberless heading levels
# Line 3525  width0pt\relax} \fi Line 3815  width0pt\relax} \fi
3815      \unnumberedsubsubseczzz{#2}      \unnumberedsubsubseczzz{#2}
3816    \fi    \fi
3817  \fi  \fi
3818    \suppressfirstparagraphindent
3819  }  }
3820    
3821  % @chapter, @appendix, @unnumbered.  % @chapter, @appendix, @unnumbered.
# Line 3532  width0pt\relax} \fi Line 3823  width0pt\relax} \fi
3823  \outer\def\chapter{\parsearg\chapteryyy}  \outer\def\chapter{\parsearg\chapteryyy}
3824  \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz  \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
3825  \def\chapterzzz #1{%  \def\chapterzzz #1{%
3826  \secno=0 \subsecno=0 \subsubsecno=0    \secno=0 \subsecno=0 \subsubsecno=0
3827  \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%    \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%
3828  \chapmacro {#1}{\the\chapno}%    \chapmacro {#1}{\the\chapno}%
3829  \gdef\thissection{#1}%    \gdef\thissection{#1}%
3830  \gdef\thischaptername{#1}%    \gdef\thischaptername{#1}%
3831  % We don't substitute the actual chapter name into \thischapter    % We don't substitute the actual chapter name into \thischapter
3832  % because we don't want its macros evaluated now.    % because we don't want its macros evaluated now.
3833  \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%    \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
3834  \toks0 = {#1}%    \writetocentry{chap}{#1}{{\the\chapno}}
3835  \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%    \donoderef
3836                                    {\the\chapno}}}%    \global\let\section = \numberedsec
3837  \temp    \global\let\subsection = \numberedsubsec
3838  \donoderef    \global\let\subsubsection = \numberedsubsubsec
3839  \global\let\section = \numberedsec  }
3840  \global\let\subsection = \numberedsubsec  
3841  \global\let\subsubsection = \numberedsubsubsec  % we use \chapno to avoid indenting back
3842  }  \def\appendixbox#1{%
3843      \setbox0 = \hbox{\putwordAppendix{} \the\chapno}%
3844      \hbox to \wd0{#1\hss}}
3845    
3846  \outer\def\appendix{\parsearg\appendixyyy}  \outer\def\appendix{\parsearg\appendixyyy}
3847  \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz  \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
3848  \def\appendixzzz #1{%  \def\appendixzzz #1{%
3849  \secno=0 \subsecno=0 \subsubsecno=0    \secno=0 \subsecno=0 \subsubsecno=0
3850  \global\advance \appendixno by 1    \global\advance \appendixno by 1
3851  \message{\putwordAppendix\space \appendixletter}%    \message{\putwordAppendix\space \appendixletter}%
3852  \chapmacro {#1}{\putwordAppendix{} \appendixletter}%    \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}%
3853  \gdef\thissection{#1}%    \gdef\thissection{#1}%
3854  \gdef\thischaptername{#1}%    \gdef\thischaptername{#1}%
3855  \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%    \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
3856  \toks0 = {#1}%    \writetocentry{appendix}{#1}{{\appendixletter}}
3857  \edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%    \appendixnoderef
3858                         {\appendixletter}}}%    \global\let\section = \appendixsec
3859  \temp    \global\let\subsection = \appendixsubsec
3860  \appendixnoderef    \global\let\subsubsection = \appendixsubsubsec
 \global\let\section = \appendixsec  
 \global\let\subsection = \appendixsubsec  
 \global\let\subsubsection = \appendixsubsubsec  
3861  }  }
3862    
3863  % @centerchap is like @unnumbered, but the heading is centered.  % @centerchap is like @unnumbered, but the heading is centered.
# Line 3580  width0pt\relax} \fi Line 3870  width0pt\relax} \fi
3870  \outer\def\unnumbered{\parsearg\unnumberedyyy}  \outer\def\unnumbered{\parsearg\unnumberedyyy}
3871  \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz  \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
3872  \def\unnumberedzzz #1{%  \def\unnumberedzzz #1{%
3873  \secno=0 \subsecno=0 \subsubsecno=0    \secno=0 \subsecno=0 \subsubsecno=0
3874  %    %
3875  % This used to be simply \message{#1}, but TeX fully expands the    % This used to be simply \message{#1}, but TeX fully expands the
3876  % argument to \message.  Therefore, if #1 contained @-commands, TeX    % argument to \message.  Therefore, if #1 contained @-commands, TeX
3877  % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX    % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
3878  % expanded @cite (which turns out to cause errors because \cite is meant    % expanded @cite (which turns out to cause errors because \cite is meant
3879  % to be executed, not expanded).    % to be executed, not expanded).
3880  %    %
3881  % Anyway, we don't want the fully-expanded definition of @cite to appear    % Anyway, we don't want the fully-expanded definition of @cite to appear
3882  % as a result of the \message, we just want `@cite' itself.  We use    % as a result of the \message, we just want `@cite' itself.  We use
3883  % \the<toks register> to achieve this: TeX expands \the<toks> only once,    % \the<toks register> to achieve this: TeX expands \the<toks> only once,
3884  % simply yielding the contents of <toks register>.  (We also do this for    % simply yielding the contents of <toks register>.  (We also do this for
3885  % the toc entries.)    % the toc entries.)
3886  \toks0 = {#1}\message{(\the\toks0)}%    \toks0 = {#1}\message{(\the\toks0)}%
3887  %    %
3888  \unnumbchapmacro {#1}%    \unnumbchapmacro {#1}%
3889  \gdef\thischapter{#1}\gdef\thissection{#1}%    \gdef\thischapter{#1}\gdef\thissection{#1}%
3890  \toks0 = {#1}%    \writetocentry{unnumbchap}{#1}{{\the\chapno}}
3891  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}%    \unnumbnoderef
3892  \temp    \global\let\section = \unnumberedsec
3893  \unnumbnoderef    \global\let\subsection = \unnumberedsubsec
3894  \global\let\section = \unnumberedsec    \global\let\subsubsection = \unnumberedsubsubsec
 \global\let\subsection = \unnumberedsubsec  
 \global\let\subsubsection = \unnumberedsubsubsec  
3895  }  }
3896    
3897  % Sections.  % Sections.
3898  \outer\def\numberedsec{\parsearg\secyyy}  \outer\def\numberedsec{\parsearg\secyyy}
3899  \def\secyyy #1{\numhead1{#1}} % normally calls seczzz  \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
3900  \def\seczzz #1{%  \def\seczzz #1{%
3901  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %    \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3902  \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%    \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
3903  \toks0 = {#1}%    \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}}
3904  \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%    \donoderef
3905                                    {\the\chapno}{\the\secno}}}%    \nobreak
 \temp  
 \donoderef  
 \nobreak  
3906  }  }
3907    
3908  \outer\def\appendixsection{\parsearg\appendixsecyyy}  \outer\def\appendixsection{\parsearg\appendixsecyyy}
3909  \outer\def\appendixsec{\parsearg\appendixsecyyy}  \outer\def\appendixsec{\parsearg\appendixsecyyy}
3910  \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz  \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
3911  \def\appendixsectionzzz #1{%  \def\appendixsectionzzz #1{%
3912  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %    \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3913  \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%    \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
3914  \toks0 = {#1}%    \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}}
3915  \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%    \appendixnoderef
3916                                    {\appendixletter}{\the\secno}}}%    \nobreak
 \temp  
 \appendixnoderef  
 \nobreak  
3917  }  }
3918    
3919  \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}  \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
3920  \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz  \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
3921  \def\unnumberedseczzz #1{%  \def\unnumberedseczzz #1{%
3922  \plainsecheading {#1}\gdef\thissection{#1}%    \plainsecheading {#1}\gdef\thissection{#1}%
3923  \toks0 = {#1}%    \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}}
3924  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%    \unnumbnoderef
3925    {\the\toks0}{\the\chapno}}}%    \nobreak
 \temp  
 \unnumbnoderef  
 \nobreak  
3926  }  }
3927    
3928  % Subsections.  % Subsections.
3929  \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}  \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
3930  \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz  \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
3931  \def\numberedsubseczzz #1{%  \def\numberedsubseczzz #1{%
3932  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %    \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3933  \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%    \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
3934  \toks0 = {#1}%    \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}}
3935  \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%    \donoderef
3936                                      {\the\chapno}{\the\secno}{\the\subsecno}}}%    \nobreak
 \temp  
 \donoderef  
 \nobreak  
3937  }  }
3938    
3939  \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}  \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
3940  \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz  \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
3941  \def\appendixsubseczzz #1{%  \def\appendixsubseczzz #1{%
3942  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %    \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3943  \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%    \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
3944  \toks0 = {#1}%    \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}}
3945  \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%    \appendixnoderef
3946                                  {\appendixletter}{\the\secno}{\the\subsecno}}}%    \nobreak
 \temp  
 \appendixnoderef  
 \nobreak  
3947  }  }
3948    
3949  \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}  \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
3950  \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz  \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
3951  \def\unnumberedsubseczzz #1{%  \def\unnumberedsubseczzz #1{%
3952  \plainsubsecheading {#1}\gdef\thissection{#1}%    \plainsubsecheading {#1}\gdef\thissection{#1}%
3953  \toks0 = {#1}%    \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}}
3954  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%    \unnumbnoderef
3955    {\the\toks0}{\the\chapno}{\the\secno}}}%    \nobreak
 \temp  
 \unnumbnoderef  
 \nobreak  
3956  }  }
3957    
3958  % Subsubsections.  % Subsubsections.
3959  \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}  \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
3960  \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz  \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
3961  \def\numberedsubsubseczzz #1{%  \def\numberedsubsubseczzz #1{%
3962  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %    \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3963  \subsubsecheading {#1}    \subsubsecheading {#1}
3964    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%      {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3965  \toks0 = {#1}%    \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}
3966  \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%    \donoderef
3967    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%    \nobreak
 \temp  
 \donoderef  
 \nobreak  
3968  }  }
3969    
3970  \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}  \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
3971  \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz  \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
3972  \def\appendixsubsubseczzz #1{%  \def\appendixsubsubseczzz #1{%
3973  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %    \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3974  \subsubsecheading {#1}    \subsubsecheading {#1}
3975    {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%      {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3976  \toks0 = {#1}%    \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}
3977  \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%    \appendixnoderef
3978    {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%    \nobreak
 \temp  
 \appendixnoderef  
 \nobreak  
3979  }  }
3980    
3981  \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}  \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
3982  \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz  \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
3983  \def\unnumberedsubsubseczzz #1{%  \def\unnumberedsubsubseczzz #1{%
3984  \plainsubsubsecheading {#1}\gdef\thissection{#1}%    \plainsubsubsecheading {#1}\gdef\thissection{#1}%
3985  \toks0 = {#1}%    \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}
3986  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%    \unnumbnoderef
3987    {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%    \nobreak
 \temp  
 \unnumbnoderef  
 \nobreak  
3988  }  }
3989    
3990  % These are variants which are not "outer", so they can appear in @ifinfo.  % These are variants which are not "outer", so they can appear in @ifinfo.
# Line 3764  width0pt\relax} \fi Line 4025  width0pt\relax} \fi
4025    
4026  \def\majorheading{\parsearg\majorheadingzzz}  \def\majorheading{\parsearg\majorheadingzzz}
4027  \def\majorheadingzzz #1{%  \def\majorheadingzzz #1{%
4028  {\advance\chapheadingskip by 10pt \chapbreak }%    {\advance\chapheadingskip by 10pt \chapbreak }%
4029  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000    {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
4030                    \parindent=0pt\raggedright                      \parindent=0pt\raggedright
4031                    \rm #1\hfill}}\bigskip \par\penalty 200}                      \rm #1\hfill}}\bigskip \par\penalty 200}
4032    
4033  \def\chapheading{\parsearg\chapheadingzzz}  \def\chapheading{\parsearg\chapheadingzzz}
4034  \def\chapheadingzzz #1{\chapbreak %  \def\chapheadingzzz #1{\chapbreak %
4035  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000    {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
4036                    \parindent=0pt\raggedright                      \parindent=0pt\raggedright
4037                    \rm #1\hfill}}\bigskip \par\penalty 200}                      \rm #1\hfill}}\bigskip \par\penalty 200}
4038    
4039  % @heading, @subheading, @subsubheading.  % @heading, @subheading, @subsubheading.
4040  \def\heading{\parsearg\plainsecheading}  \def\heading{\parsearg\plainsecheading}
# Line 3919  width0pt\relax} \fi Line 4180  width0pt\relax} \fi
4180            \hangindent = \wd0 % zero if no section number            \hangindent = \wd0 % zero if no section number
4181            \unhbox0 #3}%            \unhbox0 #3}%
4182    }%    }%
4183    \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak    % Add extra space after the heading -- either a line space or a
4184      % paragraph space, whichever is more.  (Some people like to set
4185      % \parskip to large values for some reason.)  Don't allow stretch, though.
4186      \nobreak
4187      \ifdim\parskip>\normalbaselineskip
4188        \kern\parskip
4189      \else
4190        \kern\normalbaselineskip
4191      \fi
4192      \nobreak
4193  }  }
4194    
4195    
# Line 3931  width0pt\relax} \fi Line 4201  width0pt\relax} \fi
4201  % Called from @chapter, etc.  We supply {\folio} at the end of the  % Called from @chapter, etc.  We supply {\folio} at the end of the
4202  % argument, which will end up as the last argument to the \...entry macro.  % argument, which will end up as the last argument to the \...entry macro.
4203  %  %
4204  % We open the .toc file here instead of at @setfilename or any other  % Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}}
4205  % fixed time so that @contents can be put in the document anywhere.  % We open the .toc file for writing here instead of at @setfilename (or
4206    % any other fixed time) so that @contents can be anywhere in the document.
4207  %  %
4208  \newif\iftocfileopened  \newif\iftocfileopened
4209  \def\writetocentry#1{%  \def\writetocentry#1#2#3{%
4210    \iftocfileopened\else    \iftocfileopened\else
4211      \immediate\openout\tocfile = \jobname.toc      \immediate\openout\tocfile = \jobname.toc
4212      \global\tocfileopenedtrue      \global\tocfileopenedtrue
4213    \fi    \fi
4214    \iflinks \write\tocfile{#1{\folio}}\fi    %
4215      \iflinks
4216        \toks0 = {#2}%
4217        \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}%
4218        \temp
4219      \fi
4220    %    %
4221    % Tell \shipout to create a page destination if we're doing pdf, which    % Tell \shipout to create a page destination if we're doing pdf, which
4222    % will be the target of the links in the table of contents.  We can't    % will be the target of the links in the table of contents.  We can't
# Line 3979  width0pt\relax} \fi Line 4255  width0pt\relax} \fi
4255        \advance\hsize by -\contentsrightmargin % Don't use the full line length.        \advance\hsize by -\contentsrightmargin % Don't use the full line length.
4256        %        %
4257        % Roman numerals for page numbers.        % Roman numerals for page numbers.
4258        \ifnum \pageno>0 \pageno = \lastnegativepageno \fi        \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
4259  }  }
4260    
4261    
# Line 3996  width0pt\relax} \fi Line 4272  width0pt\relax} \fi
4272       \pdfmakeoutlines       \pdfmakeoutlines
4273     \endgroup     \endgroup
4274     \lastnegativepageno = \pageno     \lastnegativepageno = \pageno
4275     \pageno = \savepageno     \global\pageno = \savepageno
4276  }  }
4277    
4278  % And just the chapters.  % And just the chapters.
# Line 4008  width0pt\relax} \fi Line 4284  width0pt\relax} \fi
4284        \let\unnumbchapentry = \shortunnumberedentry        \let\unnumbchapentry = \shortunnumberedentry
4285        % We want a true roman here for the page numbers.        % We want a true roman here for the page numbers.
4286        \secfonts        \secfonts
4287        \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl        \let\rm=\shortcontrm \let\bf=\shortcontbf
4288          \let\sl=\shortcontsl \let\tt=\shortconttt
4289        \rm        \rm
4290        \hyphenpenalty = 10000        \hyphenpenalty = 10000
4291        \advance\baselineskip by 1pt % Open it up a little.        \advance\baselineskip by 1pt % Open it up a little.
4292        \def\secentry ##1##2##3##4{}        \def\secentry ##1##2##3##4{}
       \def\unnumbsecentry ##1##2##3{}  
4293        \def\subsecentry ##1##2##3##4##5{}        \def\subsecentry ##1##2##3##4##5{}
       \def\unnumbsubsecentry ##1##2##3##4{}  
4294        \def\subsubsecentry ##1##2##3##4##5##6{}        \def\subsubsecentry ##1##2##3##4##5##6{}
4295        \def\unnumbsubsubsecentry ##1##2##3##4##5{}        \let\unnumbsecentry = \secentry
4296          \let\unnumbsubsecentry = \subsecentry
4297          \let\unnumbsubsubsecentry = \subsubsecentry
4298        \openin 1 \jobname.toc        \openin 1 \jobname.toc
4299        \ifeof 1 \else        \ifeof 1 \else
4300          \closein 1          \closein 1
# Line 4027  width0pt\relax} \fi Line 4304  width0pt\relax} \fi
4304       \contentsalignmacro % in case @setchapternewpage odd is in effect       \contentsalignmacro % in case @setchapternewpage odd is in effect
4305     \endgroup     \endgroup
4306     \lastnegativepageno = \pageno     \lastnegativepageno = \pageno
4307     \pageno = \savepageno     \global\pageno = \savepageno
4308  }  }
4309  \let\shortcontents = \summarycontents  \let\shortcontents = \summarycontents
4310    
# Line 4050  width0pt\relax} \fi Line 4327  width0pt\relax} \fi
4327  }  }
4328    
4329  % Appendices, in the main contents.  % Appendices, in the main contents.
4330  \def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}  \def\appendixentry#1#2#3{%
4331      \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}}
4332  %  %
4333  % Appendices, in the short toc.  % Appendices, in the short toc.
4334  \let\shortappendixentry = \shortchapentry  \let\shortappendixentry = \shortchapentry
# Line 4074  width0pt\relax} \fi Line 4352  width0pt\relax} \fi
4352  }  }
4353    
4354  % Unnumbered chapters.  % Unnumbered chapters.
4355  \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}  \def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}}
4356  \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}  \def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}}
4357    
4358  % Sections.  % Sections.
4359  \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}  \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
4360  \def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}  \def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}}
4361    
4362  % Subsections.  % Subsections.
4363  \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}  \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
4364  \def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}  \def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}}
4365    
4366  % And subsubsections.  % And subsubsections.
4367  \def\subsubsecentry#1#2#3#4#5#6{%  \def\subsubsecentry#1#2#3#4#5#6{%
4368    \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}    \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
4369  \def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}  \def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}}
4370    
4371  % This parameter controls the indentation of the various levels.  % This parameter controls the indentation of the various levels.
4372  \newdimen\tocindent \tocindent = 3pc  \newdimen\tocindent \tocindent = 3pc
# Line 4190  width0pt\relax} \fi Line 4468  width0pt\relax} \fi
4468  \def\tex{\begingroup  \def\tex{\begingroup
4469    \catcode `\\=0 \catcode `\{=1 \catcode `\}=2    \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
4470    \catcode `\$=3 \catcode `\&=4 \catcode `\#=6    \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
4471    \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie    \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
4472    \catcode `\%=14    \catcode `\%=14
4473    \catcode 43=12 % plus    \catcode `\+=\other
4474    \catcode`\"=12    \catcode `\"=\other
4475    \catcode`\==12    \catcode `\==\other
4476    \catcode`\|=12    \catcode `\|=\other
4477    \catcode`\<=12    \catcode `\<=\other
4478    \catcode`\>=12    \catcode `\>=\other
4479    \escapechar=`\\    \escapechar=`\\
4480    %    %
4481    \let\b=\ptexb    \let\b=\ptexb
# Line 4209  width0pt\relax} \fi Line 4487  width0pt\relax} \fi
4487    \let\equiv=\ptexequiv    \let\equiv=\ptexequiv
4488    \let\!=\ptexexclam    \let\!=\ptexexclam
4489    \let\i=\ptexi    \let\i=\ptexi
4490      \let\indent=\ptexindent
4491    \let\{=\ptexlbrace    \let\{=\ptexlbrace
4492    \let\+=\tabalign    \let\+=\tabalign
4493    \let\}=\ptexrbrace    \let\}=\ptexrbrace
4494      \let\/=\ptexslash
4495    \let\*=\ptexstar    \let\*=\ptexstar
4496    \let\t=\ptext    \let\t=\ptext
4497    %    %
# Line 4251  width0pt\relax} \fi Line 4531  width0pt\relax} \fi
4531  % Make spacing and below environment symmetrical.  We use \parskip here  % Make spacing and below environment symmetrical.  We use \parskip here
4532  % to help in doing that, since in @example-like environments \parskip  % to help in doing that, since in @example-like environments \parskip
4533  % is reset to zero; thus the \afterenvbreak inserts no space -- but the  % is reset to zero; thus the \afterenvbreak inserts no space -- but the
4534  % start of the next paragraph will insert \parskip  % start of the next paragraph will insert \parskip.
4535  %  %
4536  \def\aboveenvbreak{{%  \def\aboveenvbreak{{%
4537    \ifnum\lastpenalty < 10000    % =10000 instead of <10000 because of a special case in \itemzzz, q.v.
4538      \ifnum \lastpenalty=10000 \else
4539      \advance\envskipamount by \parskip      \advance\envskipamount by \parskip
4540      \endgraf      \endgraf
4541      \ifdim\lastskip<\envskipamount      \ifdim\lastskip<\envskipamount
4542        \removelastskip        \removelastskip
4543        \penalty-50        % it's not a good place to break if the last penalty was \nobreak
4544          % or better ...
4545          \ifnum\lastpenalty>10000 \else \penalty-50 \fi
4546        \vskip\envskipamount        \vskip\envskipamount
4547      \fi      \fi
4548    \fi    \fi
# Line 4291  width0pt\relax} \fi Line 4574  width0pt\relax} \fi
4574  %  %
4575  \newskip\lskip\newskip\rskip  \newskip\lskip\newskip\rskip
4576    
4577  \long\def\cartouche{%  \def\cartouche{%
4578    \par  % can't be in the midst of a paragraph.
4579  \begingroup  \begingroup
4580          \lskip=\leftskip \rskip=\rightskip          \lskip=\leftskip \rskip=\rightskip
4581          \leftskip=0pt\rightskip=0pt %we want these *outside*.          \leftskip=0pt\rightskip=0pt %we want these *outside*.
# Line 4338  width0pt\relax} \fi Line 4622  width0pt\relax} \fi
4622    \inENV % This group ends at the end of the body    \inENV % This group ends at the end of the body
4623    \hfuzz = 12pt % Don't be fussy    \hfuzz = 12pt % Don't be fussy
4624    \sepspaces % Make spaces be word-separators rather than space tokens.    \sepspaces % Make spaces be word-separators rather than space tokens.
   \singlespace  
4625    \let\par = \lisppar % don't ignore blank lines    \let\par = \lisppar % don't ignore blank lines
4626    \obeylines % each line of input is a line of output    \obeylines % each line of input is a line of output
4627    \parskip = 0pt    \parskip = 0pt
# Line 4377  width0pt\relax} \fi Line 4660  width0pt\relax} \fi
4660  % @example: Same as @lisp.  % @example: Same as @lisp.
4661  \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}  \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
4662    
4663  % @small... is usually equivalent to the non-small (@smallbook  % @smallexample and @smalllisp: use smaller fonts.
 % redefines).  We must call \example (or whatever) last in the  
 % definition, since it reads the return following the @example (or  
 % whatever) command.  
 %  
 % This actually allows (for example) @end display inside an  
 % @smalldisplay.  Too bad, but makeinfo will catch the error anyway.  
 %  
 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display}  
 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp}  
 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format}  
 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp}  
   
 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts.  
4664  % Originally contributed by Pavel@xerox.  % Originally contributed by Pavel@xerox.
4665  \def\smalllispx{\begingroup  \def\smalllisp{\begingroup
4666    \def\Esmalllisp{\nonfillfinish\endgroup}%    \def\Esmalllisp{\nonfillfinish\endgroup}%
4667    \def\Esmallexample{\nonfillfinish\endgroup}%    \def\Esmallexample{\nonfillfinish\endgroup}%
4668    \smallexamplefonts    \smallexamplefonts
4669    \lisp    \lisp
4670  }  }
4671    \let\smallexample = \smalllisp
4672    
4673    
4674  % @display: same as @lisp except keep current font.  % @display: same as @lisp except keep current font.
4675  %  %
# Line 4407  width0pt\relax} \fi Line 4679  width0pt\relax} \fi
4679    \gobble    \gobble
4680  }  }
4681  %  %
4682  % @smalldisplay (when @smallbook): @display plus smaller fonts.  % @smalldisplay: @display plus smaller fonts.
4683  %  %
4684  \def\smalldisplayx{\begingroup  \def\smalldisplay{\begingroup
4685    \def\Esmalldisplay{\nonfillfinish\endgroup}%    \def\Esmalldisplay{\nonfillfinish\endgroup}%
4686    \smallexamplefonts \rm    \smallexamplefonts \rm
4687    \display    \display
# Line 4424  width0pt\relax} \fi Line 4696  width0pt\relax} \fi
4696    \gobble    \gobble
4697  }  }
4698  %  %
4699  % @smallformat (when @smallbook): @format plus smaller fonts.  % @smallformat: @format plus smaller fonts.
4700  %  %
4701  \def\smallformatx{\begingroup  \def\smallformat{\begingroup
4702    \def\Esmallformat{\nonfillfinish\endgroup}%    \def\Esmallformat{\nonfillfinish\endgroup}%
4703    \smallexamplefonts \rm    \smallexamplefonts \rm
4704    \format    \format
# Line 4453  width0pt\relax} \fi Line 4725  width0pt\relax} \fi
4725  \def\quotation{%  \def\quotation{%
4726    \begingroup\inENV %This group ends at the end of the @quotation body    \begingroup\inENV %This group ends at the end of the @quotation body
4727    {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip    {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
   \singlespace  
4728    \parindent=0pt    \parindent=0pt
4729    % We have retained a nonzero parskip for the environment, since we're    % We have retained a nonzero parskip for the environment, since we're
4730    % doing normal filling. So to avoid extra space below the environment...    % doing normal filling. So to avoid extra space below the environment...
# Line 4476  width0pt\relax} \fi Line 4747  width0pt\relax} \fi
4747  %  %
4748  % [Knuth]: Donald Ervin Knuth, 1996.  The TeXbook.  % [Knuth]: Donald Ervin Knuth, 1996.  The TeXbook.
4749  %  %
4750  % [Knuth] p. 344; only we need to do '@' too  % [Knuth] p.344; only we need to do the other characters Texinfo sets
4751    % active too.  Otherwise, they get lost as the first character on a
4752    % verbatim line.
4753  \def\dospecials{%  \def\dospecials{%
4754    \do\ \do\\\do\@\do\{\do\}\do\$\do\&%    \do\ \do\\\do\{\do\}\do\$\do\&%
4755    \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}    \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
4756      \do\<\do\>\do\|\do\@\do+\do\"%
4757    }
4758  %  %
4759  % [Knuth] p. 380  % [Knuth] p. 380
4760  \def\uncatcodespecials{%  \def\uncatcodespecials{%
# Line 4566  width0pt\relax} \fi Line 4841  width0pt\relax} \fi
4841  %  %
4842  % For Texinfo it's a lot easier than for LaTeX,  % For Texinfo it's a lot easier than for LaTeX,
4843  % because texinfo's \verbatim doesn't stop at '\end{verbatim}':  % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
4844  % we need not redefine '\', '{' and '}'  % we need not redefine '\', '{' and '}'.
4845  %  %
4846  % Inspired by LaTeX's verbatim command set [latex.ltx]  % Inspired by LaTeX's verbatim command set [latex.ltx]
4847  %% Include LaTeX hack for completeness -- never know  %% Include LaTeX hack for completeness -- never know
# Line 4576  width0pt\relax} \fi Line 4851  width0pt\relax} \fi
4851  %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[  %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[
4852  %% #1|endgroup|def|Everbatim[]|end[verbatim]]  %% #1|endgroup|def|Everbatim[]|end[verbatim]]
4853  %% |endgroup  %% |endgroup
4854    %
4855  \begingroup  \begingroup
4856    \catcode`\ =\active    \catcode`\ =\active
4857    \gdef\doverbatim#1@end verbatim{#1\end{verbatim}}    \obeylines %
4858      % ignore everything up to the first ^^M, that's the newline at the end
4859      % of the @verbatim input line itself.  Otherwise we get an extra blank
4860      % line in the output.
4861      \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}%
4862  \endgroup  \endgroup
4863  %  %
4864  \def\verbatim{%  \def\verbatim{%
# Line 4594  width0pt\relax} \fi Line 4874  width0pt\relax} \fi
4874  % Allow normal characters that we make active in the argument (a file name).  % Allow normal characters that we make active in the argument (a file name).
4875  \def\verbatiminclude{%  \def\verbatiminclude{%
4876    \begingroup    \begingroup
4877      \catcode`\\=12      \catcode`\\=\other
4878      \catcode`~=12      \catcode`~=\other
4879      \catcode`^=12      \catcode`^=\other
4880      \catcode`_=12      \catcode`_=\other
4881      \catcode`|=12      \catcode`|=\other
4882      \catcode`<=12      \catcode`<=\other
4883      \catcode`>=12      \catcode`>=\other
4884      \catcode`+=12      \catcode`+=\other
4885      \parsearg\doverbatiminclude      \parsearg\doverbatiminclude
4886  }  }
4887  \def\setupverbatiminclude{%  \def\setupverbatiminclude{%
# Line 4615  width0pt\relax} \fi Line 4895  width0pt\relax} \fi
4895       % Restore active chars for included file.       % Restore active chars for included file.
4896    \endgroup    \endgroup
4897    \begingroup    \begingroup
4898    \def\thisfile{#1}%      \let\value=\expandablevalue
4899    \expandafter\expandafter\setupverbatiminclude\input\thisfile      \def\thisfile{#1}%
4900    \endgroup\nonfillfinish\endgroup      \expandafter\expandafter\setupverbatiminclude\input\thisfile
4901      \endgroup
4902      \nonfillfinish
4903      \endgroup
4904  }  }
4905    
4906  % @copying ... @end copying.  % @copying ... @end copying.
4907  % Save the text away for @insertcopying later.  % Save the text away for @insertcopying later.  Many commands won't be
4908    % allowed in this context, but that's ok.
4909  %  %
4910  \newbox\copyingbox  % We save the uninterpreted tokens, rather than creating a box.
4911    % Saving the text in a box would be much easier, but then all the
4912    % typesetting commands (@smallbook, font changes, etc.) have to be done
4913    % beforehand -- and a) we want @copying to be done first in the source
4914    % file; b) letting users define the frontmatter in as flexible order as
4915    % possible is very desirable.
4916  %  %
4917  \def\copying{\begingroup  \def\copying{\begingroup
4918      % Define a command to swallow text until we reach `@end copying'.
4919      % \ is the escape char in this texinfo.tex file, so it is the
4920      % delimiter for the command; @ will be the escape char when we read
4921      % it, but that doesn't matter.
4922      \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}%
4923      %
4924      % We must preserve ^^M's in the input file; see \insertcopying below.
4925      \catcode`\^^M = \active
4926      \docopying
4927    }
4928    
4929    % What we do to finish off the copying text.
4930    %
4931    \def\enddocopying{\endgroup\ignorespaces}
4932    
4933    % @insertcopying.  Here we must play games with ^^M's.  On the one hand,
4934    % we need them to delimit commands such as `@end quotation', so they
4935    % must be active.  On the other hand, we certainly don't want every
4936    % end-of-line to be a \par, as would happen with the normal active
4937    % definition of ^^M.  On the third hand, two ^^M's in a row should still
4938    % generate a \par.
4939    %
4940    % Our approach is to make ^^M insert a space and a penalty1 normally;
4941    % then it can also check if \lastpenalty=1.  If it does, then manually
4942    % do \par.
4943    %
4944    % This messes up the normal definitions of @c[omment], so we redefine
4945    % it.  Similarly for @ignore.  (These commands are used in the gcc
4946    % manual for man page generation.)
4947    %
4948    % Seems pretty fragile, most line-oriented commands will presumably
4949    % fail, but for the limited use of getting the copying text (which
4950    % should be quite simple) inserted, we can hope it's ok.
4951    %
4952    {\catcode`\^^M=\active %
4953    \gdef\insertcopying{\begingroup %
4954    \parindent = 0pt  % looks wrong on title page    \parindent = 0pt  % looks wrong on title page
4955    \def\Ecopying{\egroup\endgroup}%    \def^^M{%
4956    \global\setbox\copyingbox = \vbox\bgroup      \ifnum \lastpenalty=1 %
4957          \par %
4958        \else %
4959          \space \penalty 1 %
4960        \fi %
4961      }%
4962      %
4963      % Fix @c[omment] for catcode 13 ^^M's.
4964      \def\c##1^^M{\ignorespaces}%
4965      \let\comment = \c %
4966      %
4967      % Don't bother jumping through all the hoops that \doignore does, it
4968      % would be very hard since the catcodes are already set.
4969      \long\def\ignore##1\end ignore{\ignorespaces}%
4970      %
4971      \copyingtext %
4972    \endgroup}%
4973  }  }
4974    
 % @insertcopying.  
 %  
 \def\insertcopying{\unvcopy\copyingbox}  
   
   
4975  \message{defuns,}  \message{defuns,}
4976  % @defun etc.  % @defun etc.
4977    
4978  % Allow user to change definition object font (\df) internally  % Allow user to change definition object font (\df) internally
4979  \def\setdeffont #1 {\csname DEF#1\endcsname}  \def\setdeffont#1 {\csname DEF#1\endcsname}
4980    
4981  \newskip\defbodyindent \defbodyindent=.4in  \newskip\defbodyindent \defbodyindent=.4in
4982  \newskip\defargsindent \defargsindent=50pt  \newskip\defargsindent \defargsindent=50pt
 \newskip\deftypemargin \deftypemargin=12pt  
4983  \newskip\deflastargmargin \deflastargmargin=18pt  \newskip\deflastargmargin \deflastargmargin=18pt
4984    
4985  \newcount\parencount  \newcount\parencount
4986  % define \functionparens, which makes ( and ) and & do special things.  
4987  % \functionparens affects the group it is contained in.  % We want ()&[] to print specially on the defun line.
4988    %
4989  \def\activeparens{%  \def\activeparens{%
4990  \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active    \catcode`\(=\active \catcode`\)=\active
4991  \catcode`\[=\active \catcode`\]=\active}    \catcode`\&=\active
4992      \catcode`\[=\active \catcode`\]=\active
4993    }
4994    
4995  % Make control sequences which act like normal parenthesis chars.  % Make control sequences which act like normal parenthesis chars.
4996  \let\lparen = ( \let\rparen = )  \let\lparen = ( \let\rparen = )
# Line 4699  width0pt\relax} \fi Line 5037  width0pt\relax} \fi
5037    
5038  % Active &'s sneak into the index arguments, so make sure it's defined.  % Active &'s sneak into the index arguments, so make sure it's defined.
5039  {  {
5040    \catcode`& = 13    \catcode`& = \active
5041    \global\let& = \ampnr    \global\let& = \ampnr
5042  }  }
5043    
5044  % First, defname, which formats the header line itself.  % \defname, which formats the name of the @def (not the args).
5045  % #1 should be the function name.  % #1 is the function name.
5046  % #2 should be the type of definition, such as "Function".  % #2 is the type of definition, such as "Function".
5047    %
5048  \def\defname #1#2{%  \def\defname#1#2{%
5049  % Get the values of \leftskip and \rightskip as they were    % How we'll output the type name.  Putting it in brackets helps
5050  % outside the @def...    % distinguish it from the body text that may end up on the next line
5051  \dimen2=\leftskip    % just below it.
5052  \advance\dimen2 by -\defbodyindent    \ifempty{#2}%
5053  \noindent      \def\defnametype{}%
5054  \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%    \else
5055  \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line      \def\defnametype{[\rm #2]}%
5056  \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations    \fi
5057  \parshape 2 0in \dimen0 \defargsindent \dimen1    %
5058  % Now output arg 2 ("Function" or some such)    % Get the values of \leftskip and \rightskip as they were outside the @def...
5059  % ending at \deftypemargin from the right margin,    \dimen2=\leftskip
5060  % but stuck inside a box of width 0 so it does not interfere with linebreaking    \advance\dimen2 by -\defbodyindent
5061  {% Adjust \hsize to exclude the ambient margins,    %
5062  % so that \rightline will obey them.    % Figure out values for the paragraph shape.
5063  \advance \hsize by -\dimen2    \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}%
5064  \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%    \dimen0=\hsize \advance \dimen0 by -\wd0  % compute size for first line
5065  % Make all lines underfull and no complaints:    \dimen1=\hsize \advance \dimen1 by -\defargsindent  % size for continuations
5066  \tolerance=10000 \hbadness=10000    \parshape 2 0in \dimen0 \defargsindent \dimen1
5067  \advance\leftskip by -\defbodyindent    %
5068  \exdentamount=\defbodyindent    % Output arg 2 ("Function" or some such) but stuck inside a box of
5069  {\df #1}\enskip        % Generate function name    % width 0 so it does not interfere with linebreaking.
5070  }    \noindent
5071      %
5072  % Actually process the body of a definition    {% Adjust \hsize to exclude the ambient margins,
5073  % #1 should be the terminating control sequence, such as \Edefun.     % so that \rightline will obey them.
5074  % #2 should be the "another name" control sequence, such as \defunx.     \advance \hsize by -\dimen2
5075  % #3 should be the control sequence that actually processes the header,     \dimen3 = 0pt  % was -1.25pc
5076  %    such as \defunheader.     \rlap{\rightline{\defnametype\kern\dimen3}}%
5077      }%
5078  \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody    %
5079  \medbreak %    % Allow all lines to be underfull without complaint:
5080  % Define the end token that this defining construct specifies    \tolerance=10000 \hbadness=10000
5081  % so that it will exit this group.    \advance\leftskip by -\defbodyindent
5082  \def#1{\endgraf\endgroup\medbreak}%    \exdentamount=\defbodyindent
5083  \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%    {\df #1}\enskip        % output function name
5084  \parindent=0in    % \defunargs will be called next to output the arguments, if any.
5085  \advance\leftskip by \defbodyindent  }
 \exdentamount=\defbodyindent  
 \begingroup %  
 \catcode 61=\active % 61 is `='  
 \obeylines\activeparens\spacesplit#3}  
5086    
5087    % Common pieces to start any @def...
5088  % #1 is the \E... control sequence to end the definition (which we define).  % #1 is the \E... control sequence to end the definition (which we define).
5089  % #2 is the \...x control sequence for consecutive fns (which we define).  % #2 is the \...x control sequence (which our caller defines).
5090  % #3 is the control sequence to call to resume processing.  % #3 is the control sequence to process the header, such as \defunheader.
5091    %
5092    \def\parsebodycommon#1#2#3{%
5093      \begingroup\inENV
5094      % If there are two @def commands in a row, we'll have a \nobreak,
5095      % which is there to keep the function description together with its
5096      % header.  But if there's nothing but headers, we want to allow a
5097      % break after all.  Check for penalty 10002 (inserted by
5098      % \defargscommonending) instead of 10000, since the sectioning
5099      % commands insert a \penalty10000, and we don't want to allow a break
5100      % between a section heading and a defun.
5101      \ifnum\lastpenalty=10002 \penalty0 \fi
5102      \medbreak
5103      %
5104      % Define the \E... end token that this defining construct specifies
5105      % so that it will exit this group.
5106      \def#1{\endgraf\endgroup\medbreak}%
5107      %
5108      \parindent=0in
5109      \advance\leftskip by \defbodyindent
5110      \exdentamount=\defbodyindent
5111    }
5112    
5113    % Common part of the \...x definitions.
5114    %
5115    \def\defxbodycommon{%
5116      % As with \parsebodycommon above, allow line break if we have multiple
5117      % x headers in a row.  It's not a great place, though.
5118      \ifnum\lastpenalty=10000 \penalty1000 \fi
5119      %
5120      \begingroup\obeylines
5121    }
5122    
5123    % Process body of @defun, @deffn, @defmac, etc.
5124    %
5125    \def\defparsebody#1#2#3{%
5126      \parsebodycommon{#1}{#2}{#3}%
5127      \def#2{\defxbodycommon \activeparens \spacesplit#3}%
5128      \catcode\equalChar=\active
5129      \begingroup\obeylines\activeparens
5130      \spacesplit#3%
5131    }
5132    
5133    % #1, #2, #3 are the common arguments (see \parsebodycommon above).
5134  % #4, delimited by the space, is the class name.  % #4, delimited by the space, is the class name.
5135  %  %
5136  \def\defmethparsebody#1#2#3#4 {\begingroup\inENV %  \def\defmethparsebody#1#2#3#4 {%
5137  \medbreak %    \parsebodycommon{#1}{#2}{#3}%
5138  % Define the end token that this defining construct specifies    \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}%
5139  % so that it will exit this group.    \begingroup\obeylines\activeparens
5140  \def#1{\endgraf\endgroup\medbreak}%    % The \empty here prevents misinterpretation of a construct such as
5141  \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%    %   @deffn {whatever} {Enharmonic comma}
5142  \parindent=0in    % See comments at \deftpparsebody, although in our case we don't have
5143  \advance\leftskip by \defbodyindent    % to remove the \empty afterwards, since it is empty.
5144  \exdentamount=\defbodyindent    \spacesplit{#3{#4}}\empty
5145  \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}  }
5146    
5147  % Used for @deftypemethod and @deftypeivar.  % Used for @deftypemethod and @deftypeivar.
5148  % #1 is the \E... control sequence to end the definition (which we define).  % #1, #2, #3 are the common arguments (see \defparsebody).
 % #2 is the \...x control sequence for consecutive fns (which we define).  
 % #3 is the control sequence to call to resume processing.  
5149  % #4, delimited by a space, is the class name.  % #4, delimited by a space, is the class name.
5150  % #5 is the method's return type.  % #5 is the method's return type.
5151  %  %
5152  \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV  \def\deftypemethparsebody#1#2#3#4 #5 {%
5153    \medbreak    \parsebodycommon{#1}{#2}{#3}%
5154    \def#1{\endgraf\endgroup\medbreak}%    \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}%
5155    \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%    \begingroup\obeylines\activeparens
5156    \parindent=0in    \spacesplit{#3{#4}{#5}}%
5157    \advance\leftskip by \defbodyindent  }
   \exdentamount=\defbodyindent  
   \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}  
5158    
5159  % Used for @deftypeop.  The change from \deftypemethparsebody is an  % Used for @deftypeop.  The change from \deftypemethparsebody is an
5160  % extra argument at the beginning which is the `category', instead of it  % extra argument at the beginning which is the `category', instead of it
# Line 4789  width0pt\relax} \fi Line 5163  width0pt\relax} \fi
5163  % input at hand.  Thus also need a control sequence (passed as #5) for  % input at hand.  Thus also need a control sequence (passed as #5) for
5164  % the \E... definition to assign the category name to.  % the \E... definition to assign the category name to.
5165  %  %
5166  \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV  \def\deftypeopparsebody#1#2#3#4#5 #6 {%
5167    \medbreak    \parsebodycommon{#1}{#2}{#3}%
5168    \def#1{\endgraf\endgroup\medbreak}%    \def#2##1 ##2 ##3 {\def#4{##1}%
5169    \def#2##1 ##2 ##3 {%      \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}%
5170      \def#4{##1}%    \begingroup\obeylines\activeparens
5171      \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%    \spacesplit{#3{#5}{#6}}%
5172    \parindent=0in  }
   \advance\leftskip by \defbodyindent  
   \exdentamount=\defbodyindent  
   \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}}  
5173    
5174  \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %  % For @defop.
5175  \medbreak %  \def\defopparsebody #1#2#3#4#5 {%
5176  % Define the end token that this defining construct specifies    \parsebodycommon{#1}{#2}{#3}%
5177  % so that it will exit this group.    \def#2##1 ##2 {\def#4{##1}%
5178  \def#1{\endgraf\endgroup\medbreak}%      \defxbodycommon \activeparens \spacesplit{#3{##2}}}%
5179  \def#2##1 ##2 {\def#4{##1}%    \begingroup\obeylines\activeparens
5180  \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%    \spacesplit{#3{#5}}%
5181  \parindent=0in  }
 \advance\leftskip by \defbodyindent  
 \exdentamount=\defbodyindent  
 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}}  
5182    
5183  % These parsing functions are similar to the preceding ones  % These parsing functions are similar to the preceding ones
5184  % except that they do not make parens into active characters.  % except that they do not make parens into active characters.
5185  % These are used for "variables" since they have no arguments.  % These are used for "variables" since they have no arguments.
   
 \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody  
 \medbreak %  
 % Define the end token that this defining construct specifies  
 % so that it will exit this group.  
 \def#1{\endgraf\endgroup\medbreak}%  
 \def#2{\begingroup\obeylines\spacesplit#3}%  
 \parindent=0in  
 \advance\leftskip by \defbodyindent  
 \exdentamount=\defbodyindent  
 \begingroup %  
 \catcode 61=\active %  
 \obeylines\spacesplit#3}  
   
 % This is used for \def{tp,vr}parsebody.  It could probably be used for  
 % some of the others, too, with some judicious conditionals.  
5186  %  %
5187  \def\parsebodycommon#1#2#3{%  \def\defvarparsebody #1#2#3{%
5188    \begingroup\inENV %    \parsebodycommon{#1}{#2}{#3}%
5189    \medbreak %    \def#2{\defxbodycommon \spacesplit#3}%
5190    % Define the end token that this defining construct specifies    \catcode\equalChar=\active
   % so that it will exit this group.  
   \def#1{\endgraf\endgroup\medbreak}%  
   \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%  
   \parindent=0in  
   \advance\leftskip by \defbodyindent  
   \exdentamount=\defbodyindent  
5191    \begingroup\obeylines    \begingroup\obeylines
5192      \spacesplit#3%
5193    }
5194    
5195    % @defopvar.
5196    \def\defopvarparsebody #1#2#3#4#5 {%
5197      \parsebodycommon{#1}{#2}{#3}%
5198      \def#2##1 ##2 {\def#4{##1}%
5199        \defxbodycommon \spacesplit{#3{##2}}}%
5200      \begingroup\obeylines
5201      \spacesplit{#3{#5}}%
5202  }  }
5203    
5204  \def\defvrparsebody#1#2#3#4 {%  \def\defvrparsebody#1#2#3#4 {%
5205    \parsebodycommon{#1}{#2}{#3}%    \parsebodycommon{#1}{#2}{#3}%
5206      \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}%
5207      \begingroup\obeylines
5208    \spacesplit{#3{#4}}%    \spacesplit{#3{#4}}%
5209  }  }
5210    
# Line 4861  width0pt\relax} \fi Line 5219  width0pt\relax} \fi
5219  %  %
5220  \def\deftpparsebody #1#2#3#4 {%  \def\deftpparsebody #1#2#3#4 {%
5221    \parsebodycommon{#1}{#2}{#3}%    \parsebodycommon{#1}{#2}{#3}%
5222      \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}%
5223      \begingroup\obeylines
5224    \spacesplit{\parsetpheaderline{#3{#4}}}\empty    \spacesplit{\parsetpheaderline{#3{#4}}}\empty
5225  }  }
5226    
# Line 4877  width0pt\relax} \fi Line 5237  width0pt\relax} \fi
5237    #1{\removeemptybraces#2\relax}{#3}%    #1{\removeemptybraces#2\relax}{#3}%
5238  }%  }%
5239    
5240  \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %  % Split up #2 (the rest of the input line) at the first space token.
 \medbreak %  
 % Define the end token that this defining construct specifies  
 % so that it will exit this group.  
 \def#1{\endgraf\endgroup\medbreak}%  
 \def#2##1 ##2 {\def#4{##1}%  
 \begingroup\obeylines\spacesplit{#3{##2}}}%  
 \parindent=0in  
 \advance\leftskip by \defbodyindent  
 \exdentamount=\defbodyindent  
 \begingroup\obeylines\spacesplit{#3{#5}}}  
   
 % Split up #2 at the first space token.  
5241  % call #1 with two arguments:  % call #1 with two arguments:
5242  %  the first is all of #2 before the space token,  %  the first is all of #2 before the space token,
5243  %  the second is all of #2 after that space token.  %  the second is all of #2 after that space token.
5244  % If #2 contains no space token, all of it is passed as the first arg  % If #2 contains no space token, all of it is passed as the first arg
5245  % and the second is passed as empty.  % and the second is passed as empty.
5246    %
5247  {\obeylines  {\obeylines %
5248  \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%   \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}%
5249  \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%   \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{%
5250  \ifx\relax #3%     \ifx\relax #3%
5251  #1{#2}{}\else #1{#2}{#3#4}\fi}}       #1{#2}{}%
5252       \else %
5253  % So much for the things common to all kinds of definitions.       #1{#2}{#3#4}%
5254       \fi}%
5255    }
5256    
5257  % Define @defun.  % Define @defun.
5258    
5259  % First, define the processing that is wanted for arguments of \defun  % This is called to end the arguments processing for all the @def... commands.
5260  % Use this to expand the args and terminate the paragraph they make up  %
5261    \def\defargscommonending{%
5262      \interlinepenalty = 10000
5263      \advance\rightskip by 0pt plus 1fil
5264      \endgraf
5265      \nobreak\vskip -\parskip
5266      \penalty 10002  % signal to \parsebodycommon.
5267    }
5268    
5269    % This expands the args and terminates the paragraph they comprise.
5270    %
5271  \def\defunargs#1{\functionparens \sl  \def\defunargs#1{\functionparens \sl
5272  % Expand, preventing hyphenation at `-' chars.  % Expand, preventing hyphenation at `-' chars.
5273  % Note that groups don't affect changes in \hyphenchar.  % Note that groups don't affect changes in \hyphenchar.
# Line 4917  width0pt\relax} \fi Line 5276  width0pt\relax} \fi
5276  #1%  #1%
5277  {\tensl\hyphenchar\font=45}%  {\tensl\hyphenchar\font=45}%
5278  \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%  \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
5279  \interlinepenalty=10000    \defargscommonending
 \advance\rightskip by 0pt plus 1fil  
 \endgraf\nobreak\vskip -\parskip\nobreak  
5280  }  }
5281    
5282  \def\deftypefunargs #1{%  \def\deftypefunargs #1{%
# Line 4928  width0pt\relax} \fi Line 5285  width0pt\relax} \fi
5285  % Use \boldbraxnoamp, not \functionparens, so that & is not special.  % Use \boldbraxnoamp, not \functionparens, so that & is not special.
5286  \boldbraxnoamp  \boldbraxnoamp
5287  \tclose{#1}% avoid \code because of side effects on active chars  \tclose{#1}% avoid \code because of side effects on active chars
5288  \interlinepenalty=10000    \defargscommonending
 \advance\rightskip by 0pt plus 1fil  
 \endgraf\nobreak\vskip -\parskip\nobreak  
5289  }  }
5290    
5291  % Do complete processing of one @defun or @defunx line already parsed.  % Do complete processing of one @defun or @defunx line already parsed.
# Line 4941  width0pt\relax} \fi Line 5296  width0pt\relax} \fi
5296    
5297  \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%  \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
5298  \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %  \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
5299  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5300  }  }
5301    
5302  % @defun == @deffn Function  % @defun == @deffn Function
# Line 4951  width0pt\relax} \fi Line 5306  width0pt\relax} \fi
5306  \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index  \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
5307  \begingroup\defname {#1}{\putwordDeffunc}%  \begingroup\defname {#1}{\putwordDeffunc}%
5308  \defunargs {#2}\endgroup %  \defunargs {#2}\endgroup %
5309  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5310  }  }
5311    
5312  % @deftypefun int foobar (int @var{foo}, float @var{bar})  % @deftypefun int foobar (int @var{foo}, float @var{bar})
# Line 4965  width0pt\relax} \fi Line 5320  width0pt\relax} \fi
5320  \doind {fn}{\code{#2}}% Make entry in function index  \doind {fn}{\code{#2}}% Make entry in function index
5321  \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%  \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
5322  \deftypefunargs {#3}\endgroup %  \deftypefunargs {#3}\endgroup %
5323  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5324  }  }
5325    
5326  % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})  % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
# Line 4986  width0pt\relax} \fi Line 5341  width0pt\relax} \fi
5341  %               at least some C++ text from working  %               at least some C++ text from working
5342  \defname {\defheaderxcond#2\relax$.$#3}{#1}%  \defname {\defheaderxcond#2\relax$.$#3}{#1}%
5343  \deftypefunargs {#4}\endgroup %  \deftypefunargs {#4}\endgroup %
5344  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5345  }  }
5346    
5347  % @defmac == @deffn Macro  % @defmac == @deffn Macro
# Line 4996  width0pt\relax} \fi Line 5351  width0pt\relax} \fi
5351  \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index  \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
5352  \begingroup\defname {#1}{\putwordDefmac}%  \begingroup\defname {#1}{\putwordDefmac}%
5353  \defunargs {#2}\endgroup %  \defunargs {#2}\endgroup %
5354  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5355  }  }
5356    
5357  % @defspec == @deffn Special Form  % @defspec == @deffn Special Form
# Line 5006  width0pt\relax} \fi Line 5361  width0pt\relax} \fi
5361  \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index  \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
5362  \begingroup\defname {#1}{\putwordDefspec}%  \begingroup\defname {#1}{\putwordDefspec}%
5363  \defunargs {#2}\endgroup %  \defunargs {#2}\endgroup %
5364  \catcode 61=\other % Turn off change made in \defparsebody  \catcode\equalChar=\other % Turn off change made in \defparsebody
5365  }  }
5366    
5367  % @defop CATEGORY CLASS OPERATION ARG...  % @defop CATEGORY CLASS OPERATION ARG...
# Line 5015  width0pt\relax} \fi Line 5370  width0pt\relax} \fi
5370  \defopparsebody\Edefop\defopx\defopheader\defoptype}  \defopparsebody\Edefop\defopx\defopheader\defoptype}
5371  %  %
5372  \def\defopheader#1#2#3{%  \def\defopheader#1#2#3{%
5373  \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index    \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry
5374  \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}%    \begingroup
5375  \defunargs {#3}\endgroup %      \defname{#2}{\defoptype\ \putwordon\ #1}%
5376        \defunargs{#3}%
5377      \endgroup
5378  }  }
5379    
5380  % @deftypeop CATEGORY CLASS TYPE OPERATION ARG...  % @deftypeop CATEGORY CLASS TYPE OPERATION ARG...
# Line 5084  width0pt\relax} \fi Line 5441  width0pt\relax} \fi
5441  \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}  \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
5442    
5443  \def\defcvarheader #1#2#3{%  \def\defcvarheader #1#2#3{%
5444  \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index    \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry
5445  \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}%    \begingroup
5446  \defvarargs {#3}\endgroup %      \defname{#2}{\defcvtype\ \putwordof\ #1}%
5447        \defvarargs{#3}%
5448      \endgroup
5449  }  }
5450    
5451  % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME  % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME
# Line 5094  width0pt\relax} \fi Line 5453  width0pt\relax} \fi
5453  \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}  \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
5454  %  %
5455  \def\defivarheader#1#2#3{%  \def\defivarheader#1#2#3{%
5456    \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index    \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index
5457    \begingroup    \begingroup
5458      \defname{#2}{\putwordInstanceVariableof\ #1}%      \defname{#2}{\putwordInstanceVariableof\ #1}%
5459      \defvarargs{#3}%      \defvarargs{#3}%
# Line 5106  width0pt\relax} \fi Line 5465  width0pt\relax} \fi
5465  % This is actually simple: just print them in roman.  % This is actually simple: just print them in roman.
5466  % This must expand the args and terminate the paragraph they make up  % This must expand the args and terminate the paragraph they make up
5467  \def\defvarargs #1{\normalparens #1%  \def\defvarargs #1{\normalparens #1%
5468  \interlinepenalty=10000    \defargscommonending
5469  \endgraf\nobreak\vskip -\parskip\nobreak}  }
5470    
5471  % @defvr Counter foo-count  % @defvr Counter foo-count
5472    
# Line 5143  width0pt\relax} \fi Line 5502  width0pt\relax} \fi
5502  \def\deftypevarheader #1#2{%  \def\deftypevarheader #1#2{%
5503  \dovarind#2 \relax% Make entry in variables index  \dovarind#2 \relax% Make entry in variables index
5504  \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%  \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
5505  \interlinepenalty=10000    \defargscommonending
 \endgraf\nobreak\vskip -\parskip\nobreak  
5506  \endgroup}  \endgroup}
5507  \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}  \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
5508    
# Line 5154  width0pt\relax} \fi Line 5512  width0pt\relax} \fi
5512    
5513  \def\deftypevrheader #1#2#3{\dovarind#3 \relax%  \def\deftypevrheader #1#2#3{\dovarind#3 \relax%
5514  \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}  \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
5515  \interlinepenalty=10000    \defargscommonending
 \endgraf\nobreak\vskip -\parskip\nobreak  
5516  \endgroup}  \endgroup}
5517    
5518  % Now define @deftp  % Now define @deftp
# Line 5204  width0pt\relax} \fi Line 5561  width0pt\relax} \fi
5561   \def\scanmacro#1{%   \def\scanmacro#1{%
5562     \begingroup \newlinechar`\^^M     \begingroup \newlinechar`\^^M
5563     % Undo catcode changes of \startcontents and \doprintindex     % Undo catcode changes of \startcontents and \doprintindex
5564     \catcode`\@=0 \catcode`\\=12 \escapechar=`\@     \catcode`\@=0 \catcode`\\=\other \escapechar=`\@
5565     % Append \endinput to make sure that TeX does not see the ending newline.     % Append \endinput to make sure that TeX does not see the ending newline.
5566     \toks0={#1\endinput}%     \toks0={#1\endinput}%
5567     \immediate\openout\macscribble=\jobname.tmp     \immediate\openout\macscribble=\jobname.tmp
# Line 5218  width0pt\relax} \fi Line 5575  width0pt\relax} \fi
5575  \def\scanmacro#1{%  \def\scanmacro#1{%
5576  \begingroup \newlinechar`\^^M  \begingroup \newlinechar`\^^M
5577  % Undo catcode changes of \startcontents and \doprintindex  % Undo catcode changes of \startcontents and \doprintindex
5578  \catcode`\@=0 \catcode`\\=12 \escapechar=`\@  \catcode`\@=0 \catcode`\\=\other \escapechar=`\@
5579  \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup}  \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup}
5580  \fi  \fi
5581    
# Line 5248  width0pt\relax} \fi Line 5605  width0pt\relax} \fi
5605  }  }
5606    
5607  % Trim a single trailing ^^M off a string.  % Trim a single trailing ^^M off a string.
5608  {\catcode`\^^M=12\catcode`\Q=3%  {\catcode`\^^M=\other \catcode`\Q=3%
5609  \gdef\eatcr #1{\eatcra #1Q^^MQ}%  \gdef\eatcr #1{\eatcra #1Q^^MQ}%
5610  \gdef\eatcra#1^^MQ{\eatcrb#1Q}%  \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
5611  \gdef\eatcrb#1Q#2Q{#1}%  \gdef\eatcrb#1Q#2Q{#1}%
# Line 5263  width0pt\relax} \fi Line 5620  width0pt\relax} \fi
5620  % body, and then making it the \newlinechar in \scanmacro.  % body, and then making it the \newlinechar in \scanmacro.
5621    
5622  \def\macrobodyctxt{%  \def\macrobodyctxt{%
5623    \catcode`\~=12    \catcode`\~=\other
5624    \catcode`\^=12    \catcode`\^=\other
5625    \catcode`\_=12    \catcode`\_=\other
5626    \catcode`\|=12    \catcode`\|=\other
5627    \catcode`\<=12    \catcode`\<=\other
5628    \catcode`\>=12    \catcode`\>=\other
5629    \catcode`\+=12    \catcode`\+=\other
5630    \catcode`\{=12    \catcode`\{=\other
5631    \catcode`\}=12    \catcode`\}=\other
5632    \catcode`\@=12    \catcode`\@=\other
5633    \catcode`\^^M=12    \catcode`\^^M=\other
5634    \usembodybackslash}    \usembodybackslash}
5635    
5636  \def\macroargctxt{%  \def\macroargctxt{%
5637    \catcode`\~=12    \catcode`\~=\other
5638    \catcode`\^=12    \catcode`\^=\other
5639    \catcode`\_=12    \catcode`\_=\other
5640    \catcode`\|=12    \catcode`\|=\other
5641    \catcode`\<=12    \catcode`\<=\other
5642    \catcode`\>=12    \catcode`\>=\other
5643    \catcode`\+=12    \catcode`\+=\other
5644    \catcode`\@=12    \catcode`\@=\other
5645    \catcode`\\=12}    \catcode`\\=\other}
5646    
5647  % \mbodybackslash is the definition of \ in @macro bodies.  % \mbodybackslash is the definition of \ in @macro bodies.
5648  % It maps \foo\ => \csname macarg.foo\endcsname => #N  % It maps \foo\ => \csname macarg.foo\endcsname => #N
# Line 5326  width0pt\relax} \fi Line 5683  width0pt\relax} \fi
5683    \else \expandafter\parsemacbody    \else \expandafter\parsemacbody
5684    \fi}    \fi}
5685    
5686  \def\unmacro{\parsearg\unmacroxxx}  \def\unmacro{\parsearg\dounmacro}
5687  \def\unmacroxxx#1{%  \def\dounmacro#1{%
5688    \if1\csname ismacro.#1\endcsname    \if1\csname ismacro.#1\endcsname
5689      \global\cslet{#1}{macsave.#1}%      \global\cslet{#1}{macsave.#1}%
5690      \global\expandafter\let \csname ismacro.#1\endcsname=0%      \global\expandafter\let \csname ismacro.#1\endcsname=0%
5691      % Remove the macro name from \macrolist      % Remove the macro name from \macrolist:
5692      \begingroup      \begingroup
5693        \edef\tempa{\expandafter\noexpand\csname#1\endcsname}%        \expandafter\let\csname#1\endcsname \relax
5694        \def\do##1{%        \let\do\unmacrodo
5695          \def\tempb{##1}%        \xdef\macrolist{\macrolist}%
         \ifx\tempa\tempb  
           % remove this  
         \else  
           \toks0 = \expandafter{\newmacrolist\do}%  
           \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}%  
         \fi}%  
       \def\newmacrolist{}%  
       % Execute macro list to define \newmacrolist  
       \macrolist  
       \global\let\macrolist\newmacrolist  
5696      \endgroup      \endgroup
5697    \else    \else
5698      \errmessage{Macro #1 not defined}%      \errmessage{Macro #1 not defined}%
5699    \fi    \fi
5700  }  }
5701    
5702    % Called by \do from \dounmacro on each macro.  The idea is to omit any
5703    % macro definitions that have been changed to \relax.
5704    %
5705    \def\unmacrodo#1{%
5706      \ifx#1\relax
5707        % remove this
5708      \else
5709        \noexpand\do \noexpand #1%
5710      \fi
5711    }
5712    
5713  % This makes use of the obscure feature that if the last token of a  % This makes use of the obscure feature that if the last token of a
5714  % <parameter list> is #, then the preceding argument is delimited by  % <parameter list> is #, then the preceding argument is delimited by
5715  % an opening brace, and that opening brace is not consumed.  % an opening brace, and that opening brace is not consumed.
# Line 5499  width0pt\relax} \fi Line 5857  width0pt\relax} \fi
5857    
5858  % @node's job is to define \lastnode.  % @node's job is to define \lastnode.
5859  \def\node{\ENVcheck\parsearg\nodezzz}  \def\node{\ENVcheck\parsearg\nodezzz}
5860  \def\nodezzz#1{\nodexxx [#1,]}  \def\nodezzz#1{\nodexxx #1,\finishnodeparse}
5861  \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}  \def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}}
5862  \let\nwnode=\node  \let\nwnode=\node
5863  \let\lastnode=\relax  \let\lastnode=\relax
5864    
# Line 5534  width0pt\relax} \fi Line 5892  width0pt\relax} \fi
5892  \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}  \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
5893  \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}  \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
5894    
5895  % \setref{NAME}{SNT} defines a cross-reference point NAME, namely  % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
5896  % NAME-title, NAME-pg, and NAME-SNT.  Called from \foonoderef.  We have  % anchor), namely NAME-title (the corresponding @chapter/etc. name),
5897  % to set \indexdummies so commands such as @code in a section title  % NAME-pg (the page number), and NAME-snt (section number and type).
5898  % aren't expanded.  It would be nicer not to expand the titles in the  % Called from \foonoderef.
5899  % first place, but there's so many layers that that is hard to do.  %
5900    % We have to set \indexdummies so commands such as @code in a section
5901    % title aren't expanded.  It would be nicer not to expand the titles in
5902    % the first place, but there's so many layers that that is hard to do.
5903    %
5904    % Likewise, use \turnoffactive so that punctuation chars such as underscore
5905    % and backslash work in node names.
5906  %  %
5907  \def\setref#1#2{{%  \def\setref#1#2{{%
5908    \indexdummies    \atdummies
5909    \pdfmkdest{#1}%    \pdfmkdest{#1}%
5910      %
5911      \turnoffactive
5912    \dosetq{#1-title}{Ytitle}%    \dosetq{#1-title}{Ytitle}%
5913    \dosetq{#1-pg}{Ypagenumber}%    \dosetq{#1-pg}{Ypagenumber}%
5914    \dosetq{#1-snt}{#2}%    \dosetq{#1-snt}{#2}%
# Line 5594  width0pt\relax} \fi Line 5960  width0pt\relax} \fi
5960    \ifpdf    \ifpdf
5961      \leavevmode      \leavevmode
5962      \getfilename{#4}%      \getfilename{#4}%
5963      {\normalturnoffactive      {\turnoffactive \otherbackslash
5964       \ifnum\filenamelength>0       \ifnum\filenamelength>0
5965         \startlink attr{/Border [0 0 0]}%         \startlink attr{/Border [0 0 0]}%
5966           goto file{\the\filename.pdf} name{#1}%           goto file{\the\filename.pdf} name{#1}%
# Line 5614  width0pt\relax} \fi Line 5980  width0pt\relax} \fi
5980      % into the usual \leavevmode...\vrule stuff for purposes of      % into the usual \leavevmode...\vrule stuff for purposes of
5981      % printing. So we \turnoffactive for the \refx-snt, back on for the      % printing. So we \turnoffactive for the \refx-snt, back on for the
5982      % printing, back off for the \refx-pg.      % printing, back off for the \refx-pg.
5983      {\normalturnoffactive      {\turnoffactive \otherbackslash
5984       % Only output a following space if the -snt ref is nonempty; for       % Only output a following space if the -snt ref is nonempty; for
5985       % @unnumbered and @anchor, it won't be.       % @unnumbered and @anchor, it won't be.
5986       \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%       \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
5987       \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi       \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
5988      }%      }%
5989      % [mynode],      % output the `[mynode]' via a macro.
5990      [\printednodename],\space      \xrefprintnodename\printednodename
5991      % page 3      %
5992      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%      % But we always want a comma and a space:
5993        ,\space
5994        %
5995        % output the `page 3'.
5996        \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
5997    \fi    \fi
5998    \endlink    \endlink
5999  \endgroup}  \endgroup}
6000    
6001  % \dosetq is the interface for calls from other macros  % This macro is called from \xrefX for the `[nodename]' part of xref
6002    % output.  It's a separate macro only so it can be changed more easily,
6003    % since not square brackets don't work in some documents.  Particularly
6004    % one that Bob is working on :).
6005    %
6006    \def\xrefprintnodename#1{[#1]}
6007    
6008  % Use \normalturnoffactive so that punctuation chars such as underscore  % \dosetq is called from \setref to do the actual \write (\iflinks).
6009  % and backslash work in node names.  (\turnoffactive doesn't do \.)  %
6010  \def\dosetq#1#2{%  \def\dosetq#1#2{%
6011    {\let\folio=0%    {\let\folio=0%
    \normalturnoffactive  
6012     \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%     \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
6013     \iflinks     \iflinks \next \fi
      \next  
    \fi  
6014    }%    }%
6015  }  }
6016    
6017  % \internalsetq {foo}{page} expands into  % \internalsetq{foo}{page} expands into
6018  % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}  %   CHARACTERS @xrdef{foo}{...expansion of \page...}
6019  % When the aux file is read, ' is the escape character  \def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
   
 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}  
   
 % Things to be expanded by \internalsetq  
6020    
6021    % Things to be expanded by \internalsetq.
6022    %
6023  \def\Ypagenumber{\folio}  \def\Ypagenumber{\folio}
   
6024  \def\Ytitle{\thissection}  \def\Ytitle{\thissection}
   
6025  \def\Ynothing{}  \def\Ynothing{}
   
6026  \def\Ysectionnumberandtype{%  \def\Ysectionnumberandtype{%
6027  \ifnum\secno=0 \putwordChapter\xreftie\the\chapno %    \ifnum\secno=0
6028  \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %      \putwordChapter@tie \the\chapno
6029  \else \ifnum \subsubsecno=0 %    \else \ifnum\subsecno=0
6030  \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %      \putwordSection@tie \the\chapno.\the\secno
6031  \else %    \else \ifnum\subsubsecno=0
6032  \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %      \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
6033  \fi \fi \fi }    \else
6034        \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
6035      \fi\fi\fi
6036    }
6037    
6038  \def\Yappendixletterandtype{%  \def\Yappendixletterandtype{%
6039  \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%    \ifnum\secno=0
6040  \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %       \putwordAppendix@tie @char\the\appendixno{}%
6041  \else \ifnum \subsubsecno=0 %    \else \ifnum\subsecno=0
6042  \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %       \putwordSection@tie @char\the\appendixno.\the\secno
6043  \else %    \else \ifnum\subsubsecno=0
6044  \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %      \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
6045  \fi \fi \fi }    \else
6046        \putwordSection@tie
6047  \gdef\xreftie{'tie}        @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
6048      \fi\fi\fi
6049    }
6050    
6051  % Use TeX 3.0's \inputlineno to get the line number, for better error  % Use TeX 3.0's \inputlineno to get the line number, for better error
6052  % messages, but if we're using an old version of TeX, don't do anything.  % messages, but if we're using an old version of TeX, don't do anything.
6053  %  %
6054  \ifx\inputlineno\thisisundefined  \ifx\inputlineno\thisisundefined
6055    \let\linenumber = \empty % Non-3.0.    \let\linenumber = \empty % Pre-3.0.
6056  \else  \else
6057    \def\linenumber{\the\inputlineno:\space}    \def\linenumber{\the\inputlineno:\space}
6058  \fi  \fi
6059    
6060  % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.  % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
6061  % If its value is nonempty, SUFFIX is output afterward.  % If its value is nonempty, SUFFIX is output afterward.
6062    %
6063  \def\refx#1#2{%  \def\refx#1#2{%
6064    \expandafter\ifx\csname X#1\endcsname\relax    {%
6065        \indexnofonts
6066        \otherbackslash
6067        \expandafter\global\expandafter\let\expandafter\thisrefX
6068          \csname X#1\endcsname
6069      }%
6070      \ifx\thisrefX\relax
6071      % If not defined, say something at least.      % If not defined, say something at least.
6072      \angleleft un\-de\-fined\angleright      \angleleft un\-de\-fined\angleright
6073      \iflinks      \iflinks
# Line 5704  width0pt\relax} \fi Line 6082  width0pt\relax} \fi
6082      \fi      \fi
6083    \else    \else
6084      % It's defined, so just use it.      % It's defined, so just use it.
6085      \csname X#1\endcsname      \thisrefX
6086    \fi    \fi
6087    #2% Output the suffix in any case.    #2% Output the suffix in any case.
6088  }  }
6089    
6090  % This is the macro invoked by entries in the aux file.  % This is the macro invoked by entries in the aux file.
6091  %  %
6092  \def\xrdef#1{\begingroup  \def\xrdef#1{\expandafter\gdef\csname X#1\endcsname}
   % Reenable \ as an escape while reading the second argument.  
   \catcode`\\ = 0  
   \afterassignment\endgroup  
   \expandafter\gdef\csname X#1\endcsname  
 }  
6093    
6094  % Read the last existing aux file, if any.  No error if none exists.  % Read the last existing aux file, if any.  No error if none exists.
6095  \def\readauxfile{\begingroup  \def\readauxfile{\begingroup
# Line 5747  width0pt\relax} \fi Line 6120  width0pt\relax} \fi
6120    \catcode`\^^]=\other    \catcode`\^^]=\other
6121    \catcode`\^^^=\other    \catcode`\^^^=\other
6122    \catcode`\^^_=\other    \catcode`\^^_=\other
6123    \catcode`\@=\other    % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
   \catcode`\^=\other  
   % It was suggested to define this as 7, which would allow ^^e4 etc.  
6124    % in xref tags, i.e., node names.  But since ^^e4 notation isn't    % in xref tags, i.e., node names.  But since ^^e4 notation isn't
6125    % supported in the main text, it doesn't seem desirable.  Furthermore,    % supported in the main text, it doesn't seem desirable.  Furthermore,
6126    % that is not enough: for node names that actually contain a ^    % that is not enough: for node names that actually contain a ^
# Line 5762  width0pt\relax} \fi Line 6133  width0pt\relax} \fi
6133    % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter    % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
6134    % and then to call \auxhat in \setq.    % and then to call \auxhat in \setq.
6135    %    %
6136      \catcode`\^=\other
6137      %
6138      % Special characters.  Should be turned off anyway, but...
6139    \catcode`\~=\other    \catcode`\~=\other
6140    \catcode`\[=\other    \catcode`\[=\other
6141    \catcode`\]=\other    \catcode`\]=\other
# Line 5773  width0pt\relax} \fi Line 6147  width0pt\relax} \fi
6147    \catcode`\$=\other    \catcode`\$=\other
6148    \catcode`\#=\other    \catcode`\#=\other
6149    \catcode`\&=\other    \catcode`\&=\other
6150      \catcode`\%=\other
6151    \catcode`+=\other % avoid \+ for paranoia even though we've turned it off    \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
6152      %
6153    % Make the characters 128-255 be printing characters    % Make the characters 128-255 be printing characters
6154    {%    {%
6155      \count 1=128      \count 1=128
# Line 5783  width0pt\relax} \fi Line 6159  width0pt\relax} \fi
6159        \ifnum \count 1<256 \loop \fi        \ifnum \count 1<256 \loop \fi
6160      }%      }%
6161    }%    }%
6162    % The aux file uses ' as the escape (for now).    %
6163    % Turn off \ as an escape so we do not lose on    % Turn off \ as an escape so we do not lose on
6164    % entries which were dumped with control sequences in their names.    % entries which were dumped with control sequences in their names.
6165    % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^    % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^
6166    % Reference to such entries still does not work the way one would wish,    % Reference to such entries still does not work the way one would wish,
6167    % but at least they do not bomb out when the aux file is read in.    % but at least they do not bomb out when the aux file is read in.
6168      \catcode`\\=\other
6169      %
6170      % @ is our escape character in .aux files.
6171    \catcode`\{=1    \catcode`\{=1
6172    \catcode`\}=2    \catcode`\}=2
6173    \catcode`\%=\other    \catcode`\@=0
   \catcode`\'=0  
   \catcode`\\=\other  
6174    %    %
6175    \openin 1 \jobname.aux    \openin 1 \jobname.aux
6176    \ifeof 1 \else    \ifeof 1 \else
# Line 5827  width0pt\relax} \fi Line 6204  width0pt\relax} \fi
6204  %  %
6205  % Auto-number footnotes.  Otherwise like plain.  % Auto-number footnotes.  Otherwise like plain.
6206  \gdef\footnote{%  \gdef\footnote{%
6207      \let\indent=\ptexindent
6208    \global\advance\footnoteno by \@ne    \global\advance\footnoteno by \@ne
6209    \edef\thisfootno{$^{\the\footnoteno}$}%    \edef\thisfootno{$^{\the\footnoteno}$}%
6210    %    %
6211    % In case the footnote comes at the end of a sentence, preserve the    % In case the footnote comes at the end of a sentence, preserve the
6212    % extra spacing after we do the footnote number.    % extra spacing after we do the footnote number.
6213    \let\@sf\empty    \let\@sf\empty
6214    \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi    \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
6215    %    %
6216    % Remove inadvertent blank space before typesetting the footnote number.    % Remove inadvertent blank space before typesetting the footnote number.
6217    \unskip    \unskip
6218    \thisfootno\@sf    \thisfootno\@sf
6219    \footnotezzz    \dofootnote
6220  }%  }%
6221    
6222  % Don't bother with the trickery in plain.tex to not require the  % Don't bother with the trickery in plain.tex to not require the
# Line 5848  width0pt\relax} \fi Line 6226  width0pt\relax} \fi
6226  % \parseargline fail inside footnotes because the tokens are fixed when  % \parseargline fail inside footnotes because the tokens are fixed when
6227  % the footnote is read.  --karl, 16nov96.  % the footnote is read.  --karl, 16nov96.
6228  %  %
6229  \long\gdef\footnotezzz{\insert\footins\bgroup  % The start of the footnote looks usually like this:
6230    \gdef\startfootins{\insert\footins\bgroup}
6231    %
6232    % ... but this macro is redefined inside @multitable.
6233    %
6234    \gdef\dofootnote{%
6235      \startfootins
6236    % We want to typeset this text as a normal paragraph, even if the    % We want to typeset this text as a normal paragraph, even if the
6237    % footnote reference occurs in (for example) a display environment.    % footnote reference occurs in (for example) a display environment.
6238    % So reset some parameters.    % So reset some parameters.
6239      \hsize=\pagewidth
6240    \interlinepenalty\interfootnotelinepenalty    \interlinepenalty\interfootnotelinepenalty
6241    \splittopskip\ht\strutbox % top baseline for broken footnotes    \splittopskip\ht\strutbox % top baseline for broken footnotes
6242    \splitmaxdepth\dp\strutbox    \splitmaxdepth\dp\strutbox
# Line 5881  width0pt\relax} \fi Line 6266  width0pt\relax} \fi
6266    \footstrut    \footstrut
6267    \futurelet\next\fo@t    \futurelet\next\fo@t
6268  }  }
 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t  
   \else\let\next\f@t\fi \next}  
 \def\f@@t{\bgroup\aftergroup\@foot\let\next}  
 \def\f@t#1{#1\@foot}  
 \def\@foot{\strut\par\egroup}  
   
6269  }%end \catcode `\@=11  }%end \catcode `\@=11
6270    
6271  % @| inserts a changebar to the left of the current line.  It should  % @| inserts a changebar to the left of the current line.  It should
# Line 5933  width0pt\relax} \fi Line 6312  width0pt\relax} \fi
6312  \openin 1 = epsf.tex  \openin 1 = epsf.tex
6313  \ifeof 1 \else  \ifeof 1 \else
6314    \closein 1    \closein 1
6315    % Do not bother showing banner with post-v2.7 epsf.tex (available in    % Do not bother showing banner with epsf.tex v2.7k (available in
6316    % doc/epsf.tex until it shows up on ctan).    % doc/epsf.tex and on ctan).
6317    \def\epsfannounce{\toks0 = }%    \def\epsfannounce{\toks0 = }%
6318    \input epsf.tex    \input epsf.tex
6319  \fi  \fi
# Line 6059  should work if nowhere else does.} Line 6438  should work if nowhere else does.}
6438  }  }
6439    
6440  % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;  % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
6441  % 4) hoffset; 5) binding offset; 6) topskip.  We also call  % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
6442  % \setleading{\textleading}, so the caller should define \textleading.  % physical page width.
6443  % The caller should also set \parskip.  %
6444    % We also call \setleading{\textleading}, so the caller should define
6445    % \textleading.  The caller should also set \parskip.
6446  %  %
6447  \def\internalpagesizes#1#2#3#4#5#6{%  \def\internalpagesizes#1#2#3#4#5#6#7#8{%
6448    \voffset = #3\relax    \voffset = #3\relax
6449    \topskip = #6\relax    \topskip = #6\relax
6450    \splittopskip = \topskip    \splittopskip = \topskip
# Line 6082  should work if nowhere else does.} Line 6463  should work if nowhere else does.}
6463    \normaloffset = #4\relax    \normaloffset = #4\relax
6464    \bindingoffset = #5\relax    \bindingoffset = #5\relax
6465    %    %
6466      \ifpdf
6467        \pdfpageheight #7\relax
6468        \pdfpagewidth #8\relax
6469      \fi
6470      %
6471    \setleading{\textleading}    \setleading{\textleading}
6472    %    %
6473    \parindent = \defaultparindent    \parindent = \defaultparindent
6474    \setemergencystretch    \setemergencystretch
6475  }  }
6476    
 % Use `small' versions.  
 %  
 \def\smallenvironments{%  
   \let\smalldisplay = \smalldisplayx  
   \let\smallexample = \smalllispx  
   \let\smallformat = \smallformatx  
   \let\smalllisp = \smalllispx  
 }  
   
6477  % @letterpaper (the default).  % @letterpaper (the default).
6478  \def\letterpaper{{\globaldefs = 1  \def\letterpaper{{\globaldefs = 1
6479    \parskip = 3pt plus 2pt minus 1pt    \parskip = 3pt plus 2pt minus 1pt
6480    \textleading = 13.2pt    \textleading = 13.2pt
6481    %    %
6482    % If page is nothing but text, make it come out even.    % If page is nothing but text, make it come out even.
6483    \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%    \internalpagesizes{46\baselineskip}{6in}%
6484                        {\voffset}{.25in}%
6485                        {\bindingoffset}{36pt}%
6486                        {11in}{8.5in}%
6487  }}  }}
6488    
6489  % Use @smallbook to reset parameters for 7x9.5 (or so) format.  % Use @smallbook to reset parameters for 7x9.5 (or so) format.
# Line 6111  should work if nowhere else does.} Line 6491  should work if nowhere else does.}
6491    \parskip = 2pt plus 1pt    \parskip = 2pt plus 1pt
6492    \textleading = 12pt    \textleading = 12pt
6493    %    %
6494    \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%    \internalpagesizes{7.5in}{5in}%
6495                        {\voffset}{.25in}%
6496                        {\bindingoffset}{16pt}%
6497                        {9.25in}{7in}%
6498    %    %
6499    \lispnarrowing = 0.3in    \lispnarrowing = 0.3in
6500    \tolerance = 700    \tolerance = 700
6501    \hfuzz = 1pt    \hfuzz = 1pt
6502    \contentsrightmargin = 0pt    \contentsrightmargin = 0pt
   \deftypemargin = 0pt  
6503    \defbodyindent = .5cm    \defbodyindent = .5cm
   \smallenvironments  
6504  }}  }}
6505    
6506  % Use @afourpaper to print on European A4 paper.  % Use @afourpaper to print on European A4 paper.
6507  \def\afourpaper{{\globaldefs = 1  \def\afourpaper{{\globaldefs = 1
6508    \parskip = 3pt plus 2pt minus 1pt    \parskip = 3pt plus 2pt minus 1pt
6509    \textleading = 12pt    \textleading = 13.2pt
6510    %    %
6511    \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%    % Double-side printing via postscript on Laserjet 4050
6512      % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
6513      % To change the settings for a different printer or situation, adjust
6514      % \normaloffset until the front-side and back-side texts align.  Then
6515      % do the same for \bindingoffset.  You can set these for testing in
6516      % your texinfo source file like this:
6517      % @tex
6518      % \global\normaloffset = -6mm
6519      % \global\bindingoffset = 10mm
6520      % @end tex
6521      \internalpagesizes{51\baselineskip}{160mm}
6522                        {\voffset}{\hoffset}%
6523                        {\bindingoffset}{44pt}%
6524                        {297mm}{210mm}%
6525    %    %
6526    \tolerance = 700    \tolerance = 700
6527    \hfuzz = 1pt    \hfuzz = 1pt
6528      \contentsrightmargin = 0pt
6529      \defbodyindent = 5mm
6530  }}  }}
6531    
6532  % Use @afivepaper to print on European A5 paper.  % Use @afivepaper to print on European A5 paper.
# Line 6140  should work if nowhere else does.} Line 6536  should work if nowhere else does.}
6536    \parskip = 2pt plus 1pt minus 0.1pt    \parskip = 2pt plus 1pt minus 0.1pt
6537    \textleading = 12.5pt    \textleading = 12.5pt
6538    %    %
6539    \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%    \internalpagesizes{160mm}{120mm}%
6540                        {\voffset}{\hoffset}%
6541                        {\bindingoffset}{8pt}%
6542                        {210mm}{148mm}%
6543    %    %
6544    \lispnarrowing = 0.2in    \lispnarrowing = 0.2in
6545    \tolerance = 800    \tolerance = 800
6546    \hfuzz = 1.2pt    \hfuzz = 1.2pt
6547    \contentsrightmargin = 0mm    \contentsrightmargin = 0pt
   \deftypemargin = 0pt  
6548    \defbodyindent = 2mm    \defbodyindent = 2mm
6549    \tableindent = 12mm    \tableindent = 12mm
   %  
   \smallenvironments  
6550  }}  }}
6551    
6552  % A specific text layout, 24x15cm overall, intended for A4 paper.  Top margin  % A specific text layout, 24x15cm overall, intended for A4 paper.
 % 29mm, hence bottom margin 28mm, nominal side margin 3cm.  
6553  \def\afourlatex{{\globaldefs = 1  \def\afourlatex{{\globaldefs = 1
   \textleading = 13.6pt  
   %  
6554    \afourpaper    \afourpaper
6555    \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%    \internalpagesizes{237mm}{150mm}%
6556                        {\voffset}{4.6mm}%
6557                        {\bindingoffset}{7mm}%
6558                        {297mm}{210mm}%
6559    %    %
6560    % Must explicitly reset to 0 because we call \afourpaper, apparently,    % Must explicitly reset to 0 because we call \afourpaper.
   % although this does not entirely make sense.  
6561    \globaldefs = 0    \globaldefs = 0
6562  }}  }}
6563    
6564  % Use @afourwide to print on European A4 paper in wide format.  % Use @afourwide to print on A4 paper in landscape format.
6565  \def\afourwide{%  \def\afourwide{{\globaldefs = 1
6566    \afourpaper    \afourpaper
6567    \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%    \internalpagesizes{241mm}{165mm}%
6568  }                      {\voffset}{-2.95mm}%
6569                        {\bindingoffset}{7mm}%
6570                        {297mm}{210mm}%
6571      \globaldefs = 0
6572    }}
6573    
6574  % @pagesizes TEXTHEIGHT[,TEXTWIDTH]  % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
6575  % Perhaps we should allow setting the margins, \topskip, \parskip,  % Perhaps we should allow setting the margins, \topskip, \parskip,
# Line 6185  should work if nowhere else does.} Line 6584  should work if nowhere else does.}
6584    \parskip = 3pt plus 2pt minus 1pt    \parskip = 3pt plus 2pt minus 1pt
6585    \setleading{\textleading}%    \setleading{\textleading}%
6586    %    %
6587    \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%    \dimen0 = #1
6588      \advance\dimen0 by \voffset
6589      %
6590      \dimen2 = \hsize
6591      \advance\dimen2 by \normaloffset
6592      %
6593      \internalpagesizes{#1}{\hsize}%
6594                        {\voffset}{\normaloffset}%
6595                        {\bindingoffset}{44pt}%
6596                        {\dimen0}{\dimen2}%
6597  }}  }}
6598    
6599  % Set default to letter.  % Set default to letter.
# Line 6249  should work if nowhere else does.} Line 6657  should work if nowhere else does.}
6657  \catcode`\_=\active  \catcode`\_=\active
6658  \def_{\ifusingtt\normalunderscore\_}  \def_{\ifusingtt\normalunderscore\_}
6659  % Subroutine for the previous macro.  % Subroutine for the previous macro.
6660  \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}  \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
6661    
6662  \catcode`\|=\active  \catcode`\|=\active
6663  \def|{{\tt\char124}}  \def|{{\tt\char124}}
# Line 6263  should work if nowhere else does.} Line 6671  should work if nowhere else does.}
6671  \def+{{\tt \char 43}}  \def+{{\tt \char 43}}
6672  \catcode`\$=\active  \catcode`\$=\active
6673  \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix  \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
 %\catcode 27=\active  
 %\def^^[{$\diamondsuit$}  
6674    
6675  % Set up an active definition for =, but don't enable it most of the time.  % Set up an active definition for =, but don't enable it most of the time.
6676  {\catcode`\==\active  {\catcode`\==\active
# Line 6281  should work if nowhere else does.} Line 6687  should work if nowhere else does.}
6687    
6688  \catcode`\@=0  \catcode`\@=0
6689    
6690  % \rawbackslashxx output one backslash character in current font  % \rawbackslashxx outputs one backslash character in current font,
6691    % as in \char`\\.
6692  \global\chardef\rawbackslashxx=`\\  \global\chardef\rawbackslashxx=`\\
 %{\catcode`\\=\other  
 %@gdef@rawbackslashxx{\}}  
6693    
6694  % \rawbackslash redefines \ as input to do \rawbackslashxx.  % \rawbackslash defines an active \ to do \rawbackslashxx.
6695    % \otherbackslash defines an active \ to be a literal `\' character with
6696    % catcode other.
6697  {\catcode`\\=\active  {\catcode`\\=\active
6698  @gdef@rawbackslash{@let\=@rawbackslashxx }}   @gdef@rawbackslash{@let\=@rawbackslashxx}
6699     @gdef@otherbackslash{@let\=@realbackslash}
6700    }
6701    
6702    % \realbackslash is an actual character `\' with catcode other.
6703    {\catcode`\\=\other @gdef@realbackslash{\}}
6704    
6705  % \normalbackslash outputs one backslash in fixed width font.  % \normalbackslash outputs one backslash in fixed width font.
6706  \def\normalbackslash{{\tt\rawbackslashxx}}  \def\normalbackslash{{\tt\rawbackslashxx}}
6707    
 % \catcode 17=0   % Define control-q  
6708  \catcode`\\=\active  \catcode`\\=\active
6709    
6710  % Used sometimes to turn off (effectively) the active characters  % Used sometimes to turn off (effectively) the active characters
6711  % even after parsing them.  % even after parsing them.
6712  @def@turnoffactive{@let"=@normaldoublequote  @def@turnoffactive{%
6713  @let\=@realbackslash    @let"=@normaldoublequote
6714  @let~=@normaltilde    @let\=@realbackslash
6715  @let^=@normalcaret    @let~=@normaltilde
6716  @let_=@normalunderscore    @let^=@normalcaret
6717  @let|=@normalverticalbar    @let_=@normalunderscore
6718  @let<=@normalless    @let|=@normalverticalbar
6719  @let>=@normalgreater    @let<=@normalless
6720  @let+=@normalplus    @let>=@normalgreater
6721  @let$=@normaldollar}%$ font-lock fix    @let+=@normalplus
6722      @let$=@normaldollar %$ font-lock fix
6723  @def@normalturnoffactive{@let"=@normaldoublequote  }
6724  @let\=@normalbackslash  
6725  @let~=@normaltilde  % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
6726  @let^=@normalcaret  % the literal character `\'.  (Thus, \ is not expandable when this is in
6727  @let_=@normalunderscore  % effect.)
6728  @let|=@normalverticalbar  %
6729  @let<=@normalless  @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
 @let>=@normalgreater  
 @let+=@normalplus  
 @let$=@normaldollar}%$ font-lock fix  
6730    
6731  % Make _ and + \other characters, temporarily.  % Make _ and + \other characters, temporarily.
6732  % This is canceled by @fixbackslash.  % This is canceled by @fixbackslash.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26