/[gcl]/gcl/info/texinfo.tex
ViewVC logotype

Diff of /gcl/info/texinfo.tex

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

revision 1.1.1.1 by wfs, Mon Dec 6 22:44:05 1999 UTC revision 1.2 by camm, Sun Feb 3 18:44:07 2002 UTC
# Line 1  Line 1 
1  %% TeX macros to handle texinfo files  % texinfo.tex -- TeX macros to handle Texinfo files.
2    %
3  %   Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.  % Load plain if necessary, i.e., if running under initex.
4    \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5  %This texinfo.tex file is free software; you can redistribute it and/or  %
6  %modify it under the terms of the GNU General Public License as  \def\texinfoversion{1999-01-05}%
7  %published by the Free Software Foundation; either version 2, or (at  %
8  %your option) any later version.  % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
9    % Free Software Foundation, Inc.
10  %This texinfo.tex file is distributed in the hope that it will be  %
11  %useful, but WITHOUT ANY WARRANTY; without even the implied warranty  % This texinfo.tex file is free software; you can redistribute it and/or
12  %of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  % modify it under the terms of the GNU General Public License as
13  %General Public License for more details.  % published by the Free Software Foundation; either version 2, or (at
14    % your option) any later version.
15  %You should have received a copy of the GNU General Public License  %
16  %along with this texinfo.tex file; see the file COPYING.  If not, write  % This texinfo.tex file is distributed in the hope that it will be
17  %to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,  % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
18  %USA.  % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    % General Public License for more details.
20    %
21  %In other words, you are welcome to use, share and improve this program.  % You should have received a copy of the GNU General Public License
22  %You are forbidden to forbid anyone else to use, share and improve  % along with this texinfo.tex file; see the file COPYING.  If not, write
23  %what you give them.   Help stamp out software-hoarding!  % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24    % Boston, MA 02111-1307, USA.
25  % This automatically updates the version number based on RCS.  %
26  \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}  % In other words, you are welcome to use, share and improve this program.
27  \deftexinfoversion$Revision$  % You are forbidden to forbid anyone else to use, share and improve
28  \message{Loading texinfo package [Version \texinfoversion]:}  % what you give them.   Help stamp out software-hoarding!
29    %
30  % Print the version number if in a .fmt file.  % Please try the latest version of texinfo.tex before submitting bug
31  \everyjob{\message{[Texinfo version \texinfoversion]}\message{}}  % reports; you can get the latest version from:
32    %   ftp://ftp.gnu.org/pub/gnu/texinfo.tex
33    %   /home/gd/gnu/doc/texinfo.tex on the GNU machines.
34    %   (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
35    %   ftp://tug.org/tex/texinfo.tex
36    %   ftp://ctan.org/macros/texinfo/texinfo.tex
37    %   (and all CTAN mirrors, finger ctan@ctan.org for a list).
38    % The texinfo.tex in the texinfo distribution itself could well be out
39    % of date, so if that's what you're using, please check.
40    %
41    % Send bug reports to bug-texinfo@gnu.org.
42    % Please include a precise test case in each bug report,
43    % including a complete document with which we can reproduce the problem.
44    %
45    % To process a Texinfo manual with TeX, it's most reliable to use the
46    % texi2dvi shell script that comes with the distribution.  For simple
47    % manuals, however, you can get away with:
48    %   tex foo.texi
49    %   texindex foo.??
50    %   tex foo.texi
51    %   tex foo.texi
52    %   dvips foo.dvi -o # or whatever, to process the dvi file.
53    % The extra runs of TeX get the cross-reference information correct.
54    % Sometimes one run after texindex suffices, and sometimes you need more
55    % than two; texi2dvi does it as many times as necessary.
56    
57    \message{Loading texinfo [version \texinfoversion]:}
58    
59    % If in a .fmt file, print the version number
60    % and turn on active characters that we couldn't do earlier because
61    % they might have appeared in the input file name.
62    \everyjob{\message{[Texinfo version \texinfoversion]}%
63      \catcode`+=\active \catcode`\_=\active}
64    
65  % Save some parts of plain tex whose names we will redefine.  % Save some parts of plain tex whose names we will redefine.
66    
 \let\ptextilde=\~  
 \let\ptexlbrace=\{  
 \let\ptexrbrace=\}  
 \let\ptexdots=\dots  
 \let\ptexdot=\.  
 \let\ptexstar=\*  
 \let\ptexend=\end  
 \let\ptexbullet=\bullet  
67  \let\ptexb=\b  \let\ptexb=\b
68    \let\ptexbullet=\bullet
69  \let\ptexc=\c  \let\ptexc=\c
70    \let\ptexcomma=\,
71    \let\ptexdot=\.
72    \let\ptexdots=\dots
73    \let\ptexend=\end
74    \let\ptexequiv=\equiv
75    \let\ptexexclam=\!
76  \let\ptexi=\i  \let\ptexi=\i
77    \let\ptexlbrace=\{
78    \let\ptexrbrace=\}
79    \let\ptexstar=\*
80  \let\ptext=\t  \let\ptext=\t
 \let\ptexl=\l  
 \let\ptexL=\L  
81    
82  % Be sure we're in horizontal mode when doing a tie, since we make space  % We never want plain's outer \+ definition in Texinfo.
83  % equivalent to this in @example-like environments. Otherwise, a space  % For @tex, we can use \tabalign.
84  % at the beginning of a line will start with \penalty -- and  \let\+ = \relax
85  % since \penalty is valid in vertical mode, we'd end up putting the  
 % penalty on the vertical list instead of in the new paragraph.  
 {\catcode`@ = 11  
  \gdef\tie{\leavevmode\penalty\@M\ }  
 }  
 \let\~ = \tie                  % And make it available as @~.  
86    
87  \message{Basics,}  \message{Basics,}
88  \chardef\other=12  \chardef\other=12
# Line 64  Line 91 
91  % starts a new line in the output.  % starts a new line in the output.
92  \newlinechar = `^^J  \newlinechar = `^^J
93    
94  % Set up fixed words for English.  % Set up fixed words for English if not already set.
95  \ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi%  \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
96  \def\putwordInfo{Info}%  \ifx\putwordChapter\undefined  \gdef\putwordChapter{Chapter}\fi
97  \ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi%  \ifx\putwordfile\undefined     \gdef\putwordfile{file}\fi
98  \ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi%  \ifx\putwordInfo\undefined     \gdef\putwordInfo{Info}\fi
99  \ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi%  \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
100  \ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi%  \ifx\putwordon\undefined       \gdef\putwordon{on}\fi
101  \ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi%  \ifx\putwordpage\undefined     \gdef\putwordpage{page}\fi
102  \ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi%  \ifx\putwordsection\undefined  \gdef\putwordsection{section}\fi
103  \ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi%  \ifx\putwordSection\undefined  \gdef\putwordSection{Section}\fi
104  \ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi%  \ifx\putwordsee\undefined      \gdef\putwordsee{see}\fi
105  \ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi%  \ifx\putwordSee\undefined      \gdef\putwordSee{See}\fi
106    \ifx\putwordShortContents\undefined  \gdef\putwordShortContents{Short Contents}\fi
107    \ifx\putwordTableofContents\undefined\gdef\putwordTableofContents{Table of Contents}\fi
108    
109  % Ignore a token.  % Ignore a token.
110  %  %
# Line 84  Line 113 
113  \hyphenation{ap-pen-dix}  \hyphenation{ap-pen-dix}
114  \hyphenation{mini-buf-fer mini-buf-fers}  \hyphenation{mini-buf-fer mini-buf-fers}
115  \hyphenation{eshell}  \hyphenation{eshell}
116    \hyphenation{white-space}
117    
118  % 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.
119  \newdimen \bindingoffset  \bindingoffset=0pt  \newdimen \bindingoffset
120  \newdimen \normaloffset   \normaloffset=\hoffset  \newdimen \normaloffset
121  \newdimen\pagewidth \newdimen\pageheight  \newdimen\pagewidth \newdimen\pageheight
 \pagewidth=\hsize \pageheight=\vsize  
122    
123  % Sometimes it is convenient to have everything in the transcript file  % Sometimes it is convenient to have everything in the transcript file
124  % and nothing on the terminal.  We don't just call \tracingall here,  % and nothing on the terminal.  We don't just call \tracingall here,
125  % since that produces some useless output on the terminal.  % since that produces some useless output on the terminal.
126  %  %
127  \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%  \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
128    \ifx\eTeXversion\undefined
129  \def\loggingall{\tracingcommands2 \tracingstats2  \def\loggingall{\tracingcommands2 \tracingstats2
130     \tracingpages1 \tracingoutput1 \tracinglostchars1     \tracingpages1 \tracingoutput1 \tracinglostchars1
131     \tracingmacros2 \tracingparagraphs1 \tracingrestores1     \tracingmacros2 \tracingparagraphs1 \tracingrestores1
132     \showboxbreadth\maxdimen\showboxdepth\maxdimen     \showboxbreadth\maxdimen\showboxdepth\maxdimen
133  }%  }%
134    \else
135    \def\loggingall{\tracingcommands3 \tracingstats2
136       \tracingpages1 \tracingoutput1 \tracinglostchars1
137       \tracingmacros2 \tracingparagraphs1 \tracingrestores1
138       \tracingscantokens1 \tracingassigns1 \tracingifs1
139       \tracinggroups1 \tracingnesting2
140       \showboxbreadth\maxdimen\showboxdepth\maxdimen
141    }%
142    \fi
143    
144  %---------------------Begin change-----------------------  % For @cropmarks command.
145  %  % Do @cropmarks to get crop marks.
146  %%%% For @cropmarks command.  %
147  % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986  \newif\ifcropmarks
148    \let\cropmarks = \cropmarkstrue
149  %  %
150  \newdimen\cornerlong \newdimen\cornerthick  % Dimensions to add cropmarks at corners.
151  \newdimen \topandbottommargin  % Added by P. A. MacKay, 12 Nov. 1986
 \newdimen \outerhsize \newdimen \outervsize  
 \cornerlong=1pc\cornerthick=.3pt        % These set size of cropmarks  
 \outerhsize=7in  
 %\outervsize=9.5in  
 % Alternative @smallbook page size is 9.25in  
 \outervsize=9.25in  
 \topandbottommargin=.75in  
152  %  %
153  %---------------------End change-----------------------  \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
154    \newdimen\cornerlong  \cornerlong=1pc
155    \newdimen\cornerthick \cornerthick=.3pt
156    \newdimen\topandbottommargin \topandbottommargin=.75in
157    
158    % Main output routine.
159    \chardef\PAGE = 255
160    \output = {\onepageout{\pagecontents\PAGE}}
161    
162    \newbox\headlinebox
163    \newbox\footlinebox
164    
165  % \onepageout takes a vbox as an argument.  Note that \pagecontents  % \onepageout takes a vbox as an argument.  Note that \pagecontents
166  % does insertions itself, but you have to call it yourself.  % does insertions, but you have to call it yourself.
167  \chardef\PAGE=255  \output={\onepageout{\pagecontents\PAGE}}  \def\onepageout#1{%
168  \def\onepageout#1{\hoffset=\normaloffset    \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
169  \ifodd\pageno  \advance\hoffset by \bindingoffset    %
170  \else \advance\hoffset by -\bindingoffset\fi    \ifodd\pageno  \advance\hoffset by \bindingoffset
171  {\escapechar=`\\\relax % makes sure backslash is used in output files.    \else \advance\hoffset by -\bindingoffset\fi
172  \shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%    %
173  {\let\hsize=\pagewidth \makefootline}}}%    % Do this outside of the \shipout so @code etc. will be expanded in
174  \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}    % the headline as they should be, not taken literally (outputting ''code).
175      \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
176  %%%% For @cropmarks command %%%%    \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
177      %
178  % Here is a modification of the main output routine for Near East Publications    {%
179  % This provides right-angle cropmarks at all four corners.      % Have to do this stuff outside the \shipout because we want it to
180  % The contents of the page are centerlined into the cropmarks,      % take effect in \write's, yet the group defined by the \vbox ends
181  % and any desired binding offset is added as an \hskip on either      % before the \shipout runs.
182  % site of the centerlined box.  (P. A. MacKay, 12 November, 1986)      %
183  %      \escapechar = `\\     % use backslash in output files.
184  \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up      \indexdummies         % don't expand commands in the output.
185  {\escapechar=`\\\relax % makes sure backslash is used in output files.      \normalturnoffactive  % \ in index entries must not stay \, e.g., if
186                   \shipout                     % the page break happens to be in the middle of an example.
187                   \vbox to \outervsize{\hsize=\outerhsize      \shipout\vbox{%
188                   \vbox{\line{\ewtop\hfill\ewtop}}        \ifcropmarks \vbox to \outervsize\bgroup
189                   \nointerlineskip          \hsize = \outerhsize
190                   \line{\vbox{\moveleft\cornerthick\nstop}          \vskip-\topandbottommargin
191                         \hfill          \vtop to0pt{%
192                         \vbox{\moveright\cornerthick\nstop}}            \line{\ewtop\hfil\ewtop}%
193                   \vskip \topandbottommargin            \nointerlineskip
194                   \centerline{\ifodd\pageno\hskip\bindingoffset\fi            \line{%
195                          \vbox{              \vbox{\moveleft\cornerthick\nstop}%
196                          {\let\hsize=\pagewidth \makeheadline}              \hfill
197                          \pagebody{#1}              \vbox{\moveright\cornerthick\nstop}%
198                          {\let\hsize=\pagewidth \makefootline}}            }%
199                          \ifodd\pageno\else\hskip\bindingoffset\fi}            \vss}%
200                   \vskip \topandbottommargin plus1fill minus1fill          \vskip\topandbottommargin
201                   \boxmaxdepth\cornerthick          \line\bgroup
202                   \line{\vbox{\moveleft\cornerthick\nsbot}            \hfil % center the page within the outer (page) hsize.
203                         \hfill            \ifodd\pageno\hskip\bindingoffset\fi
204                         \vbox{\moveright\cornerthick\nsbot}}            \vbox\bgroup
205                   \nointerlineskip        \fi
206                   \vbox{\line{\ewbot\hfill\ewbot}}        %
207          }}        \unvbox\headlinebox
208          \pagebody{#1}%
209          \ifdim\ht\footlinebox > 0pt
210            % Only leave this space if the footline is nonempty.
211            % (We lessened \vsize for it in \oddfootingxxx.)
212            % The \baselineskip=24pt in plain's \makefootline has no effect.
213            \vskip 2\baselineskip
214            \unvbox\footlinebox
215          \fi
216          %
217          \ifcropmarks
218              \egroup % end of \vbox\bgroup
219            \hfil\egroup % end of (centering) \line\bgroup
220            \vskip\topandbottommargin plus1fill minus1fill
221            \boxmaxdepth = \cornerthick
222            \vbox to0pt{\vss
223              \line{%
224                \vbox{\moveleft\cornerthick\nsbot}%
225                \hfill
226                \vbox{\moveright\cornerthick\nsbot}%
227              }%
228              \nointerlineskip
229              \line{\ewbot\hfil\ewbot}%
230            }%
231          \egroup % \vbox from first cropmarks clause
232          \fi
233        }% end of \shipout\vbox
234      }% end of group with \turnoffactive
235    \advancepageno    \advancepageno
236    \ifnum\outputpenalty>-20000 \else\dosupereject\fi}    \ifnum\outputpenalty>-20000 \else\dosupereject\fi
237  %  }
 % Do @cropmarks to get crop marks  
 \def\cropmarks{\let\onepageout=\croppageout }  
238    
239  \newinsert\margin \dimen\margin=\maxdimen  \newinsert\margin \dimen\margin=\maxdimen
240    
# Line 181  Line 249 
249  \ifr@ggedbottom \kern-\dimen@ \vfil \fi}  \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
250  }  }
251    
 %  
252  % Here are the rules for the cropmarks.  Note that they are  % Here are the rules for the cropmarks.  Note that they are
253  % offset so that the space between them is truly \outerhsize or \outervsize  % offset so that the space between them is truly \outerhsize or \outervsize
254  % (P. A. MacKay, 12 November, 1986)  % (P. A. MacKay, 12 November, 1986)
# Line 276  Line 343 
343  %% Call \inENV within environments (after a \begingroup)  %% Call \inENV within environments (after a \begingroup)
344  \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}  \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
345  \def\ENVcheck{%  \def\ENVcheck{%
346  \ifENV\errmessage{Still within an environment.  Type Return to continue.}  \ifENV\errmessage{Still within an environment; press RETURN to continue}
347  \endgroup\fi} % This is not perfect, but it should reduce lossage  \endgroup\fi} % This is not perfect, but it should reduce lossage
348    
349  % @begin foo  is the same as @foo, for now.  % @begin foo  is the same as @foo, for now.
350  \newhelp\EMsimple{Type <Return> to continue.}  \newhelp\EMsimple{Press RETURN to continue.}
351    
352  \outer\def\begin{\parsearg\beginxxx}  \outer\def\begin{\parsearg\beginxxx}
353    
# Line 339  Line 406 
406    
407  % @@ prints an @  % @@ prints an @
408  % Kludge this until the fonts are right (grr).  % Kludge this until the fonts are right (grr).
409  \def\@{{\tt \char '100}}  \def\@{{\tt\char64}}
410    
411  % This is turned off because it was never documented  % This is turned off because it was never documented
412  % and you can use @w{...} around a quote to suppress ligatures.  % and you can use @w{...} around a quote to suppress ligatures.
# Line 349  Line 416 
416  %\def\'{{'}}  %\def\'{{'}}
417    
418  % Used to generate quoted braces.  % Used to generate quoted braces.
419    \def\mylbrace {{\tt\char123}}
420  \def\mylbrace {{\tt \char '173}}  \def\myrbrace {{\tt\char125}}
 \def\myrbrace {{\tt \char '175}}  
421  \let\{=\mylbrace  \let\{=\mylbrace
422  \let\}=\myrbrace  \let\}=\myrbrace
423    \begingroup
424      % Definitions to produce actual \{ & \} command in an index.
425      \catcode`\{ = 12 \catcode`\} = 12
426      \catcode`\[ = 1 \catcode`\] = 2
427      \catcode`\@ = 0 \catcode`\\ = 12
428      @gdef@lbracecmd[\{]%
429      @gdef@rbracecmd[\}]%
430    @endgroup
431    
432    % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
433    % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
434    \let\, = \c
435    \let\dotaccent = \.
436    \def\ringaccent#1{{\accent23 #1}}
437    \let\tieaccent = \t
438    \let\ubaraccent = \b
439    \let\udotaccent = \d
440    
441    % Other special characters: @questiondown @exclamdown
442    % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
443    \def\questiondown{?`}
444    \def\exclamdown{!`}
445    
446    % Dotless i and dotless j, used for accents.
447    \def\imacro{i}
448    \def\jmacro{j}
449    \def\dotless#1{%
450      \def\temp{#1}%
451      \ifx\temp\imacro \ptexi
452      \else\ifx\temp\jmacro \j
453      \else \errmessage{@dotless can be used only with i or j}%
454      \fi\fi
455    }
456    
457    % Be sure we're in horizontal mode when doing a tie, since we make space
458    % equivalent to this in @example-like environments. Otherwise, a space
459    % at the beginning of a line will start with \penalty -- and
460    % since \penalty is valid in vertical mode, we'd end up putting the
461    % penalty on the vertical list instead of in the new paragraph.
462    {\catcode`@ = 11
463     % Avoid using \@M directly, because that causes trouble
464     % if the definition is written into an index file.
465     \global\let\tiepenalty = \@M
466     \gdef\tie{\leavevmode\penalty\tiepenalty\ }
467    }
468    
469  % @: forces normal size whitespace following.  % @: forces normal size whitespace following.
470  \def\:{\spacefactor=1000 }  \def\:{\spacefactor=1000 }
# Line 364  Line 475 
475  % @. is an end-of-sentence period.  % @. is an end-of-sentence period.
476  \def\.{.\spacefactor=3000 }  \def\.{.\spacefactor=3000 }
477    
 % @enddots{} is an end-of-sentence ellipsis.  
 \gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}  
   
478  % @! is an end-of-sentence bang.  % @! is an end-of-sentence bang.
479  \gdef\!{!\spacefactor=3000 }  \def\!{!\spacefactor=3000 }
480    
481  % @? is an end-of-sentence query.  % @? is an end-of-sentence query.
482  \gdef\?{?\spacefactor=3000 }  \def\?{?\spacefactor=3000 }
483    
484  % @w prevents a word break.  Without the \leavevmode, @w at the  % @w prevents a word break.  Without the \leavevmode, @w at the
485  % beginning of a paragraph, when TeX is still in vertical mode, would  % beginning of a paragraph, when TeX is still in vertical mode, would
# Line 455  where each line of input produces a line Line 563  where each line of input produces a line
563  %% This method tries to make TeX break the page naturally  %% This method tries to make TeX break the page naturally
564  %% if the depth of the box does not fit.  %% if the depth of the box does not fit.
565  %{\baselineskip=0pt%  %{\baselineskip=0pt%
566  %\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000  %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
567  %\prevdepth=-1000pt  %\prevdepth=-1000pt
568  %}}  %}}
569    
# Line 496  where each line of input produces a line Line 604  where each line of input produces a line
604    
605  \let\br = \par  \let\br = \par
606    
607  % @dots{}  output some dots  % @dots{} output an ellipsis using the current font.
608    % We do .5em per period so that it has the same spacing in a typewriter
609    % font as three actual period characters.
610    %
611    \def\dots{%
612      \leavevmode
613      \hbox to 1.5em{%
614        \hskip 0pt plus 0.25fil minus 0.25fil
615        .\hss.\hss.%
616        \hskip 0pt plus 0.5fil minus 0.5fil
617      }%
618    }
619    
620    % @enddots{} is an end-of-sentence ellipsis.
621    %
622    \def\enddots{%
623      \leavevmode
624      \hbox to 2em{%
625        \hskip 0pt plus 0.25fil minus 0.25fil
626        .\hss.\hss.\hss.%
627        \hskip 0pt plus 0.5fil minus 0.5fil
628      }%
629      \spacefactor=3000
630    }
631    
 \def\dots{$\ldots$}  
632    
633  % @page    forces the start of a new page  % @page    forces the start of a new page
634    %
635  \def\page{\par\vfill\supereject}  \def\page{\par\vfill\supereject}
636    
637  % @exdent text....  % @exdent text....
# Line 520  where each line of input produces a line Line 650  where each line of input produces a line
650  \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount  \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
651  \leftline{\hskip\leftskip{\rm#1}}}}  \leftline{\hskip\leftskip{\rm#1}}}}
652    
653    % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
654    
655    \def\inmargin#1{%
656    \strut\vadjust{\nobreak\kern-\strutdepth
657      \vtop to \strutdepth{\baselineskip\strutdepth\vss
658      \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
659    \newskip\inmarginspacing \inmarginspacing=1cm
660    \def\strutdepth{\dp\strutbox}
661    
662  %\hbox{{\rm#1}}\hfil\break}}  %\hbox{{\rm#1}}\hfil\break}}
663    
664  % @include file    insert text of that file as input.  % @include file    insert text of that file as input.
665    % Allow normal characters that  we make active in the argument (a file name).
666  \def\include{\parsearg\includezzz}  \def\include{\begingroup
667  %Use \input\thisfile to avoid blank after \input, which may be an active    \catcode`\\=12
668  %char (in which case the blank would become the \input argument).    \catcode`~=12
669  %The grouping keeps the value of \thisfile correct even when @include    \catcode`^=12
670  %is nested.    \catcode`_=12
671  \def\includezzz #1{\begingroup    \catcode`|=12
672  \def\thisfile{#1}\message{<opening \thisfile>}\input\thisfile\message{<closing \thisfile>}    \catcode`<=12
673      \catcode`>=12
674      \catcode`+=12
675      \parsearg\includezzz}
676    % Restore active chars for included file.
677    \def\includezzz#1{\endgroup\begingroup
678      % Read the included file in a group so nested @include's work.
679      \def\thisfile{#1}%
680      \input\thisfile
681  \endgroup}  \endgroup}
682    
683  \def\thisfile{}  \def\thisfile{}
# Line 545  where each line of input produces a line Line 692  where each line of input produces a line
692  % @sp n   outputs n lines of vertical space  % @sp n   outputs n lines of vertical space
693    
694  \def\sp{\parsearg\spxxx}  \def\sp{\parsearg\spxxx}
695  \def\spxxx #1{\par \vskip #1\baselineskip}  \def\spxxx #1{\vskip #1\baselineskip}
696    
697  % @comment ...line which is ignored...  % @comment ...line which is ignored...
698  % @c is the same as @comment  % @c is the same as @comment
699  % @ignore ... @end ignore  is another way to write a comment  % @ignore ... @end ignore  is another way to write a comment
700    
701  \def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%  \def\comment{\begingroup \catcode`\^^M=\other%
702  \parsearg \commentxxx}  \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
703    \commentxxx}
704  \def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }  {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
705    
706  \let\c=\comment  \let\c=\comment
707    
708    % @paragraphindent  is defined for the Info formatting commands only.
709    \let\paragraphindent=\comment
710    
711  % Prevent errors for section commands.  % Prevent errors for section commands.
712  % Used in @ignore and in failing conditionals.  % Used in @ignore and in failing conditionals.
713  \def\ignoresections{%  \def\ignoresections{%
# Line 592  where each line of input produces a line Line 742  where each line of input produces a line
742  % incorrectly.  % incorrectly.
743  %  %
744  \def\ignoremorecommands{%  \def\ignoremorecommands{%
745      \let\defcodeindex = \relax
746    \let\defcv = \relax    \let\defcv = \relax
747    \let\deffn = \relax    \let\deffn = \relax
748    \let\deffnx = \relax    \let\deffnx = \relax
# Line 615  where each line of input produces a line Line 766  where each line of input produces a line
766    \let\printindex = \relax    \let\printindex = \relax
767    \let\pxref = \relax    \let\pxref = \relax
768    \let\settitle = \relax    \let\settitle = \relax
769      \let\setchapternewpage = \relax
770      \let\setchapterstyle = \relax
771      \let\everyheading = \relax
772      \let\evenheading = \relax
773      \let\oddheading = \relax
774      \let\everyfooting = \relax
775      \let\evenfooting = \relax
776      \let\oddfooting = \relax
777      \let\headings = \relax
778    \let\include = \relax    \let\include = \relax
779    \let\lowersections = \relax    \let\lowersections = \relax
780    \let\down = \relax    \let\down = \relax
# Line 623  where each line of input produces a line Line 783  where each line of input produces a line
783    \let\set = \relax    \let\set = \relax
784    \let\clear = \relax    \let\clear = \relax
785    \let\item = \relax    \let\item = \relax
   \let\message = \relax  
786  }  }
787    
788  % Ignore @ignore ... @end ignore.  % Ignore @ignore ... @end ignore.
789  %  %
790  \def\ignore{\doignore{ignore}}  \def\ignore{\doignore{ignore}}
791    
792  % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text.  % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
793  %  %
794  \def\ifinfo{\doignore{ifinfo}}  \def\ifinfo{\doignore{ifinfo}}
795  \def\ifhtml{\doignore{ifhtml}}  \def\ifhtml{\doignore{ifhtml}}
796    \def\ifnottex{\doignore{ifnottex}}
797  \def\html{\doignore{html}}  \def\html{\doignore{html}}
798  \def\menu{\doignore{menu}}  \def\menu{\doignore{menu}}
799  \def\direntry{\doignore{direntry}}  \def\direntry{\doignore{direntry}}
800    
801    % @dircategory CATEGORY  -- specify a category of the dir file
802    % which this file should belong to.  Ignore this in TeX.
803    \let\dircategory = \comment
804    
805  % Ignore text until a line `@end #1'.  % Ignore text until a line `@end #1'.
806  %  %
807  \def\doignore#1{\begingroup  \def\doignore#1{\begingroup
# Line 645  where each line of input produces a line Line 809  where each line of input produces a line
809    \ignoresections    \ignoresections
810    %    %
811    % Define a command to swallow text until we reach `@end #1'.    % Define a command to swallow text until we reach `@end #1'.
812    \long\def\doignoretext##1\end #1{\enddoignore}%    % This @ is a catcode 12 token (that is the normal catcode of @ in
813      % this texinfo.tex file).  We change the catcode of @ below to match.
814      \long\def\doignoretext##1@end #1{\enddoignore}%
815    %    %
816    % Make sure that spaces turn into tokens that match what \doignoretext wants.    % Make sure that spaces turn into tokens that match what \doignoretext wants.
817    \catcode32 = 10    \catcode32 = 10
818    %    %
819      % Ignore braces, too, so mismatched braces don't cause trouble.
820      \catcode`\{ = 9
821      \catcode`\} = 9
822      %
823      % We must not have @c interpreted as a control sequence.
824      \catcode`\@ = 12
825      %
826      % Make the letter c a comment character so that the rest of the line
827      % will be ignored. This way, the document can have (for example)
828      %   @c @end ifinfo
829      % and the @end ifinfo will be properly ignored.
830      % (We've just changed @ to catcode 12.)
831      \catcode`\c = 14
832      %
833    % And now expand that command.    % And now expand that command.
834    \doignoretext    \doignoretext
835  }  }
# Line 669  where each line of input produces a line Line 849  where each line of input produces a line
849      \immediate\write16{If you are running another version of TeX, relax.}      \immediate\write16{If you are running another version of TeX, relax.}
850      \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.}
851      \immediate\write16{  Then upgrade your TeX installation if you can.}      \immediate\write16{  Then upgrade your TeX installation if you can.}
852        \immediate\write16{  (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
853      \immediate\write16{If you are stuck with version 3.0, run the}      \immediate\write16{If you are stuck with version 3.0, run the}
854      \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}      \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}
855      \immediate\write16{  to use a workaround.}      \immediate\write16{  to use a workaround.}
856      \immediate\write16{}      \immediate\write16{}
857      \warnedobstrue      \global\warnedobstrue
858      \fi      \fi
859  }  }
860    
# Line 740  where each line of input produces a line Line 921  where each line of input produces a line
921      \pretolerance = 10000      \pretolerance = 10000
922      %      %
923      % Do not execute instructions in @tex      % Do not execute instructions in @tex
924      \def\tex{\doignore{tex}}      \def\tex{\doignore{tex}}%
925        % Do not execute macro definitions.
926        % `c' is a comment character, so the word `macro' will get cut off.
927        \def\macro{\doignore{ma}}%
928  }  }
929    
930  % @set VAR sets the variable VAR to an empty value.  % @set VAR sets the variable VAR to an empty value.
# Line 749  where each line of input produces a line Line 933  where each line of input produces a line
933  % Since we want to separate VAR from REST-OF-LINE (which might be  % Since we want to separate VAR from REST-OF-LINE (which might be
934  % empty), we can't just use \parsearg; we have to insert a space of our  % empty), we can't just use \parsearg; we have to insert a space of our
935  % own to delimit the rest of the line, and then take it out again if we  % own to delimit the rest of the line, and then take it out again if we
936  % didn't need it.  % didn't need it.  Make sure the catcode of space is correct to avoid
937    % losing inside @example, for instance.
938  %  %
939  \def\set{\parsearg\setxxx}  \def\set{\begingroup\catcode` =10
940      \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
941      \parsearg\setxxx}
942  \def\setxxx#1{\setyyy#1 \endsetyyy}  \def\setxxx#1{\setyyy#1 \endsetyyy}
943  \def\setyyy#1 #2\endsetyyy{%  \def\setyyy#1 #2\endsetyyy{%
944    \def\temp{#2}%    \def\temp{#2}%
945    \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty    \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
946    \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.    \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
947    \fi    \fi
948      \endgroup
949  }  }
950  \def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}}  % Can't use \xdef to pre-expand #2 and save some time, since \temp or
951    % \next or other control sequences that we've defined might get us into
952    % an infinite loop. Consider `@set foo @cite{bar}'.
953    \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
954    
955  % @clear VAR clears (i.e., unsets) the variable VAR.  % @clear VAR clears (i.e., unsets) the variable VAR.
956  %  %
# Line 768  where each line of input produces a line Line 959  where each line of input produces a line
959    
960  % @value{foo} gets the text saved in variable foo.  % @value{foo} gets the text saved in variable foo.
961  %  %
962  \def\value#1{\expandafter  {
963                  \ifx\csname SET#1\endcsname\relax    \catcode`\_ = \active
964                          {\{No value for ``#1''\}}    %
965                  \else \csname SET#1\endcsname \fi}    % We might end up with active _ or - characters in the argument if
966      % we're called from @code, as @code{@value{foo-bar_}}.  So \let any
967      % such active characters to their normal equivalents.
968      \gdef\value{\begingroup
969        \catcode`\-=12 \catcode`\_=12
970        \indexbreaks \let_\normalunderscore
971        \valuexxx}
972    }
973    \def\valuexxx#1{\expandablevalue{#1}\endgroup}
974    
975    % We have this subroutine so that we can handle at least some @value's
976    % properly in indexes (we \let\value to this in \indexdummies).  Ones
977    % whose names contain - or _ still won't work, but we can't do anything
978    % about that.  The command has to be fully expandable, since the result
979    % winds up in the index file.  This means that if the variable's value
980    % contains other Texinfo commands, it's almost certain it will fail
981    % (although perhaps we could fix that with sufficient work to do a
982    % one-level expansion on the result, instead of complete).
983    %
984    \def\expandablevalue#1{%
985      \expandafter\ifx\csname SET#1\endcsname\relax
986        {[No value for ``#1'']}%
987      \else
988        \csname SET#1\endcsname
989      \fi
990    }
991    
992  % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined  % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
993  % with @set.  % with @set.
# Line 803  where each line of input produces a line Line 1019  where each line of input produces a line
1019  \def\ifclearfail{\nestedignore{ifclear}}  \def\ifclearfail{\nestedignore{ifclear}}
1020  \defineunmatchedend{ifclear}  \defineunmatchedend{ifclear}
1021    
1022  % @iftex always succeeds; we read the text following, through @end  % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
1023  % iftex).  But `@end iftex' should be valid only after an @iftex.  % following, through the first @end iftex (etc.).  Make `@end iftex'
1024    % (etc.) valid only after an @iftex.
1025  %  %
1026  \def\iftex{\conditionalsucceed{iftex}}  \def\iftex{\conditionalsucceed{iftex}}
1027    \def\ifnothtml{\conditionalsucceed{ifnothtml}}
1028    \def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
1029  \defineunmatchedend{iftex}  \defineunmatchedend{iftex}
1030    \defineunmatchedend{ifnothtml}
1031    \defineunmatchedend{ifnotinfo}
1032    
1033  % We can't just want to start a group at @iftex (for example) and end it  % We can't just want to start a group at @iftex (for example) and end it
1034  % at @end iftex, since then @set commands inside the conditional have no  % at @end iftex, since then @set commands inside the conditional have no
# Line 853  where each line of input produces a line Line 1074  where each line of input produces a line
1074  \def\bullet{\implicitmath\ptexbullet\implicitmath}  \def\bullet{\implicitmath\ptexbullet\implicitmath}
1075  \def\minus{\implicitmath-\implicitmath}  \def\minus{\implicitmath-\implicitmath}
1076    
1077  \def\node{\ENVcheck\parsearg\nodezzz}  % @refill is a no-op.
 \def\nodezzz#1{\nodexxx [#1,]}  
 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}  
 \let\nwnode=\node  
 \let\lastnode=\relax  
   
 \def\donoderef{\ifx\lastnode\relax\else  
 \expandafter\expandafter\expandafter\setref{\lastnode}\fi  
 \global\let\lastnode=\relax}  
   
 \def\unnumbnoderef{\ifx\lastnode\relax\else  
 \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi  
 \global\let\lastnode=\relax}  
   
 \def\appendixnoderef{\ifx\lastnode\relax\else  
 \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi  
 \global\let\lastnode=\relax}  
   
1078  \let\refill=\relax  \let\refill=\relax
1079    
1080    % If working on a large document in chapters, it is convenient to
1081    % be able to disable indexing, cross-referencing, and contents, for test runs.
1082    % This is done with @novalidate (before @setfilename).
1083    %
1084    \newif\iflinks \linkstrue % by default we want the aux files.
1085    \let\novalidate = \linksfalse
1086    
1087  % @setfilename is done at the beginning of every texinfo file.  % @setfilename is done at the beginning of every texinfo file.
1088  % So open here the files we need to have open while reading the input.  % So open here the files we need to have open while reading the input.
1089  % This makes it possible to make a .fmt file for texinfo.  % This makes it possible to make a .fmt file for texinfo.
1090  \def\setfilename{%  \def\setfilename{%
1091     \readauxfile     \iflinks
1092     \opencontents       \readauxfile
1093       \fi % \openindices needs to do some work in any case.
1094     \openindices     \openindices
1095     \fixbackslash  % Turn off hack to swallow `\input texinfo'.     \fixbackslash  % Turn off hack to swallow `\input texinfo'.
1096     \global\let\setfilename=\comment % Ignore extra @setfilename cmds.     \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
1097       %
1098       % If texinfo.cnf is present on the system, read it.
1099       % Useful for site-wide @afourpaper, etc.
1100       % Just to be on the safe side, close the input stream before the \input.
1101       \openin 1 texinfo.cnf
1102       \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
1103       \closein1
1104       \temp
1105       %
1106     \comment % Ignore the actual filename.     \comment % Ignore the actual filename.
1107  }  }
1108    
1109    % Called from \setfilename.
1110    %
1111    \def\openindices{%
1112      \newindex{cp}%
1113      \newcodeindex{fn}%
1114      \newcodeindex{vr}%
1115      \newcodeindex{tp}%
1116      \newcodeindex{ky}%
1117      \newcodeindex{pg}%
1118    }
1119    
1120    % @bye.
1121  \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}  \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1122    
 \def\inforef #1{\inforefzzz #1,,,,**}  
 \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},  
   node \samp{\ignorespaces#1{}}}  
1123    
1124  \message{fonts,}  \message{fonts,}
   
1125  % Font-change commands.  % Font-change commands.
1126    
1127  % Texinfo supports the sans serif font style, which plain TeX does not.  % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1128  % So we set up a \sf analogous to plain's \rm, etc.  % So we set up a \sf analogous to plain's \rm, etc.
1129  \newfam\sffam  \newfam\sffam
1130  \def\sf{\fam=\sffam \tensf}  \def\sf{\fam=\sffam \tensf}
1131  \let\li = \sf % Sometimes we call it \li, not \sf.  \let\li = \sf % Sometimes we call it \li, not \sf.
1132    
1133  %% Try out Computer Modern fonts at \magstephalf  % We don't need math for this one.
1134  \let\mainmagstep=\magstephalf  \def\ttsl{\tenttsl}
1135    
1136    % Use Computer Modern fonts at \magstephalf (11pt).
1137    \newcount\mainmagstep
1138    \mainmagstep=\magstephalf
1139    
1140  % Set the font macro #1 to the font named #2, adding on the  % Set the font macro #1 to the font named #2, adding on the
1141  % specified font prefix (normally `cm').  % specified font prefix (normally `cm').
1142  \def\setfont#1#2{\font#1=\fontprefix#2}  % #3 is the font's design size, #4 is a scale factor
1143    \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
1144    
1145  % Use cm as the default font prefix.  % Use cm as the default font prefix.
1146  % To specify the font prefix, you must define \fontprefix  % To specify the font prefix, you must define \fontprefix
# Line 914  where each line of input produces a line Line 1148  where each line of input produces a line
1148  \ifx\fontprefix\undefined  \ifx\fontprefix\undefined
1149  \def\fontprefix{cm}  \def\fontprefix{cm}
1150  \fi  \fi
1151    % Support font families that don't use the same naming scheme as CM.
1152    \def\rmshape{r}
1153    \def\rmbshape{bx}               %where the normal face is bold
1154    \def\bfshape{b}
1155    \def\bxshape{bx}
1156    \def\ttshape{tt}
1157    \def\ttbshape{tt}
1158    \def\ttslshape{sltt}
1159    \def\itshape{ti}
1160    \def\itbshape{bxti}
1161    \def\slshape{sl}
1162    \def\slbshape{bxsl}
1163    \def\sfshape{ss}
1164    \def\sfbshape{ss}
1165    \def\scshape{csc}
1166    \def\scbshape{csc}
1167    
1168  \ifx\bigger\relax  \ifx\bigger\relax
1169  \let\mainmagstep=\magstep1  \let\mainmagstep=\magstep1
1170  \setfont\textrm{r12}  \setfont\textrm\rmshape{12}{1000}
1171  \setfont\texttt{tt12}  \setfont\texttt\ttshape{12}{1000}
1172  \else  \else
1173  \setfont\textrm{r10 scaled \mainmagstep}  \setfont\textrm\rmshape{10}{\mainmagstep}
1174  \setfont\texttt{tt10 scaled \mainmagstep}  \setfont\texttt\ttshape{10}{\mainmagstep}
1175  \fi  \fi
1176  % Instead of cmb10, you many want to use cmbx10.  % Instead of cmb10, you many want to use cmbx10.
1177  % cmbx10 is a prettier font on its own, but cmb10  % cmbx10 is a prettier font on its own, but cmb10
1178  % looks better when embedded in a line with cmr10.  % looks better when embedded in a line with cmr10.
1179  \setfont\textbf{b10 scaled \mainmagstep}  \setfont\textbf\bfshape{10}{\mainmagstep}
1180  \setfont\textit{ti10 scaled \mainmagstep}  \setfont\textit\itshape{10}{\mainmagstep}
1181  \setfont\textsl{sl10 scaled \mainmagstep}  \setfont\textsl\slshape{10}{\mainmagstep}
1182  \setfont\textsf{ss10 scaled \mainmagstep}  \setfont\textsf\sfshape{10}{\mainmagstep}
1183  \setfont\textsc{csc10 scaled \mainmagstep}  \setfont\textsc\scshape{10}{\mainmagstep}
1184    \setfont\textttsl\ttslshape{10}{\mainmagstep}
1185  \font\texti=cmmi10 scaled \mainmagstep  \font\texti=cmmi10 scaled \mainmagstep
1186  \font\textsy=cmsy10 scaled \mainmagstep  \font\textsy=cmsy10 scaled \mainmagstep
1187    
1188  % A few fonts for @defun, etc.  % A few fonts for @defun, etc.
1189  \setfont\defbf{bx10 scaled \magstep1} %was 1314  \setfont\defbf\bxshape{10}{\magstep1} %was 1314
1190  \setfont\deftt{tt10 scaled \magstep1}  \setfont\deftt\ttshape{10}{\magstep1}
1191  \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}  \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
1192    
1193  % Fonts for indices and small examples.  % Fonts for indices and small examples (9pt).
1194  % We actually use the slanted font rather than the italic,  % We actually use the slanted font rather than the italic,
1195  % because texinfo normally uses the slanted fonts for that.  % because texinfo normally uses the slanted fonts for that.
1196  % Do not make many font distinctions in general in the index, since they  % Do not make many font distinctions in general in the index, since they
1197  % aren't very useful.  % aren't very useful.
1198  \setfont\ninett{tt9}  \setfont\ninett\ttshape{9}{1000}
1199  \setfont\indrm{r9}  \setfont\ninettsl\ttslshape{10}{900}
1200  \setfont\indit{sl9}  \setfont\indrm\rmshape{9}{1000}
1201  \let\indsl=\indit  \setfont\indit\itshape{9}{1000}
1202    \setfont\indsl\slshape{9}{1000}
1203  \let\indtt=\ninett  \let\indtt=\ninett
1204    \let\indttsl=\ninettsl
1205  \let\indsf=\indrm  \let\indsf=\indrm
1206  \let\indbf=\indrm  \let\indbf=\indrm
1207  \let\indsc=\indrm  \setfont\indsc\scshape{10}{900}
1208  \font\indi=cmmi9  \font\indi=cmmi9
1209  \font\indsy=cmsy9  \font\indsy=cmsy9
1210    
1211  % Fonts for headings  % Fonts for title page:
1212  \setfont\chaprm{bx12 scaled \magstep2}  \setfont\titlerm\rmbshape{12}{\magstep3}
1213  \setfont\chapit{ti12 scaled \magstep2}  \setfont\titleit\itbshape{10}{\magstep4}
1214  \setfont\chapsl{sl12 scaled \magstep2}  \setfont\titlesl\slbshape{10}{\magstep4}
1215  \setfont\chaptt{tt12 scaled \magstep2}  \setfont\titlett\ttbshape{12}{\magstep3}
1216  \setfont\chapsf{ss12 scaled \magstep2}  \setfont\titlettsl\ttslshape{10}{\magstep4}
1217    \setfont\titlesf\sfbshape{17}{\magstep1}
1218    \let\titlebf=\titlerm
1219    \setfont\titlesc\scbshape{10}{\magstep4}
1220    \font\titlei=cmmi12 scaled \magstep3
1221    \font\titlesy=cmsy10 scaled \magstep4
1222    \def\authorrm{\secrm}
1223    
1224    % Chapter (and unnumbered) fonts (17.28pt).
1225    \setfont\chaprm\rmbshape{12}{\magstep2}
1226    \setfont\chapit\itbshape{10}{\magstep3}
1227    \setfont\chapsl\slbshape{10}{\magstep3}
1228    \setfont\chaptt\ttbshape{12}{\magstep2}
1229    \setfont\chapttsl\ttslshape{10}{\magstep3}
1230    \setfont\chapsf\sfbshape{17}{1000}
1231  \let\chapbf=\chaprm  \let\chapbf=\chaprm
1232  \setfont\chapsc{csc10 scaled\magstep3}  \setfont\chapsc\scbshape{10}{\magstep3}
1233  \font\chapi=cmmi12 scaled \magstep2  \font\chapi=cmmi12 scaled \magstep2
1234  \font\chapsy=cmsy10 scaled \magstep3  \font\chapsy=cmsy10 scaled \magstep3
1235    
1236  \setfont\secrm{bx12 scaled \magstep1}  % Section fonts (14.4pt).
1237  \setfont\secit{ti12 scaled \magstep1}  \setfont\secrm\rmbshape{12}{\magstep1}
1238  \setfont\secsl{sl12 scaled \magstep1}  \setfont\secit\itbshape{10}{\magstep2}
1239  \setfont\sectt{tt12 scaled \magstep1}  \setfont\secsl\slbshape{10}{\magstep2}
1240  \setfont\secsf{ss12 scaled \magstep1}  \setfont\sectt\ttbshape{12}{\magstep1}
1241  \setfont\secbf{bx12 scaled \magstep1}  \setfont\secttsl\ttslshape{10}{\magstep2}
1242  \setfont\secsc{csc10 scaled\magstep2}  \setfont\secsf\sfbshape{12}{\magstep1}
1243    \let\secbf\secrm
1244    \setfont\secsc\scbshape{10}{\magstep2}
1245  \font\seci=cmmi12 scaled \magstep1  \font\seci=cmmi12 scaled \magstep1
1246  \font\secsy=cmsy10 scaled \magstep2  \font\secsy=cmsy10 scaled \magstep2
1247    
1248  % \setfont\ssecrm{bx10 scaled \magstep1}    % This size an font looked bad.  % \setfont\ssecrm\bxshape{10}{\magstep1}    % This size an font looked bad.
1249  % \setfont\ssecit{cmti10 scaled \magstep1}    % The letters were too crowded.  % \setfont\ssecit\itshape{10}{\magstep1}    % The letters were too crowded.
1250  % \setfont\ssecsl{sl10 scaled \magstep1}  % \setfont\ssecsl\slshape{10}{\magstep1}
1251  % \setfont\ssectt{tt10 scaled \magstep1}  % \setfont\ssectt\ttshape{10}{\magstep1}
1252  % \setfont\ssecsf{ss10 scaled \magstep1}  % \setfont\ssecsf\sfshape{10}{\magstep1}
1253    
1254  %\setfont\ssecrm{b10 scaled 1315}       % Note the use of cmb rather than cmbx.  %\setfont\ssecrm\bfshape{10}{1315}      % Note the use of cmb rather than cmbx.
1255  %\setfont\ssecit{ti10 scaled 1315}      % Also, the size is a little larger than  %\setfont\ssecit\itshape{10}{1315}      % Also, the size is a little larger than
1256  %\setfont\ssecsl{sl10 scaled 1315}      % being scaled magstep1.  %\setfont\ssecsl\slshape{10}{1315}      % being scaled magstep1.
1257  %\setfont\ssectt{tt10 scaled 1315}  %\setfont\ssectt\ttshape{10}{1315}
1258  %\setfont\ssecsf{ss10 scaled 1315}  %\setfont\ssecsf\sfshape{10}{1315}
1259    
1260  %\let\ssecbf=\ssecrm  %\let\ssecbf=\ssecrm
1261    
1262  \setfont\ssecrm{bx12 scaled \magstephalf}  % Subsection fonts (13.15pt).
1263  \setfont\ssecit{ti12 scaled \magstephalf}  \setfont\ssecrm\rmbshape{12}{\magstephalf}
1264  \setfont\ssecsl{sl12 scaled \magstephalf}  \setfont\ssecit\itbshape{10}{1315}
1265  \setfont\ssectt{tt12 scaled \magstephalf}  \setfont\ssecsl\slbshape{10}{1315}
1266  \setfont\ssecsf{ss12 scaled \magstephalf}  \setfont\ssectt\ttbshape{12}{\magstephalf}
1267  \setfont\ssecbf{bx12 scaled \magstephalf}  \setfont\ssecttsl\ttslshape{10}{1315}
1268  \setfont\ssecsc{csc10 scaled \magstep1}  \setfont\ssecsf\sfbshape{12}{\magstephalf}
1269    \let\ssecbf\ssecrm
1270    \setfont\ssecsc\scbshape{10}{\magstep1}
1271  \font\sseci=cmmi12 scaled \magstephalf  \font\sseci=cmmi12 scaled \magstephalf
1272  \font\ssecsy=cmsy10 scaled \magstep1  \font\ssecsy=cmsy10 scaled 1315
1273  % The smallcaps and symbol fonts should actually be scaled \magstep1.5,  % The smallcaps and symbol fonts should actually be scaled \magstep1.5,
1274  % but that is not a standard magnification.  % but that is not a standard magnification.
1275    
 % Fonts for title page:  
 \setfont\titlerm{bx12 scaled \magstep3}  
 \let\authorrm = \secrm  
   
1276  % In order for the font changes to affect most math symbols and letters,  % In order for the font changes to affect most math symbols and letters,
1277  % we have to define the \textfont of the standard families.  Since  % we have to define the \textfont of the standard families.  Since
1278  % texinfo doesn't allow for producing subscripts and superscripts, we  % texinfo doesn't allow for producing subscripts and superscripts, we
# Line 1022  where each line of input produces a line Line 1289  where each line of input produces a line
1289  % The font-changing commands redefine the meanings of \tenSTYLE, instead  % The font-changing commands redefine the meanings of \tenSTYLE, instead
1290  % of just \STYLE.  We do this so that font changes will continue to work  % of just \STYLE.  We do this so that font changes will continue to work
1291  % in math mode, where it is the current \fam that is relevant in most  % in math mode, where it is the current \fam that is relevant in most
1292  % cases, not the current.  Plain TeX does, for example,  % cases, not the current font.  Plain TeX does \def\bf{\fam=\bffam
1293  % \def\bf{\fam=\bffam \tenbf}  By redefining \tenbf, we obviate the need  % \tenbf}, for example.  By redefining \tenbf, we obviate the need to
1294  % to redefine \bf itself.  % redefine \bf itself.
1295  \def\textfonts{%  \def\textfonts{%
1296    \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl    \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
1297    \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc    \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
1298    \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy    \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
1299    \resetmathfonts}    \resetmathfonts}
1300    \def\titlefonts{%
1301      \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
1302      \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
1303      \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
1304      \let\tenttsl=\titlettsl
1305      \resetmathfonts \setleading{25pt}}
1306    \def\titlefont#1{{\titlefonts\rm #1}}
1307  \def\chapfonts{%  \def\chapfonts{%
1308    \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl    \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1309    \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc    \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1310    \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy    \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1311    \resetmathfonts}    \resetmathfonts \setleading{19pt}}
1312  \def\secfonts{%  \def\secfonts{%
1313    \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl    \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
1314    \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc    \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
1315    \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy    \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
1316    \resetmathfonts}    \resetmathfonts \setleading{16pt}}
1317  \def\subsecfonts{%  \def\subsecfonts{%
1318    \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl    \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
1319    \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc    \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
1320    \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy    \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
1321    \resetmathfonts}    \resetmathfonts \setleading{15pt}}
1322    \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
1323  \def\indexfonts{%  \def\indexfonts{%
1324    \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl    \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
1325    \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc    \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
1326    \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy    \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
1327    \resetmathfonts}    \resetmathfonts \setleading{12pt}}
1328    
1329  % 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.
1330  %  %
1331  \textfonts  \textfonts
1332    
1333    % Define these so they can be easily changed for other fonts.
1334    \def\angleleft{$\langle$}
1335    \def\angleright{$\rangle$}
1336    
1337  % Count depth in font-changes, for error checks  % Count depth in font-changes, for error checks
1338  \newcount\fontdepth \fontdepth=0  \newcount\fontdepth \fontdepth=0
1339    
1340  % Fonts for short table of contents.  % Fonts for short table of contents.
1341  \setfont\shortcontrm{r12}  \setfont\shortcontrm\rmshape{12}{1000}
1342  \setfont\shortcontbf{bx12}  \setfont\shortcontbf\bxshape{12}{1000}
1343  \setfont\shortcontsl{sl12}  \setfont\shortcontsl\slshape{12}{1000}
1344    
1345  %% Add scribe-like font environments, plus @l for inline lisp (usually sans  %% Add scribe-like font environments, plus @l for inline lisp (usually sans
1346  %% serif) and @ii for TeX italic  %% serif) and @ii for TeX italic
# Line 1069  where each line of input produces a line Line 1348  where each line of input produces a line
1348  % \smartitalic{ARG} outputs arg in italics, followed by an italic correction  % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1349  % unless the following character is such as not to need one.  % unless the following character is such as not to need one.
1350  \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\/\fi\fi\fi}
1351  \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}  \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
1352    \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
1353    
1354  \let\i=\smartitalic  \let\i=\smartitalic
1355  \let\var=\smartitalic  \let\var=\smartslanted
1356  \let\dfn=\smartitalic  \let\dfn=\smartslanted
1357  \let\emph=\smartitalic  \let\emph=\smartitalic
1358  \let\cite=\smartitalic  \let\cite=\smartslanted
1359    
1360  \def\b#1{{\bf #1}}  \def\b#1{{\bf #1}}
1361  \let\strong=\b  \let\strong=\b
# Line 1088  where each line of input produces a line Line 1368  where each line of input produces a line
1368  \def\restorehyphenation{\hyphenchar\font = `- }  \def\restorehyphenation{\hyphenchar\font = `- }
1369    
1370  \def\t#1{%  \def\t#1{%
1371    {\tt \nohyphenation \rawbackslash \frenchspacing #1}%    {\tt \rawbackslash \frenchspacing #1}%
1372    \null    \null
1373  }  }
1374  \let\ttfont = \t  \let\ttfont=\t
1375  %\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}  \def\samp#1{`\tclose{#1}'\null}
1376  \def\samp #1{`\tclose{#1}'\null}  \setfont\smallrm\rmshape{8}{1000}
1377  \def\key #1{{\tt \nohyphenation \uppercase{#1}}\null}  \font\smallsy=cmsy9
1378    \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
1379      \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
1380        \vbox{\hrule\kern-0.4pt
1381         \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
1382        \kern-0.4pt\hrule}%
1383      \kern-.06em\raise0.4pt\hbox{\angleright}}}}
1384    % The old definition, with no lozenge:
1385    %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1386  \def\ctrl #1{{\tt \rawbackslash \hat}#1}  \def\ctrl #1{{\tt \rawbackslash \hat}#1}
1387    
1388    % @file, @option are the same as @samp.
1389  \let\file=\samp  \let\file=\samp
1390    \let\option=\samp
1391    
1392  % @code is a modification of @t,  % @code is a modification of @t,
1393  % which makes spaces the same size as normal in the surrounding text.  % which makes spaces the same size as normal in the surrounding text.
# Line 1123  where each line of input produces a line Line 1413  where each line of input produces a line
1413  }  }
1414    
1415  % We *must* turn on hyphenation at `-' and `_' in \code.  % We *must* turn on hyphenation at `-' and `_' in \code.
1416  % Otherwise, it is too hard to avoid overful hboxes  % Otherwise, it is too hard to avoid overfull hboxes
1417  % in the Emacs manual, the Library manual, etc.  % in the Emacs manual, the Library manual, etc.
1418    
1419  % Unfortunately, TeX uses one parameter (\hyphenchar) to control  % Unfortunately, TeX uses one parameter (\hyphenchar) to control
1420  % both hyphenation at - and hyphenation within words.  % both hyphenation at - and hyphenation within words.
1421  % We must therefore turn them both off (\tclose does that)  % We must therefore turn them both off (\tclose does that)
1422  % and arrange explicitly to hyphenate an a dash.  % and arrange explicitly to hyphenate at a dash.
1423  %  -- rms.  %  -- rms.
1424  {  {
1425  \catcode`\-=\active    \catcode`\-=\active
1426  \catcode`\_=\active    \catcode`\_=\active
1427  \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}    %
1428  % The following is used by \doprintindex to insure that long function names    \global\def\code{\begingroup
1429  % wrap around.  It is necessary for - and _ to be active before the index is      \catcode`\-=\active \let-\codedash
1430  % read from the file, as \entry parses the arguments long before \code is      \catcode`\_=\active \let_\codeunder
1431  % ever called.  -- mycroft      \codex
1432  \global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder}    }
1433      %
1434      % If we end up with any active - characters when handling the index,
1435      % just treat them as a normal -.
1436      \global\def\indexbreaks{\catcode`\-=\active \let-\realdash}
1437  }  }
1438    
1439  \def\realdash{-}  \def\realdash{-}
 \def\realunder{_}  
1440  \def\codedash{-\discretionary{}{}{}}  \def\codedash{-\discretionary{}{}{}}
1441  \def\codeunder{\normalunderscore\discretionary{}{}{}}  \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
1442  \def\codex #1{\tclose{#1}\endgroup}  \def\codex #1{\tclose{#1}\endgroup}
1443    
1444  %\let\exp=\tclose  %Was temporary  %\let\exp=\tclose  %Was temporary
# Line 1152  where each line of input produces a line Line 1446  where each line of input produces a line
1446  % @kbd is like @code, except that if the argument is just one @key command,  % @kbd is like @code, except that if the argument is just one @key command,
1447  % then @kbd has no effect.  % then @kbd has no effect.
1448    
1449    % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
1450    %   `example' (@kbd uses ttsl only inside of @example and friends),
1451    %   or `code' (@kbd uses normal tty font always).
1452    \def\kbdinputstyle{\parsearg\kbdinputstylexxx}
1453    \def\kbdinputstylexxx#1{%
1454      \def\arg{#1}%
1455      \ifx\arg\worddistinct
1456        \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
1457      \else\ifx\arg\wordexample
1458        \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1459      \else\ifx\arg\wordcode
1460        \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1461      \fi\fi\fi
1462    }
1463    \def\worddistinct{distinct}
1464    \def\wordexample{example}
1465    \def\wordcode{code}
1466    
1467    % Default is kbdinputdistinct.  (Too much of a hassle to call the macro,
1468    % the catcodes are wrong for parsearg to work.)
1469    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
1470    
1471  \def\xkey{\key}  \def\xkey{\key}
1472  \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{??}%
1473  \ifx\one\xkey\ifx\threex\three \key{#2}%  \ifx\one\xkey\ifx\threex\three \key{#2}%
1474  \else\tclose{\look}\fi  \else{\tclose{\kbdfont\look}}\fi
1475  \else\tclose{\look}\fi}  \else{\tclose{\kbdfont\look}}\fi}
1476    
1477    % For @url, @env, @command quotes seem unnecessary, so use \code.
1478    \let\url=\code
1479    \let\env=\code
1480    \let\command=\code
1481    
1482    % @uref (abbreviation for `urlref') takes an optional second argument
1483    % specifying the text to display.  First (mandatory) arg is the url.
1484    % Perhaps eventually put in a hypertex \special here.
1485    %
1486    \def\uref#1{\urefxxx #1,,\finish}
1487    \def\urefxxx#1,#2,#3\finish{%
1488      \setbox0 = \hbox{\ignorespaces #2}%
1489      \ifdim\wd0 > 0pt
1490        \unhbox0\ (\code{#1})%
1491      \else
1492        \code{#1}%
1493      \fi
1494    }
1495    
1496    % rms does not like the angle brackets --karl, 17may97.
1497    % So now @email is just like @uref.
1498    %\def\email#1{\angleleft{\tt #1}\angleright}
1499    \let\email=\uref
1500    
1501    % Check if we are currently using a typewriter font.  Since all the
1502    % Computer Modern typewriter fonts have zero interword stretch (and
1503    % shrink), and it is reasonable to expect all typewriter fonts to have
1504    % this property, we can check that font parameter.
1505    %
1506    \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
1507    
1508  % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the  % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
1509  % argument is to make the input look right: @dmn{pt} instead of  % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
 % @dmn{}pt.  
1510  %  %
1511  \def\dmn#1{\thinspace #1}  \def\dmn#1{\thinspace #1}
1512    
1513  \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}  \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
1514    
1515  \def\l#1{{\li #1}\null}         %  % @l was never documented to mean ``switch to the Lisp font'',
1516    % and it is not used as such in any manual I can find.  We need it for
1517    % Polish suppressed-l.  --karl, 22sep96.
1518    %\def\l#1{{\li #1}\null}
1519    
1520    % Explicit font changes: @r, @sc, undocumented @ii.
1521    \def\r#1{{\rm #1}}              % roman font
1522    \def\sc#1{{\smallcaps#1}}       % smallcaps font
1523    \def\ii#1{{\it #1}}             % italic font
1524    
1525    % @acronym downcases the argument and prints in smallcaps.
1526    \def\acronym#1{{\smallcaps \lowercase{#1}}}
1527    
1528    % @pounds{} is a sterling sign.
1529    \def\pounds{{\it\$}}
1530    
 \def\r#1{{\rm #1}}              % roman font  
 % Use of \lowercase was suggested.  
 \def\sc#1{{\smallcaps#1}}       % smallcaps font  
 \def\ii#1{{\it #1}}             % italic font  
1531    
1532  \message{page headings,}  \message{page headings,}
1533    
# Line 1179  where each line of input produces a line Line 1535  where each line of input produces a line
1535  \newskip\titlepagebottomglue \titlepagebottomglue = 2pc  \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1536    
1537  % First the title page.  Must do @settitle before @titlepage.  % First the title page.  Must do @settitle before @titlepage.
 \def\titlefont#1{{\titlerm #1}}  
   
1538  \newif\ifseenauthor  \newif\ifseenauthor
1539  \newif\iffinishedtitlepage  \newif\iffinishedtitlepage
1540    
1541    % Do an implicit @contents or @shortcontents after @end titlepage if the
1542    % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
1543    %
1544    \newif\ifsetcontentsaftertitlepage
1545     \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
1546    \newif\ifsetshortcontentsaftertitlepage
1547     \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
1548    
1549  \def\shorttitlepage{\parsearg\shorttitlepagezzz}  \def\shorttitlepage{\parsearg\shorttitlepagezzz}
1550  \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%  \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1551          \endgroup\page\hbox{}\page}          \endgroup\page\hbox{}\page}
1552    
1553  \def\titlepage{\begingroup \parindent=0pt \textfonts  \def\titlepage{\begingroup \parindent=0pt \textfonts
1554     \let\subtitlerm=\tenrm     \let\subtitlerm=\tenrm
 % I deinstalled the following change because \cmr12 is undefined.  
 % This change was not in the ChangeLog anyway.  --rms.  
 %   \let\subtitlerm=\cmr12  
1555     \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%     \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1556     %     %
1557     \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%     \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
# Line 1202  where each line of input produces a line Line 1561  where each line of input produces a line
1561     %     %
1562     % Now you can print the title using @title.     % Now you can print the title using @title.
1563     \def\title{\parsearg\titlezzz}%     \def\title{\parsearg\titlezzz}%
1564     \def\titlezzz##1{\leftline{\titlefont{##1}}     \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
1565                      % print a rule at the page bottom also.                      % print a rule at the page bottom also.
1566                      \finishedtitlepagefalse                      \finishedtitlepagefalse
1567                      \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%                      \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
1568     % No rule at page bottom unless we print one at the top with @title.     % No rule at page bottom unless we print one at the top with @title.
1569     \finishedtitlepagetrue     \finishedtitlepagetrue
1570     %     %
# Line 1223  where each line of input produces a line Line 1582  where each line of input produces a line
1582     \let\oldpage = \page     \let\oldpage = \page
1583     \def\page{%     \def\page{%
1584        \iffinishedtitlepage\else        \iffinishedtitlepage\else
1585           \finishtitlepage           \finishtitlepage
1586        \fi        \fi
1587        \oldpage        \oldpage
1588        \let\page = \oldpage        \let\page = \oldpage
# Line 1241  where each line of input produces a line Line 1600  where each line of input produces a line
1600     % after the title page, which we certainly don't want.     % after the title page, which we certainly don't want.
1601     \oldpage     \oldpage
1602     \endgroup     \endgroup
1603       %
1604       % If they want short, they certainly want long too.
1605       \ifsetshortcontentsaftertitlepage
1606         \shortcontents
1607         \contents
1608         \global\let\shortcontents = \relax
1609         \global\let\contents = \relax
1610       \fi
1611       %
1612       \ifsetcontentsaftertitlepage
1613         \contents
1614         \global\let\contents = \relax
1615         \global\let\shortcontents = \relax
1616       \fi
1617       %
1618     \HEADINGSon     \HEADINGSon
1619  }  }
1620    
# Line 1254  where each line of input produces a line Line 1628  where each line of input produces a line
1628    
1629  \let\thispage=\folio  \let\thispage=\folio
1630    
1631  \newtoks \evenheadline    % Token sequence for heading line of even pages  \newtoks\evenheadline    % headline on even pages
1632  \newtoks \oddheadline     % Token sequence for heading line of odd pages  \newtoks\oddheadline     % headline on odd pages
1633  \newtoks \evenfootline    % Token sequence for footing line of even pages  \newtoks\evenfootline    % footline on even pages
1634  \newtoks \oddfootline     % Token sequence for footing line of odd pages  \newtoks\oddfootline     % footline on odd pages
1635    
1636  % Now make Tex use those variables  % Now make Tex use those variables
1637  \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline  \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
# Line 1291  where each line of input produces a line Line 1665  where each line of input produces a line
1665  \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%  \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
1666  \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}  \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1667    
1668  \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}  \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
 \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%  
 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}  
 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}  
1669    
1670  \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}  \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
1671  \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%  \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
# Line 1302  where each line of input produces a line Line 1673  where each line of input produces a line
1673    
1674  \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}  \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
1675  \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%  \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
1676  \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}    \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
1677      %
1678      % Leave some space for the footline.  Hopefully ok to assume
1679      % @evenfooting will not be used by itself.
1680      \global\advance\pageheight by -\baselineskip
1681      \global\advance\vsize by -\baselineskip
1682    }
1683    
1684  \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}  \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
 \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%  
 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}  
 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}  
1685  %  %
1686  }% unbind the catcode of @.  }% unbind the catcode of @.
1687    
1688  % @headings double      turns headings on for double-sided printing.  % @headings double      turns headings on for double-sided printing.
1689  % @headings single      turns headings on for single-sided printing.  % @headings single      turns headings on for single-sided printing.
1690  % @headings off         turns them off.  % @headings off         turns them off.
1691  % @headings on          same as @headings double, retained for compatibility.  % @headings on          same as @headings double, retained for compatibility.
1692  % @headings after       turns on double-sided headings after this page.  % @headings after       turns on double-sided headings after this page.
1693  % @headings doubleafter turns on double-sided headings after this page.  % @headings doubleafter turns on double-sided headings after this page.
1694  % @headings singleafter turns on single-sided headings after this page.  % @headings singleafter turns on single-sided headings after this page.
1695  % By default, they are off.  % By default, they are off at the start of a document,
1696    % and turned `on' after @end titlepage.
1697    
1698  \def\headings #1 {\csname HEADINGS#1\endcsname}  \def\headings #1 {\csname HEADINGS#1\endcsname}
1699    
# Line 1332  where each line of input produces a line Line 1707  where each line of input produces a line
1707  % title on inside top of left hand pages, and page numbers on outside top  % title on inside top of left hand pages, and page numbers on outside top
1708  % edge of all pages.  % edge of all pages.
1709  \def\HEADINGSdouble{  \def\HEADINGSdouble{
 %\pagealignmacro  
1710  \global\pageno=1  \global\pageno=1
1711  \global\evenfootline={\hfil}  \global\evenfootline={\hfil}
1712  \global\oddfootline={\hfil}  \global\oddfootline={\hfil}
1713  \global\evenheadline={\line{\folio\hfil\thistitle}}  \global\evenheadline={\line{\folio\hfil\thistitle}}
1714  \global\oddheadline={\line{\thischapter\hfil\folio}}  \global\oddheadline={\line{\thischapter\hfil\folio}}
1715    \global\let\contentsalignmacro = \chapoddpage
1716  }  }
1717    \let\contentsalignmacro = \chappager
1718    
1719  % For single-sided printing, chapter title goes across top left of page,  % For single-sided printing, chapter title goes across top left of page,
1720  % page number on top right.  % page number on top right.
1721  \def\HEADINGSsingle{  \def\HEADINGSsingle{
 %\pagealignmacro  
1722  \global\pageno=1  \global\pageno=1
1723  \global\evenfootline={\hfil}  \global\evenfootline={\hfil}
1724  \global\oddfootline={\hfil}  \global\oddfootline={\hfil}
1725  \global\evenheadline={\line{\thischapter\hfil\folio}}  \global\evenheadline={\line{\thischapter\hfil\folio}}
1726  \global\oddheadline={\line{\thischapter\hfil\folio}}  \global\oddheadline={\line{\thischapter\hfil\folio}}
1727    \global\let\contentsalignmacro = \chappager
1728  }  }
1729  \def\HEADINGSon{\HEADINGSdouble}  \def\HEADINGSon{\HEADINGSdouble}
1730    
# Line 1358  where each line of input produces a line Line 1735  where each line of input produces a line
1735  \global\oddfootline={\hfil}  \global\oddfootline={\hfil}
1736  \global\evenheadline={\line{\folio\hfil\thistitle}}  \global\evenheadline={\line{\folio\hfil\thistitle}}
1737  \global\oddheadline={\line{\thischapter\hfil\folio}}  \global\oddheadline={\line{\thischapter\hfil\folio}}
1738    \global\let\contentsalignmacro = \chapoddpage
1739  }  }
1740    
1741  \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}  \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
# Line 1366  where each line of input produces a line Line 1744  where each line of input produces a line
1744  \global\oddfootline={\hfil}  \global\oddfootline={\hfil}
1745  \global\evenheadline={\line{\thischapter\hfil\folio}}  \global\evenheadline={\line{\thischapter\hfil\folio}}
1746  \global\oddheadline={\line{\thischapter\hfil\folio}}  \global\oddheadline={\line{\thischapter\hfil\folio}}
1747    \global\let\contentsalignmacro = \chappager
1748  }  }
1749    
1750  % Subroutines used in generating headings  % Subroutines used in generating headings
# Line 1389  July\or August\or September\or October\o Line 1768  July\or August\or September\or October\o
1768  \def\settitle{\parsearg\settitlezzz}  \def\settitle{\parsearg\settitlezzz}
1769  \def\settitlezzz #1{\gdef\thistitle{#1}}  \def\settitlezzz #1{\gdef\thistitle{#1}}
1770    
 \message{tables,}  
   
 % @tabs -- simple alignment  
   
 % These don't work.  For one thing, \+ is defined as outer.  
 % So these macros cannot even be defined.  
   
 %\def\tabs{\parsearg\tabszzz}  
 %\def\tabszzz #1{\settabs\+#1\cr}  
 %\def\tabline{\parsearg\tablinezzz}  
 %\def\tablinezzz #1{\+#1\cr}  
 %\def\&{&}  
1771    
1772    \message{tables,}
1773  % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).  % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
1774    
1775  % default indentation of table text  % default indentation of table text
# Line 1421  July\or August\or September\or October\o Line 1789  July\or August\or September\or October\o
1789    
1790  \newif\ifitemxneedsnegativevskip  \newif\ifitemxneedsnegativevskip
1791    
1792  \def\itemxpar{\par\ifitemxneedsnegativevskip\vskip-\parskip\nobreak\fi}  \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
1793    
1794  \def\internalBitem{\smallbreak \parsearg\itemzzz}  \def\internalBitem{\smallbreak \parsearg\itemzzz}
1795  \def\internalBitemx{\itemxpar \parsearg\itemzzz}  \def\internalBitemx{\itemxpar \parsearg\itemzzz}
# Line 1445  July\or August\or September\or October\o Line 1813  July\or August\or September\or October\o
1813    \itemindex{#1}%    \itemindex{#1}%
1814    \nobreak % This prevents a break before @itemx.    \nobreak % This prevents a break before @itemx.
1815    %    %
   % Be sure we are not still in the middle of a paragraph.  
   %{\parskip = 0in  
   %\par  
   %}%  
   %  
1816    % If the item text does not fit in the space we have, put it on a line    % If the item text does not fit in the space we have, put it on a line
1817    % by itself, and do not allow a page break either before or after that    % by itself, and do not allow a page break either before or after that
1818    % line.  We do not start a paragraph here because then if the next    % line.  We do not start a paragraph here because then if the next
# Line 1478  July\or August\or September\or October\o Line 1841  July\or August\or September\or October\o
1841      \itemxneedsnegativevskipfalse      \itemxneedsnegativevskipfalse
1842    \else    \else
1843      % The item text fits into the space.  Start a paragraph, so that the      % The item text fits into the space.  Start a paragraph, so that the
1844      % following text (if any) will end up on the same line.  Since that      % following text (if any) will end up on the same line.  
     % text will be indented by \tableindent, we make the item text be in  
     % a zero-width box.  
1845      \noindent      \noindent
1846      \rlap{\hskip -\tableindent\box0}\ignorespaces%      % Do this with kerns and \unhbox so that if there is a footnote in
1847      \endgroup%      % the item text, it can migrate to the main vertical list and
1848      \itemxneedsnegativevskiptrue%      % eventually be printed.
1849        \nobreak\kern-\tableindent
1850        \dimen0 = \itemmax  \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
1851        \unhbox0
1852        \nobreak\kern\dimen0
1853        \endgroup
1854        \itemxneedsnegativevskiptrue
1855    \fi    \fi
1856  }  }
1857    
# Line 1495  July\or August\or September\or October\o Line 1862  July\or August\or September\or October\o
1862  \def\xitem{\errmessage{@xitem while not in a table}}  \def\xitem{\errmessage{@xitem while not in a table}}
1863  \def\xitemx{\errmessage{@xitemx while not in a table}}  \def\xitemx{\errmessage{@xitemx while not in a table}}
1864    
1865  %% Contains a kludge to get @end[description] to work  % Contains a kludge to get @end[description] to work.
1866  \def\description{\tablez{\dontindex}{1}{}{}{}{}}  \def\description{\tablez{\dontindex}{1}{}{}{}{}}
1867    
1868    % @table, @ftable, @vtable.
1869  \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}  \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
1870  {\obeylines\obeyspaces%  {\obeylines\obeyspaces%
1871  \gdef\tablex #1^^M{%  \gdef\tablex #1^^M{%
# Line 1528  July\or August\or September\or October\o Line 1896  July\or August\or September\or October\o
1896  \def\tablez #1#2#3#4#5#6{%  \def\tablez #1#2#3#4#5#6{%
1897  \aboveenvbreak %  \aboveenvbreak %
1898  \begingroup %  \begingroup %
1899  \def\Edescription{\Etable}% Neccessary kludge.  \def\Edescription{\Etable}% Necessary kludge.
1900  \let\itemindex=#1%  \let\itemindex=#1%
1901  \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %  \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
1902  \ifnum 0#4>0 \tableindent=#4\mil \fi %  \ifnum 0#4>0 \tableindent=#4\mil \fi %
# Line 1557  July\or August\or September\or October\o Line 1925  July\or August\or September\or October\o
1925  \def\itemize{\parsearg\itemizezzz}  \def\itemize{\parsearg\itemizezzz}
1926    
1927  \def\itemizezzz #1{%  \def\itemizezzz #1{%
1928    \begingroup % ended by the @end itemsize    \begingroup % ended by the @end itemize
1929    \itemizey {#1}{\Eitemize}    \itemizey {#1}{\Eitemize}
1930  }  }
1931    
# Line 1685  July\or August\or September\or October\o Line 2053  July\or August\or September\or October\o
2053  \def\itemizeitem{%  \def\itemizeitem{%
2054  \advance\itemno by 1  \advance\itemno by 1
2055  {\let\par=\endgraf \smallbreak}%  {\let\par=\endgraf \smallbreak}%
2056  \ifhmode \errmessage{\in hmode at itemizeitem}\fi  \ifhmode \errmessage{In hmode at itemizeitem}\fi
2057  {\parskip=0in \hskip 0pt  {\parskip=0in \hskip 0pt
2058  \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%  \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
2059  \vadjust{\penalty 1200}}%  \vadjust{\penalty 1200}}%
2060  \flushcr}  \flushcr}
2061    
2062  % @multitable macros  % @multitable macros
2063  % Amy Hendrickson, 8/18/94  % Amy Hendrickson, 8/18/94, 3/6/96
2064  %  %
2065  % @multitable ... @endmultitable will make as many columns as desired.  % @multitable ... @end multitable will make as many columns as desired.
2066  % Contents of each column will wrap at width given in preamble. Width  % Contents of each column will wrap at width given in preamble.  Width
2067  % can be specified either with sample text given in a template line,  % can be specified either with sample text given in a template line,
2068  % or in percent of \hsize, the current width of text on page.  % or in percent of \hsize, the current width of text on page.
2069    
# Line 1703  July\or August\or September\or October\o Line 2071  July\or August\or September\or October\o
2071    
2072  % To make preamble:  % To make preamble:
2073  %  %
2074  % Either define widths of columns in terms of percent of \hsize:  % Either define widths of columns in terms of percent of \hsize:
2075  %   @multitable @percentofhsize .2 .3 .5  %   @multitable @columnfractions .25 .3 .45
2076  %   @item ...  %   @item ...
2077  %  %
2078  %   Numbers following @percentofhsize are the percent of the total  %   Numbers following @columnfractions are the percent of the total
2079  %   current hsize to be used for each column. You may use as many  %   current hsize to be used for each column. You may use as many
2080  %   columns as desired.  %   columns as desired.
2081    
2082    
2083  % Or use a template:  % Or use a template:
2084  %   @multitable {Column 1 template} {Column 2 template} {Column 3 template}  %   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
2085  %   @item ...  %   @item ...
2086  %   using the widest term desired in each column.  %   using the widest term desired in each column.
2087    %
2088    % For those who want to use more than one line's worth of words in
2089    % the preamble, break the line within one argument and it
2090    % will parse correctly, i.e.,
2091    %
2092    %     @multitable {Column 1 template} {Column 2 template} {Column 3
2093    %      template}
2094    % Not:
2095    %     @multitable {Column 1 template} {Column 2 template}
2096    %      {Column 3 template}
2097    
2098    % Each new table line starts with @item, each subsequent new column
 % Each new table line starts with @item, each subsequent new column  
2099  % starts with @tab. Empty columns may be produced by supplying @tab's  % starts with @tab. Empty columns may be produced by supplying @tab's
2100  % with nothing between them for as many times as empty columns are needed,  % with nothing between them for as many times as empty columns are needed,
2101  % ie, @tab@tab@tab will produce two empty columns.  % ie, @tab@tab@tab will produce two empty columns.
2102    
2103  % @item, @tab, @multicolumn or @endmulticolumn do not need to be on their  % @item, @tab, @multitable or @end multitable do not need to be on their
2104  % own lines, but it will not hurt if they are.  % own lines, but it will not hurt if they are.
2105    
2106  % Sample multitable:  % Sample multitable:
2107    
2108  %   @multitable {Column 1 template} {Column 2 template} {Column 3 template}  %   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
2109  %   @item first col stuff @tab second col stuff @tab third col  %   @item first col stuff @tab second col stuff @tab third col
2110  %   @item  %   @item
2111  %   first col stuff  %   first col stuff
2112  %   @tab  %   @tab
2113  %   second col stuff  %   second col stuff
2114  %   @tab  %   @tab
2115  %   third col  %   third col
2116  %   @item first col stuff @tab second col stuff  %   @item first col stuff @tab second col stuff
2117  %   @tab Many paragraphs of text may be used in any column.  %   @tab Many paragraphs of text may be used in any column.
2118  %      %
2119  %         They will wrap at the width determined by the template.  %         They will wrap at the width determined by the template.
2120  %   @item@tab@tab This will be in third column.  %   @item@tab@tab This will be in third column.
2121  %   @endmultitable  %   @end multitable
2122    
2123  % Default dimensions may be reset by user.  % Default dimensions may be reset by user.
2124  % @intableparskip will set vertical space between paragraphs in table.  % @multitableparskip is vertical space between paragraphs in table.
2125  % @intableparindent will set paragraph indent in table.  % @multitableparindent is paragraph indent in table.
2126  % @spacebetweencols will set horizontal space to be left between columns.  % @multitablecolmargin is horizontal space to be left between columns.
2127  % @spacebetweenlines will set vertical space to be left between lines.  % @multitablelinespace is space to leave between table items, baseline
2128    %                                                            to baseline.
2129  %%%%  %   0pt means it depends on current normal line spacing.
2130  % Dimensions  %
2131    \newskip\multitableparskip
2132  \newdimen\intableparskip  \newskip\multitableparindent
2133  \newdimen\intableparindent  \newdimen\multitablecolspace
2134  \newdimen\spacebetweencols  \newskip\multitablelinespace
2135  \newdimen\spacebetweenlines  \multitableparskip=0pt
2136  \intableparskip=0pt  \multitableparindent=6pt
2137  \intableparindent=6pt  \multitablecolspace=12pt
2138  \spacebetweencols=12pt  \multitablelinespace=0pt
 \spacebetweenlines=12pt  
2139    
 %%%%  
2140  % Macros used to set up halign preamble:  % Macros used to set up halign preamble:
2141    %
2142  \let\endsetuptable\relax  \let\endsetuptable\relax
2143  \def\xendsetuptable{\endsetuptable}  \def\xendsetuptable{\endsetuptable}
2144  \let\percentofhsize\relax  \let\columnfractions\relax
2145  \def\xpercentofhsize{\percentofhsize}  \def\xcolumnfractions{\columnfractions}
2146  \newif\ifsetpercent  \newif\ifsetpercent
2147    
2148    % #1 is the part of the @columnfraction before the decimal point, which
2149    % is presumably either 0 or the empty string (but we don't check, we
2150    % just throw it away).  #2 is the decimal part, which we use as the
2151    % percent of \hsize for this column.
2152    \def\pickupwholefraction#1.#2 {%
2153      \global\advance\colcount by 1
2154      \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}%
2155      \setuptable
2156    }
2157    
2158  \newcount\colcount  \newcount\colcount
2159  \def\setuptable#1{\def\firstarg{#1}%  \def\setuptable#1{%
2160  \ifx\firstarg\xendsetuptable\let\go\relax%    \def\firstarg{#1}%
2161  \else    \ifx\firstarg\xendsetuptable
2162    \ifx\firstarg\xpercentofhsize\global\setpercenttrue%      \let\go = \relax
2163    \else    \else
2164      \ifsetpercent      \ifx\firstarg\xcolumnfractions
2165         \if#1.\else%        \global\setpercenttrue
2166         \global\advance\colcount by1 %      \else
2167         \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%        \ifsetpercent
2168         \fi           \let\go\pickupwholefraction
2169          \else
2170             \global\advance\colcount by 1
2171             \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;
2172                                % typically that is always in the input, anyway.
2173             \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
2174          \fi
2175        \fi
2176        \ifx\go\pickupwholefraction
2177          % Put the argument back for the \pickupwholefraction call, so
2178          % we'll always have a period there to be parsed.
2179          \def\go{\pickupwholefraction#1}%
2180      \else      \else
2181         \global\advance\colcount by1        \let\go = \setuptable
        \setbox0=\hbox{#1}%  
        \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%  
2182      \fi%      \fi%
2183    \fi%    \fi
2184    \let\go\setuptable%    \go
2185  \fi\go}  }
 %%%%  
 % multitable syntax  
 \def\tab{&}  
   
 %%%%  
 % @multitable ... @endmultitable definitions:  
2186    
2187  \def\multitable#1\item{\bgroup  % multitable syntax
2188  \let\item\cr  \def\tab{&\hskip1sp\relax} % 2/2/96
2189  \tolerance=9500                             % tiny skip here makes sure this column space is
2190  \hbadness=9500                             % maintained, even if it is never used.
2191  \parskip=\intableparskip  
2192  \parindent=\intableparindent  % @multitable ... @end multitable definitions:
2193  \overfullrule=0pt  %
2194  \global\colcount=0\relax%  \def\multitable{\parsearg\dotable}
2195  \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%  \def\dotable#1{\bgroup
2196   % To parse everything between @multitable and @item :    \vskip\parskip
2197  \def\one{#1}\expandafter\setuptable\one\endsetuptable    \let\item\crcr
2198   % Need to reset this to 0 after \setuptable.    \tolerance=9500
2199  \global\colcount=0\relax%    \hbadness=9500
2200   %    \setmultitablespacing
2201   % This preamble sets up a generic column definition, which will    \parskip=\multitableparskip
2202   % be used as many times as user calls for columns.    \parindent=\multitableparindent
2203   % \vtop will set a single line and will also let text wrap and    \overfullrule=0pt
2204   % continue for many paragraphs if desired.    \global\colcount=0
2205  \halign\bgroup&\global\advance\colcount by 1\relax%    \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
2206  \vtop{\hsize=\expandafter\csname col\the\colcount\endcsname    %
2207   % In order to keep entries from bumping into each other    % To parse everything between @multitable and @item:
2208   % we will add a \leftskip of \spacebetweencols to all columns after    \setuptable#1 \endsetuptable
2209   % the first one.    %
2210   %  If a template has been used, we will add \spacebetweencols    % \everycr will reset column counter, \colcount, at the end of
2211   % to the width of each template entry.    % each line. Every column entry will cause \colcount to advance by one.
2212   %  If user has set preamble in terms of percent of \hsize    % The table preamble
2213   % we will use that dimension as the width of the column, and    % looks at the current \colcount to find the correct column width.
2214   % the \leftskip will keep entries from bumping into each other.    \everycr{\noalign{%
2215   % Table will start at left margin and final column will justify at    %
2216   % right margin.    % \filbreak%% keeps underfull box messages off when table breaks over pages.
2217  \ifnum\colcount=1    % Maybe so, but it also creates really weird page breaks when the table
2218  \else    % breaks over pages. Wouldn't \vfil be better?  Wait until the problem
2219    \ifsetpercent    % manifests itself, so it can be fixed for real --karl.
2220        \global\colcount=0\relax}}%
2221      %
2222      % This preamble sets up a generic column definition, which will
2223      % be used as many times as user calls for columns.
2224      % \vtop will set a single line and will also let text wrap and
2225      % continue for many paragraphs if desired.
2226      \halign\bgroup&\global\advance\colcount by 1\relax
2227        \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2228      %
2229      % In order to keep entries from bumping into each other
2230      % we will add a \leftskip of \multitablecolspace to all columns after
2231      % the first one.
2232      %
2233      % If a template has been used, we will add \multitablecolspace
2234      % to the width of each template entry.
2235      %
2236      % If the user has set preamble in terms of percent of \hsize we will
2237      % use that dimension as the width of the column, and the \leftskip
2238      % will keep entries from bumping into each other.  Table will start at
2239      % left margin and final column will justify at right margin.
2240      %
2241      % Make sure we don't inherit \rightskip from the outer environment.
2242      \rightskip=0pt
2243      \ifnum\colcount=1
2244        % The first column will be indented with the surrounding text.
2245        \advance\hsize by\leftskip
2246    \else    \else
2247     % If user has <not> set preamble in terms of percent of \hsize      \ifsetpercent \else
2248     % we will advance \hsize by \spacebetweencols        % If user has not set preamble in terms of percent of \hsize
2249    \advance\hsize by \spacebetweencols        % we will advance \hsize by \multitablecolspace.
2250          \advance\hsize by \multitablecolspace
2251        \fi
2252       % In either case we will make \leftskip=\multitablecolspace:
2253      \leftskip=\multitablecolspace
2254    \fi    \fi
2255   % In either case we will make \leftskip=\spacebetweencols:    % Ignoring space at the beginning and end avoids an occasional spurious
2256  \leftskip=\spacebetweencols    % blank line, when TeX decides to break the line at the space before the
2257  \fi    % box from the multistrut, so the strut ends up on a line by itself.
2258  \noindent##}\cr%    % For example:
2259   % \everycr will reset column counter, \colcount, at the end of    % @multitable @columnfractions .11 .89
2260   % each line. Every column  entry will cause \colcount to advance by one.    % @item @code{#}
2261   % The table preamble    % @tab Legal holiday which is valid in major parts of the whole country.
2262   % looks at the current \colcount to find the correct column width.    % Is automatically provided with highlighting sequences respectively marking
2263  \global\everycr{\noalign{\nointerlineskip\vskip\spacebetweenlines    % characters.
2264  \filbreak%% keeps underfull box messages off when table breaks over pages.    \noindent\ignorespaces##\unskip\multistrut}\cr
2265  \global\colcount=0\relax}}}  }
2266    
2267    \def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2268    % If so, do nothing. If not, give it an appropriate dimension based on
2269    % current baselineskip.
2270    \ifdim\multitablelinespace=0pt
2271    %% strut to put in table in case some entry doesn't have descenders,
2272    %% to keep lines equally spaced
2273    \let\multistrut = \strut
2274    %% Test to see if parskip is larger than space between lines of
2275    %% table. If not, do nothing.
2276    %%        If so, set to same dimension as multitablelinespace.
2277    \else
2278    \gdef\multistrut{\vrule height\multitablelinespace depth\dp0
2279    width0pt\relax} \fi
2280    \ifdim\multitableparskip>\multitablelinespace
2281    \global\multitableparskip=\multitablelinespace
2282    \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
2283                                          %% than skip between lines in the table.
2284    \fi%
2285    \ifdim\multitableparskip=0pt
2286    \global\multitableparskip=\multitablelinespace
2287    \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
2288                                          %% than skip between lines in the table.
2289    \fi}
2290    
2291    
2292  \message{indexing,}  \message{indexing,}
2293  % Index generation facilities  % Index generation facilities
# Line 1856  July\or August\or September\or October\o Line 2301  July\or August\or September\or October\o
2301  % It automatically defines \fooindex such that  % It automatically defines \fooindex such that
2302  % \fooindex ...rest of line... puts an entry in the index foo.  % \fooindex ...rest of line... puts an entry in the index foo.
2303  % It also defines \fooindfile to be the number of the output channel for  % It also defines \fooindfile to be the number of the output channel for
2304  % the file that accumulates this index.  The file's extension is foo.  % the file that accumulates this index.  The file's extension is foo.
2305  % The name of an index should be no more than 2 characters long  % The name of an index should be no more than 2 characters long
2306  % for the sake of vms.  % for the sake of vms.
2307    %
2308  \def\newindex #1{  \def\newindex#1{%
2309  \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file    \iflinks
2310  \openout \csname#1indfile\endcsname \jobname.#1 % Open the file      \expandafter\newwrite \csname#1indfile\endcsname
2311  \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex      \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
2312  \noexpand\doindex {#1}}    \fi
2313      \expandafter\xdef\csname#1index\endcsname{%     % Define @#1index
2314        \noexpand\doindex{#1}}
2315  }  }
2316    
2317  % @defindex foo  ==  \newindex{foo}  % @defindex foo  ==  \newindex{foo}
# Line 1873  July\or August\or September\or October\o Line 2320  July\or August\or September\or October\o
2320    
2321  % Define @defcodeindex, like @defindex except put all entries in @code.  % Define @defcodeindex, like @defindex except put all entries in @code.
2322    
2323  \def\newcodeindex #1{  \def\newcodeindex#1{%
2324  \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file    \iflinks
2325  \openout \csname#1indfile\endcsname \jobname.#1 % Open the file      \expandafter\newwrite \csname#1indfile\endcsname
2326  \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex      \openout \csname#1indfile\endcsname \jobname.#1
2327  \noexpand\docodeindex {#1}}    \fi
2328      \expandafter\xdef\csname#1index\endcsname{%
2329        \noexpand\docodeindex{#1}}
2330  }  }
2331    
2332  \def\defcodeindex{\parsearg\newcodeindex}  \def\defcodeindex{\parsearg\newcodeindex}
2333    
2334  % @synindex foo bar    makes index foo feed into index bar.  % @synindex foo bar    makes index foo feed into index bar.
2335  % Do this instead of @defindex foo if you don't want it as a separate index.  % Do this instead of @defindex foo if you don't want it as a separate index.
2336  \def\synindex #1 #2 {%  % The \closeout helps reduce unnecessary open files; the limit on the
2337  \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname  % Acorn RISC OS is a mere 16 files.
2338  \expandafter\let\csname#1indfile\endcsname=\synindexfoo  \def\synindex#1 #2 {%
2339  \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex    \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2340  \noexpand\doindex {#2}}%    \expandafter\closeout\csname#1indfile\endcsname
2341      \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2342      \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2343        \noexpand\doindex{#2}}%
2344  }  }
2345    
2346  % @syncodeindex foo bar   similar, but put all entries made for index foo  % @syncodeindex foo bar   similar, but put all entries made for index foo
2347  % inside @code.  % inside @code.
2348  \def\syncodeindex #1 #2 {%  \def\syncodeindex#1 #2 {%
2349  \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname    \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2350  \expandafter\let\csname#1indfile\endcsname=\synindexfoo    \expandafter\closeout\csname#1indfile\endcsname
2351  \expandafter\xdef\csname#1index\endcsname{%     % Define \xxxindex    \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2352  \noexpand\docodeindex {#2}}%    \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2353        \noexpand\docodeindex{#2}}%
2354  }  }
2355    
2356  % Define \doindex, the driver for all \fooindex macros.  % Define \doindex, the driver for all \fooindex macros.
# Line 1918  July\or August\or September\or October\o Line 2371  July\or August\or September\or October\o
2371  \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}  \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
2372    
2373  \def\indexdummies{%  \def\indexdummies{%
2374    \def\ { }%
2375  % Take care of the plain tex accent commands.  % Take care of the plain tex accent commands.
2376  \def\"{\realbackslash "}%  \def\"{\realbackslash "}%
2377  \def\`{\realbackslash `}%  \def\`{\realbackslash `}%
# Line 1944  July\or August\or September\or October\o Line 2398  July\or August\or September\or October\o
2398  \def\L{\realbackslash L}%  \def\L{\realbackslash L}%
2399  \def\ss{\realbackslash ss}%  \def\ss{\realbackslash ss}%
2400  % Take care of texinfo commands likely to appear in an index entry.  % Take care of texinfo commands likely to appear in an index entry.
2401    % (Must be a way to avoid doing expansion at all, and thus not have to
2402    % laboriously list every single command here.)
2403    \def\@{@}% will be @@ when we switch to @ as escape char.
2404    % Need these in case \tex is in effect and \{ is a \delimiter again.
2405    % But can't use \lbracecmd and \rbracecmd because texindex assumes
2406    % braces and backslashes are used only as delimiters.
2407    \let\{ = \mylbrace
2408    \let\} = \myrbrace
2409  \def\_{{\realbackslash _}}%  \def\_{{\realbackslash _}}%
2410  \def\w{\realbackslash w }%  \def\w{\realbackslash w }%
2411  \def\bf{\realbackslash bf }%  \def\bf{\realbackslash bf }%
2412  \def\rm{\realbackslash rm }%  %\def\rm{\realbackslash rm }%
2413  \def\sl{\realbackslash sl }%  \def\sl{\realbackslash sl }%
2414  \def\sf{\realbackslash sf}%  \def\sf{\realbackslash sf}%
2415  \def\tt{\realbackslash tt}%  \def\tt{\realbackslash tt}%
2416  \def\gtr{\realbackslash gtr}%  \def\gtr{\realbackslash gtr}%
2417  \def\less{\realbackslash less}%  \def\less{\realbackslash less}%
2418  \def\hat{\realbackslash hat}%  \def\hat{\realbackslash hat}%
 \def\char{\realbackslash char}%  
2419  \def\TeX{\realbackslash TeX}%  \def\TeX{\realbackslash TeX}%
2420  \def\dots{\realbackslash dots }%  \def\dots{\realbackslash dots }%
2421  \def\copyright{\realbackslash copyright }%  \def\result{\realbackslash result}%
2422    \def\equiv{\realbackslash equiv}%
2423    \def\expansion{\realbackslash expansion}%
2424    \def\print{\realbackslash print}%
2425    \def\error{\realbackslash error}%
2426    \def\point{\realbackslash point}%
2427    \def\copyright{\realbackslash copyright}%
2428  \def\tclose##1{\realbackslash tclose {##1}}%  \def\tclose##1{\realbackslash tclose {##1}}%
2429  \def\code##1{\realbackslash code {##1}}%  \def\code##1{\realbackslash code {##1}}%
2430    \def\uref##1{\realbackslash uref {##1}}%
2431    \def\url##1{\realbackslash url {##1}}%
2432    \def\env##1{\realbackslash env {##1}}%
2433    \def\command##1{\realbackslash command {##1}}%
2434    \def\option##1{\realbackslash option {##1}}%
2435    \def\dotless##1{\realbackslash dotless {##1}}%
2436  \def\samp##1{\realbackslash samp {##1}}%  \def\samp##1{\realbackslash samp {##1}}%
2437  \def\t##1{\realbackslash r {##1}}%  \def\,##1{\realbackslash ,{##1}}%
2438    \def\t##1{\realbackslash t {##1}}%
2439  \def\r##1{\realbackslash r {##1}}%  \def\r##1{\realbackslash r {##1}}%
2440  \def\i##1{\realbackslash i {##1}}%  \def\i##1{\realbackslash i {##1}}%
2441  \def\b##1{\realbackslash b {##1}}%  \def\b##1{\realbackslash b {##1}}%
2442    \def\sc##1{\realbackslash sc {##1}}%
2443  \def\cite##1{\realbackslash cite {##1}}%  \def\cite##1{\realbackslash cite {##1}}%
2444  \def\key##1{\realbackslash key {##1}}%  \def\key##1{\realbackslash key {##1}}%
2445  \def\file##1{\realbackslash file {##1}}%  \def\file##1{\realbackslash file {##1}}%
# Line 1972  July\or August\or September\or October\o Line 2447  July\or August\or September\or October\o
2447  \def\kbd##1{\realbackslash kbd {##1}}%  \def\kbd##1{\realbackslash kbd {##1}}%
2448  \def\dfn##1{\realbackslash dfn {##1}}%  \def\dfn##1{\realbackslash dfn {##1}}%
2449  \def\emph##1{\realbackslash emph {##1}}%  \def\emph##1{\realbackslash emph {##1}}%
2450    \def\acronym##1{\realbackslash acronym {##1}}%
2451    %
2452    % Handle some cases of @value -- where the variable name does not
2453    % contain - or _, and the value does not contain any
2454    % (non-fully-expandable) commands.
2455    \let\value = \expandablevalue
2456    %
2457    \unsepspaces
2458  }  }
2459    
2460    % If an index command is used in an @example environment, any spaces
2461    % therein should become regular spaces in the raw index file, not the
2462    % expansion of \tie (\\leavevmode \penalty \@M \ ).
2463    {\obeyspaces
2464     \gdef\unsepspaces{\obeyspaces\let =\space}}
2465    
2466  % \indexnofonts no-ops all font-change commands.  % \indexnofonts no-ops all font-change commands.
2467  % This is used when outputting the strings to sort the index by.  % This is used when outputting the strings to sort the index by.
2468  \def\indexdummyfont#1{#1}  \def\indexdummyfont#1{#1}
# Line 1982  July\or August\or September\or October\o Line 2471  July\or August\or September\or October\o
2471    
2472  \def\indexnofonts{%  \def\indexnofonts{%
2473  % Just ignore accents.  % Just ignore accents.
2474    \let\,=\indexdummyfont
2475  \let\"=\indexdummyfont  \let\"=\indexdummyfont
2476  \let\`=\indexdummyfont  \let\`=\indexdummyfont
2477  \let\'=\indexdummyfont  \let\'=\indexdummyfont
# Line 1994  July\or August\or September\or October\o Line 2484  July\or August\or September\or October\o
2484  \let\u=\indexdummyfont  \let\u=\indexdummyfont
2485  \let\v=\indexdummyfont  \let\v=\indexdummyfont
2486  \let\H=\indexdummyfont  \let\H=\indexdummyfont
2487    \let\dotless=\indexdummyfont
2488  % Take care of the plain tex special European modified letters.  % Take care of the plain tex special European modified letters.
2489  \def\oe{oe}%  \def\oe{oe}%
2490  \def\ae{ae}%  \def\ae{ae}%
# Line 2020  July\or August\or September\or October\o Line 2511  July\or August\or September\or October\o
2511  %\let\tt=\indexdummyfont  %\let\tt=\indexdummyfont
2512  \let\tclose=\indexdummyfont  \let\tclose=\indexdummyfont
2513  \let\code=\indexdummyfont  \let\code=\indexdummyfont
2514    \let\url=\indexdummyfont
2515    \let\uref=\indexdummyfont
2516    \let\env=\indexdummyfont
2517    \let\command=\indexdummyfont
2518    \let\option=\indexdummyfont
2519  \let\file=\indexdummyfont  \let\file=\indexdummyfont
2520  \let\samp=\indexdummyfont  \let\samp=\indexdummyfont
2521  \let\kbd=\indexdummyfont  \let\kbd=\indexdummyfont
# Line 2027  July\or August\or September\or October\o Line 2523  July\or August\or September\or October\o
2523  \let\var=\indexdummyfont  \let\var=\indexdummyfont
2524  \let\TeX=\indexdummytex  \let\TeX=\indexdummytex
2525  \let\dots=\indexdummydots  \let\dots=\indexdummydots
2526    \def\@{@}%
2527  }  }
2528    
2529  % To define \realbackslash, we must make \ not be an escape.  % To define \realbackslash, we must make \ not be an escape.
# Line 2034  July\or August\or September\or October\o Line 2531  July\or August\or September\or October\o
2531  % so we do not become unable to do a definition.  % so we do not become unable to do a definition.
2532    
2533  {\catcode`\@=0 \catcode`\\=\other  {\catcode`\@=0 \catcode`\\=\other
2534  @gdef@realbackslash{\}}   @gdef@realbackslash{\}}
2535    
2536  \let\indexbackslash=0  %overridden during \printindex.  \let\indexbackslash=0  %overridden during \printindex.
2537    \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
2538    
2539  \let\SETmarginindex=\relax %initialize!  % For \ifx comparisons.
2540  % workhorse for all \fooindexes  \def\emptymacro{\empty}
2541  % #1 is name of index, #2 is stuff to put there  
2542  \def\doind #1#2{%  % Most index entries go through here, but \dosubind is the general case.
2543  % Put the index entry in the margin if desired.  %
2544  \ifx\SETmarginindex\relax\else%  \def\doind#1#2{\dosubind{#1}{#2}\empty}
2545  \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%  
2546  \fi%  % Workhorse for all \fooindexes.
2547  {\count10=\lastpenalty %  % #1 is name of index, #2 is stuff to put there, #3 is subentry --
2548  {\indexdummies % Must do this here, since \bf, etc expand at this stage  % \empty if called from \doind, as we usually are.  The main exception
2549  \escapechar=`\\%  % is with defuns, which call us directly.
2550  {\let\folio=0% Expand all macros now EXCEPT \folio  %
2551  \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now  \def\dosubind#1#2#3{%
2552  % so it will be output as is; and it will print as backslash in the indx.    % Put the index entry in the margin if desired.
2553  %    \ifx\SETmarginindex\relax\else
2554  % Now process the index-string once, with all font commands turned off,      \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
2555  % to get the string to sort the index by.    \fi
2556  {\indexnofonts    {%
2557  \xdef\temp1{#2}%      \count255=\lastpenalty
2558  }%      {%
2559  % Now produce the complete index entry.  We process the index-string again,        \indexdummies % Must do this here, since \bf, etc expand at this stage
2560  % this time with font commands expanded, to get what to print in the index.        \escapechar=`\\
2561  \edef\temp{%        {%
2562  \write \csname#1indfile\endcsname{%          \let\folio = 0% We will expand all macros now EXCEPT \folio.
2563  \realbackslash entry {\temp1}{\folio}{#2}}}%          \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
2564  \temp }%          % so it will be output as is; and it will print as backslash.
2565  }\penalty\count10}}          %
2566            \def\thirdarg{#3}%
2567  \def\dosubind #1#2#3{%          %
2568  {\count10=\lastpenalty %          % If third arg is present, precede it with space in sort key.
2569  {\indexdummies % Must do this here, since \bf, etc expand at this stage          \ifx\thirdarg\emptymacro
2570  \escapechar=`\\%            \let\subentry = \empty
2571  {\let\folio=0%          \else
2572  \def\rawbackslashxx{\indexbackslash}%            \def\subentry{ #3}%
2573  %          \fi
2574  % Now process the index-string once, with all font commands turned off,          %
2575  % to get the string to sort the index by.          % First process the index-string with all font commands turned off
2576  {\indexnofonts          % to get the string to sort by.
2577  \xdef\temp1{#2 #3}%          {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
2578  }%          %
2579  % Now produce the complete index entry.  We process the index-string again,          % Now produce the complete index entry, with both the sort key and the
2580  % this time with font commands expanded, to get what to print in the index.          % original text, including any font commands.
2581  \edef\temp{%          \toks0 = {#2}%
2582  \write \csname#1indfile\endcsname{%          \edef\temp{%
2583  \realbackslash entry {\temp1}{\folio}{#2}{#3}}}%            \write\csname#1indfile\endcsname{%
2584  \temp }%              \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
2585  }\penalty\count10}}          }%
2586            %
2587            % If third (subentry) arg is present, add it to the index string.
2588            \ifx\thirdarg\emptymacro \else
2589              \toks0 = {#3}%
2590              \edef\temp{\temp{\the\toks0}}%
2591            \fi
2592            %
2593            % If a skip is the last thing on the list now, preserve it
2594            % by backing up by \lastskip, doing the \write, then inserting
2595            % the skip again.  Otherwise, the whatsit generated by the
2596            % \write will make \lastskip zero.  The result is that sequences
2597            % like this:
2598            % @end defun
2599            % @tindex whatever
2600            % @defun ...
2601            % will have extra space inserted, because the \medbreak in the
2602            % start of the @defun won't see the skip inserted by the @end of
2603            % the previous defun.
2604            %
2605            % But don't do any of this if we're not in vertical mode.  We
2606            % don't want to do a \vskip and prematurely end a paragraph.
2607            %
2608            % Avoid page breaks due to these extra skips, too.
2609            %
2610            \iflinks
2611              \ifvmode
2612                \skip0 = \lastskip
2613                \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
2614              \fi
2615              %
2616              \temp % do the write
2617              %
2618              %
2619              \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
2620            \fi
2621          }%
2622        }%
2623        \penalty\count255
2624      }%
2625    }
2626    
2627  % The index entry written in the file actually looks like  % The index entry written in the file actually looks like
2628  %  \entry {sortstring}{page}{topic}  %  \entry {sortstring}{page}{topic}
# Line 2118  July\or August\or September\or October\o Line 2656  July\or August\or September\or October\o
2656    
2657  % Define the macros used in formatting output of the sorted index material.  % Define the macros used in formatting output of the sorted index material.
2658    
2659  % This is what you call to cause a particular index to get printed.  % @printindex causes a particular index (the ??s file) to get printed.
2660  % Write  % It does not print any chapter heading (usually an @unnumbered).
2661  % @unnumbered Function Index  %
 % @printindex fn  
   
2662  \def\printindex{\parsearg\doprintindex}  \def\printindex{\parsearg\doprintindex}
2663    \def\doprintindex#1{\begingroup
2664  \def\doprintindex#1{%    \dobreak \chapheadingskip{10000}%
   \tex  
   \dobreak \chapheadingskip {10000}  
   \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other  
   \catcode`\$=\other  
   \catcode`\~=\other  
   \indexbreaks  
2665    %    %
2666    % The following don't help, since the chars were translated    \indexfonts \rm
2667    % when the raw index was written, and their fonts were discarded    \tolerance = 9500
2668    % due to \indexnofonts.    \indexbreaks
   %\catcode`\"=\active  
   %\catcode`\^=\active  
   %\catcode`\_=\active  
   %\catcode`\|=\active  
   %\catcode`\<=\active  
   %\catcode`\>=\active  
   % %  
   \def\indexbackslash{\rawbackslashxx}  
   \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt  
   \begindoublecolumns  
2669    %    %
2670    % See if the index file exists and is nonempty.    % See if the index file exists and is nonempty.
2671      % Change catcode of @ here so that if the index file contains
2672      % \initial {@}
2673      % as its first line, TeX doesn't complain about mismatched braces
2674      % (because it thinks @} is a control sequence).
2675      \catcode`\@ = 11
2676    \openin 1 \jobname.#1s    \openin 1 \jobname.#1s
2677    \ifeof 1    \ifeof 1
2678      % \enddoublecolumns gets confused if there is no text in the index,      % \enddoublecolumns gets confused if there is no text in the index,
# Line 2155  July\or August\or September\or October\o Line 2680  July\or August\or September\or October\o
2680      % index.  The easiest way to prevent this problem is to make sure      % index.  The easiest way to prevent this problem is to make sure
2681      % there is some text.      % there is some text.
2682      (Index is nonexistent)      (Index is nonexistent)
2683      \else    \else
2684      %      %
2685      % If the index file exists but is empty, then \openin leaves \ifeof      % If the index file exists but is empty, then \openin leaves \ifeof
2686      % false.  We have to make TeX try to read something from the file, so      % false.  We have to make TeX try to read something from the file, so
# Line 2164  July\or August\or September\or October\o Line 2689  July\or August\or September\or October\o
2689      \ifeof 1      \ifeof 1
2690        (Index is empty)        (Index is empty)
2691      \else      \else
2692          % Index files are almost Texinfo source, but we use \ as the escape
2693          % character.  It would be better to use @, but that's too big a change
2694          % to make right now.
2695          \def\indexbackslash{\rawbackslashxx}%
2696          \catcode`\\ = 0
2697          \escapechar = `\\
2698          \begindoublecolumns
2699        \input \jobname.#1s        \input \jobname.#1s
2700          \enddoublecolumns
2701      \fi      \fi
2702    \fi    \fi
2703    \closein 1    \closein 1
2704    \enddoublecolumns  \endgroup}
   \Etex  
 }  
2705    
2706  % These macros are used by the sorted index file itself.  % These macros are used by the sorted index file itself.
2707  % Change them to control the appearance of the index.  % Change them to control the appearance of the index.
2708    
2709  % Same as \bigskipamount except no shrink.  \def\initial#1{{%
2710  % \balancecolumns gets confused if there is any shrink.    % Some minor font changes for the special characters.
2711  \newskip\initialskipamount \initialskipamount 12pt plus4pt    \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
2712      %
2713  \def\initial #1{%    % Remove any glue we may have, we'll be inserting our own.
2714  {\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt    \removelastskip
2715  \ifdim\lastskip<\initialskipamount    %
2716  \removelastskip \penalty-200 \vskip \initialskipamount\fi    % We like breaks before the index initials, so insert a bonus.
2717  \line{\secbf#1\hfill}\kern 2pt\penalty10000}}    \penalty -300
2718      %
2719      % Typeset the initial.  Making this add up to a whole number of
2720      % baselineskips increases the chance of the dots lining up from column
2721      % to column.  It still won't often be perfect, because of the stretch
2722      % we need before each entry, but it's better.
2723      %
2724      % No shrink because it confuses \balancecolumns.
2725      \vskip 1.67\baselineskip plus .5\baselineskip
2726      \leftline{\secbf #1}%
2727      \vskip .33\baselineskip plus .1\baselineskip
2728      %
2729      % Do our best not to break after the initial.
2730      \nobreak
2731    }}
2732    
2733  % This typesets a paragraph consisting of #1, dot leaders, and then #2  % This typesets a paragraph consisting of #1, dot leaders, and then #2
2734  % flush to the right margin.  It is used for index and table of contents  % flush to the right margin.  It is used for index and table of contents
2735  % entries.  The paragraph is indented by \leftskip.  % entries.  The paragraph is indented by \leftskip.
2736  %  %
2737  \def\entry #1#2{\begingroup  \def\entry#1#2{\begingroup
2738    %    %
2739    % Start a new paragraph if necessary, so our assignments below can't    % Start a new paragraph if necessary, so our assignments below can't
2740    % affect previous text.    % affect previous text.
# Line 2212  July\or August\or September\or October\o Line 2757  July\or August\or September\or October\o
2757    %    %
2758    % \hangafter is reset to 1 (which is the value we want) at the start    % \hangafter is reset to 1 (which is the value we want) at the start
2759    % of each paragraph, so we need not do anything with that.    % of each paragraph, so we need not do anything with that.
2760    \hangindent=2em    \hangindent = 2em
2761    %    %
2762    % When the entry text needs to be broken, just fill out the first line    % When the entry text needs to be broken, just fill out the first line
2763    % with blank space.    % with blank space.
2764    \rightskip = 0pt plus1fil    \rightskip = 0pt plus1fil
2765    %    %
2766      % A bit of stretch before each entry for the benefit of balancing columns.
2767      \vskip 0pt plus1pt
2768      %
2769    % Start a ``paragraph'' for the index entry so the line breaking    % Start a ``paragraph'' for the index entry so the line breaking
2770    % parameters we've set above will have an effect.    % parameters we've set above will have an effect.
2771    \noindent    \noindent
2772    %    %
2773    % Insert the text of the index entry.  TeX will do line-breaking on it.    % Insert the text of the index entry.  TeX will do line-breaking on it.
2774    #1%    #1%
2775    % The following is kluged to not output a line of dots in the index if    % The following is kludged to not output a line of dots in the index if
2776    % there are no page numbers.  The next person who breaks this will be    % there are no page numbers.  The next person who breaks this will be
2777    % cursed by a Unix daemon.    % cursed by a Unix daemon.
2778    \def\tempa{{\rm }}%    \def\tempa{{\rm }}%
# Line 2261  July\or August\or September\or October\o Line 2809  July\or August\or September\or October\o
2809  \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par  \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
2810  }}  }}
2811    
2812  %% Define two-column mode, which is used in indexes.  % Define two-column mode, which we use to typeset indexes.
2813  %% Adapted from the TeXbook, page 416.  % Adapted from the TeXbook, page 416, which is to say,
2814  \catcode `\@=11  % the manmac.tex format used to print the TeXbook itself.
2815    \catcode`\@=11
2816    
2817  \newbox\partialpage  \newbox\partialpage
   
2818  \newdimen\doublecolumnhsize  \newdimen\doublecolumnhsize
2819    
2820  \def\begindoublecolumns{\begingroup  \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
2821    % Grab any single-column material above us.    % Grab any single-column material above us.
2822    \output = {\global\setbox\partialpage    \output = {\global\setbox\partialpage = \vbox{%
2823      =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%      %
2824    \eject      % Here is a possibility not foreseen in manmac: if we accumulate a
2825        % whole lot of material, we might end up calling this \output
2826        % routine twice in a row (see the doublecol-lose test, which is
2827        % essentially a couple of indexes with @setchapternewpage off).  In
2828        % that case, we must prevent the second \partialpage from
2829        % simply overwriting the first, causing us to lose the page.
2830        % This will preserve it until a real output routine can ship it
2831        % out.  Generally, \partialpage will be empty when this runs and
2832        % this will be a no-op.
2833        \unvbox\partialpage
2834        %
2835        % Unvbox the main output page.
2836        \unvbox255
2837        \kern-\topskip \kern\baselineskip
2838      }}%
2839      \eject % run that output routine to set \partialpage
2840    %    %
2841    % Now switch to the double-column output routine.    % Use the double-column output routine for subsequent pages.
2842    \output={\doublecolumnout}%    \output = {\doublecolumnout}%
2843    %    %
2844    % Change the page size parameters.  We could do this once outside this    % Change the page size parameters.  We could do this once outside this
2845    % routine, in each of @smallbook, @afourpaper, and the default 8.5x11    % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
2846    % format, but then we repeat the same computation.  Repeating a couple    % format, but then we repeat the same computation.  Repeating a couple
2847    % of assignments once per index is clearly meaningless for the    % of assignments once per index is clearly meaningless for the
2848    % execution time, so we may as well do it once.    % execution time, so we may as well do it in one place.
2849    %    %
2850    % First we halve the line length, less a little for the gutter between    % First we halve the line length, less a little for the gutter between
2851    % the columns.  We compute the gutter based on the line length, so it    % the columns.  We compute the gutter based on the line length, so it
2852    % changes automatically with the paper format.  The magic constant    % changes automatically with the paper format.  The magic constant
2853    % below is chosen so that the gutter has the same value (well, +- <    % below is chosen so that the gutter has the same value (well, +-<1pt)
2854    % 1pt) as it did when we hard-coded it.    % as it did when we hard-coded it.
2855    %    %
2856    % We put the result in a separate register, \doublecolumhsize, so we    % We put the result in a separate register, \doublecolumhsize, so we
2857    % can restore it in \pagesofar, after \hsize itself has (potentially)    % can restore it in \pagesofar, after \hsize itself has (potentially)
# Line 2301  July\or August\or September\or October\o Line 2864  July\or August\or September\or October\o
2864    %    %
2865    % Double the \vsize as well.  (We don't need a separate register here,    % Double the \vsize as well.  (We don't need a separate register here,
2866    % since nobody clobbers \vsize.)    % since nobody clobbers \vsize.)
2867      \advance\vsize by -\ht\partialpage
2868    \vsize = 2\vsize    \vsize = 2\vsize
   \doublecolumnpagegoal  
2869  }  }
2870    
2871  \def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage}  % The double-column output routine for all double-column pages except
2872    % the last.
2873  \def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth  %
   \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage  
   \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1}  
   \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3}  
   \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi  
   \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi  
 }  
 \def\doublecolumnpagegoal{%  
   \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@  
 }  
 \def\pagesofar{\unvbox\partialpage %  
   \hsize=\doublecolumnhsize % have to restore this since output routine  
   \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}  
2874  \def\doublecolumnout{%  \def\doublecolumnout{%
2875    \setbox5=\copy255    \splittopskip=\topskip \splitmaxdepth=\maxdepth
2876    {\vbadness=10000 \doublecolumnsplit}    % Get the available space for the double columns -- the normal
2877    \ifvbox255    % (undoubled) page height minus any material left over from the
2878      \setbox0=\vtop to\dimen@{\unvbox0}    % previous page.
2879      \setbox2=\vtop to\dimen@{\unvbox2}    \dimen@ = \vsize
2880      \onepageout\pagesofar \unvbox255 \penalty\outputpenalty    \divide\dimen@ by 2
2881    \else    %
2882      \setbox0=\vbox{\unvbox5}    % box0 will be the left-hand column, box2 the right.
2883      \ifvbox0    \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
2884        \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip    \onepageout\pagesofar
2885        \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth    \unvbox255
2886        {\vbadness=10000    \penalty\outputpenalty
2887          \loop \global\setbox5=\copy0  }
2888            \setbox1=\vsplit5 to\dimen@  \def\pagesofar{%
2889            \setbox3=\vsplit5 to\dimen@    % Re-output the contents of the output page -- any previous material,
2890            \ifvbox5 \global\advance\dimen@ by1pt \repeat    % followed by the two boxes we just split, in box0 and box2.
2891          \setbox0=\vbox to\dimen@{\unvbox1}    \advance\vsize by \ht\partialpage
2892          \setbox2=\vbox to\dimen@{\unvbox3}    \unvbox\partialpage
2893          \global\setbox\partialpage=\vbox{\pagesofar}    %
2894          \doublecolumnpagegoal    \hsize = \doublecolumnhsize
2895        }    \wd0=\hsize \wd2=\hsize
2896      \fi    \hbox to\pagewidth{\box0\hfil\box2}%
2897    \fi  }
2898    \def\enddoublecolumns{%
2899      \output = {%
2900        % Split the last of the double-column material.  Leave it on the
2901        % current page, no automatic page break.
2902        \balancecolumns
2903        %
2904        % If we end up splitting too much material for the current page,
2905        % though, there will be another page break right after this \output
2906        % invocation ends.  Having called \balancecolumns once, we do not
2907        % want to call it again.  Therefore, reset \output to its normal
2908        % definition right away.  (We hope \balancecolumns will never be
2909        % called on to balance too much material, but if it is, this makes
2910        % the output somewhat more palatable.)
2911        \global\output = {\onepageout{\pagecontents\PAGE}}%
2912      }%
2913      \eject
2914      \endgroup % started in \begindoublecolumns
2915      %
2916      % \pagegoal was set to the doubled \vsize above, since we restarted
2917      % the current page.  We're now back to normal single-column
2918      % typesetting, so reset \pagegoal to the normal \vsize (after the
2919      % \endgroup where \vsize got restored).
2920      \pagegoal = \vsize
2921    }
2922    \def\balancecolumns{%
2923      % Called at the end of the double column material.
2924      \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
2925      \dimen@ = \ht0
2926      \advance\dimen@ by \topskip
2927      \advance\dimen@ by-\baselineskip
2928      \divide\dimen@ by 2 % target to split to
2929      %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
2930      \splittopskip = \topskip
2931      % Loop until we get a decent breakpoint.
2932      {%
2933        \vbadness = 10000
2934        \loop
2935          \global\setbox3 = \copy0
2936          \global\setbox1 = \vsplit3 to \dimen@
2937        \ifdim\ht3>\dimen@
2938          \global\advance\dimen@ by 1pt
2939        \repeat
2940      }%
2941      %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
2942      \setbox0=\vbox to\dimen@{\unvbox1}%
2943      \setbox2=\vbox to\dimen@{\unvbox3}%
2944      %
2945      \pagesofar
2946  }  }
2947    \catcode`\@ = \other
2948    
2949    
 \catcode `\@=\other  
2950  \message{sectioning,}  \message{sectioning,}
2951  % Define chapters, sections, etc.  % Define chapters, sections, etc.
2952    
2953  \newcount \chapno  \newcount\chapno
2954  \newcount \secno        \secno=0  \newcount\secno        \secno=0
2955  \newcount \subsecno     \subsecno=0  \newcount\subsecno     \subsecno=0
2956  \newcount \subsubsecno  \subsubsecno=0  \newcount\subsubsecno  \subsubsecno=0
2957    
2958  % This counter is funny since it counts through charcodes of letters A, B, ...  % This counter is funny since it counts through charcodes of letters A, B, ...
2959  \newcount \appendixno  \appendixno = `\@  \newcount\appendixno  \appendixno = `\@
2960  \def\appendixletter{\char\the\appendixno}  \def\appendixletter{\char\the\appendixno}
2961    
 \newwrite \contentsfile  
 % This is called from \setfilename.  
 \def\opencontents{\openout \contentsfile = \jobname.toc}  
   
2962  % Each @chapter defines this as the name of the chapter.  % Each @chapter defines this as the name of the chapter.
2963  % page headings and footings can use it.  @section does likewise  % page headings and footings can use it.  @section does likewise.
2964    \def\thischapter{}
2965  \def\thischapter{} \def\thissection{}  \def\thissection{}
 \def\seccheck#1{\if \pageno<0 %  
 \errmessage{@#1 not allowed after generating table of contents}\fi  
 %  
 }  
   
 \def\chapternofonts{%  
 \let\rawbackslash=\relax%  
 \let\frenchspacing=\relax%  
 \def\result{\realbackslash result}  
 \def\equiv{\realbackslash equiv}  
 \def\expansion{\realbackslash expansion}  
 \def\print{\realbackslash print}  
 \def\TeX{\realbackslash TeX}  
 \def\dots{\realbackslash dots}  
 \def\copyright{\realbackslash copyright}  
 \def\tt{\realbackslash tt}  
 \def\bf{\realbackslash bf }  
 \def\w{\realbackslash w}  
 \def\less{\realbackslash less}  
 \def\gtr{\realbackslash gtr}  
 \def\hat{\realbackslash hat}  
 \def\char{\realbackslash char}  
 \def\tclose##1{\realbackslash tclose {##1}}  
 \def\code##1{\realbackslash code {##1}}  
 \def\samp##1{\realbackslash samp {##1}}  
 \def\r##1{\realbackslash r {##1}}  
 \def\b##1{\realbackslash b {##1}}  
 \def\key##1{\realbackslash key {##1}}  
 \def\file##1{\realbackslash file {##1}}  
 \def\kbd##1{\realbackslash kbd {##1}}  
 % These are redefined because @smartitalic wouldn't work inside xdef.  
 \def\i##1{\realbackslash i {##1}}  
 \def\cite##1{\realbackslash cite {##1}}  
 \def\var##1{\realbackslash var {##1}}  
 \def\emph##1{\realbackslash emph {##1}}  
 \def\dfn##1{\realbackslash dfn {##1}}  
 }  
2966    
2967  \newcount\absseclevel % used to calculate proper heading level  \newcount\absseclevel % used to calculate proper heading level
2968  \newcount\secbase\secbase=0 % @raise/lowersections modify this count  \newcount\secbase\secbase=0 % @raise/lowersections modify this count
# Line 2475  July\or August\or September\or October\o Line 3034  July\or August\or September\or October\o
3034  \fi  \fi
3035  }  }
3036    
3037    % @chapter, @appendix, @unnumbered.
3038  \def\thischaptername{No Chapter Title}  \def\thischaptername{No Chapter Title}
3039  \outer\def\chapter{\parsearg\chapteryyy}  \outer\def\chapter{\parsearg\chapteryyy}
3040  \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz  \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
3041  \def\chapterzzz #1{\seccheck{chapter}%  \def\chapterzzz #1{%
3042  \secno=0 \subsecno=0 \subsubsecno=0  \secno=0 \subsecno=0 \subsubsecno=0
3043  \global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%  \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%
3044  \chapmacro {#1}{\the\chapno}%  \chapmacro {#1}{\the\chapno}%
3045  \gdef\thissection{#1}%  \gdef\thissection{#1}%
3046  \gdef\thischaptername{#1}%  \gdef\thischaptername{#1}%
3047  % We don't substitute the actual chapter name into \thischapter  % We don't substitute the actual chapter name into \thischapter
3048  % because we don't want its macros evaluated now.  % because we don't want its macros evaluated now.
3049  \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%  \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
3050  {\chapternofonts%  \toks0 = {#1}%
3051  \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%  \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
3052  \escapechar=`\\%                                    {\the\chapno}}}%
3053  \write \contentsfile \temp  %  \temp
3054  \donoderef %  \donoderef
3055  \global\let\section = \numberedsec  \global\let\section = \numberedsec
3056  \global\let\subsection = \numberedsubsec  \global\let\subsection = \numberedsubsec
3057  \global\let\subsubsection = \numberedsubsubsec  \global\let\subsubsection = \numberedsubsubsec
3058  }}  }
3059    
3060  \outer\def\appendix{\parsearg\appendixyyy}  \outer\def\appendix{\parsearg\appendixyyy}
3061  \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz  \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
3062  \def\appendixzzz #1{\seccheck{appendix}%  \def\appendixzzz #1{%
3063  \secno=0 \subsecno=0 \subsubsecno=0  \secno=0 \subsecno=0 \subsubsecno=0
3064  \global\advance \appendixno by 1 \message{Appendix \appendixletter}%  \global\advance \appendixno by 1
3065    \message{\putwordAppendix\space \appendixletter}%
3066  \chapmacro {#1}{\putwordAppendix{} \appendixletter}%  \chapmacro {#1}{\putwordAppendix{} \appendixletter}%
3067  \gdef\thissection{#1}%  \gdef\thissection{#1}%
3068  \gdef\thischaptername{#1}%  \gdef\thischaptername{#1}%
3069  \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%  \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
3070  {\chapternofonts%  \toks0 = {#1}%
3071  \edef\temp{{\realbackslash chapentry  \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
3072    {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%                         {\putwordAppendix{} \appendixletter}}}%
3073  \escapechar=`\\%  \temp
3074  \write \contentsfile \temp  %  \appendixnoderef
 \appendixnoderef %  
3075  \global\let\section = \appendixsec  \global\let\section = \appendixsec
3076  \global\let\subsection = \appendixsubsec  \global\let\subsection = \appendixsubsec
3077  \global\let\subsubsection = \appendixsubsubsec  \global\let\subsubsection = \appendixsubsubsec
3078  }}  }
3079    
3080    % @centerchap is like @unnumbered, but the heading is centered.
3081    \outer\def\centerchap{\parsearg\centerchapyyy}
3082    \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
3083    
3084    % @top is like @unnumbered.
3085  \outer\def\top{\parsearg\unnumberedyyy}  \outer\def\top{\parsearg\unnumberedyyy}
3086    
3087  \outer\def\unnumbered{\parsearg\unnumberedyyy}  \outer\def\unnumbered{\parsearg\unnumberedyyy}
3088  \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz  \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
3089  \def\unnumberedzzz #1{\seccheck{unnumbered}%  \def\unnumberedzzz #1{%
3090  \secno=0 \subsecno=0 \subsubsecno=0  \secno=0 \subsecno=0 \subsubsecno=0
3091  %  %
3092  % This used to be simply \message{#1}, but TeX fully expands the  % This used to be simply \message{#1}, but TeX fully expands the
# Line 2533  July\or August\or September\or October\o Line 3098  July\or August\or September\or October\o
3098  % 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
3099  % 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
3100  % \the<toks register> to achieve this: TeX expands \the<toks> only once,  % \the<toks register> to achieve this: TeX expands \the<toks> only once,
3101  % simply yielding the contents of the <toks register>.  % simply yielding the contents of <toks register>.  (We also do this for
3102    % the toc entries.)
3103  \toks0 = {#1}\message{(\the\toks0)}%  \toks0 = {#1}\message{(\the\toks0)}%
3104  %  %
3105  \unnumbchapmacro {#1}%  \unnumbchapmacro {#1}%
3106  \gdef\thischapter{#1}\gdef\thissection{#1}%  \gdef\thischapter{#1}\gdef\thissection{#1}%
3107  {\chapternofonts%  \toks0 = {#1}%
3108  \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}%
3109  \escapechar=`\\%  \temp
3110  \write \contentsfile \temp  %  \unnumbnoderef
 \unnumbnoderef %  
3111  \global\let\section = \unnumberedsec  \global\let\section = \unnumberedsec
3112  \global\let\subsection = \unnumberedsubsec  \global\let\subsection = \unnumberedsubsec
3113  \global\let\subsubsection = \unnumberedsubsubsec  \global\let\subsubsection = \unnumberedsubsubsec
3114  }}  }
3115    
3116    % Sections.
3117  \outer\def\numberedsec{\parsearg\secyyy}  \outer\def\numberedsec{\parsearg\secyyy}
3118  \def\secyyy #1{\numhead1{#1}} % normally calls seczzz  \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
3119  \def\seczzz #1{\seccheck{section}%  \def\seczzz #1{%
3120  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3121  \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%  \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
3122  {\chapternofonts%  \toks0 = {#1}%
3123  \edef\temp{{\realbackslash secentry %  \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
3124  {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%                                    {\the\chapno}{\the\secno}}}%
3125  \escapechar=`\\%  \temp
3126  \write \contentsfile \temp %  \donoderef
3127  \donoderef %  \nobreak
3128  \penalty 10000 %  }
 }}  
3129    
3130  \outer\def\appenixsection{\parsearg\appendixsecyyy}  \outer\def\appendixsection{\parsearg\appendixsecyyy}
3131  \outer\def\appendixsec{\parsearg\appendixsecyyy}  \outer\def\appendixsec{\parsearg\appendixsecyyy}
3132  \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz  \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
3133  \def\appendixsectionzzz #1{\seccheck{appendixsection}%  \def\appendixsectionzzz #1{%
3134  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %  \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3135  \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%  \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
3136  {\chapternofonts%  \toks0 = {#1}%
3137  \edef\temp{{\realbackslash secentry %  \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
3138  {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%                                    {\appendixletter}{\the\secno}}}%
3139  \escapechar=`\\%  \temp
3140  \write \contentsfile \temp %  \appendixnoderef
3141  \appendixnoderef %  \nobreak
3142  \penalty 10000 %  }
 }}  
3143    
3144  \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}  \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
3145  \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz  \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
3146  \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%  \def\unnumberedseczzz #1{%
3147  \plainsecheading {#1}\gdef\thissection{#1}%  \plainsecheading {#1}\gdef\thissection{#1}%
3148  {\chapternofonts%  \toks0 = {#1}%
3149  \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
3150  \escapechar=`\\%  \temp
3151  \write \contentsfile \temp %  \unnumbnoderef
3152  \unnumbnoderef %  \nobreak
3153  \penalty 10000 %  }
 }}  
3154    
3155    % Subsections.
3156  \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}  \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
3157  \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz  \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
3158  \def\numberedsubseczzz #1{\seccheck{subsection}%  \def\numberedsubseczzz #1{%
3159  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3160  \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%  \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
3161  {\chapternofonts%  \toks0 = {#1}%
3162  \edef\temp{{\realbackslash subsecentry %  \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
3163  {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%                                      {\the\chapno}{\the\secno}{\the\subsecno}}}%
3164  \escapechar=`\\%  \temp
3165  \write \contentsfile \temp %  \donoderef
3166  \donoderef %  \nobreak
3167  \penalty 10000 %  }
 }}  
3168    
3169  \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}  \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
3170  \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz  \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
3171  \def\appendixsubseczzz #1{\seccheck{appendixsubsec}%  \def\appendixsubseczzz #1{%
3172  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %  \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3173  \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%  \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
3174  {\chapternofonts%  \toks0 = {#1}%
3175  \edef\temp{{\realbackslash subsecentry %  \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
3176  {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%                                  {\appendixletter}{\the\secno}{\the\subsecno}}}%
3177  \escapechar=`\\%  \temp
3178  \write \contentsfile \temp %  \appendixnoderef
3179  \appendixnoderef %  \nobreak
3180  \penalty 10000 %  }
 }}  
3181    
3182  \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}  \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
3183  \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz  \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
3184  \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%  \def\unnumberedsubseczzz #1{%
3185  \plainsecheading {#1}\gdef\thissection{#1}%  \plainsubsecheading {#1}\gdef\thissection{#1}%
3186  {\chapternofonts%  \toks0 = {#1}%
3187  \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
3188  \escapechar=`\\%                                      {\the\toks0}}}%
3189  \write \contentsfile \temp %  \temp
3190  \unnumbnoderef %  \unnumbnoderef
3191  \penalty 10000 %  \nobreak
3192  }}  }
3193    
3194    % Subsubsections.
3195  \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}  \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
3196  \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz  \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
3197  \def\numberedsubsubseczzz #1{\seccheck{subsubsection}%  \def\numberedsubsubseczzz #1{%
3198  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3199  \subsubsecheading {#1}  \subsubsecheading {#1}
3200    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3201  {\chapternofonts%  \toks0 = {#1}%
3202  \edef\temp{{\realbackslash subsubsecentry %  \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
3203    {#1}    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
3204    {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}  \temp
3205    {\noexpand\folio}}}%  \donoderef
3206  \escapechar=`\\%  \nobreak
3207  \write \contentsfile \temp %  }
 \donoderef %  
 \penalty 10000 %  
 }}  
3208    
3209  \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}  \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
3210  \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz  \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
3211  \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%  \def\appendixsubsubseczzz #1{%
3212  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %  \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3213  \subsubsecheading {#1}  \subsubsecheading {#1}
3214    {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%    {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3215  {\chapternofonts%  \toks0 = {#1}%
3216  \edef\temp{{\realbackslash subsubsecentry{#1}%  \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
3217    {\appendixletter}    {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
3218    {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%  \temp
3219  \escapechar=`\\%  \appendixnoderef
3220  \write \contentsfile \temp %  \nobreak
3221  \appendixnoderef %  }
 \penalty 10000 %  
 }}  
3222    
3223  \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}  \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
3224  \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz  \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
3225  \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%  \def\unnumberedsubsubseczzz #1{%
3226  \plainsecheading {#1}\gdef\thissection{#1}%  \plainsubsubsecheading {#1}\gdef\thissection{#1}%
3227  {\chapternofonts%  \toks0 = {#1}%
3228  \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%  \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
3229  \escapechar=`\\%                                      {\the\toks0}}}%
3230  \write \contentsfile \temp %  \temp
3231  \unnumbnoderef %  \unnumbnoderef
3232  \penalty 10000 %  \nobreak
3233  }}  }
3234    
3235  % 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.
3236  % Actually, they should now be obsolete; ordinary section commands should work.  % Actually, they should now be obsolete; ordinary section commands should work.
# Line 2701  July\or August\or September\or October\o Line 3259  July\or August\or September\or October\o
3259    
3260  % Define @majorheading, @heading and @subheading  % Define @majorheading, @heading and @subheading
3261    
3262  % NOTE on use of \vbox for chapter headings, section headings, and  % NOTE on use of \vbox for chapter headings, section headings, and such:
3263  % such:  %       1) We use \vbox rather than the earlier \line to permit
3264  %       1) We use \vbox rather than the earlier \line to permit  %          overlong headings to fold.
3265  %          overlong headings to fold.  %       2) \hyphenpenalty is set to 10000 because hyphenation in a
3266  %       2) \hyphenpenalty is set to 10000 because hyphenation in a  %          heading is obnoxious; this forbids it.
 %          heading is obnoxious; this forbids it.  
3267  %       3) Likewise, headings look best if no \parindent is used, and  %       3) Likewise, headings look best if no \parindent is used, and
3268  %          if justification is not attempted.  Hence \raggedright.  %          if justification is not attempted.  Hence \raggedright.
3269    
# Line 2724  July\or August\or September\or October\o Line 3281  July\or August\or September\or October\o
3281                    \parindent=0pt\raggedright                    \parindent=0pt\raggedright
3282                    \rm #1\hfill}}\bigskip \par\penalty 200}                    \rm #1\hfill}}\bigskip \par\penalty 200}
3283    
3284  \def\heading{\parsearg\secheadingi}  % @heading, @subheading, @subsubheading.
3285    \def\heading{\parsearg\plainsecheading}
3286  \def\subheading{\parsearg\subsecheadingi}  \def\subheading{\parsearg\plainsubsecheading}
3287    \def\subsubheading{\parsearg\plainsubsubsecheading}
 \def\subsubheading{\parsearg\subsubsecheadingi}  
3288    
3289  % These macros generate a chapter, section, etc. heading only  % These macros generate a chapter, section, etc. heading only
3290  % (including whitespace, linebreaking, etc. around it),  % (including whitespace, linebreaking, etc. around it),
# Line 2742  July\or August\or September\or October\o Line 3298  July\or August\or September\or October\o
3298  %%% Define plain chapter starts, and page on/off switching for it  %%% Define plain chapter starts, and page on/off switching for it
3299  % Parameter controlling skip before chapter headings (if needed)  % Parameter controlling skip before chapter headings (if needed)
3300    
3301  \newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt  \newskip\chapheadingskip
3302    
3303  \def\chapbreak{\dobreak \chapheadingskip {-4000}}  \def\chapbreak{\dobreak \chapheadingskip {-4000}}
3304  \def\chappager{\par\vfill\supereject}  \def\chappager{\par\vfill\supereject}
# Line 2750  July\or August\or September\or October\o Line 3306  July\or August\or September\or October\o
3306    
3307  \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}  \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
3308    
3309  \def\CHAPPAGoff{  \def\CHAPPAGoff{%
3310    \global\let\contentsalignmacro = \chappager
3311  \global\let\pchapsepmacro=\chapbreak  \global\let\pchapsepmacro=\chapbreak
3312  \global\let\pagealignmacro=\chappager}  \global\let\pagealignmacro=\chappager}
3313    
3314  \def\CHAPPAGon{  \def\CHAPPAGon{%
3315    \global\let\contentsalignmacro = \chappager
3316  \global\let\pchapsepmacro=\chappager  \global\let\pchapsepmacro=\chappager
3317  \global\let\pagealignmacro=\chappager  \global\let\pagealignmacro=\chappager
3318  \global\def\HEADINGSon{\HEADINGSsingle}}  \global\def\HEADINGSon{\HEADINGSsingle}}
3319    
3320  \def\CHAPPAGodd{  \def\CHAPPAGodd{
3321    \global\let\contentsalignmacro = \chapoddpage
3322  \global\let\pchapsepmacro=\chapoddpage  \global\let\pchapsepmacro=\chapoddpage
3323  \global\let\pagealignmacro=\chapoddpage  \global\let\pagealignmacro=\chapoddpage
3324  \global\def\HEADINGSon{\HEADINGSdouble}}  \global\def\HEADINGSon{\HEADINGSdouble}}
# Line 2768  July\or August\or September\or October\o Line 3327  July\or August\or September\or October\o
3327    
3328  \def\CHAPFplain{  \def\CHAPFplain{
3329  \global\let\chapmacro=\chfplain  \global\let\chapmacro=\chfplain
3330  \global\let\unnumbchapmacro=\unnchfplain}  \global\let\unnumbchapmacro=\unnchfplain
3331    \global\let\centerchapmacro=\centerchfplain}
3332    
3333  \def\chfplain #1#2{%  % Plain chapter opening.
3334    % #1 is the text, #2 the chapter number or empty if unnumbered.
3335    \def\chfplain#1#2{%
3336    \pchapsepmacro    \pchapsepmacro
3337    {%    {%
3338      \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000      \chapfonts \rm
3339                       \parindent=0pt\raggedright      \def\chapnum{#2}%
3340                       \rm #2\enspace #1}%      \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
3341        \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3342              \hangindent = \wd0 \centerparametersmaybe
3343              \unhbox0 #1\par}%
3344    }%    }%
3345    \bigskip    \nobreak\bigskip % no page break after a chapter title
3346    \penalty5000    \nobreak
3347  }  }
3348    
3349  \def\unnchfplain #1{%  % Plain opening for unnumbered.
3350  \pchapsepmacro %  \def\unnchfplain#1{\chfplain{#1}{}}
3351  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000  
3352                    \parindent=0pt\raggedright  % @centerchap -- centered and unnumbered.
3353                    \rm #1\hfill}}\bigskip \par\penalty 10000 %  \let\centerparametersmaybe = \relax
3354  }  \def\centerchfplain#1{{%
3355      \def\centerparametersmaybe{%
3356        \advance\rightskip by 3\rightskip
3357        \leftskip = \rightskip
3358        \parfillskip = 0pt
3359      }%
3360      \chfplain{#1}{}%
3361    }}
3362    
3363  \CHAPFplain % The default  \CHAPFplain % The default
3364    
3365  \def\unnchfopen #1{%  \def\unnchfopen #1{%
3366  \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000  \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3367                         \parindent=0pt\raggedright                         \parindent=0pt\raggedright
3368                         \rm #1\hfill}}\bigskip \par\penalty 10000 %                         \rm #1\hfill}}\bigskip \par\nobreak
3369  }  }
3370    
3371  \def\chfopen #1#2{\chapoddpage {\chapfonts  \def\chfopen #1#2{\chapoddpage {\chapfonts
# Line 2800  July\or August\or September\or October\o Line 3373  July\or August\or September\or October\o
3373  \par\penalty 5000 %  \par\penalty 5000 %
3374  }  }
3375    
3376    \def\centerchfopen #1{%
3377    \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3378                           \parindent=0pt
3379                           \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
3380    }
3381    
3382  \def\CHAPFopen{  \def\CHAPFopen{
3383  \global\let\chapmacro=\chfopen  \global\let\chapmacro=\chfopen
3384  \global\let\unnumbchapmacro=\unnchfopen}  \global\let\unnumbchapmacro=\unnchfopen
3385    \global\let\centerchapmacro=\centerchfopen}
 % Parameter controlling skip before section headings.  
3386    
 \newskip \subsecheadingskip  \subsecheadingskip = 17pt plus 8pt minus 4pt  
 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}  
3387    
3388  \newskip \secheadingskip  \secheadingskip = 21pt plus 8pt minus 4pt  % Section titles.
3389    \newskip\secheadingskip
3390  \def\secheadingbreak{\dobreak \secheadingskip {-1000}}  \def\secheadingbreak{\dobreak \secheadingskip {-1000}}
3391    \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
3392    \def\plainsecheading#1{\sectionheading{sec}{}{#1}}
3393    
3394  % @paragraphindent  is defined for the Info formatting commands only.  % Subsection titles.
3395  \let\paragraphindent=\comment  \newskip \subsecheadingskip
3396    \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
3397    \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
3398    \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
3399    
3400  % Section fonts are the base font at magstep2, which produces  % Subsubsection titles.
3401  % a size a bit more than 14 points in the default situation.  \let\subsubsecheadingskip = \subsecheadingskip
3402    \let\subsubsecheadingbreak = \subsecheadingbreak
3403    \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
3404    \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
3405    
 \def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}  
 \def\plainsecheading #1{\secheadingi {#1}}  
 \def\secheadingi #1{{\advance \secheadingskip by \parskip %  
 \secheadingbreak}%  
 {\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000  
                  \parindent=0pt\raggedright  
                  \rm #1\hfill}}%  
 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }  
   
   
 % Subsection fonts are the base font at magstep1,  
 % which produces a size of 12 points.  
   
 \def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}}  
 \def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip %  
 \subsecheadingbreak}%  
 {\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000  
                      \parindent=0pt\raggedright  
                      \rm #1\hfill}}%  
 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }  
   
 \def\subsubsecfonts{\subsecfonts} % Maybe this should change:  
                                   % Perhaps make sssec fonts scaled  
                                   % magstep half  
 \def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}}  
 \def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip %  
 \subsecheadingbreak}%  
 {\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000  
                        \parindent=0pt\raggedright  
                        \rm #1\hfill}}%  
 \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}  
3406    
3407    % Print any size section title.
3408    %
3409    % #1 is the section type (sec/subsec/subsubsec), #2 is the section
3410    % number (maybe empty), #3 the text.
3411    \def\sectionheading#1#2#3{%
3412      {%
3413        \expandafter\advance\csname #1headingskip\endcsname by \parskip
3414        \csname #1headingbreak\endcsname
3415      }%
3416      {%
3417        % Switch to the right set of fonts.
3418        \csname #1fonts\endcsname \rm
3419        %
3420        % Only insert the separating space if we have a section number.
3421        \def\secnum{#2}%
3422        \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
3423        %
3424        \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3425              \hangindent = \wd0 % zero if no section number
3426              \unhbox0 #3}%
3427      }%
3428      \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
3429    }
3430    
 \message{toc printing,}  
3431    
3432  % Finish up the main text and prepare to read what we've written  \message{toc,}
3433  % to \contentsfile.  \newwrite\tocfile
3434    
3435    % Write an entry to the toc file, opening it if necessary.
3436    % Called from @chapter, etc.  We supply {\folio} at the end of the
3437    % argument, which will end up as the last argument to the \...entry macro.
3438    %
3439    % We open the .toc file here instead of at @setfilename or any other
3440    % given time so that @contents can be put in the document anywhere.
3441    %
3442    \newif\iftocfileopened
3443    \def\writetocentry#1{%
3444      \iftocfileopened\else
3445        \immediate\openout\tocfile = \jobname.toc
3446        \global\tocfileopenedtrue
3447      \fi
3448      \iflinks \write\tocfile{#1{\folio}}\fi
3449    }
3450    
3451  \newskip\contentsrightmargin \contentsrightmargin=1in  \newskip\contentsrightmargin \contentsrightmargin=1in
3452    \newcount\savepageno
3453    \newcount\lastnegativepageno \lastnegativepageno = -1
3454    
3455    % Finish up the main text and prepare to read what we've written
3456    % to \tocfile.
3457    %
3458  \def\startcontents#1{%  \def\startcontents#1{%
3459     \pagealignmacro     % If @setchapternewpage on, and @headings double, the contents should
3460     \immediate\closeout \contentsfile     % start on an odd page, unlike chapters.  Thus, we maintain
3461     \ifnum \pageno>0     % \contentsalignmacro in parallel with \pagealignmacro.
3462        \pageno = -1              % Request roman numbered pages.     % From: Torbjorn Granlund <tege@matematik.su.se>
3463     \fi     \contentsalignmacro
3464       \immediate\closeout\tocfile
3465       %
3466     % Don't need to put `Contents' or `Short Contents' in the headline.     % Don't need to put `Contents' or `Short Contents' in the headline.
3467     % It is abundantly clear what they are.     % It is abundantly clear what they are.
3468     \unnumbchapmacro{#1}\def\thischapter{}%     \unnumbchapmacro{#1}\def\thischapter{}%
3469     \begingroup                  % Set up to handle contents files properly.     \savepageno = \pageno
3470       \begingroup                  % Set up to handle contents files properly.
3471        \catcode`\\=0  \catcode`\{=1  \catcode`\}=2  \catcode`\@=11        \catcode`\\=0  \catcode`\{=1  \catcode`\}=2  \catcode`\@=11
3472        \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi        % We can't do this, because then an actual ^ in a section
3473          % title fails, e.g., @chapter ^ -- exponentiation.  --karl, 9jul97.
3474          %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
3475        \raggedbottom             % Worry more about breakpoints than the bottom.        \raggedbottom             % Worry more about breakpoints than the bottom.
3476        \advance\hsize by -\contentsrightmargin % Don't use the full line length.        \advance\hsize by -\contentsrightmargin % Don't use the full line length.
3477          %
3478          % Roman numerals for page numbers.
3479          \ifnum \pageno>0 \pageno = \lastnegativepageno \fi
3480  }  }
3481    
3482    
3483  % Normal (long) toc.  % Normal (long) toc.
3484  \outer\def\contents{%  \def\contents{%
3485     \startcontents{\putwordTableofContents}%     \startcontents{\putwordTableofContents}%
3486        \input \jobname.toc       \openin 1 \jobname.toc
3487         \ifeof 1 \else
3488           \closein 1
3489           \input \jobname.toc
3490         \fi
3491         \vfill \eject
3492     \endgroup     \endgroup
3493     \vfill \eject     \lastnegativepageno = \pageno
3494       \pageno = \savepageno
3495  }  }
3496    
3497  % And just the chapters.  % And just the chapters.
3498  \outer\def\summarycontents{%  \def\summarycontents{%
3499     \startcontents{\putwordShortContents}%     \startcontents{\putwordShortContents}%
3500        %        %
3501        \let\chapentry = \shortchapentry        \let\chapentry = \shortchapentry
# Line 2892  July\or August\or September\or October\o Line 3504  July\or August\or September\or October\o
3504        \secfonts        \secfonts
3505        \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl        \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
3506        \rm        \rm
3507          \hyphenpenalty = 10000
3508        \advance\baselineskip by 1pt % Open it up a little.        \advance\baselineskip by 1pt % Open it up a little.
3509        \def\secentry ##1##2##3##4{}        \def\secentry ##1##2##3##4{}
3510        \def\unnumbsecentry ##1##2{}        \def\unnumbsecentry ##1##2{}
# Line 2899  July\or August\or September\or October\o Line 3512  July\or August\or September\or October\o
3512        \def\unnumbsubsecentry ##1##2{}        \def\unnumbsubsecentry ##1##2{}
3513        \def\subsubsecentry ##1##2##3##4##5##6{}        \def\subsubsecentry ##1##2##3##4##5##6{}
3514        \def\unnumbsubsubsecentry ##1##2{}        \def\unnumbsubsubsecentry ##1##2{}
3515        \input \jobname.toc        \openin 1 \jobname.toc
3516          \ifeof 1 \else
3517            \closein 1
3518            \input \jobname.toc
3519          \fi
3520         \vfill \eject
3521     \endgroup     \endgroup
3522     \vfill \eject     \lastnegativepageno = \pageno
3523       \pageno = \savepageno
3524  }  }
3525  \let\shortcontents = \summarycontents  \let\shortcontents = \summarycontents
3526    
# Line 2935  July\or August\or September\or October\o Line 3554  July\or August\or September\or October\o
3554    % This space should be plenty, since a single number is .5em, and the    % This space should be plenty, since a single number is .5em, and the
3555    % widest letter (M) is 1em, at least in the Computer Modern fonts.    % widest letter (M) is 1em, at least in the Computer Modern fonts.
3556    % (This space doesn't include the extra space that gets added after    % (This space doesn't include the extra space that gets added after
3557    % the label; that gets put in in \shortchapentry above.)    % the label; that gets put in by \shortchapentry above.)
3558    \advance\dimen0 by 1.1em    \advance\dimen0 by 1.1em
3559    \hbox to \dimen0{#1\hfil}%    \hbox to \dimen0{#1\hfil}%
3560  }  }
# Line 2956  July\or August\or September\or October\o Line 3575  July\or August\or September\or October\o
3575    \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}    \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
3576  \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}  \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
3577    
   
3578  % This parameter controls the indentation of the various levels.  % This parameter controls the indentation of the various levels.
3579  \newdimen\tocindent \tocindent = 3pc  \newdimen\tocindent \tocindent = 3pc
3580    
3581  % Now for the actual typesetting. In all these, #1 is the text and #2 is the  % Now for the actual typesetting. In all these, #1 is the text and #2 is the
3582  % page number.  % page number.
3583  %  %
3584  % If the toc has to be broken over pages, we would want to be at chapters  % If the toc has to be broken over pages, we want it to be at chapters
3585  % if at all possible; hence the \penalty.  % if at all possible; hence the \penalty.
3586  \def\dochapentry#1#2{%  \def\dochapentry#1#2{%
3587     \penalty-300 \vskip\baselineskip     \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
3588     \begingroup     \begingroup
3589       \chapentryfonts       \chapentryfonts
3590       \tocentry{#1}{\dopageno{#2}}%       \tocentry{#1}{\dopageno{#2}}%
3591     \endgroup     \endgroup
3592     \nobreak\vskip .25\baselineskip     \nobreak\vskip .25\baselineskip plus.1\baselineskip
3593  }  }
3594    
3595  \def\dosecentry#1#2{\begingroup  \def\dosecentry#1#2{\begingroup
# Line 2993  July\or August\or September\or October\o Line 3611  July\or August\or September\or October\o
3611  % the index entries, but we want to suppress hyphenation here.  (We  % the index entries, but we want to suppress hyphenation here.  (We
3612  % can't do that in the \entry macro, since index entries might consist  % can't do that in the \entry macro, since index entries might consist
3613  % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)  % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
 %  
3614  \def\tocentry#1#2{\begingroup  \def\tocentry#1#2{\begingroup
3615    \hyphenpenalty = 10000    \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
3616      % Do not use \turnoffactive in these arguments.  Since the toc is
3617      % typeset in cmr, so characters such as _ would come out wrong; we
3618      % have to do the usual translation tricks.
3619    \entry{#1}{#2}%    \entry{#1}{#2}%
3620  \endgroup}  \endgroup}
3621    
# Line 3020  July\or August\or September\or October\o Line 3640  July\or August\or September\or October\o
3640  \newbox\pushcharbox    \newbox\bullbox  \newbox\pushcharbox    \newbox\bullbox
3641  \newbox\equivbox       \newbox\errorbox  \newbox\equivbox       \newbox\errorbox
3642    
 \let\ptexequiv = \equiv  
   
3643  %{\tentt  %{\tentt
3644  %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}  %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
3645  %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}  %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
# Line 3032  July\or August\or September\or October\o Line 3650  July\or August\or September\or October\o
3650  %                                      depth .1ex\hfil}  %                                      depth .1ex\hfil}
3651  %}  %}
3652    
3653    % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3654  \def\point{$\star$}  \def\point{$\star$}
   
3655  \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}  \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3656  \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}  \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
3657  \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}  \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
   
3658  \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}  \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3659    
3660  % Adapted from the TeXbook's \boxit.  % Adapted from the TeXbook's \boxit.
# Line 3065  July\or August\or September\or October\o Line 3682  July\or August\or September\or October\o
3682  % But \@ or @@ will get a plain tex @ character.  % But \@ or @@ will get a plain tex @ character.
3683    
3684  \def\tex{\begingroup  \def\tex{\begingroup
3685  \catcode `\\=0 \catcode `\{=1 \catcode `\}=2    \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
3686  \catcode `\$=3 \catcode `\&=4 \catcode `\#=6    \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
3687  \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie    \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
3688  \catcode `\%=14    \catcode `\%=14
3689  \catcode 43=12    \catcode 43=12 % plus
3690  \catcode`\"=12    \catcode`\"=12
3691  \catcode`\==12    \catcode`\==12
3692  \catcode`\|=12    \catcode`\|=12
3693  \catcode`\<=12    \catcode`\<=12
3694  \catcode`\>=12    \catcode`\>=12
3695  \escapechar=`\\    \escapechar=`\\
3696  %    %
3697  \let\~=\ptextilde    \let\b=\ptexb
3698  \let\{=\ptexlbrace    \let\bullet=\ptexbullet
3699  \let\}=\ptexrbrace    \let\c=\ptexc
3700  \let\.=\ptexdot    \let\,=\ptexcomma
3701  \let\*=\ptexstar    \let\.=\ptexdot
3702  \let\dots=\ptexdots    \let\dots=\ptexdots
3703  \def\@{@}%    \let\equiv=\ptexequiv
3704  \let\bullet=\ptexbullet    \let\!=\ptexexclam
3705  \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl    \let\i=\ptexi
3706  \let\L=\ptexL    \let\{=\ptexlbrace
3707  %    \let\+=\tabalign
3708      \let\}=\ptexrbrace
3709      \let\*=\ptexstar
3710      \let\t=\ptext
3711      %
3712      \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3713      \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3714      \def\@{@}%
3715  \let\Etex=\endgroup}  \let\Etex=\endgroup}
3716    
3717  % Define @lisp ... @endlisp.  % Define @lisp ... @endlisp.
# Line 3132  July\or August\or September\or October\o Line 3756  July\or August\or September\or October\o
3756  % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins.  % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins.
3757  \let\nonarrowing=\relax  \let\nonarrowing=\relax
3758    
3759  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
3760  % \cartouche: draw rectangle w/rounded corners around argument  % environment contents.
3761  \font\circle=lcircle10  \font\circle=lcircle10
3762  \newdimen\circthick  \newdimen\circthick
3763  \newdimen\cartouter\newdimen\cartinner  \newdimen\cartouter\newdimen\cartinner
# Line 3145  July\or August\or September\or October\o Line 3769  July\or August\or September\or October\o
3769  \def\cbl{{\circle\char'012\hskip -6pt}}  \def\cbl{{\circle\char'012\hskip -6pt}}
3770  \def\cbr{{\hskip 6pt\circle\char'011}}  \def\cbr{{\hskip 6pt\circle\char'011}}
3771  \def\carttop{\hbox to \cartouter{\hskip\lskip  \def\carttop{\hbox to \cartouter{\hskip\lskip
3772          \ctl\leaders\hrule height\circthick\hfil\ctr          \ctl\leaders\hrule height\circthick\hfil\ctr
3773          \hskip\rskip}}          \hskip\rskip}}
3774  \def\cartbot{\hbox to \cartouter{\hskip\lskip  \def\cartbot{\hbox to \cartouter{\hskip\lskip
3775          \cbl\leaders\hrule height\circthick\hfil\cbr          \cbl\leaders\hrule height\circthick\hfil\cbr
3776          \hskip\rskip}}          \hskip\rskip}}
3777  %  %
3778  \newskip\lskip\newskip\rskip  \newskip\lskip\newskip\rskip
3779    
3780  \long\def\cartouche{%  \long\def\cartouche{%
3781  \begingroup  \begingroup
3782          \lskip=\leftskip \rskip=\rightskip          \lskip=\leftskip \rskip=\rightskip
3783          \leftskip=0pt\rightskip=0pt %we want these *outside*.          \leftskip=0pt\rightskip=0pt %we want these *outside*.
3784          \cartinner=\hsize \advance\cartinner by-\lskip          \cartinner=\hsize \advance\cartinner by-\lskip
3785                            \advance\cartinner by-\rskip                            \advance\cartinner by-\rskip
3786          \cartouter=\hsize          \cartouter=\hsize
3787          \advance\cartouter by 18pt % allow for 3pt kerns on either          \advance\cartouter by 18.4pt % allow for 3pt kerns on either
3788  %                                    side, and for 6pt waste from  %                                    side, and for 6pt waste from
3789  %                                    each corner char  %                                    each corner char, and rule thickness
3790          \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip          \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
3791          % Flag to tell @lisp, etc., not to narrow margin.          % Flag to tell @lisp, etc., not to narrow margin.
3792          \let\nonarrowing=\comment          \let\nonarrowing=\comment
3793          \vbox\bgroup          \vbox\bgroup
3794                  \baselineskip=0pt\parskip=0pt\lineskip=0pt                  \baselineskip=0pt\parskip=0pt\lineskip=0pt
3795                  \carttop                  \carttop
3796                  \hbox\bgroup                  \hbox\bgroup
3797                          \hskip\lskip                          \hskip\lskip
3798                          \vrule\kern3pt                          \vrule\kern3pt
3799                          \vbox\bgroup                          \vbox\bgroup
3800                                  \hsize=\cartinner                                  \hsize=\cartinner
3801                                  \kern3pt                                  \kern3pt
3802                                  \begingroup                                  \begingroup
3803                                          \baselineskip=\normbskip                                          \baselineskip=\normbskip
3804                                          \lineskip=\normlskip                                          \lineskip=\normlskip
3805                                          \parskip=\normpskip                                          \parskip=\normpskip
3806                                          \vskip -\parskip                                          \vskip -\parskip
3807  \def\Ecartouche{%  \def\Ecartouche{%
3808                                  \endgroup                                  \endgroup
3809                                  \kern3pt                                  \kern3pt
3810                          \egroup                          \egroup
3811                          \kern3pt\vrule                          \kern3pt\vrule
3812                          \hskip\rskip                          \hskip\rskip
3813                  \egroup                  \egroup
3814                  \cartbot                  \cartbot
3815          \egroup          \egroup
3816  \endgroup  \endgroup
3817  }}  }}
3818    
# Line 3216  July\or August\or September\or October\o Line 3840  July\or August\or September\or October\o
3840    \fi    \fi
3841  }  }
3842    
3843  % To ending an @example-like environment, we first end the paragraph  % Define the \E... control sequence only if we are inside the particular
3844  % (via \afterenvbreak's vertical glue), and then the group.  That way we  % environment, so the error checking in \end will work.
3845  % keep the zero \parskip that the environments set -- \parskip glue  %
3846  % will be inserted at the beginning of the next paragraph in the  % To end an @example-like environment, we first end the paragraph (via
3847  % document, after the environment.  % \afterenvbreak's vertical glue), and then the group.  That way we keep
3848    % the zero \parskip that the environments set -- \parskip glue will be
3849    % inserted at the beginning of the next paragraph in the document, after
3850    % the environment.
3851  %  %
3852  \def\nonfillfinish{\afterenvbreak\endgroup}%  \def\nonfillfinish{\afterenvbreak\endgroup}
3853    
3854  % This macro is  % @lisp: indented, narrowed, typewriter font.
3855  \def\lisp{\begingroup  \def\lisp{\begingroup
3856    \nonfillstart    \nonfillstart
3857    \let\Elisp = \nonfillfinish    \let\Elisp = \nonfillfinish
3858    \tt    \tt
3859    \rawbackslash % have \ input char produce \ char from current font    \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
3860    \gobble    \gobble       % eat return
3861  }  }
3862    
3863  % Define the \E... control sequence only if we are inside the  % @example: Same as @lisp.
 % environment, so the error checking in \end will work.  
 %  
 % We must call \lisp last in the definition, since it reads the  
 % return following the @example (or whatever) command.  
 %  
3864  \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}  \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
 \def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp}  
 \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp}  
3865    
3866  % @smallexample and @smalllisp.  This is not used unless the @smallbook  % @small... is usually equivalent to the non-small (@smallbook
3867  % command is given.  Originally contributed by Pavel@xerox.  % redefines).  We must call \example (or whatever) last in the
3868    % definition, since it reads the return following the @example (or
3869    % whatever) command.
3870    %
3871    % This actually allows (for example) @end display inside an
3872    % @smalldisplay.  Too bad, but makeinfo will catch the error anyway.
3873  %  %
3874    \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display}
3875    \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp}
3876    \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format}
3877    \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
3878    
3879    % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts.
3880    % Originally contributed by Pavel@xerox.
3881  \def\smalllispx{\begingroup  \def\smalllispx{\begingroup
3882    \nonfillstart    \def\Esmalllisp{\nonfillfinish\endgroup}%
3883    \let\Esmalllisp = \nonfillfinish    \def\Esmallexample{\nonfillfinish\endgroup}%
3884    \let\Esmallexample = \nonfillfinish    \indexfonts
3885    %    \lisp
   % Smaller interline space and fonts for small examples.  
   \setleading{10pt}%  
   \indexfonts \tt  
   \rawbackslash % make \ output the \ character from the current font (tt)  
   \gobble  
3886  }  }
3887    
3888  % This is @display; same as @lisp except use roman font.  % @display: same as @lisp except keep current font.
3889  %  %
3890  \def\display{\begingroup  \def\display{\begingroup
3891    \nonfillstart    \nonfillstart
# Line 3266  July\or August\or September\or October\o Line 3893  July\or August\or September\or October\o
3893    \gobble    \gobble
3894  }  }
3895    
3896  % This is @format; same as @display except don't narrow margins.  % @smalldisplay (when @smallbook): @display plus smaller fonts.
3897    %
3898    \def\smalldisplayx{\begingroup
3899      \def\Esmalldisplay{\nonfillfinish\endgroup}%
3900      \indexfonts \rm
3901      \display
3902    }
3903    
3904    % @format: same as @display except don't narrow margins.
3905  %  %
3906  \def\format{\begingroup  \def\format{\begingroup
3907    \let\nonarrowing = t    \let\nonarrowing = t
# Line 3275  July\or August\or September\or October\o Line 3910  July\or August\or September\or October\o
3910    \gobble    \gobble
3911  }  }
3912    
3913  % @flushleft (same as @format) and @flushright.  % @smallformat (when @smallbook): @format plus smaller fonts.
3914  %  %
3915  \def\flushleft{\begingroup  \def\smallformatx{\begingroup
3916    \let\nonarrowing = t    \def\Esmallformat{\nonfillfinish\endgroup}%
3917    \nonfillstart    \indexfonts \rm
3918    \let\Eflushleft = \nonfillfinish    \format
   \gobble  
3919  }  }
3920    
3921    % @flushleft (same as @format).
3922    %
3923    \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format}
3924    
3925    % @flushright.
3926    %
3927  \def\flushright{\begingroup  \def\flushright{\begingroup
3928    \let\nonarrowing = t    \let\nonarrowing = t
3929    \nonfillstart    \nonfillstart
3930    \let\Eflushright = \nonfillfinish    \let\Eflushright = \nonfillfinish
3931    \advance\leftskip by 0pt plus 1fill    \advance\leftskip by 0pt plus 1fill
3932    \gobble}    \gobble
3933    }
3934    
3935  % @quotation does normal linebreaking (hence we can't use \nonfillstart)  % @quotation does normal linebreaking (hence we can't use \nonfillstart)
3936  % and narrows the margins.  % and narrows the margins.
# Line 3311  July\or August\or September\or October\o Line 3953  July\or August\or September\or October\o
3953    \fi    \fi
3954  }  }
3955    
3956    
3957  \message{defuns,}  \message{defuns,}
3958  % Define formatter for defuns  % Define formatter for defuns
3959  % First, allow user to change definition object font (\df) internally  % First, allow user to change definition object font (\df) internally
# Line 3341  July\or August\or September\or October\o Line 3984  July\or August\or September\or October\o
3984    
3985  \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }  \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
3986  \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}  \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
3987    % This is used to turn on special parens
3988    % but make & act ordinary (given that it's active).
3989    \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
3990    
3991  % Definitions of (, ) and & used in args for functions.  % Definitions of (, ) and & used in args for functions.
3992  % This is the definition of ( outside of all parentheses.  % This is the definition of ( outside of all parentheses.
3993  \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %  \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
3994  \global\advance\parencount by 1 }    \global\advance\parencount by 1
3995    }
3996  %  %
3997  % This is the definition of ( when already inside a level of parens.  % This is the definition of ( when already inside a level of parens.
3998  \gdef\opnested{\char`\(\global\advance\parencount by 1 }  \gdef\opnested{\char`\(\global\advance\parencount by 1 }
3999  %  %
4000  \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.  \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
4001  % also in that case restore the outer-level definition of (.    % also in that case restore the outer-level definition of (.
4002  \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi    \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
4003  \global\advance \parencount by -1 }    \global\advance \parencount by -1 }
4004  % If we encounter &foo, then turn on ()-hacking afterwards  % If we encounter &foo, then turn on ()-hacking afterwards
4005  \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }  \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
4006  %  %
# Line 3361  July\or August\or September\or October\o Line 4008  July\or August\or September\or October\o
4008  } % End of definition inside \activeparens  } % End of definition inside \activeparens
4009  %% These parens (in \boldbrax) actually are a little bolder than the  %% These parens (in \boldbrax) actually are a little bolder than the
4010  %% contained text.  This is especially needed for [ and ]  %% contained text.  This is especially needed for [ and ]
4011  \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}  \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
4012  \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}}  \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
4013    \def\ampnr{\&}
4014    \def\lbrb{{\bf\char`\[}}
4015    \def\rbrb{{\bf\char`\]}}
4016    
4017  % First, defname, which formats the header line itself.  % First, defname, which formats the header line itself.
4018  % #1 should be the function name.  % #1 should be the function name.
# Line 3373  July\or August\or September\or October\o Line 4023  July\or August\or September\or October\o
4023  % outside the @def...  % outside the @def...
4024  \dimen2=\leftskip  \dimen2=\leftskip
4025  \advance\dimen2 by -\defbodyindent  \advance\dimen2 by -\defbodyindent
4026  \dimen3=\rightskip  \noindent
 \advance\dimen3 by -\defbodyindent  
 \noindent        %  
4027  \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%  \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
4028  \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line  \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
4029  \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations  \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
4030  \parshape 2 0in \dimen0 \defargsindent \dimen1     %  \parshape 2 0in \dimen0 \defargsindent \dimen1
4031  % Now output arg 2 ("Function" or some such)  % Now output arg 2 ("Function" or some such)
4032  % ending at \deftypemargin from the right margin,  % ending at \deftypemargin from the right margin,
4033  % but stuck inside a box of width 0 so it does not interfere with linebreaking  % but stuck inside a box of width 0 so it does not interfere with linebreaking
4034  {% Adjust \hsize to exclude the ambient margins,  {% Adjust \hsize to exclude the ambient margins,
4035  % so that \rightline will obey them.  % so that \rightline will obey them.
4036  \advance \hsize by -\dimen2 \advance \hsize by -\dimen3  \advance \hsize by -\dimen2
4037  \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%  \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%
4038  % Make all lines underfull and no complaints:  % Make all lines underfull and no complaints:
4039  \tolerance=10000 \hbadness=10000  \tolerance=10000 \hbadness=10000
4040  \advance\leftskip by -\defbodyindent  \advance\leftskip by -\defbodyindent
# Line 3407  July\or August\or September\or October\o Line 4055  July\or August\or September\or October\o
4055  \def#1{\endgraf\endgroup\medbreak}%  \def#1{\endgraf\endgroup\medbreak}%
4056  \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%  \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
4057  \parindent=0in  \parindent=0in
4058  \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent  \advance\leftskip by \defbodyindent
4059  \exdentamount=\defbodyindent  \exdentamount=\defbodyindent
4060  \begingroup %  \begingroup %
4061  \catcode 61=\active % 61 is `='  \catcode 61=\active % 61 is `='
4062  \obeylines\activeparens\spacesplit#3}  \obeylines\activeparens\spacesplit#3}
4063    
4064  \def\defmethparsebody #1#2#3#4 {\begingroup\inENV %  % #1 is the \E... control sequence to end the definition (which we define).
4065    % #2 is the \...x control sequence for consecutive fns (which we define).
4066    % #3 is the control sequence to call to resume processing.
4067    % #4, delimited by the space, is the class name.
4068    %
4069    \def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
4070  \medbreak %  \medbreak %
4071  % Define the end token that this defining construct specifies  % Define the end token that this defining construct specifies
4072  % so that it will exit this group.  % so that it will exit this group.
4073  \def#1{\endgraf\endgroup\medbreak}%  \def#1{\endgraf\endgroup\medbreak}%
4074  \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%  \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
4075  \parindent=0in  \parindent=0in
4076  \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent  \advance\leftskip by \defbodyindent
4077  \exdentamount=\defbodyindent  \exdentamount=\defbodyindent
4078  \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}  \begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
4079    
4080    % @deftypemethod has an extra argument that nothing else does.  Sigh.
4081    % #1 is the \E... control sequence to end the definition (which we define).
4082    % #2 is the \...x control sequence for consecutive fns (which we define).
4083    % #3 is the control sequence to call to resume processing.
4084    % #4, delimited by the space, is the class name.
4085    % #5 is the method's return type.
4086    %
4087    \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
4088    \medbreak %
4089    % Define the end token that this defining construct specifies
4090    % so that it will exit this group.
4091    \def#1{\endgraf\endgroup\medbreak}%
4092    \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
4093    \parindent=0in
4094    \advance\leftskip by \defbodyindent
4095    \exdentamount=\defbodyindent
4096    \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
4097    
4098  \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %  \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
4099  \medbreak %  \medbreak %
4100  % Define the end token that this defining construct specifies  % Define the end token that this defining construct specifies
# Line 3432  July\or August\or September\or October\o Line 4103  July\or August\or September\or October\o
4103  \def#2##1 ##2 {\def#4{##1}%  \def#2##1 ##2 {\def#4{##1}%
4104  \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%  \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
4105  \parindent=0in  \parindent=0in
4106  \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent  \advance\leftskip by \defbodyindent
4107  \exdentamount=\defbodyindent  \exdentamount=\defbodyindent
4108  \begingroup\obeylines\activeparens\spacesplit{#3{#5}}}  \begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
4109    
# Line 3447  July\or August\or September\or October\o Line 4118  July\or August\or September\or October\o
4118  \def#1{\endgraf\endgroup\medbreak}%  \def#1{\endgraf\endgroup\medbreak}%
4119  \def#2{\begingroup\obeylines\spacesplit#3}%  \def#2{\begingroup\obeylines\spacesplit#3}%
4120  \parindent=0in  \parindent=0in
4121  \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent  \advance\leftskip by \defbodyindent
4122  \exdentamount=\defbodyindent  \exdentamount=\defbodyindent
4123  \begingroup %  \begingroup %
4124  \catcode 61=\active %  \catcode 61=\active %
# Line 3455  July\or August\or September\or October\o Line 4126  July\or August\or September\or October\o
4126    
4127  % This is used for \def{tp,vr}parsebody.  It could probably be used for  % This is used for \def{tp,vr}parsebody.  It could probably be used for
4128  % some of the others, too, with some judicious conditionals.  % some of the others, too, with some judicious conditionals.
4129  %  %
4130  \def\parsebodycommon#1#2#3{%  \def\parsebodycommon#1#2#3{%
4131    \begingroup\inENV %    \begingroup\inENV %
4132    \medbreak %    \medbreak %
# Line 3464  July\or August\or September\or October\o Line 4135  July\or August\or September\or October\o
4135    \def#1{\endgraf\endgroup\medbreak}%    \def#1{\endgraf\endgroup\medbreak}%
4136    \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%    \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
4137    \parindent=0in    \parindent=0in
4138    \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent    \advance\leftskip by \defbodyindent
4139    \exdentamount=\defbodyindent    \exdentamount=\defbodyindent
4140    \begingroup\obeylines    \begingroup\obeylines
4141  }  }
# Line 3489  July\or August\or September\or October\o Line 4160  July\or August\or September\or October\o
4160  }  }
4161    
4162  % Fine, but then we have to eventually remove the \empty *and* the  % Fine, but then we have to eventually remove the \empty *and* the
4163  % braces (if any).  That's what this does, putting the result in \tptemp.  % braces (if any).  That's what this does.
4164  %  %
4165  \def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}%  \def\removeemptybraces\empty#1\relax{#1}
4166    
4167  % After \spacesplit has done its work, this is called -- #1 is the final  % After \spacesplit has done its work, this is called -- #1 is the final
4168  % thing to call, #2 the type name (which starts with \empty), and #3  % thing to call, #2 the type name (which starts with \empty), and #3
4169  % (which might be empty) the arguments.  % (which might be empty) the arguments.
4170  %  %
4171  \def\parsetpheaderline#1#2#3{%  \def\parsetpheaderline#1#2#3{%
4172    \removeemptybraces#2\relax    #1{\removeemptybraces#2\relax}{#3}%
   #1{\tptemp}{#3}%  
4173  }%  }%
4174    
4175  \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %  \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
# Line 3510  July\or August\or September\or October\o Line 4180  July\or August\or September\or October\o
4180  \def#2##1 ##2 {\def#4{##1}%  \def#2##1 ##2 {\def#4{##1}%
4181  \begingroup\obeylines\spacesplit{#3{##2}}}%  \begingroup\obeylines\spacesplit{#3{##2}}}%
4182  \parindent=0in  \parindent=0in
4183  \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent  \advance\leftskip by \defbodyindent
4184  \exdentamount=\defbodyindent  \exdentamount=\defbodyindent
4185  \begingroup\obeylines\spacesplit{#3{#5}}}  \begingroup\obeylines\spacesplit{#3{#5}}}
4186    
# Line 3540  July\or August\or September\or October\o Line 4210  July\or August\or September\or October\o
4210  \hyphenchar\tensl=0  \hyphenchar\tensl=0
4211  #1%  #1%
4212  \hyphenchar\tensl=45  \hyphenchar\tensl=45
4213  \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%  \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
4214  \interlinepenalty=10000  \interlinepenalty=10000
4215  \advance\rightskip by 0pt plus 1fil  \advance\rightskip by 0pt plus 1fil
4216  \endgraf\penalty 10000\vskip -\parskip\penalty 10000%  \endgraf\nobreak\vskip -\parskip\nobreak
4217  }  }
4218    
4219  \def\deftypefunargs #1{%  \def\deftypefunargs #1{%
4220  % Expand, preventing hyphenation at `-' chars.  % Expand, preventing hyphenation at `-' chars.
4221  % Note that groups don't affect changes in \hyphenchar.  % Note that groups don't affect changes in \hyphenchar.
4222  \functionparens  % Use \boldbraxnoamp, not \functionparens, so that & is not special.
4223    \boldbraxnoamp
4224  \tclose{#1}% avoid \code because of side effects on active chars  \tclose{#1}% avoid \code because of side effects on active chars
4225  \interlinepenalty=10000  \interlinepenalty=10000
4226  \advance\rightskip by 0pt plus 1fil  \advance\rightskip by 0pt plus 1fil
4227  \endgraf\penalty 10000\vskip -\parskip\penalty 10000%  \endgraf\nobreak\vskip -\parskip\nobreak
4228  }  }
4229    
4230  % Do complete processing of one @defun or @defunx line already parsed.  % Do complete processing of one @defun or @defunx line already parsed.
# Line 3640  July\or August\or September\or October\o Line 4311  July\or August\or September\or October\o
4311  \def\defmacx #1 {\errmessage{@defmacx in invalid context}}  \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
4312  \def\defspecx #1 {\errmessage{@defspecx in invalid context}}  \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
4313  \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}  \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
4314  \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}  \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
4315    \def\deftypefunx #1 {\errmessage{@deftypefunx in invalid context}}
4316    
4317  % @defmethod, and so on  % @defmethod, and so on
4318    
4319  % @defop {Funny Method} foo-class frobnicate argument  % @defop CATEGORY CLASS OPERATION ARG...
4320    
4321  \def\defop #1 {\def\defoptype{#1}%  \def\defop #1 {\def\defoptype{#1}%
4322  \defopparsebody\Edefop\defopx\defopheader\defoptype}  \defopparsebody\Edefop\defopx\defopheader\defoptype}
4323    
4324  \def\defopheader #1#2#3{%  \def\defopheader #1#2#3{%
4325  \dosubind {fn}{\code{#2}}{on #1}% Make entry in function index  \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
4326  \begingroup\defname {#2}{\defoptype{} on #1}%  \begingroup\defname {#2}{\defoptype{} on #1}%
4327  \defunargs {#3}\endgroup %  \defunargs {#3}\endgroup %
4328  }  }
4329    
4330  % @defmethod == @defop Method  % @deftypemethod CLASS RETURN-TYPE METHOD ARG...
4331    %
4332    \def\deftypemethod{%
4333      \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
4334    %
4335    % #1 is the class name, #2 the data type, #3 the method name, #4 the args.
4336    \def\deftypemethodheader#1#2#3#4{%
4337      \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
4338      \begingroup
4339        \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
4340        \deftypefunargs{#4}%
4341      \endgroup
4342    }
4343    
4344    % @defmethod == @defop Method
4345    %
4346  \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}  \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
4347    %
4348  \def\defmethodheader #1#2#3{%  % #1 is the class name, #2 the method name, #3 the args.
4349  \dosubind {fn}{\code{#2}}{on #1}% entry in function index  \def\defmethodheader#1#2#3{%
4350  \begingroup\defname {#2}{Method on #1}%    \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index
4351  \defunargs {#3}\endgroup %    \begingroup
4352        \defname{#2}{\putwordMethodon\ \code{#1}}%
4353        \defunargs{#3}%
4354      \endgroup
4355  }  }
4356    
4357  % @defcv {Class Option} foo-class foo-flag  % @defcv {Class Option} foo-class foo-flag
# Line 3701  July\or August\or September\or October\o Line 4390  July\or August\or September\or October\o
4390  % This must expand the args and terminate the paragraph they make up  % This must expand the args and terminate the paragraph they make up
4391  \def\defvarargs #1{\normalparens #1%  \def\defvarargs #1{\normalparens #1%
4392  \interlinepenalty=10000  \interlinepenalty=10000
4393  \endgraf\penalty 10000\vskip -\parskip\penalty 10000}  \endgraf\nobreak\vskip -\parskip\nobreak}
4394    
4395  % @defvr Counter foo-count  % @defvr Counter foo-count
4396    
# Line 3732  July\or August\or September\or October\o Line 4421  July\or August\or September\or October\o
4421    
4422  \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}  \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
4423    
4424  % #1 is the data type.  #2 is the name.  % #1 is the data type.  #2 is the name, perhaps followed by text that
4425    % is actually part of the data type, which should not be put into the index.
4426  \def\deftypevarheader #1#2{%  \def\deftypevarheader #1#2{%
4427  \doind {vr}{\code{#2}}% Make entry in variables index  \dovarind#2 \relax% Make entry in variables index
4428  \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%  \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
4429  \interlinepenalty=10000  \interlinepenalty=10000
4430  \endgraf\penalty 10000\vskip -\parskip\penalty 10000  \endgraf\nobreak\vskip -\parskip\nobreak
4431  \endgroup}  \endgroup}
4432    \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
4433    
4434  % @deftypevr {Global Flag} int enable  % @deftypevr {Global Flag} int enable
4435    
4436  \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}  \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
4437    
4438  \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}%  \def\deftypevrheader #1#2#3{\dovarind#3 \relax%
4439  \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}  \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
4440  \interlinepenalty=10000  \interlinepenalty=10000
4441  \endgraf\penalty 10000\vskip -\parskip\penalty 10000  \endgraf\nobreak\vskip -\parskip\nobreak
4442  \endgroup}  \endgroup}
4443    
4444  % This definition is run if you use @defvarx  % This definition is run if you use @defvarx
# Line 3776  July\or August\or September\or October\o Line 4467  July\or August\or September\or October\o
4467    
4468  \def\deftpx #1 {\errmessage{@deftpx in invalid context}}  \def\deftpx #1 {\errmessage{@deftpx in invalid context}}
4469    
 \message{cross reference,}  
 % Define cross-reference macros  
 \newwrite \auxfile  
4470    
4471  \newif\ifhavexrefs  % True if xref values are known.  \message{macros,}
4472    % @macro.
4473    
4474    % To do this right we need a feature of e-TeX, \scantokens,
4475    % which we arrange to emulate with a temporary file in ordinary TeX.
4476    \ifx\eTeXversion\undefined
4477     \newwrite\macscribble
4478     \def\scanmacro#1{%
4479       \begingroup \newlinechar`\^^M
4480       \immediate\openout\macscribble=\jobname.tmp
4481       \immediate\write\macscribble{#1}%
4482       \immediate\closeout\macscribble
4483       \let\xeatspaces\eatspaces
4484       \input \jobname.tmp
4485       \endgroup
4486    }
4487    \else
4488    \def\scanmacro#1{%
4489    \begingroup \newlinechar`\^^M
4490    \let\xeatspaces\eatspaces\scantokens{#1}\endgroup}
4491    \fi
4492    
4493    \newcount\paramno   % Count of parameters
4494    \newtoks\macname    % Macro name
4495    \newif\ifrecursive  % Is it recursive?
4496    
4497    % Utility routines.
4498    % Thisdoes \let #1 = #2, except with \csnames.
4499    \def\cslet#1#2{%
4500    \expandafter\expandafter
4501    \expandafter\let
4502    \expandafter\expandafter
4503    \csname#1\endcsname
4504    \csname#2\endcsname}
4505    
4506    % Trim leading and trailing spaces off a string.
4507    % Concepts from aro-bend problem 15 (see CTAN).
4508    {\catcode`\@=11
4509    \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
4510    \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
4511    \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
4512    \def\unbrace#1{#1}
4513    \unbrace{\gdef\trim@@@ #1 } #2@{#1}
4514    }
4515    
4516    % Trim a single trailing ^^M off a string.
4517    {\catcode`\^^M=12\catcode`\Q=3%
4518    \gdef\eatcr #1{\eatcra #1Q^^MQ}%
4519    \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
4520    \gdef\eatcrb#1Q#2Q{#1}%
4521    }
4522    
4523    % Macro bodies are absorbed as an argument in a context where
4524    % all characters are catcode 10, 11 or 12, except \ which is active
4525    % (as in normal texinfo). It is necessary to change the definition of \.
4526    
4527    % It's necessary to have hard CRs when the macro is executed. This is
4528    % done by  making ^^M (\endlinechar) catcode 12 when reading the macro
4529    % body, and then making it the \newlinechar in \scanmacro.
4530    
4531    \def\macrobodyctxt{%
4532      \catcode`\~=12
4533      \catcode`\^=12
4534      \catcode`\_=12
4535      \catcode`\|=12
4536      \catcode`\<=12
4537      \catcode`\>=12
4538      \catcode`\+=12
4539      \catcode`\{=12
4540      \catcode`\}=12
4541      \catcode`\@=12
4542      \catcode`\^^M=12
4543      \usembodybackslash}
4544    
4545    \def\macroargctxt{%
4546      \catcode`\~=12
4547      \catcode`\^=12
4548      \catcode`\_=12
4549      \catcode`\|=12
4550      \catcode`\<=12
4551      \catcode`\>=12
4552      \catcode`\+=12
4553      \catcode`\@=12
4554      \catcode`\\=12}
4555    
4556    % \mbodybackslash is the definition of \ in @macro bodies.
4557    % It maps \foo\ => \csname macarg.foo\endcsname => #N
4558    % where N is the macro parameter number.
4559    % We define \csname macarg.\endcsname to be \realbackslash, so
4560    % \\ in macro replacement text gets you a backslash.
4561    
4562    {\catcode`@=0 @catcode`@\=@active
4563     @gdef@usembodybackslash{@let\=@mbodybackslash}
4564     @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
4565    }
4566    \expandafter\def\csname macarg.\endcsname{\realbackslash}
4567    
4568    \def\macro{\recursivefalse\parsearg\macroxxx}
4569    \def\rmacro{\recursivetrue\parsearg\macroxxx}
4570    
4571    \def\macroxxx#1{%
4572      \getargs{#1}%           now \macname is the macname and \argl the arglist
4573      \ifx\argl\empty       % no arguments
4574         \paramno=0%
4575      \else
4576         \expandafter\parsemargdef \argl;%
4577      \fi
4578      \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4579         \cslet{macsave.\the\macname}{\the\macname}%
4580      \else
4581         \message{Warning: redefining \the\macname}%
4582      \fi
4583      \begingroup \macrobodyctxt
4584      \ifrecursive \expandafter\parsermacbody
4585      \else \expandafter\parsemacbody
4586      \fi}
4587    
4588    \def\unmacro{\parsearg\unmacroxxx}
4589    \def\unmacroxxx#1{%
4590      \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4591        \errmessage{Macro \the\macname\ not defined.}%
4592      \else
4593        \cslet{#1}{macsave.#1}%
4594        \expandafter\let \csname macsave.\the\macname\endcsname \undefined
4595      \fi
4596    }
4597    
4598    % This makes use of the obscure feature that if the last token of a
4599    % <parameter list> is #, then the preceding argument is delimited by
4600    % an opening brace, and that opening brace is not consumed.
4601    \def\getargs#1{\getargsxxx#1{}}
4602    \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
4603    \def\getmacname #1 #2\relax{\macname={#1}}
4604    \def\getmacargs#1{\def\argl{#1}}
4605    
4606    % Parse the optional {params} list.  Set up \paramno and \paramlist
4607    % so \defmacro knows what to do.  Define \macarg.blah for each blah
4608    % in the params list, to be ##N where N is the position in that list.
4609    % That gets used by \mbodybackslash (above).
4610    
4611    % We need to get `macro parameter char #' into several definitions.
4612    % The technique used is stolen from LaTeX:  let \hash be something
4613    % unexpandable, insert that wherever you need a #, and then redefine
4614    % it to # just before using the token list produced.
4615    %
4616    % The same technique is used to protect \eatspaces till just before
4617    % the macro is used.
4618    
4619    \def\parsemargdef#1;{\paramno=0\def\paramlist{}%
4620            \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
4621    \def\parsemargdefxxx#1,{%
4622      \if#1;\let\next=\relax
4623      \else \let\next=\parsemargdefxxx
4624        \advance\paramno by 1%
4625        \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
4626            {\xeatspaces{\hash\the\paramno}}%
4627        \edef\paramlist{\paramlist\hash\the\paramno,}%
4628      \fi\next}
4629    
4630    % These two commands read recursive and nonrecursive macro bodies.
4631    % (They're different since rec and nonrec macros end differently.)
4632    
4633    \long\def\parsemacbody#1@end macro%
4634    {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
4635    \long\def\parsermacbody#1@end rmacro%
4636    {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
4637    
4638    % This defines the macro itself. There are six cases: recursive and
4639    % nonrecursive macros of zero, one, and many arguments.
4640    % Much magic with \expandafter here.
4641    % \xdef is used so that macro definitions will survive the file
4642    % they're defined in; @include reads the file inside a group.
4643    \def\defmacro{%
4644      \let\hash=##% convert placeholders to macro parameter chars
4645      \ifrecursive
4646        \ifcase\paramno
4647        % 0
4648          \expandafter\xdef\csname\the\macname\endcsname{%
4649            \noexpand\scanmacro{\temp}}%
4650        \or % 1
4651          \expandafter\xdef\csname\the\macname\endcsname{%
4652             \bgroup\noexpand\macroargctxt
4653             \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4654          \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
4655             \egroup\noexpand\scanmacro{\temp}}%
4656        \else % many
4657          \expandafter\xdef\csname\the\macname\endcsname{%
4658             \bgroup\noexpand\macroargctxt
4659             \noexpand\csname\the\macname xx\endcsname}
4660          \expandafter\xdef\csname\the\macname xx\endcsname##1{%
4661              \csname\the\macname xxx\endcsname ##1,}%
4662          \expandafter\expandafter
4663          \expandafter\xdef
4664          \expandafter\expandafter
4665            \csname\the\macname xxx\endcsname
4666              \paramlist{\egroup\noexpand\scanmacro{\temp}}%
4667        \fi
4668      \else
4669        \ifcase\paramno
4670        % 0
4671          \expandafter\xdef\csname\the\macname\endcsname{%
4672            \noexpand\norecurse{\the\macname}%
4673            \noexpand\scanmacro{\temp}\egroup}%
4674        \or % 1
4675          \expandafter\xdef\csname\the\macname\endcsname{%
4676             \bgroup\noexpand\macroargctxt
4677             \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4678          \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
4679            \egroup
4680            \noexpand\norecurse{\the\macname}%
4681            \noexpand\scanmacro{\temp}\egroup}%
4682        \else % many
4683          \expandafter\xdef\csname\the\macname\endcsname{%
4684             \bgroup\noexpand\macroargctxt
4685             \noexpand\csname\the\macname xx\endcsname}
4686          \expandafter\xdef\csname\the\macname xx\endcsname##1{%
4687              \csname\the\macname xxx\endcsname ##1,}%
4688          \expandafter\expandafter
4689          \expandafter\xdef
4690          \expandafter\expandafter
4691          \csname\the\macname xxx\endcsname
4692          \paramlist{%
4693              \egroup
4694              \noexpand\norecurse{\the\macname}%
4695              \noexpand\scanmacro{\temp}\egroup}%
4696        \fi
4697      \fi}
4698    
4699    \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
4700    
4701    % \braceorline decides whether the next nonwhitespace character is a
4702    % {.  If so it reads up to the closing }, if not, it reads the whole
4703    % line.  Whatever was read is then fed to the next control sequence
4704    % as an argument (by \parsebrace or \parsearg)
4705    \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
4706    \def\braceorlinexxx{%
4707      \ifx\nchar\bgroup\else
4708        \expandafter\parsearg
4709      \fi \next}
4710    
4711    
4712    \message{cross references,}
4713    \newwrite\auxfile
4714    
4715    \newif\ifhavexrefs    % True if xref values are known.
4716  \newif\ifwarnedxrefs  % True if we warned once that they aren't known.  \newif\ifwarnedxrefs  % True if we warned once that they aren't known.
4717    
4718  % \setref{foo} defines a cross-reference point named foo.  % @inforef is relatively simple.
4719    \def\inforef #1{\inforefzzz #1,,,,**}
4720    \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
4721      node \samp{\ignorespaces#1{}}}
4722    
4723    % @node's job is to define \lastnode.
4724    \def\node{\ENVcheck\parsearg\nodezzz}
4725    \def\nodezzz#1{\nodexxx [#1,]}
4726    \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
4727    \let\nwnode=\node
4728    \let\lastnode=\relax
4729    
4730  \def\setref#1{%  % The sectioning commands (@chapter, etc.) call these.
4731  \dosetq{#1-title}{Ytitle}%  \def\donoderef{%
4732  \dosetq{#1-pg}{Ypagenumber}%    \ifx\lastnode\relax\else
4733  \dosetq{#1-snt}{Ysectionnumberandtype}}      \expandafter\expandafter\expandafter\setref{\lastnode}%
4734          {Ysectionnumberandtype}%
4735  \def\unnumbsetref#1{%      \global\let\lastnode=\relax
4736  \dosetq{#1-title}{Ytitle}%    \fi
4737  \dosetq{#1-pg}{Ypagenumber}%  }
4738  \dosetq{#1-snt}{Ynothing}}  \def\unnumbnoderef{%
4739      \ifx\lastnode\relax\else
4740  \def\appendixsetref#1{%      \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}%
4741  \dosetq{#1-title}{Ytitle}%      \global\let\lastnode=\relax
4742  \dosetq{#1-pg}{Ypagenumber}%    \fi
4743  \dosetq{#1-snt}{Yappendixletterandtype}}  }
4744    \def\appendixnoderef{%
4745  % \xref, \pxref, and \ref generate cross-references to specified points.    \ifx\lastnode\relax\else
4746  % For \xrefX, #1 is the node name, #2 the name of the Info      \expandafter\expandafter\expandafter\setref{\lastnode}%
4747  % cross-reference, #3 the printed node name, #4 the name of the Info        {Yappendixletterandtype}%
4748  % file, #5 the name of the printed manual.  All but the node name can be      \global\let\lastnode=\relax
4749  % omitted.    \fi
4750    }
4751    
4752    
4753    % @anchor{NAME} -- define xref target at arbitrary point.
4754    %
4755    \def\anchor#1{\setref{#1}{Ynothing}}
4756    
4757    
4758    % \setref{NAME}{SNT} defines a cross-reference point NAME, namely
4759    % NAME-title, NAME-pg, and NAME-SNT.  Called from \foonoderef.  We have
4760    % to set \indexdummies so commands such as @code in a section title
4761    % aren't expanded.  It would be nicer not to expand the titles in the
4762    % first place, but there's so many layers that that is hard to do.
4763    %
4764    \def\setref#1#2{{%
4765      \indexdummies
4766      \dosetq{#1-title}{Ytitle}%
4767      \dosetq{#1-pg}{Ypagenumber}%
4768      \dosetq{#1-snt}{#2}
4769    }}
4770    
4771    % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
4772    % the node name, #2 the name of the Info cross-reference, #3 the printed
4773    % node name, #4 the name of the Info file, #5 the name of the printed
4774    % manual.  All but the node name can be omitted.
4775  %  %
4776  \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}  \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
4777  \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}  \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
# Line 3816  July\or August\or September\or October\o Line 4783  July\or August\or September\or October\o
4783    \setbox0=\hbox{\printednodename}%    \setbox0=\hbox{\printednodename}%
4784    \ifdim \wd0 = 0pt    \ifdim \wd0 = 0pt
4785      % No printed node name was explicitly given.      % No printed node name was explicitly given.
4786      \ifx\SETxref-automatic-section-title\relax %      \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
4787          % Use the node name inside the square brackets.
4788          \def\printednodename{\ignorespaces #1}%
4789        \else
4790        % Use the actual chapter/section title appear inside        % Use the actual chapter/section title appear inside
4791        % the square brackets.  Use the real section title if we have it.        % the square brackets.  Use the real section title if we have it.
4792        \ifdim \wd1>0pt%        \ifdim \wd1 > 0pt
4793          % It is in another manual, so we don't have it.          % It is in another manual, so we don't have it.
4794          \def\printednodename{\ignorespaces #1}%          \def\printednodename{\ignorespaces #1}%
4795        \else        \else
4796          \ifhavexrefs          \ifhavexrefs
4797            % We know the real title if we have the xref values.            % We know the real title if we have the xref values.
4798            \def\printednodename{\refx{#1-title}}%            \def\printednodename{\refx{#1-title}{}}%
4799          \else          \else
4800            % Otherwise just copy the Info node name.            % Otherwise just copy the Info node name.
4801            \def\printednodename{\ignorespaces #1}%            \def\printednodename{\ignorespaces #1}%
4802          \fi%          \fi%
4803        \fi        \fi
       \def\printednodename{#1-title}%  
     \else  
       % Use the node name inside the square brackets.  
       \def\printednodename{\ignorespaces #1}%  
4804      \fi      \fi
4805    \fi    \fi
4806    %    %
# Line 3852  July\or August\or September\or October\o Line 4818  July\or August\or September\or October\o
4818      % into the usual \leavevmode...\vrule stuff for purposes of      % into the usual \leavevmode...\vrule stuff for purposes of
4819      % printing. So we \turnoffactive for the \refx-snt, back on for the      % printing. So we \turnoffactive for the \refx-snt, back on for the
4820      % printing, back off for the \refx-pg.      % printing, back off for the \refx-pg.
4821      {\turnoffactive \refx{#1-snt}{}}%      {\normalturnoffactive
4822      \space [\printednodename],\space       % Only output a following space if the -snt ref is nonempty; for
4823         % @unnumbered and @anchor, it won't be.
4824         \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
4825         \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
4826        }%
4827        % [mynode],
4828        [\printednodename],\space
4829        % page 3
4830      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
4831    \fi    \fi
4832  \endgroup}  \endgroup}
4833    
4834  % \dosetq is the interface for calls from other macros  % \dosetq is the interface for calls from other macros
4835    
4836  % Use \turnoffactive so that punctuation chars such as underscore  % Use \normalturnoffactive so that punctuation chars such as underscore
4837  % work in node names.  % and backslash work in node names.  (\turnoffactive doesn't do \.)
4838  \def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat%  \def\dosetq#1#2{%
4839  \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%    {\let\folio=0
4840  \next}}     \normalturnoffactive
4841       \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
4842       \iflinks
4843         \next
4844       \fi
4845      }%
4846    }
4847    
4848  % \internalsetq {foo}{page} expands into  % \internalsetq {foo}{page} expands into
4849  % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}  % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
# Line 3915  July\or August\or September\or October\o Line 4894  July\or August\or September\or October\o
4894  \def\refx#1#2{%  \def\refx#1#2{%
4895    \expandafter\ifx\csname X#1\endcsname\relax    \expandafter\ifx\csname X#1\endcsname\relax
4896      % If not defined, say something at least.      % If not defined, say something at least.
4897      $\langle$un\-de\-fined$\rangle$%      \angleleft un\-de\-fined\angleright
4898      \ifhavexrefs      \iflinks
4899        \message{\linenumber Undefined cross reference `#1'.}%        \ifhavexrefs
4900      \else          \message{\linenumber Undefined cross reference `#1'.}%
4901        \ifwarnedxrefs\else        \else
4902          \global\warnedxrefstrue          \ifwarnedxrefs\else
4903          \message{Cross reference values unknown; you must run TeX again.}%            \global\warnedxrefstrue
4904              \message{Cross reference values unknown; you must run TeX again.}%
4905            \fi
4906        \fi        \fi
4907      \fi      \fi
4908    \else    \else
# Line 3931  July\or August\or September\or October\o Line 4912  July\or August\or September\or October\o
4912    #2% Output the suffix in any case.    #2% Output the suffix in any case.
4913  }  }
4914    
 % Read the last existing aux file, if any.  No error if none exists.  
   
4915  % This is the macro invoked by entries in the aux file.  % This is the macro invoked by entries in the aux file.
4916  \def\xrdef #1#2{  %
4917  {\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}  \def\xrdef#1{\begingroup
4918      % Reenable \ as an escape while reading the second argument.
4919      \catcode`\\ = 0
4920      \afterassignment\endgroup
4921      \expandafter\gdef\csname X#1\endcsname
4922    }
4923    
4924  \def\readauxfile{%  % Read the last existing aux file, if any.  No error if none exists.
4925  \begingroup  \def\readauxfile{\begingroup
4926  \catcode `\^^@=\other    \catcode`\^^@=\other
4927  \catcode `\&=\other    \catcode`\^^A=\other
4928  \catcode `\\
=\other
   \catcode`\^^B=\other
4929  \catcode `\^^C=\other    \catcode`\^^C=\other
4930  \catcode `\^^D=\other    \catcode`\^^D=\other
4931  \catcode `\^^E=\other    \catcode`\^^E=\other
4932  \catcode `\^^F=\other    \catcode`\^^F=\other
4933  \catcode `\^^G=\other    \catcode`\^^G=\other
4934  \catcode `\^^H=\other    \catcode`\^^H=\other
4935  \catcode `\ =\other    \catcode`\^^K=\other
4936  \catcode `\^^L=\other    \catcode`\^^L=\other
4937  \catcode `\=\other    \catcode`\^^N=\other
4938  \catcode `\=\other    \catcode`\^^P=\other
4939  \catcode `\=\other    \catcode`\^^Q=\other
4940  \catcode `\=\other    \catcode`\^^R=\other
4941  \catcode `\=\other    \catcode`\^^S=\other
4942  \catcode `\=\other    \catcode`\^^T=\other
4943  \catcode `\=\other    \catcode`\^^U=\other
4944  \catcode `\=\other    \catcode`\^^V=\other
4945  \catcode `\=\other    \catcode`\^^W=\other
4946  \catcode `\=\other    \catcode`\^^X=\other
4947  \catcode `\=\other    \catcode`\^^Z=\other
4948  \catcode `\=\other    \catcode`\^^[=\other
4949  \catcode 26=\other    \catcode`\^^\=\other
4950  \catcode `\^^[=\other    \catcode`\^^]=\other
4951  \catcode `\^^\=\other    \catcode`\^^^=\other
4952  \catcode `\^^]=\other    \catcode`\^^_=\other
4953  \catcode `\^^^=\other    \catcode`\@=\other
4954  \catcode `\^^_=\other    \catcode`\^=\other
4955  \catcode `\@=\other    % It was suggested to define this as 7, which would allow ^^e4 etc.
4956  \catcode `\^=\other    % in xref tags, i.e., node names.  But since ^^e4 notation isn't
4957  \catcode `\~=\other    % supported in the main text, it doesn't seem desirable.  Furthermore,
4958  \catcode `\[=\other    % that is not enough: for node names that actually contain a ^
4959  \catcode `\]=\other    % character, we would end up writing a line like this: 'xrdef {'hat
4960  \catcode`\"=\other    % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
4961  \catcode`\_=\other    % argument, and \hat is not an expandable control sequence.  It could
4962  \catcode`\|=\other    % all be worked out, but why?  Either we support ^^ or we don't.
4963  \catcode`\<=\other    %
4964  \catcode`\>=\other    % The other change necessary for this was to define \auxhat:
4965  \catcode `\$=\other    % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
4966  \catcode `\#=\other    % and then to call \auxhat in \setq.
4967  \catcode `\&=\other    %
4968  % `\+ does not work, so use 43.    \catcode`\~=\other
4969  \catcode 43=\other    \catcode`\[=\other
4970  % Make the characters 128-255 be printing characters    \catcode`\]=\other
4971  {%    \catcode`\"=\other
4972    \count 1=128    \catcode`\_=\other
4973    \def\loop{%    \catcode`\|=\other
4974      \catcode\count 1=\other    \catcode`\<=\other
4975      \advance\count 1 by 1    \catcode`\>=\other
4976      \ifnum \count 1<256 \loop \fi    \catcode`\$=\other
4977      \catcode`\#=\other
4978      \catcode`\&=\other
4979      \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
4980      % Make the characters 128-255 be printing characters
4981      {%
4982        \count 1=128
4983        \def\loop{%
4984          \catcode\count 1=\other
4985          \advance\count 1 by 1
4986          \ifnum \count 1<256 \loop \fi
4987        }%
4988    }%    }%
4989  }%    % The aux file uses ' as the escape (for now).
4990  % the aux file uses ' as the escape.    % Turn off \ as an escape so we do not lose on
4991  % Turn off \ as an escape so we do not lose on    % entries which were dumped with control sequences in their names.
4992  % entries which were dumped with control sequences in their names.    % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
4993  % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^    % Reference to such entries still does not work the way one would wish,
4994  % Reference to such entries still does not work the way one would wish,    % but at least they do not bomb out when the aux file is read in.
4995  % but at least they do not bomb out when the aux file is read in.    \catcode`\{=1
4996  \catcode `\{=1 \catcode `\}=2    \catcode`\}=2
4997  \catcode `\%=\other    \catcode`\%=\other
4998  \catcode `\'=0    \catcode`\'=0
4999  \catcode`\^=7 % to make ^^e4 etc usable in xref tags    \catcode`\\=\other
5000  \catcode `\\=\other    %
5001  \openin 1 \jobname.aux    \openin 1 \jobname.aux
5002  \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue    \ifeof 1 \else
5003  \global\warnedobstrue      \closein 1
5004  \fi      \input \jobname.aux
5005  % Open the new aux file.  Tex will close it automatically at exit.      \global\havexrefstrue
5006  \openout \auxfile=\jobname.aux      \global\warnedobstrue
5007      \fi
5008      % Open the new aux file.  TeX will close it automatically at exit.
5009      \openout\auxfile=\jobname.aux
5010  \endgroup}  \endgroup}
5011    
5012    
# Line 4019  July\or August\or September\or October\o Line 5017  July\or August\or September\or October\o
5017  % The trailing space in the following definition for supereject is  % The trailing space in the following definition for supereject is
5018  % vital for proper filling; pages come out unaligned when you do a  % vital for proper filling; pages come out unaligned when you do a
5019  % pagealignmacro call if that space before the closing brace is  % pagealignmacro call if that space before the closing brace is
5020  % removed.  % removed. (Generally, numeric constants should always be followed by a
5021    % space to prevent strange expansion errors.)
5022  \def\supereject{\par\penalty -20000\footnoteno =0 }  \def\supereject{\par\penalty -20000\footnoteno =0 }
5023    
5024  % @footnotestyle is meaningful for info output only..  % @footnotestyle is meaningful for info output only.
5025  \let\footnotestyle=\comment  \let\footnotestyle=\comment
5026    
5027  \let\ptexfootnote=\footnote  \let\ptexfootnote=\footnote
# Line 4048  July\or August\or September\or October\o Line 5047  July\or August\or September\or October\o
5047  % 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
5048  % footnote text as a parameter.  Our footnotes don't need to be so general.  % footnote text as a parameter.  Our footnotes don't need to be so general.
5049  %  %
5050  \long\gdef\footnotezzz#1{\insert\footins{%  % Oh yes, they do; otherwise, @ifset and anything else that uses
5051    % \parseargline fail inside footnotes because the tokens are fixed when
5052    % the footnote is read.  --karl, 16nov96.
5053    %
5054    \long\gdef\footnotezzz{\insert\footins\bgroup
5055    % 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
5056    % footnote reference occurs in (for example) a display environment.    % footnote reference occurs in (for example) a display environment.
5057    % So reset some parameters.    % So reset some parameters.
# Line 4070  July\or August\or September\or October\o Line 5073  July\or August\or September\or October\o
5073    % expands into a box, it must come within the paragraph, lest it    % expands into a box, it must come within the paragraph, lest it
5074    % provide a place where TeX can split the footnote.    % provide a place where TeX can split the footnote.
5075    \footstrut    \footstrut
5076    #1\strut}%    \futurelet\next\fo@t
5077  }  }
5078    \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
5079      \else\let\next\f@t\fi \next}
5080    \def\f@@t{\bgroup\aftergroup\@foot\let\next}
5081    \def\f@t#1{#1\@foot}
5082    \def\@foot{\strut\egroup}
5083    
5084  }%end \catcode `\@=11  }%end \catcode `\@=11
5085    
# Line 4128  July\or August\or September\or October\o Line 5136  July\or August\or September\or October\o
5136  %  %
5137  \def\finalout{\overfullrule=0pt}  \def\finalout{\overfullrule=0pt}
5138    
5139    % @image.  We use the macros from epsf.tex to support this.
5140  % End of control word definitions.  % If epsf.tex is not installed and @image is used, we complain.
5141    %
5142  \message{and turning on texinfo input format.}  % Check for and read epsf.tex up front.  If we read it only at @image
5143    % time, we might be inside a group, and then its definitions would get
5144  \def\openindices{%  % undone and the next image would fail.
5145     \newindex{cp}%  \openin 1 = epsf.tex
5146     \newcodeindex{fn}%  \ifeof 1 \else
5147     \newcodeindex{vr}%    \closein 1
5148     \newcodeindex{tp}%    % Do not bother showing banner with post-v2.7 epsf.tex (available in
5149     \newcodeindex{ky}%    % doc/epsf.tex until it shows up on ctan).
5150     \newcodeindex{pg}%    \def\epsfannounce{\toks0 = }%
5151      \input epsf.tex
5152    \fi
5153    %
5154    \newif\ifwarnednoepsf
5155    \newhelp\noepsfhelp{epsf.tex must be installed for images to
5156      work.  It is also included in the Texinfo distribution, or you can get
5157      it from ftp://ftp.tug.org/tex/epsf.tex.}
5158    %
5159    % Only complain once about lack of epsf.tex.
5160    \def\image#1{%
5161      \ifx\epsfbox\undefined
5162        \ifwarnednoepsf \else
5163          \errhelp = \noepsfhelp
5164          \errmessage{epsf.tex not found, images will be ignored}%
5165          \global\warnednoepsftrue
5166        \fi
5167      \else
5168        \imagexxx #1,,,\finish
5169      \fi
5170  }  }
5171    %
5172    % Arguments to @image:
5173    % #1 is (mandatory) image filename; we tack on .eps extension.
5174    % #2 is (optional) width, #3 is (optional) height.
5175    % #4 is just the usual extra ignored arg for parsing this stuff.
5176    \def\imagexxx#1,#2,#3,#4\finish{%
5177      % \epsfbox itself resets \epsf?size at each figure.
5178      \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
5179      \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
5180      % If the image is by itself, center it.
5181      \ifvmode
5182        \nobreak\medskip
5183        \nobreak
5184        \centerline{\epsfbox{#1.eps}}%
5185        \bigbreak
5186      \else
5187        \epsfbox{#1.eps}%
5188      \fi
5189    }
5190    
5191    
5192  % Set some numeric style parameters, for 8.5 x 11 format.  \message{paper sizes,}
5193    % And other related parameters.
5194    
 %\hsize = 6.5in  
5195  \newdimen\defaultparindent \defaultparindent = 15pt  \newdimen\defaultparindent \defaultparindent = 15pt
5196  \parindent = \defaultparindent  
5197  \parskip 3pt plus2pt minus2pt  \chapheadingskip = 15pt plus 4pt minus 2pt
5198  \setleading{13pt}  \secheadingskip = 12pt plus 3pt minus 2pt
5199  \advance\topskip by 1.2cm  \subsecheadingskip = 9pt plus 2pt minus 2pt
5200    
5201  % Prevent underfull vbox error messages.  % Prevent underfull vbox error messages.
5202  \vbadness=10000  \vbadness = 10000
5203    
5204    % Don't be so finicky about underfull hboxes, either.
5205    \hbadness = 2000
5206    
5207  % Following George Bush, just get rid of widows and orphans.  % Following George Bush, just get rid of widows and orphans.
5208  \widowpenalty=10000  \widowpenalty=10000
# Line 4161  July\or August\or September\or October\o Line 5211  July\or August\or September\or October\o
5211  % Use TeX 3.0's \emergencystretch to help line breaking, but if we're  % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
5212  % using an old version of TeX, don't do anything.  We want the amount of  % using an old version of TeX, don't do anything.  We want the amount of
5213  % stretch added to depend on the line length, hence the dependence on  % stretch added to depend on the line length, hence the dependence on
5214  % \hsize.  This makes it come to about 9pt for the 8.5x11 format.  % \hsize.  This makes it come to about 9pt for the 8.5x11 format.  We
5215    % call this whenever the paper size is set.
5216  %  %
5217  \ifx\emergencystretch\thisisundefined  \def\setemergencystretch{%
5218    % Allow us to assign to \emergencystretch anyway.    \ifx\emergencystretch\thisisundefined
5219    \def\emergencystretch{\dimen0}%      % Allow us to assign to \emergencystretch anyway.
5220  \else      \def\emergencystretch{\dimen0}%
5221    \emergencystretch = \hsize    \else
5222    \divide\emergencystretch by 45      \emergencystretch = \hsize
5223  \fi      \divide\emergencystretch by 45
5224      \fi
5225    }
5226    
5227  % Use @smallbook to reset parameters for 7x9.5 format  (or else 7x9.25)  % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
5228  \def\smallbook{  % 4) hoffset; 5) binding offset; 6) topskip.  Then whoever calls us can
5229    % set \parskip and call \setleading for \baselineskip.
5230    %
5231    \def\internalpagesizes#1#2#3#4#5#6{%
5232      \voffset = #3\relax
5233      \topskip = #6\relax
5234      \splittopskip = \topskip
5235      %
5236      \vsize = #1\relax
5237      \advance\vsize by \topskip
5238      \outervsize = \vsize
5239      \advance\outervsize by 2\topandbottommargin
5240      \pageheight = \vsize
5241      %
5242      \hsize = #2\relax
5243      \outerhsize = \hsize
5244      \advance\outerhsize by 0.5in
5245      \pagewidth = \hsize
5246      %
5247      \normaloffset = #4\relax
5248      \bindingoffset = #5\relax
5249      %
5250      \parindent = \defaultparindent
5251      \setemergencystretch
5252    }
5253    
5254    % @letterpaper (the default).
5255    \def\letterpaper{{\globaldefs = 1
5256      \parskip = 3pt plus 2pt minus 1pt
5257      \setleading{13.2pt}%
5258      %
5259      % If page is nothing but text, make it come out even.
5260      \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
5261    }}
5262    
5263  % These values for secheadingskip and subsecheadingskip are  % Use @smallbook to reset parameters for 7x9.5 (or so) format.
5264  % experiments.  RJC 7 Aug 1992  \def\smallbook{{\globaldefs = 1
5265  \global\secheadingskip = 17pt plus 6pt minus 3pt    \parskip = 2pt plus 1pt
5266  \global\subsecheadingskip = 14pt plus 6pt minus 3pt    \setleading{12pt}%
5267      %
5268  \global\lispnarrowing = 0.3in    \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
5269  \setleading{12pt}    %
5270  \advance\topskip by -1cm    \lispnarrowing = 0.3in
5271  \global\parskip 3pt plus 1pt    \tolerance = 700
5272  \global\hsize = 5in    \hfuzz = 1pt
5273  \global\vsize=7.5in    \contentsrightmargin = 0pt
5274  \global\tolerance=700    \deftypemargin = 0pt
5275  \global\hfuzz=1pt    \defbodyindent = .5cm
5276  \global\contentsrightmargin=0pt    %
5277  \global\deftypemargin=0pt    \let\smalldisplay = \smalldisplayx
5278  \global\defbodyindent=.5cm    \let\smallexample = \smalllispx
5279      \let\smallformat = \smallformatx
5280  \global\pagewidth=\hsize    \let\smalllisp = \smalllispx
5281  \global\pageheight=\vsize  }}
   
 \global\let\smalllisp=\smalllispx  
 \global\let\smallexample=\smalllispx  
 \global\def\Esmallexample{\Esmalllisp}  
 }  
5282    
5283  % Use @afourpaper to print on European A4 paper.  % Use @afourpaper to print on European A4 paper.
5284  \def\afourpaper{  \def\afourpaper{{\globaldefs = 1
5285  \global\tolerance=700    \setleading{12pt}%
5286  \global\hfuzz=1pt    \parskip = 3pt plus 2pt minus 1pt
5287  \setleading{12pt}    %
5288  \global\parskip 15pt plus 1pt    \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
5289      %
5290  \global\vsize= 53\baselineskip    \tolerance = 700
5291  \advance\vsize by \topskip    \hfuzz = 1pt
5292  %\global\hsize=   5.85in     % A4 wide 10pt  }}
 \global\hsize=  6.5in  
 \global\outerhsize=\hsize  
 \global\advance\outerhsize by 0.5in  
 \global\outervsize=\vsize  
 \global\advance\outervsize by 0.6in  
   
 \global\pagewidth=\hsize  
 \global\pageheight=\vsize  
 }  
   
 % Allow control of the text dimensions.  Parameters in order: textheight;  
 % textwidth; \voffset; \hoffset (!); binding offset.  All require a dimension;  
 % header is additional; added length extends the bottom of the page.  
   
 \def\changepagesizes#1#2#3#4#5{  
  \global\vsize= #1  
  \advance\vsize by \topskip  
  \global\voffset= #3  
  \global\hsize= #2  
  \global\outerhsize=\hsize  
  \global\advance\outerhsize by 0.5in  
  \global\outervsize=\vsize  
  \global\advance\outervsize by 0.6in  
  \global\pagewidth=\hsize  
  \global\pageheight=\vsize  
  \global\normaloffset= #4  
  \global\bindingoffset= #5}  
5293    
5294  % This layout is compatible with Latex on A4 paper.  % A specific text layout, 24x15cm overall, intended for A4 paper.  Top margin
5295    % 29mm, hence bottom margin 28mm, nominal side margin 3cm.
5296    \def\afourlatex{{\globaldefs = 1
5297      \setleading{13.6pt}%
5298      %
5299      \afourpaper
5300      \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
5301      %
5302      \globaldefs = 0
5303    }}
5304    
5305  \def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}}  % Use @afourwide to print on European A4 paper in wide format.
5306    \def\afourwide{%
5307      \afourpaper
5308      \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
5309      %
5310      \globaldefs = 0
5311    }
5312    
5313    % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
5314    % Perhaps we should allow setting the margins, \topskip, \parskip,
5315    % and/or leading, also. Or perhaps we should compute them somehow.
5316    %
5317    \def\pagesizes{\parsearg\pagesizesxxx}
5318    \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
5319    \def\pagesizesyyy#1,#2,#3\finish{{%
5320      \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
5321      \globaldefs = 1
5322      %
5323      \parskip = 3pt plus 2pt minus 1pt
5324      \setleading{13.2pt}%
5325      %
5326      \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
5327    }}
5328    
5329    % Set default to letter.
5330    %
5331    \letterpaper
5332    
5333    \message{and turning on texinfo input format.}
5334    
5335  % Define macros to output various characters with catcode for normal text.  % Define macros to output various characters with catcode for normal text.
5336  \catcode`\"=\other  \catcode`\"=\other
# Line 4276  July\or August\or September\or October\o Line 5367  July\or August\or September\or October\o
5367  % use math or other variants that look better in normal text.  % use math or other variants that look better in normal text.
5368    
5369  \catcode`\"=\active  \catcode`\"=\active
5370  \def\activedoublequote{{\tt \char '042}}  \def\activedoublequote{{\tt\char34}}
5371  \let"=\activedoublequote  \let"=\activedoublequote
5372  \catcode`\~=\active  \catcode`\~=\active
5373  \def~{{\tt \char '176}}  \def~{{\tt\char126}}
5374  \chardef\hat=`\^  \chardef\hat=`\^
5375  \catcode`\^=\active  \catcode`\^=\active
 \def\auxhat{\def^{'hat}}  
5376  \def^{{\tt \hat}}  \def^{{\tt \hat}}
5377    
5378  \catcode`\_=\active  \catcode`\_=\active
5379  \def_{\ifusingtt\normalunderscore\_}  \def_{\ifusingtt\normalunderscore\_}
5380  % Subroutine for the previous macro.  % Subroutine for the previous macro.
5381  \def\_{\lvvmode \kern.06em \vbox{\hrule width.3em height.1ex}}  \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
   
 % \lvvmode is equivalent in function to \leavevmode.  
 % Using \leavevmode runs into trouble when written out to  
 % an index file due to the expansion of \leavevmode into ``\unhbox  
 % \voidb@x'' ---which looks to TeX like ``\unhbox \voidb\x'' due to our  
 % magic tricks with @.  
 \def\lvvmode{\vbox to 0pt{}}  
5382    
5383  \catcode`\|=\active  \catcode`\|=\active
5384  \def|{{\tt \char '174}}  \def|{{\tt\char124}}
5385  \chardef \less=`\<  \chardef \less=`\<
5386  \catcode`\<=\active  \catcode`\<=\active
5387  \def<{{\tt \less}}  \def<{{\tt \less}}
# Line 4314  July\or August\or September\or October\o Line 5397  July\or August\or September\or October\o
5397  {\catcode`\==\active  {\catcode`\==\active
5398  \global\def={{\tt \char 61}}}  \global\def={{\tt \char 61}}}
5399    
5400    \catcode`+=\active
5401    \catcode`\_=\active
5402    
5403    % If a .fmt file is being used, characters that might appear in a file
5404    % name cannot be active until we have parsed the command line.
5405    % So turn them off again, and have \everyjob (or @setfilename) turn them on.
5406    % \otherifyactive is called near the end of this file.
5407    \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
5408    
5409  \catcode`\@=0  \catcode`\@=0
5410    
5411  % \rawbackslashxx output one backslash character in current font  % \rawbackslashxx output one backslash character in current font
# Line 4356  July\or August\or September\or October\o Line 5448  July\or August\or September\or October\o
5448  @let>=@normalgreater  @let>=@normalgreater
5449  @let+=@normalplus}  @let+=@normalplus}
5450    
5451    % Make _ and + \other characters, temporarily.
5452    % This is canceled by @fixbackslash.
5453    @otherifyactive
5454    
5455  % If a .fmt file is being used, we don't want the `\input texinfo' to show up.  % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
5456  % That is what \eatinput is for; after that, the `\' should revert to printing  % That is what \eatinput is for; after that, the `\' should revert to printing
5457  % a backslash.  % a backslash.
# Line 4366  July\or August\or September\or October\o Line 5462  July\or August\or September\or October\o
5462  % On the other hand, perhaps the file did not have a `\input texinfo'. Then  % On the other hand, perhaps the file did not have a `\input texinfo'. Then
5463  % the first `\{ in the file would cause an error. This macro tries to fix  % the first `\{ in the file would cause an error. This macro tries to fix
5464  % that, assuming it is called before the first `\' could plausibly occur.  % that, assuming it is called before the first `\' could plausibly occur.
5465    % Also back turn on active characters that might appear in the input
5466    % file name, in case not using a pre-dumped format.
5467  %  %
5468  @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi}  @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
5469      @catcode`+=@active @catcode`@_=@active}
5470    
5471  %% These look ok in all fonts, so just make them not special.  The @rm below  % These look ok in all fonts, so just make them not special.  The @rm below
5472  %% makes sure that the current font starts out as the newly loaded cmr10  % makes sure that the current font starts out as the newly loaded cmr10
5473  @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other  @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
5474    
5475  @textfonts  @textfonts
5476  @rm  @rm
5477    
5478  @c Local variables:  @c Local variables:
5479    @c eval: (add-hook 'write-file-hooks 'time-stamp)
5480  @c page-delimiter: "^\\\\message"  @c page-delimiter: "^\\\\message"
5481    @c time-stamp-start: "def\\\\texinfoversion{"
5482    @c time-stamp-format: "%:y-%02m-%02d"
5483    @c time-stamp-end: "}"
5484  @c End:  @c End:

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

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