Deleted Added
full compact
texinfo.tex (38494) texinfo.tex (42629)
1%% TeX macros to handle Texinfo files.
2%% $Id: texinfo.tex,v 2.218 1997/07/26 19:12:35 karl Exp $
3
4% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
5% 94, 95, 96, 97 Free Software Foundation, Inc.
6
7%This texinfo.tex file is free software; you can redistribute it and/or
8%modify it under the terms of the GNU General Public License as
9%published by the Free Software Foundation; either version 2, or (at
10%your option) any later version.
11
12%This texinfo.tex file is distributed in the hope that it will be
13%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15%General Public License for more details.
16
17%You should have received a copy of the GNU General Public License
18%along with this texinfo.tex file; see the file COPYING. If not, write
19%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20%Boston, MA 02111-1307, USA.
21
22
23%In other words, you are welcome to use, share and improve this program.
24%You are forbidden to forbid anyone else to use, share and improve
25%what you give them. Help stamp out software-hoarding!
26
27
28% Send bug reports to bug-texinfo@prep.ai.mit.edu.
29% Please include a *precise* test case in each bug report.
30
31
32% Make it possible to create a .fmt file just by loading this file:
33% if the underlying format is not loaded, start by loading it now.
34% Added by gildea November 1993.
1% texinfo.tex -- TeX macros to handle Texinfo files.
2%
3% Load plain if necessary, i.e., if running under initex.
35\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5%
6\def\texinfoversion{1998-11-13}%
7%
8% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
9% Free Software Foundation, Inc.
10%
11% This texinfo.tex file is free software; you can redistribute it and/or
12% modify it under the terms of the GNU General Public License as
13% published by the Free Software Foundation; either version 2, or (at
14% your option) any later version.
15%
16% This texinfo.tex file is distributed in the hope that it will be
17% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
18% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19% General Public License for more details.
20%
21% You should have received a copy of the GNU General Public License
22% along with this texinfo.tex file; see the file COPYING. If not, write
23% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24% Boston, MA 02111-1307, USA.
25%
26% In other words, you are welcome to use, share and improve this program.
27% You are forbidden to forbid anyone else to use, share and improve
28% what you give them. Help stamp out software-hoarding!
29%
30% Please try the latest version of texinfo.tex before submitting bug
31% 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.
36
56
37% This automatically updates the version number based on RCS.
38\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
39\deftexinfoversion$Revision: 2.218 $
40\message{Loading texinfo package [Version \texinfoversion]:}
57\message{Loading texinfo [version \texinfoversion]:}
41
42% If in a .fmt file, print the version number
43% and turn on active characters that we couldn't do earlier because
44% they might have appeared in the input file name.
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.
45\everyjob{\message{[Texinfo version \texinfoversion]}\message{}
62\everyjob{\message{[Texinfo version \texinfoversion]}%
46 \catcode`+=\active \catcode`\_=\active}
47
48% Save some parts of plain tex whose names we will redefine.
49
50\let\ptexb=\b
51\let\ptexbullet=\bullet
52\let\ptexc=\c
53\let\ptexcomma=\,
54\let\ptexdot=\.
55\let\ptexdots=\dots
56\let\ptexend=\end
63 \catcode`+=\active \catcode`\_=\active}
64
65% Save some parts of plain tex whose names we will redefine.
66
67\let\ptexb=\b
68\let\ptexbullet=\bullet
69\let\ptexc=\c
70\let\ptexcomma=\,
71\let\ptexdot=\.
72\let\ptexdots=\dots
73\let\ptexend=\end
57\let\ptexequiv = \equiv
74\let\ptexequiv=\equiv
75\let\ptexexclam=\!
58\let\ptexi=\i
59\let\ptexlbrace=\{
60\let\ptexrbrace=\}
61\let\ptexstar=\*
62\let\ptext=\t
63
76\let\ptexi=\i
77\let\ptexlbrace=\{
78\let\ptexrbrace=\}
79\let\ptexstar=\*
80\let\ptext=\t
81
64% Be sure we're in horizontal mode when doing a tie, since we make space
65% equivalent to this in @example-like environments. Otherwise, a space
66% at the beginning of a line will start with \penalty -- and
67% since \penalty is valid in vertical mode, we'd end up putting the
68% penalty on the vertical list instead of in the new paragraph.
69{\catcode`@ = 11
70 % Avoid using \@M directly, because that causes trouble
71 % if the definition is written into an index file.
72 \global\let\tiepenalty = \@M
73 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
74}
82% We never want plain's outer \+ definition in Texinfo.
83% For @tex, we can use \tabalign.
84\let\+ = \relax
75
76
77\message{Basics,}
78\chardef\other=12
79
80% If this character appears in an error message or help string, it
81% starts a new line in the output.
82\newlinechar = `^^J
83
85
86
87\message{Basics,}
88\chardef\other=12
89
90% If this character appears in an error message or help string, it
91% starts a new line in the output.
92\newlinechar = `^^J
93
84% Set up fixed words for English.
85\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi%
86\def\putwordInfo{Info}%
87\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi%
88\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi%
89\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi%
90\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi%
91\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi%
92\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi%
93\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi%
94\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi%
95\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi%
94% Set up fixed words for English if not already set.
95\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
96\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
97\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
98\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
99\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
100\ifx\putwordon\undefined \gdef\putwordon{on}\fi
101\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
102\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
103\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
104\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
105\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
96
97% Ignore a token.
98%
99\def\gobble#1{}
100
101\hyphenation{ap-pen-dix}
102\hyphenation{mini-buf-fer mini-buf-fers}
103\hyphenation{eshell}

--- 4 unchanged lines hidden (view full) ---

108\newdimen \normaloffset
109\newdimen\pagewidth \newdimen\pageheight
110
111% Sometimes it is convenient to have everything in the transcript file
112% and nothing on the terminal. We don't just call \tracingall here,
113% since that produces some useless output on the terminal.
114%
115\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
108
109% Ignore a token.
110%
111\def\gobble#1{}
112
113\hyphenation{ap-pen-dix}
114\hyphenation{mini-buf-fer mini-buf-fers}
115\hyphenation{eshell}

--- 4 unchanged lines hidden (view full) ---

120\newdimen \normaloffset
121\newdimen\pagewidth \newdimen\pageheight
122
123% Sometimes it is convenient to have everything in the transcript file
124% and nothing on the terminal. We don't just call \tracingall here,
125% since that produces some useless output on the terminal.
126%
127\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
128\ifx\eTeXversion\undefined
116\def\loggingall{\tracingcommands2 \tracingstats2
117 \tracingpages1 \tracingoutput1 \tracinglostchars1
118 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
119 \showboxbreadth\maxdimen\showboxdepth\maxdimen
120}%
129\def\loggingall{\tracingcommands2 \tracingstats2
130 \tracingpages1 \tracingoutput1 \tracinglostchars1
131 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
132 \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
121
122% For @cropmarks command.
123% Do @cropmarks to get crop marks.
124%
125\newif\ifcropmarks
126\let\cropmarks = \cropmarkstrue
127%
128% Dimensions to add cropmarks at corners.
129% Added by P. A. MacKay, 12 Nov. 1986
130%
143
144% For @cropmarks command.
145% Do @cropmarks to get crop marks.
146%
147\newif\ifcropmarks
148\let\cropmarks = \cropmarkstrue
149%
150% Dimensions to add cropmarks at corners.
151% Added by P. A. MacKay, 12 Nov. 1986
152%
131\newdimen\cornerlong \newdimen\cornerthick
132\newdimen\topandbottommargin
133\newdimen\outerhsize \newdimen\outervsize
134\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
135\outerhsize=7in
136%\outervsize=9.5in
137% Alternative @smallbook page size is 9.25in
138\outervsize=9.25in
139\topandbottommargin=.75in
153\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
140
141% Main output routine.
142\chardef\PAGE = 255
143\output = {\onepageout{\pagecontents\PAGE}}
144
145\newbox\headlinebox
146\newbox\footlinebox
147

--- 17 unchanged lines hidden (view full) ---

165 %
166 \escapechar = `\\ % use backslash in output files.
167 \indexdummies % don't expand commands in the output.
168 \normalturnoffactive % \ in index entries must not stay \, e.g., if
169 % the page break happens to be in the middle of an example.
170 \shipout\vbox{%
171 \ifcropmarks \vbox to \outervsize\bgroup
172 \hsize = \outerhsize
157
158% Main output routine.
159\chardef\PAGE = 255
160\output = {\onepageout{\pagecontents\PAGE}}
161
162\newbox\headlinebox
163\newbox\footlinebox
164

--- 17 unchanged lines hidden (view full) ---

182 %
183 \escapechar = `\\ % use backslash in output files.
184 \indexdummies % don't expand commands in the output.
185 \normalturnoffactive % \ in index entries must not stay \, e.g., if
186 % the page break happens to be in the middle of an example.
187 \shipout\vbox{%
188 \ifcropmarks \vbox to \outervsize\bgroup
189 \hsize = \outerhsize
173 \line{\ewtop\hfil\ewtop}%
174 \nointerlineskip
175 \line{%
176 \vbox{\moveleft\cornerthick\nstop}%
177 \hfill
178 \vbox{\moveright\cornerthick\nstop}%
179 }%
190 \vskip-\topandbottommargin
191 \vtop to0pt{%
192 \line{\ewtop\hfil\ewtop}%
193 \nointerlineskip
194 \line{%
195 \vbox{\moveleft\cornerthick\nstop}%
196 \hfill
197 \vbox{\moveright\cornerthick\nstop}%
198 }%
199 \vss}%
180 \vskip\topandbottommargin
181 \line\bgroup
182 \hfil % center the page within the outer (page) hsize.
183 \ifodd\pageno\hskip\bindingoffset\fi
184 \vbox\bgroup
185 \fi
186 %
187 \unvbox\headlinebox

--- 6 unchanged lines hidden (view full) ---

194 \unvbox\footlinebox
195 \fi
196 %
197 \ifcropmarks
198 \egroup % end of \vbox\bgroup
199 \hfil\egroup % end of (centering) \line\bgroup
200 \vskip\topandbottommargin plus1fill minus1fill
201 \boxmaxdepth = \cornerthick
200 \vskip\topandbottommargin
201 \line\bgroup
202 \hfil % center the page within the outer (page) hsize.
203 \ifodd\pageno\hskip\bindingoffset\fi
204 \vbox\bgroup
205 \fi
206 %
207 \unvbox\headlinebox

--- 6 unchanged lines hidden (view full) ---

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
202 \line{%
203 \vbox{\moveleft\cornerthick\nsbot}%
204 \hfill
205 \vbox{\moveright\cornerthick\nsbot}%
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}%
206 }%
230 }%
207 \nointerlineskip
208 \line{\ewbot\hfil\ewbot}%
209 \egroup % \vbox from first cropmarks clause
210 \fi
211 }% end of \shipout\vbox
212 }% end of group with \turnoffactive
213 \advancepageno
214 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
215}
216

--- 99 unchanged lines hidden (view full) ---

316
317
318\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
319
320%% These are used to keep @begin/@end levels from running away
321%% Call \inENV within environments (after a \begingroup)
322\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
323\def\ENVcheck{%
231 \egroup % \vbox from first cropmarks clause
232 \fi
233 }% end of \shipout\vbox
234 }% end of group with \turnoffactive
235 \advancepageno
236 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
237}
238

--- 99 unchanged lines hidden (view full) ---

338
339
340\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
341
342%% These are used to keep @begin/@end levels from running away
343%% Call \inENV within environments (after a \begingroup)
344\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
345\def\ENVcheck{%
324\ifENV\errmessage{Still within an environment. Type Return to continue.}
346\ifENV\errmessage{Still within an environment; press RETURN to continue}
325\endgroup\fi} % This is not perfect, but it should reduce lossage
326
327% @begin foo is the same as @foo, for now.
347\endgroup\fi} % This is not perfect, but it should reduce lossage
348
349% @begin foo is the same as @foo, for now.
328\newhelp\EMsimple{Type <Return> to continue.}
350\newhelp\EMsimple{Press RETURN to continue.}
329
330\outer\def\begin{\parsearg\beginxxx}
331
332\def\beginxxx #1{%
333\expandafter\ifx\csname #1\endcsname\relax
334{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
335\csname #1\endcsname\fi}
336

--- 42 unchanged lines hidden (view full) ---

379 %\kern \baselineskip}%
380 \setleading \singlespaceskip
381}
382
383%% Simple single-character @ commands
384
385% @@ prints an @
386% Kludge this until the fonts are right (grr).
351
352\outer\def\begin{\parsearg\beginxxx}
353
354\def\beginxxx #1{%
355\expandafter\ifx\csname #1\endcsname\relax
356{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
357\csname #1\endcsname\fi}
358

--- 42 unchanged lines hidden (view full) ---

401 %\kern \baselineskip}%
402 \setleading \singlespaceskip
403}
404
405%% Simple single-character @ commands
406
407% @@ prints an @
408% Kludge this until the fonts are right (grr).
387\def\@{{\tt \char '100}}
409\def\@{{\tt\char64}}
388
389% This is turned off because it was never documented
390% and you can use @w{...} around a quote to suppress ligatures.
391%% Define @` and @' to be the same as ` and '
392%% but suppressing ligatures.
393%\def\`{{`}}
394%\def\'{{'}}
395
396% Used to generate quoted braces.
410
411% This is turned off because it was never documented
412% and you can use @w{...} around a quote to suppress ligatures.
413%% Define @` and @' to be the same as ` and '
414%% but suppressing ligatures.
415%\def\`{{`}}
416%\def\'{{'}}
417
418% Used to generate quoted braces.
397\def\mylbrace {{\tt \char '173}}
398\def\myrbrace {{\tt \char '175}}
419\def\mylbrace {{\tt\char123}}
420\def\myrbrace {{\tt\char125}}
399\let\{=\mylbrace
400\let\}=\myrbrace
401\begingroup
402 % Definitions to produce actual \{ & \} command in an index.
403 \catcode`\{ = 12 \catcode`\} = 12
404 \catcode`\[ = 1 \catcode`\] = 2
405 \catcode`\@ = 0 \catcode`\\ = 12
406 @gdef@lbracecmd[\{]%

--- 20 unchanged lines hidden (view full) ---

427\def\dotless#1{%
428 \def\temp{#1}%
429 \ifx\temp\imacro \ptexi
430 \else\ifx\temp\jmacro \j
431 \else \errmessage{@dotless can be used only with i or j}%
432 \fi\fi
433}
434
421\let\{=\mylbrace
422\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[\{]%

--- 20 unchanged lines hidden (view full) ---

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
435% @: forces normal size whitespace following.
436\def\:{\spacefactor=1000 }
437
438% @* forces a line break.
439\def\*{\hfil\break\hbox{}\ignorespaces}
440
441% @. is an end-of-sentence period.
442\def\.{.\spacefactor=3000 }
443
469% @: forces normal size whitespace following.
470\def\:{\spacefactor=1000 }
471
472% @* forces a line break.
473\def\*{\hfil\break\hbox{}\ignorespaces}
474
475% @. is an end-of-sentence period.
476\def\.{.\spacefactor=3000 }
477
444% @enddots{} is an end-of-sentence ellipsis.
445\gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}
446
447% @! is an end-of-sentence bang.
478% @! is an end-of-sentence bang.
448\gdef\!{!\spacefactor=3000 }
479\def\!{!\spacefactor=3000 }
449
450% @? is an end-of-sentence query.
480
481% @? is an end-of-sentence query.
451\gdef\?{?\spacefactor=3000 }
482\def\?{?\spacefactor=3000 }
452
453% @w prevents a word break. Without the \leavevmode, @w at the
454% beginning of a paragraph, when TeX is still in vertical mode, would
455% produce a whole line of output instead of starting the paragraph.
456\def\w#1{\leavevmode\hbox{#1}}
457
458% @group ... @end group forces ... to be all on one page, by enclosing
459% it in a TeX vbox. We use \vtop instead of \vbox to construct the box

--- 67 unchanged lines hidden (view full) ---

527
528\def\need{\parsearg\needx}
529
530% Old definition--didn't work.
531%\def\needx #1{\par %
532%% This method tries to make TeX break the page naturally
533%% if the depth of the box does not fit.
534%{\baselineskip=0pt%
483
484% @w prevents a word break. Without the \leavevmode, @w at the
485% beginning of a paragraph, when TeX is still in vertical mode, would
486% produce a whole line of output instead of starting the paragraph.
487\def\w#1{\leavevmode\hbox{#1}}
488
489% @group ... @end group forces ... to be all on one page, by enclosing
490% it in a TeX vbox. We use \vtop instead of \vbox to construct the box

--- 67 unchanged lines hidden (view full) ---

558
559\def\need{\parsearg\needx}
560
561% Old definition--didn't work.
562%\def\needx #1{\par %
563%% This method tries to make TeX break the page naturally
564%% if the depth of the box does not fit.
565%{\baselineskip=0pt%
535%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
566%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
536%\prevdepth=-1000pt
537%}}
538
539\def\needx#1{%
540 % Go into vertical mode, so we don't make a big box in the middle of a
541 % paragraph.
542 \par
543 %

--- 24 unchanged lines hidden (view full) ---

568 % Do not allow a page break right after this kern.
569 \nobreak
570}
571
572% @br forces paragraph break
573
574\let\br = \par
575
567%\prevdepth=-1000pt
568%}}
569
570\def\needx#1{%
571 % Go into vertical mode, so we don't make a big box in the middle of a
572 % paragraph.
573 \par
574 %

--- 24 unchanged lines hidden (view full) ---

599 % Do not allow a page break right after this kern.
600 \nobreak
601}
602
603% @br forces paragraph break
604
605\let\br = \par
606
576% @dots{} output some dots
607% @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}
577
619
578\def\dots{$\ldots$}
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}
579
631
580% @page forces the start of a new page
581
632
633% @page forces the start of a new page
634%
582\def\page{\par\vfill\supereject}
583
584% @exdent text....
585% outputs text on separate line in roman font, starting at standard page margin
586
587% This records the amount of indent in the innermost environment.
588% That's how much \exdent should take out.
589\newskip\exdentamount

--- 50 unchanged lines hidden (view full) ---

640
641\def\sp{\parsearg\spxxx}
642\def\spxxx #1{\vskip #1\baselineskip}
643
644% @comment ...line which is ignored...
645% @c is the same as @comment
646% @ignore ... @end ignore is another way to write a comment
647
635\def\page{\par\vfill\supereject}
636
637% @exdent text....
638% outputs text on separate line in roman font, starting at standard page margin
639
640% This records the amount of indent in the innermost environment.
641% That's how much \exdent should take out.
642\newskip\exdentamount

--- 50 unchanged lines hidden (view full) ---

693
694\def\sp{\parsearg\spxxx}
695\def\spxxx #1{\vskip #1\baselineskip}
696
697% @comment ...line which is ignored...
698% @c is the same as @comment
699% @ignore ... @end ignore is another way to write a comment
700
648\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
649\parsearg \commentxxx}
701\def\comment{\begingroup \catcode`\^^M=\other%
702\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
703\commentxxx}
704{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
650
705
651\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
652
653\let\c=\comment
654
655% @paragraphindent is defined for the Info formatting commands only.
656\let\paragraphindent=\comment
657
658% Prevent errors for section commands.
659% Used in @ignore and in failing conditionals.
660\def\ignoresections{%

--- 79 unchanged lines hidden (view full) ---

740%
741\def\ifinfo{\doignore{ifinfo}}
742\def\ifhtml{\doignore{ifhtml}}
743\def\ifnottex{\doignore{ifnottex}}
744\def\html{\doignore{html}}
745\def\menu{\doignore{menu}}
746\def\direntry{\doignore{direntry}}
747
706\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.
712% Used in @ignore and in failing conditionals.
713\def\ignoresections{%

--- 79 unchanged lines hidden (view full) ---

793%
794\def\ifinfo{\doignore{ifinfo}}
795\def\ifhtml{\doignore{ifhtml}}
796\def\ifnottex{\doignore{ifnottex}}
797\def\html{\doignore{html}}
798\def\menu{\doignore{menu}}
799\def\direntry{\doignore{direntry}}
800
748% Also ignore @macro ... @end macro. The user must run texi2dvi,
749% which runs makeinfo to do macro expansion. Ignore @unmacro, too.
750\def\macro{\doignore{macro}}
751\let\unmacro = \comment
752
753
754% @dircategory CATEGORY -- specify a category of the dir file
755% which this file should belong to. Ignore this in TeX.
756\let\dircategory = \comment
757
758% Ignore text until a line `@end #1'.
759%
760\def\doignore#1{\begingroup
761 % Don't complain about control sequences we have declared \outer.
762 \ignoresections
763 %
764 % Define a command to swallow text until we reach `@end #1'.
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'.
806%
807\def\doignore#1{\begingroup
808 % Don't complain about control sequences we have declared \outer.
809 \ignoresections
810 %
811 % Define a command to swallow text until we reach `@end #1'.
765 \long\def\doignoretext##1\end #1{\enddoignore}%
812 % 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}%
766 %
767 % Make sure that spaces turn into tokens that match what \doignoretext wants.
768 \catcode32 = 10
769 %
770 % Ignore braces, too, so mismatched braces don't cause trouble.
771 \catcode`\{ = 9
772 \catcode`\} = 9
773 %
815 %
816 % Make sure that spaces turn into tokens that match what \doignoretext wants.
817 \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 %
774 % And now expand that command.
775 \doignoretext
776}
777
778% What we do to finish off ignored text.
779%
780\def\enddoignore{\endgroup\ignorespaces}%
781
782\newif\ifwarnedobs\warnedobsfalse
783\def\obstexwarn{%
784 \ifwarnedobs\relax\else
785 % We need to warn folks that they may have trouble with TeX 3.0.
786 % This uses \immediate\write16 rather than \message to get newlines.
787 \immediate\write16{}
788 \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
789 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
790 \immediate\write16{If you are running another version of TeX, relax.}
791 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
792 \immediate\write16{ Then upgrade your TeX installation if you can.}
833 % And now expand that command.
834 \doignoretext
835}
836
837% What we do to finish off ignored text.
838%
839\def\enddoignore{\endgroup\ignorespaces}%
840
841\newif\ifwarnedobs\warnedobsfalse
842\def\obstexwarn{%
843 \ifwarnedobs\relax\else
844 % We need to warn folks that they may have trouble with TeX 3.0.
845 % This uses \immediate\write16 rather than \message to get newlines.
846 \immediate\write16{}
847 \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
848 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
849 \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.}
851 \immediate\write16{ Then upgrade your TeX installation if you can.}
793 \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
852 \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
794 \immediate\write16{If you are stuck with version 3.0, run the}
795 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
796 \immediate\write16{ to use a workaround.}
797 \immediate\write16{}
798 \global\warnedobstrue
799 \fi
800}
801

--- 56 unchanged lines hidden (view full) ---

858 % Don't report underfull hboxes.
859 \hbadness = 10000
860 %
861 % Do minimal line-breaking.
862 \pretolerance = 10000
863 %
864 % Do not execute instructions in @tex
865 \def\tex{\doignore{tex}}%
853 \immediate\write16{If you are stuck with version 3.0, run the}
854 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
855 \immediate\write16{ to use a workaround.}
856 \immediate\write16{}
857 \global\warnedobstrue
858 \fi
859}
860

--- 56 unchanged lines hidden (view full) ---

917 % Don't report underfull hboxes.
918 \hbadness = 10000
919 %
920 % Do minimal line-breaking.
921 \pretolerance = 10000
922 %
923 % Do not execute instructions in @tex
924 \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}}%
866}
867
868% @set VAR sets the variable VAR to an empty value.
869% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
870%
871% Since we want to separate VAR from REST-OF-LINE (which might be
872% empty), we can't just use \parsearg; we have to insert a space of our
873% own to delimit the rest of the line, and then take it out again if we

--- 18 unchanged lines hidden (view full) ---

892
893% @clear VAR clears (i.e., unsets) the variable VAR.
894%
895\def\clear{\parsearg\clearxxx}
896\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
897
898% @value{foo} gets the text saved in variable foo.
899%
928}
929
930% @set VAR sets the variable VAR to an empty value.
931% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
932%
933% 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
935% own to delimit the rest of the line, and then take it out again if we

--- 18 unchanged lines hidden (view full) ---

954
955% @clear VAR clears (i.e., unsets) the variable VAR.
956%
957\def\clear{\parsearg\clearxxx}
958\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
959
960% @value{foo} gets the text saved in variable foo.
961%
900\def\value{\begingroup
901 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
902 \valuexxx}
903\def\valuexxx#1{%
962{
963 \catcode`\_ = \active
964 %
965 % 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{%
904 \expandafter\ifx\csname SET#1\endcsname\relax
985 \expandafter\ifx\csname SET#1\endcsname\relax
905 {\{No value for ``#1''\}}%
986 {[No value for ``#1'']}%
906 \else
907 \csname SET#1\endcsname
908 \fi
987 \else
988 \csname SET#1\endcsname
989 \fi
909\endgroup}
990}
910
911% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
912% with @set.
913%
914\def\ifset{\parsearg\ifsetxxx}
915\def\ifsetxxx #1{%
916 \expandafter\ifx\csname SET#1\endcsname\relax
917 \expandafter\ifsetfail

--- 70 unchanged lines hidden (view full) ---

988%
989\let\implicitmath = $
990\def\math#1{\implicitmath #1\implicitmath}
991
992% @bullet and @minus need the same treatment as @math, just above.
993\def\bullet{\implicitmath\ptexbullet\implicitmath}
994\def\minus{\implicitmath-\implicitmath}
995
991
992% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
993% with @set.
994%
995\def\ifset{\parsearg\ifsetxxx}
996\def\ifsetxxx #1{%
997 \expandafter\ifx\csname SET#1\endcsname\relax
998 \expandafter\ifsetfail

--- 70 unchanged lines hidden (view full) ---

1069%
1070\let\implicitmath = $
1071\def\math#1{\implicitmath #1\implicitmath}
1072
1073% @bullet and @minus need the same treatment as @math, just above.
1074\def\bullet{\implicitmath\ptexbullet\implicitmath}
1075\def\minus{\implicitmath-\implicitmath}
1076
996\def\node{\ENVcheck\parsearg\nodezzz}
997\def\nodezzz#1{\nodexxx [#1,]}
998\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
999\let\nwnode=\node
1000\let\lastnode=\relax
1001
1002\def\donoderef{\ifx\lastnode\relax\else
1003\expandafter\expandafter\expandafter\setref{\lastnode}\fi
1004\global\let\lastnode=\relax}
1005
1006\def\unnumbnoderef{\ifx\lastnode\relax\else
1007\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
1008\global\let\lastnode=\relax}
1009
1010\def\appendixnoderef{\ifx\lastnode\relax\else
1011\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
1012\global\let\lastnode=\relax}
1013
1014% @refill is a no-op.
1015\let\refill=\relax
1016
1077% @refill is a no-op.
1078\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
1017% @setfilename is done at the beginning of every texinfo file.
1018% So open here the files we need to have open while reading the input.
1019% This makes it possible to make a .fmt file for texinfo.
1020\def\setfilename{%
1087% @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.
1089% This makes it possible to make a .fmt file for texinfo.
1090\def\setfilename{%
1021 \readauxfile
1022 \opencontents
1091 \iflinks
1092 \readauxfile
1093 \fi % \openindices needs to do some work in any case.
1023 \openindices
1024 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1025 \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
1026 %
1027 % If texinfo.cnf is present on the system, read it.
1028 % Useful for site-wide @afourpaper, etc.
1029 % Just to be on the safe side, close the input stream before the \input.
1030 \openin 1 texinfo.cnf
1031 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
1032 \closein1
1033 \temp
1034 %
1035 \comment % Ignore the actual filename.
1036}
1037
1094 \openindices
1095 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1096 \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.
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
1038% @bye.
1039\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1040
1120% @bye.
1121\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1122
1041% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx}
1042% \def\macroxxx#1#2 \end macro{%
1043% \expandafter\gdef\macrotemp#1{#2}%
1044% \endgroup}
1045
1123
1046%\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx}
1047%\def\linemacroxxx#1#2 \end linemacro{%
1048%\let\parsearg=\relax
1049%\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}%
1050%\expandafter\xdef\macrotemp{\parsearg\macrotempx}%
1051%\expandafter\gdef\macrotempx#1{#2}%
1052%\endgroup}
1053
1054%\def\butfirst#1{}
1055
1056
1057\message{fonts,}
1124\message{fonts,}
1058
1059% Font-change commands.
1060
1125% Font-change commands.
1126
1061% Texinfo supports the sans serif font style, which plain TeX does not.
1127% Texinfo sort of supports the sans serif font style, which plain TeX does not.
1062% So we set up a \sf analogous to plain's \rm, etc.
1063\newfam\sffam
1064\def\sf{\fam=\sffam \tensf}
1065\let\li = \sf % Sometimes we call it \li, not \sf.
1066
1067% We don't need math for this one.
1068\def\ttsl{\tenttsl}
1069

--- 55 unchanged lines hidden (view full) ---

1125\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
1126
1127% Fonts for indices and small examples (9pt).
1128% We actually use the slanted font rather than the italic,
1129% because texinfo normally uses the slanted fonts for that.
1130% Do not make many font distinctions in general in the index, since they
1131% aren't very useful.
1132\setfont\ninett\ttshape{9}{1000}
1128% So we set up a \sf analogous to plain's \rm, etc.
1129\newfam\sffam
1130\def\sf{\fam=\sffam \tensf}
1131\let\li = \sf % Sometimes we call it \li, not \sf.
1132
1133% We don't need math for this one.
1134\def\ttsl{\tenttsl}
1135

--- 55 unchanged lines hidden (view full) ---

1191\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
1192
1193% Fonts for indices and small examples (9pt).
1194% We actually use the slanted font rather than the italic,
1195% because texinfo normally uses the slanted fonts for that.
1196% Do not make many font distinctions in general in the index, since they
1197% aren't very useful.
1198\setfont\ninett\ttshape{9}{1000}
1199\setfont\ninettsl\ttslshape{10}{900}
1133\setfont\indrm\rmshape{9}{1000}
1200\setfont\indrm\rmshape{9}{1000}
1134\setfont\indit\slshape{9}{1000}
1135\let\indsl=\indit
1201\setfont\indit\itshape{9}{1000}
1202\setfont\indsl\slshape{9}{1000}
1136\let\indtt=\ninett
1203\let\indtt=\ninett
1137\let\indttsl=\ninett
1204\let\indttsl=\ninettsl
1138\let\indsf=\indrm
1139\let\indbf=\indrm
1140\setfont\indsc\scshape{10}{900}
1141\font\indi=cmmi9
1142\font\indsy=cmsy9
1143
1144% Fonts for title page:
1145\setfont\titlerm\rmbshape{12}{\magstep3}

--- 85 unchanged lines hidden (view full) ---

1231 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
1232 \resetmathfonts}
1233\def\titlefonts{%
1234 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
1235 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
1236 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
1237 \let\tenttsl=\titlettsl
1238 \resetmathfonts \setleading{25pt}}
1205\let\indsf=\indrm
1206\let\indbf=\indrm
1207\setfont\indsc\scshape{10}{900}
1208\font\indi=cmmi9
1209\font\indsy=cmsy9
1210
1211% Fonts for title page:
1212\setfont\titlerm\rmbshape{12}{\magstep3}

--- 85 unchanged lines hidden (view full) ---

1298 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
1299 \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}}
1239\def\titlefont#1{{\titlefonts #1}}
1306\def\titlefont#1{{\titlefonts\rm #1}}
1240\def\chapfonts{%
1241 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1242 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1243 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1244 \resetmathfonts \setleading{19pt}}
1245\def\secfonts{%
1246 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
1247 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc

--- 10 unchanged lines hidden (view full) ---

1258 \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
1259 \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
1260 \resetmathfonts \setleading{12pt}}
1261
1262% Set up the default fonts, so we can use them for creating boxes.
1263%
1264\textfonts
1265
1307\def\chapfonts{%
1308 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1309 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1310 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1311 \resetmathfonts \setleading{19pt}}
1312\def\secfonts{%
1313 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
1314 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc

--- 10 unchanged lines hidden (view full) ---

1325 \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
1326 \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
1327 \resetmathfonts \setleading{12pt}}
1328
1329% Set up the default fonts, so we can use them for creating boxes.
1330%
1331\textfonts
1332
1333% Define these so they can be easily changed for other fonts.
1334\def\angleleft{$\langle$}
1335\def\angleright{$\rangle$}
1336
1266% Count depth in font-changes, for error checks
1267\newcount\fontdepth \fontdepth=0
1268
1269% Fonts for short table of contents.
1270\setfont\shortcontrm\rmshape{12}{1000}
1271\setfont\shortcontbf\bxshape{12}{1000}
1272\setfont\shortcontsl\slshape{12}{1000}
1273
1274%% Add scribe-like font environments, plus @l for inline lisp (usually sans
1275%% serif) and @ii for TeX italic
1276
1277% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1278% unless the following character is such as not to need one.
1279\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
1337% Count depth in font-changes, for error checks
1338\newcount\fontdepth \fontdepth=0
1339
1340% Fonts for short table of contents.
1341\setfont\shortcontrm\rmshape{12}{1000}
1342\setfont\shortcontbf\bxshape{12}{1000}
1343\setfont\shortcontsl\slshape{12}{1000}
1344
1345%% Add scribe-like font environments, plus @l for inline lisp (usually sans
1346%% serif) and @ii for TeX italic
1347
1348% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
1349% 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}
1280\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
1351\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
1352\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
1281
1282\let\i=\smartitalic
1353
1354\let\i=\smartitalic
1283\let\var=\smartitalic
1284\let\dfn=\smartitalic
1355\let\var=\smartslanted
1356\let\dfn=\smartslanted
1285\let\emph=\smartitalic
1357\let\emph=\smartitalic
1286\let\cite=\smartitalic
1358\let\cite=\smartslanted
1287
1288\def\b#1{{\bf #1}}
1289\let\strong=\b
1290
1291% We can't just use \exhyphenpenalty, because that only has effect at
1292% the end of a paragraph. Restore normal hyphenation at the end of the
1293% group within which \nohyphenation is presumably called.
1294%
1295\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
1296\def\restorehyphenation{\hyphenchar\font = `- }
1297
1298\def\t#1{%
1299 {\tt \rawbackslash \frenchspacing #1}%
1300 \null
1301}
1302\let\ttfont=\t
1359
1360\def\b#1{{\bf #1}}
1361\let\strong=\b
1362
1363% We can't just use \exhyphenpenalty, because that only has effect at
1364% the end of a paragraph. Restore normal hyphenation at the end of the
1365% group within which \nohyphenation is presumably called.
1366%
1367\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
1368\def\restorehyphenation{\hyphenchar\font = `- }
1369
1370\def\t#1{%
1371 {\tt \rawbackslash \frenchspacing #1}%
1372 \null
1373}
1374\let\ttfont=\t
1303\def\samp #1{`\tclose{#1}'\null}
1375\def\samp#1{`\tclose{#1}'\null}
1304\setfont\smallrm\rmshape{8}{1000}
1305\font\smallsy=cmsy9
1306\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
1376\setfont\smallrm\rmshape{8}{1000}
1377\font\smallsy=cmsy9
1378\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
1307 \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{%
1379 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
1308 \vbox{\hrule\kern-0.4pt
1380 \vbox{\hrule\kern-0.4pt
1309 \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}%
1381 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
1310 \kern-0.4pt\hrule}%
1382 \kern-0.4pt\hrule}%
1311 \kern-.06em\raise0.4pt\hbox{$\rangle$}}}}
1383 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
1312% The old definition, with no lozenge:
1313%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1314\def\ctrl #1{{\tt \rawbackslash \hat}#1}
1315
1384% The old definition, with no lozenge:
1385%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1386\def\ctrl #1{{\tt \rawbackslash \hat}#1}
1387
1388% @file, @option are the same as @samp.
1316\let\file=\samp
1389\let\file=\samp
1390\let\option=\samp
1317
1318% @code is a modification of @t,
1319% which makes spaces the same size as normal in the surrounding text.
1320\def\tclose#1{%
1321 {%
1322 % Change normal interword space to be same as for the current font.
1323 \spaceskip = \fontdimen2\font
1324 %

--- 18 unchanged lines hidden (view full) ---

1343% in the Emacs manual, the Library manual, etc.
1344
1345% Unfortunately, TeX uses one parameter (\hyphenchar) to control
1346% both hyphenation at - and hyphenation within words.
1347% We must therefore turn them both off (\tclose does that)
1348% and arrange explicitly to hyphenate at a dash.
1349% -- rms.
1350{
1391
1392% @code is a modification of @t,
1393% which makes spaces the same size as normal in the surrounding text.
1394\def\tclose#1{%
1395 {%
1396 % Change normal interword space to be same as for the current font.
1397 \spaceskip = \fontdimen2\font
1398 %

--- 18 unchanged lines hidden (view full) ---

1417% in the Emacs manual, the Library manual, etc.
1418
1419% Unfortunately, TeX uses one parameter (\hyphenchar) to control
1420% both hyphenation at - and hyphenation within words.
1421% We must therefore turn them both off (\tclose does that)
1422% and arrange explicitly to hyphenate at a dash.
1423% -- rms.
1424{
1351\catcode`\-=\active
1352\catcode`\_=\active
1353\catcode`\|=\active
1354\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
1355% The following is used by \doprintindex to insure that long function names
1356% wrap around. It is necessary for - and _ to be active before the index is
1357% read from the file, as \entry parses the arguments long before \code is
1358% ever called. -- mycroft
1359% _ is always active; and it shouldn't be \let = to an _ that is a
1360% subscript character anyway. Then, @cindex @samp{_} (for example)
1361% fails. --karl
1362\global\def\indexbreaks{%
1363 \catcode`\-=\active \let-\realdash
1425 \catcode`\-=\active
1426 \catcode`\_=\active
1427 %
1428 \global\def\code{\begingroup
1429 \catcode`\-=\active \let-\codedash
1430 \catcode`\_=\active \let_\codeunder
1431 \codex
1432 }
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}
1364}
1437}
1365}
1366
1367\def\realdash{-}
1368\def\codedash{-\discretionary{}{}{}}
1369\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
1370\def\codex #1{\tclose{#1}\endgroup}
1371
1372%\let\exp=\tclose %Was temporary
1373

--- 23 unchanged lines hidden (view full) ---

1397\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
1398
1399\def\xkey{\key}
1400\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
1401\ifx\one\xkey\ifx\threex\three \key{#2}%
1402\else{\tclose{\kbdfont\look}}\fi
1403\else{\tclose{\kbdfont\look}}\fi}
1404
1438
1439\def\realdash{-}
1440\def\codedash{-\discretionary{}{}{}}
1441\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
1442\def\codex #1{\tclose{#1}\endgroup}
1443
1444%\let\exp=\tclose %Was temporary
1445

--- 23 unchanged lines hidden (view full) ---

1469\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
1470
1471\def\xkey{\key}
1472\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
1473\ifx\one\xkey\ifx\threex\three \key{#2}%
1474\else{\tclose{\kbdfont\look}}\fi
1475\else{\tclose{\kbdfont\look}}\fi}
1476
1405% @url. Quotes do not seem necessary, so use \code.
1477% For @url, @env, @command quotes seem unnecessary, so use \code.
1406\let\url=\code
1478\let\url=\code
1479\let\env=\code
1480\let\command=\code
1407
1408% @uref (abbreviation for `urlref') takes an optional second argument
1409% specifying the text to display. First (mandatory) arg is the url.
1410% Perhaps eventually put in a hypertex \special here.
1411%
1412\def\uref#1{\urefxxx #1,,\finish}
1413\def\urefxxx#1,#2,#3\finish{%
1414 \setbox0 = \hbox{\ignorespaces #2}%
1415 \ifdim\wd0 > 0pt
1416 \unhbox0\ (\code{#1})%
1417 \else
1418 \code{#1}%
1419 \fi
1420}
1421
1422% rms does not like the angle brackets --karl, 17may97.
1423% So now @email is just like @uref.
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.
1424%\def\email#1{$\langle${\tt #1}$\rangle$}
1498%\def\email#1{\angleleft{\tt #1}\angleright}
1425\let\email=\uref
1426
1427% Check if we are currently using a typewriter font. Since all the
1428% Computer Modern typewriter fonts have zero interword stretch (and
1429% shrink), and it is reasonable to expect all typewriter fonts to have
1430% this property, we can check that font parameter.
1431%
1432\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
1433
1434% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
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
1435% argument is to make the input look right: @dmn{pt} instead of
1436% @dmn{}pt.
1509% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
1437%
1438\def\dmn#1{\thinspace #1}
1439
1440\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
1441
1442% @l was never documented to mean ``switch to the Lisp font'',
1443% and it is not used as such in any manual I can find. We need it for
1444% Polish suppressed-l. --karl, 22sep96.
1445%\def\l#1{{\li #1}\null}
1446
1510%
1511\def\dmn#1{\thinspace #1}
1512
1513\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
1514
1515% @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.
1447\def\r#1{{\rm #1}} % roman font
1521\def\r#1{{\rm #1}} % roman font
1448% Use of \lowercase was suggested.
1449\def\sc#1{{\smallcaps#1}} % smallcaps font
1450\def\ii#1{{\it #1}} % italic font
1451
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
1452% @pounds{} is a sterling sign.
1453\def\pounds{{\it\$}}
1454
1455
1456\message{page headings,}
1457
1458\newskip\titlepagetopglue \titlepagetopglue = 1.5in
1459\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1460
1461% First the title page. Must do @settitle before @titlepage.
1462\newif\ifseenauthor
1463\newif\iffinishedtitlepage
1464
1528% @pounds{} is a sterling sign.
1529\def\pounds{{\it\$}}
1530
1531
1532\message{page headings,}
1533
1534\newskip\titlepagetopglue \titlepagetopglue = 1.5in
1535\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1536
1537% First the title page. Must do @settitle before @titlepage.
1538\newif\ifseenauthor
1539\newif\iffinishedtitlepage
1540
1541% Do an implicit @contents or @shortcontents after @end titlepage if the
1542% user says @contentsaftertitlepage or @shortcontentsaftertitlepage.
1543%
1544\newif\ifsetcontentsaftertitlepage
1545 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
1546\newif\ifsetshortcontentsaftertitlepage
1547 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
1548
1465\def\shorttitlepage{\parsearg\shorttitlepagezzz}
1466\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1467 \endgroup\page\hbox{}\page}
1468
1469\def\titlepage{\begingroup \parindent=0pt \textfonts
1470 \let\subtitlerm=\tenrm
1549\def\shorttitlepage{\parsearg\shorttitlepagezzz}
1550\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1551 \endgroup\page\hbox{}\page}
1552
1553\def\titlepage{\begingroup \parindent=0pt \textfonts
1554 \let\subtitlerm=\tenrm
1471% I deinstalled the following change because \cmr12 is undefined.
1472% This change was not in the ChangeLog anyway. --rms.
1473% \let\subtitlerm=\cmr12
1474 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1475 %
1476 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
1477 %
1478 % Leave some space at the very top of the page.
1479 \vglue\titlepagetopglue
1480 %
1481 % Now you can print the title using @title.

--- 32 unchanged lines hidden (view full) ---

1514 \finishtitlepage
1515 \fi
1516 % It is important to do the page break before ending the group,
1517 % because the headline and footline are only empty inside the group.
1518 % If we use the new definition of \page, we always get a blank page
1519 % after the title page, which we certainly don't want.
1520 \oldpage
1521 \endgroup
1555 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
1556 %
1557 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
1558 %
1559 % Leave some space at the very top of the page.
1560 \vglue\titlepagetopglue
1561 %
1562 % Now you can print the title using @title.

--- 32 unchanged lines hidden (view full) ---

1595 \finishtitlepage
1596 \fi
1597 % It is important to do the page break before ending the group,
1598 % because the headline and footline are only empty inside the group.
1599 % If we use the new definition of \page, we always get a blank page
1600 % after the title page, which we certainly don't want.
1601 \oldpage
1602 \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 %
1522 \HEADINGSon
1523}
1524
1525\def\finishtitlepage{%
1526 \vskip4pt \hrule height 2pt width \hsize
1527 \vskip\titlepagebottomglue
1528 \finishedtitlepagetrue
1529}
1530
1531%%% Set up page headings and footings.
1532
1533\let\thispage=\folio
1534
1618 \HEADINGSon
1619}
1620
1621\def\finishtitlepage{%
1622 \vskip4pt \hrule height 2pt width \hsize
1623 \vskip\titlepagebottomglue
1624 \finishedtitlepagetrue
1625}
1626
1627%%% Set up page headings and footings.
1628
1629\let\thispage=\folio
1630
1535\newtoks \evenheadline % Token sequence for heading line of even pages
1536\newtoks \oddheadline % Token sequence for heading line of odd pages
1537\newtoks \evenfootline % Token sequence for footing line of even pages
1538\newtoks \oddfootline % Token sequence for footing line of odd pages
1631\newtoks\evenheadline % headline on even pages
1632\newtoks\oddheadline % headline on odd pages
1633\newtoks\evenfootline % footline on even pages
1634\newtoks\oddfootline % footline on odd pages
1539
1540% Now make Tex use those variables
1541\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
1542 \else \the\evenheadline \fi}}
1543\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
1544 \else \the\evenfootline \fi}\HEADINGShook}
1545\let\HEADINGShook=\relax
1546

--- 122 unchanged lines hidden (view full) ---

1669% It generates no output of its own
1670
1671\def\thistitle{No Title}
1672\def\settitle{\parsearg\settitlezzz}
1673\def\settitlezzz #1{\gdef\thistitle{#1}}
1674
1675
1676\message{tables,}
1635
1636% Now make Tex use those variables
1637\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
1638 \else \the\evenheadline \fi}}
1639\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
1640 \else \the\evenfootline \fi}\HEADINGShook}
1641\let\HEADINGShook=\relax
1642

--- 122 unchanged lines hidden (view full) ---

1765% It generates no output of its own
1766
1767\def\thistitle{No Title}
1768\def\settitle{\parsearg\settitlezzz}
1769\def\settitlezzz #1{\gdef\thistitle{#1}}
1770
1771
1772\message{tables,}
1677
1678% @tabs -- simple alignment
1679
1680% These don't work. For one thing, \+ is defined as outer.
1681% So these macros cannot even be defined.
1682
1683%\def\tabs{\parsearg\tabszzz}
1684%\def\tabszzz #1{\settabs\+#1\cr}
1685%\def\tabline{\parsearg\tablinezzz}
1686%\def\tablinezzz #1{\+#1\cr}
1687%\def\&{&}
1688
1689% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
1690
1691% default indentation of table text
1692\newdimen\tableindent \tableindent=.8in
1693% default indentation of @itemize and @enumerate text
1694\newdimen\itemindent \itemindent=.3in
1695% margin between end of table item and start of table text.
1696\newdimen\itemmargin \itemmargin=.1in

--- 27 unchanged lines hidden (view full) ---

1724
1725\def\itemzzz #1{\begingroup %
1726 \advance\hsize by -\rightskip
1727 \advance\hsize by -\tableindent
1728 \setbox0=\hbox{\itemfont{#1}}%
1729 \itemindex{#1}%
1730 \nobreak % This prevents a break before @itemx.
1731 %
1773% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
1774
1775% default indentation of table text
1776\newdimen\tableindent \tableindent=.8in
1777% default indentation of @itemize and @enumerate text
1778\newdimen\itemindent \itemindent=.3in
1779% margin between end of table item and start of table text.
1780\newdimen\itemmargin \itemmargin=.1in

--- 27 unchanged lines hidden (view full) ---

1808
1809\def\itemzzz #1{\begingroup %
1810 \advance\hsize by -\rightskip
1811 \advance\hsize by -\tableindent
1812 \setbox0=\hbox{\itemfont{#1}}%
1813 \itemindex{#1}%
1814 \nobreak % This prevents a break before @itemx.
1815 %
1732 % Be sure we are not still in the middle of a paragraph.
1733 %{\parskip = 0in
1734 %\par
1735 %}%
1736 %
1737 % If the item text does not fit in the space we have, put it on a line
1738 % by itself, and do not allow a page break either before or after that
1739 % line. We do not start a paragraph here because then if the next
1740 % command is, e.g., @kindex, the whatsit would get put into the
1741 % horizontal list on a line by itself, resulting in extra blank space.
1742 \ifdim \wd0>\itemmax
1743 %
1744 % Make this a paragraph so we get the \parskip glue and wrapping,

--- 12 unchanged lines hidden (view full) ---

1757 % Stop a page break at the \parskip glue coming up. Unfortunately
1758 % we can't prevent a possible page break at the following
1759 % \baselineskip glue.
1760 \nobreak
1761 \endgroup
1762 \itemxneedsnegativevskipfalse
1763 \else
1764 % The item text fits into the space. Start a paragraph, so that the
1816 % 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
1818 % line. We do not start a paragraph here because then if the next
1819 % command is, e.g., @kindex, the whatsit would get put into the
1820 % horizontal list on a line by itself, resulting in extra blank space.
1821 \ifdim \wd0>\itemmax
1822 %
1823 % Make this a paragraph so we get the \parskip glue and wrapping,

--- 12 unchanged lines hidden (view full) ---

1836 % Stop a page break at the \parskip glue coming up. Unfortunately
1837 % we can't prevent a possible page break at the following
1838 % \baselineskip glue.
1839 \nobreak
1840 \endgroup
1841 \itemxneedsnegativevskipfalse
1842 \else
1843 % The item text fits into the space. Start a paragraph, so that the
1765 % following text (if any) will end up on the same line. Since that
1766 % text will be indented by \tableindent, we make the item text be in
1767 % a zero-width box.
1844 % following text (if any) will end up on the same line.
1768 \noindent
1845 \noindent
1769 \rlap{\hskip -\tableindent\box0}\ignorespaces%
1770 \endgroup%
1771 \itemxneedsnegativevskiptrue%
1846 % Do this with kerns and \unhbox so that if there is a footnote in
1847 % the item text, it can migrate to the main vertical list and
1848 % 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
1772 \fi
1773}
1774
1775\def\item{\errmessage{@item while not in a table}}
1776\def\itemx{\errmessage{@itemx while not in a table}}
1777\def\kitem{\errmessage{@kitem while not in a table}}
1778\def\kitemx{\errmessage{@kitemx while not in a table}}
1779\def\xitem{\errmessage{@xitem while not in a table}}
1780\def\xitemx{\errmessage{@xitemx while not in a table}}
1781
1855 \fi
1856}
1857
1858\def\item{\errmessage{@item while not in a table}}
1859\def\itemx{\errmessage{@itemx while not in a table}}
1860\def\kitem{\errmessage{@kitem while not in a table}}
1861\def\kitemx{\errmessage{@kitemx while not in a table}}
1862\def\xitem{\errmessage{@xitem while not in a table}}
1863\def\xitemx{\errmessage{@xitemx while not in a table}}
1864
1782%% Contains a kludge to get @end[description] to work
1865% Contains a kludge to get @end[description] to work.
1783\def\description{\tablez{\dontindex}{1}{}{}{}{}}
1784
1866\def\description{\tablez{\dontindex}{1}{}{}{}{}}
1867
1868% @table, @ftable, @vtable.
1785\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
1786{\obeylines\obeyspaces%
1787\gdef\tablex #1^^M{%
1788\tabley\dontindex#1 \endtabley}}
1789
1790\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
1791{\obeylines\obeyspaces%
1792\gdef\ftablex #1^^M{%

--- 43 unchanged lines hidden (view full) ---

1836
1837% This is the counter used by @enumerate, which is really @itemize
1838
1839\newcount \itemno
1840
1841\def\itemize{\parsearg\itemizezzz}
1842
1843\def\itemizezzz #1{%
1869\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
1870{\obeylines\obeyspaces%
1871\gdef\tablex #1^^M{%
1872\tabley\dontindex#1 \endtabley}}
1873
1874\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
1875{\obeylines\obeyspaces%
1876\gdef\ftablex #1^^M{%

--- 43 unchanged lines hidden (view full) ---

1920
1921% This is the counter used by @enumerate, which is really @itemize
1922
1923\newcount \itemno
1924
1925\def\itemize{\parsearg\itemizezzz}
1926
1927\def\itemizezzz #1{%
1844 \begingroup % ended by the @end itemsize
1928 \begingroup % ended by the @end itemize
1845 \itemizey {#1}{\Eitemize}
1846}
1847
1848\def\itemizey #1#2{%
1849\aboveenvbreak %
1850\itemmax=\itemindent %
1851\advance \itemmax by -\itemmargin %
1852\advance \leftskip by \itemindent %

--- 185 unchanged lines hidden (view full) ---

2038
2039% Default dimensions may be reset by user.
2040% @multitableparskip is vertical space between paragraphs in table.
2041% @multitableparindent is paragraph indent in table.
2042% @multitablecolmargin is horizontal space to be left between columns.
2043% @multitablelinespace is space to leave between table items, baseline
2044% to baseline.
2045% 0pt means it depends on current normal line spacing.
1929 \itemizey {#1}{\Eitemize}
1930}
1931
1932\def\itemizey #1#2{%
1933\aboveenvbreak %
1934\itemmax=\itemindent %
1935\advance \itemmax by -\itemmargin %
1936\advance \leftskip by \itemindent %

--- 185 unchanged lines hidden (view full) ---

2122
2123% Default dimensions may be reset by user.
2124% @multitableparskip is vertical space between paragraphs in table.
2125% @multitableparindent is paragraph indent in table.
2126% @multitablecolmargin is horizontal space to be left between columns.
2127% @multitablelinespace is space to leave between table items, baseline
2128% to baseline.
2129% 0pt means it depends on current normal line spacing.
2046
2047%%%%
2048% Dimensions
2049
2130%
2050\newskip\multitableparskip
2051\newskip\multitableparindent
2052\newdimen\multitablecolspace
2053\newskip\multitablelinespace
2054\multitableparskip=0pt
2055\multitableparindent=6pt
2056\multitablecolspace=12pt
2057\multitablelinespace=0pt
2058
2131\newskip\multitableparskip
2132\newskip\multitableparindent
2133\newdimen\multitablecolspace
2134\newskip\multitablelinespace
2135\multitableparskip=0pt
2136\multitableparindent=6pt
2137\multitablecolspace=12pt
2138\multitablelinespace=0pt
2139
2059%%%%
2060% Macros used to set up halign preamble:
2140% Macros used to set up halign preamble:
2141%
2061\let\endsetuptable\relax
2062\def\xendsetuptable{\endsetuptable}
2063\let\columnfractions\relax
2064\def\xcolumnfractions{\columnfractions}
2065\newif\ifsetpercent
2066
2142\let\endsetuptable\relax
2143\def\xendsetuptable{\endsetuptable}
2144\let\columnfractions\relax
2145\def\xcolumnfractions{\columnfractions}
2146\newif\ifsetpercent
2147
2067%% 2/1/96, to allow fractions to be given with more than one digit.
2148% 2/1/96, to allow fractions to be given with more than one digit.
2068\def\pickupwholefraction#1 {\global\advance\colcount by1 %
2069\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
2070\setuptable}
2071
2072\newcount\colcount
2073\def\setuptable#1{\def\firstarg{#1}%
2074\ifx\firstarg\xendsetuptable\let\go\relax%
2075\else

--- 9 unchanged lines hidden (view full) ---

2085 \setbox0=\hbox{#1 }% Add a normal word space as a separator;
2086 % typically that is always in the input, anyway.
2087 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
2088 \fi%
2089 \fi%
2090\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
2091\fi\go}
2092
2149\def\pickupwholefraction#1 {\global\advance\colcount by1 %
2150\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
2151\setuptable}
2152
2153\newcount\colcount
2154\def\setuptable#1{\def\firstarg{#1}%
2155\ifx\firstarg\xendsetuptable\let\go\relax%
2156\else

--- 9 unchanged lines hidden (view full) ---

2166 \setbox0=\hbox{#1 }% Add a normal word space as a separator;
2167 % typically that is always in the input, anyway.
2168 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
2169 \fi%
2170 \fi%
2171\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
2172\fi\go}
2173
2093%%%%
2094% multitable syntax
2095\def\tab{&\hskip1sp\relax} % 2/2/96
2096 % tiny skip here makes sure this column space is
2097 % maintained, even if it is never used.
2098
2174% multitable syntax
2175\def\tab{&\hskip1sp\relax} % 2/2/96
2176 % tiny skip here makes sure this column space is
2177 % maintained, even if it is never used.
2178
2099
2100%%%%
2101% @multitable ... @end multitable definitions:
2102
2103\def\multitable{\parsearg\dotable}
2179% @multitable ... @end multitable definitions:
2180
2181\def\multitable{\parsearg\dotable}
2104
2105\def\dotable#1{\bgroup
2182\def\dotable#1{\bgroup
2106\let\item\cr
2107\tolerance=9500
2108\hbadness=9500
2109\setmultitablespacing
2110\parskip=\multitableparskip
2111\parindent=\multitableparindent
2112\overfullrule=0pt
2113\global\colcount=0\relax%
2114\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
2115 % To parse everything between @multitable and @item :
2116\setuptable#1 \endsetuptable
2117 % Need to reset this to 0 after \setuptable.
2118\global\colcount=0\relax%
2119 %
2120 % This preamble sets up a generic column definition, which will
2121 % be used as many times as user calls for columns.
2122 % \vtop will set a single line and will also let text wrap and
2123 % continue for many paragraphs if desired.
2124\halign\bgroup&\global\advance\colcount by 1\relax%
2125\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2126 % In order to keep entries from bumping into each other
2127 % we will add a \leftskip of \multitablecolspace to all columns after
2128 % the first one.
2129 % If a template has been used, we will add \multitablecolspace
2130 % to the width of each template entry.
2131 % If user has set preamble in terms of percent of \hsize
2132 % we will use that dimension as the width of the column, and
2133 % the \leftskip will keep entries from bumping into each other.
2134 % Table will start at left margin and final column will justify at
2135 % right margin.
2136\ifnum\colcount=1
2137\else
2138 \ifsetpercent
2183 \vskip\parskip
2184 \let\item\crcr
2185 \tolerance=9500
2186 \hbadness=9500
2187 \setmultitablespacing
2188 \parskip=\multitableparskip
2189 \parindent=\multitableparindent
2190 \overfullrule=0pt
2191 \global\colcount=0
2192 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
2193 %
2194 % To parse everything between @multitable and @item:
2195 \setuptable#1 \endsetuptable
2196 %
2197 % \everycr will reset column counter, \colcount, at the end of
2198 % each line. Every column entry will cause \colcount to advance by one.
2199 % The table preamble
2200 % looks at the current \colcount to find the correct column width.
2201 \everycr{\noalign{%
2202 %
2203 % \filbreak%% keeps underfull box messages off when table breaks over pages.
2204 % Maybe so, but it also creates really weird page breaks when the table
2205 % breaks over pages. Wouldn't \vfil be better? Wait until the problem
2206 % manifests itself, so it can be fixed for real --karl.
2207 \global\colcount=0\relax}}%
2208 %
2209 % This preamble sets up a generic column definition, which will
2210 % be used as many times as user calls for columns.
2211 % \vtop will set a single line and will also let text wrap and
2212 % continue for many paragraphs if desired.
2213 \halign\bgroup&\global\advance\colcount by 1\relax
2214 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2215 %
2216 % In order to keep entries from bumping into each other
2217 % we will add a \leftskip of \multitablecolspace to all columns after
2218 % the first one.
2219 %
2220 % If a template has been used, we will add \multitablecolspace
2221 % to the width of each template entry.
2222 %
2223 % If the user has set preamble in terms of percent of \hsize we will
2224 % use that dimension as the width of the column, and the \leftskip
2225 % will keep entries from bumping into each other. Table will start at
2226 % left margin and final column will justify at right margin.
2227 %
2228 % Make sure we don't inherit \rightskip from the outer environment.
2229 \rightskip=0pt
2230 \ifnum\colcount=1
2231 % The first column will be indented with the surrounding text.
2232 \advance\hsize by\leftskip
2139 \else
2233 \else
2140 % If user has <not> set preamble in terms of percent of \hsize
2141 % we will advance \hsize by \multitablecolspace
2142 \advance\hsize by \multitablecolspace
2234 \ifsetpercent \else
2235 % If user has not set preamble in terms of percent of \hsize
2236 % we will advance \hsize by \multitablecolspace.
2237 \advance\hsize by \multitablecolspace
2238 \fi
2239 % In either case we will make \leftskip=\multitablecolspace:
2240 \leftskip=\multitablecolspace
2143 \fi
2241 \fi
2144 % In either case we will make \leftskip=\multitablecolspace:
2145\leftskip=\multitablecolspace
2146\fi
2147 % Ignoring space at the beginning and end avoids an occasional spurious
2148 % blank line, when TeX decides to break the line at the space before the
2149 % box from the multistrut, so the strut ends up on a line by itself.
2150 % For example:
2151 % @multitable @columnfractions .11 .89
2152 % @item @code{#}
2153 % @tab Legal holiday which is valid in major parts of the whole country.
2154 % Is automatically provided with highlighting sequences respectively marking
2155 % characters.
2156 \noindent\ignorespaces##\unskip\multistrut}\cr
2157 % \everycr will reset column counter, \colcount, at the end of
2158 % each line. Every column entry will cause \colcount to advance by one.
2159 % The table preamble
2160 % looks at the current \colcount to find the correct column width.
2161\global\everycr{\noalign{%
2162% \filbreak%% keeps underfull box messages off when table breaks over pages.
2163% Maybe so, but it also creates really weird page breaks when the table
2164% breaks over pages Wouldn't \vfil be better? Wait until the problem
2165% manifests itself, so it can be fixed for real --karl.
2166\global\colcount=0\relax}}
2242 % Ignoring space at the beginning and end avoids an occasional spurious
2243 % blank line, when TeX decides to break the line at the space before the
2244 % box from the multistrut, so the strut ends up on a line by itself.
2245 % For example:
2246 % @multitable @columnfractions .11 .89
2247 % @item @code{#}
2248 % @tab Legal holiday which is valid in major parts of the whole country.
2249 % Is automatically provided with highlighting sequences respectively marking
2250 % characters.
2251 \noindent\ignorespaces##\unskip\multistrut}\cr
2167}
2168
2169\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2170% If so, do nothing. If not, give it an appropriate dimension based on
2171% current baselineskip.
2172\ifdim\multitablelinespace=0pt
2173%% strut to put in table in case some entry doesn't have descenders,
2174%% to keep lines equally spaced

--- 26 unchanged lines hidden (view full) ---

2201
2202% \newindex {foo} defines an index named foo.
2203% It automatically defines \fooindex such that
2204% \fooindex ...rest of line... puts an entry in the index foo.
2205% It also defines \fooindfile to be the number of the output channel for
2206% the file that accumulates this index. The file's extension is foo.
2207% The name of an index should be no more than 2 characters long
2208% for the sake of vms.
2252}
2253
2254\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2255% If so, do nothing. If not, give it an appropriate dimension based on
2256% current baselineskip.
2257\ifdim\multitablelinespace=0pt
2258%% strut to put in table in case some entry doesn't have descenders,
2259%% to keep lines equally spaced

--- 26 unchanged lines hidden (view full) ---

2286
2287% \newindex {foo} defines an index named foo.
2288% It automatically defines \fooindex such that
2289% \fooindex ...rest of line... puts an entry in the index foo.
2290% It also defines \fooindfile to be the number of the output channel for
2291% the file that accumulates this index. The file's extension is foo.
2292% The name of an index should be no more than 2 characters long
2293% for the sake of vms.
2209
2210\def\newindex #1{
2211\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
2212\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
2213\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
2214\noexpand\doindex {#1}}
2294%
2295\def\newindex#1{%
2296 \iflinks
2297 \expandafter\newwrite \csname#1indfile\endcsname
2298 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
2299 \fi
2300 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
2301 \noexpand\doindex{#1}}
2215}
2216
2217% @defindex foo == \newindex{foo}
2218
2219\def\defindex{\parsearg\newindex}
2220
2221% Define @defcodeindex, like @defindex except put all entries in @code.
2222
2302}
2303
2304% @defindex foo == \newindex{foo}
2305
2306\def\defindex{\parsearg\newindex}
2307
2308% Define @defcodeindex, like @defindex except put all entries in @code.
2309
2223\def\newcodeindex #1{
2224\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
2225\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
2226\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
2227\noexpand\docodeindex {#1}}
2310\def\newcodeindex#1{%
2311 \iflinks
2312 \expandafter\newwrite \csname#1indfile\endcsname
2313 \openout \csname#1indfile\endcsname \jobname.#1
2314 \fi
2315 \expandafter\xdef\csname#1index\endcsname{%
2316 \noexpand\docodeindex{#1}}
2228}
2229
2230\def\defcodeindex{\parsearg\newcodeindex}
2231
2232% @synindex foo bar makes index foo feed into index bar.
2233% Do this instead of @defindex foo if you don't want it as a separate index.
2317}
2318
2319\def\defcodeindex{\parsearg\newcodeindex}
2320
2321% @synindex foo bar makes index foo feed into index bar.
2322% Do this instead of @defindex foo if you don't want it as a separate index.
2234\def\synindex #1 #2 {%
2235\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2236\expandafter\let\csname#1indfile\endcsname=\synindexfoo
2237\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
2238\noexpand\doindex {#2}}%
2323% The \closeout helps reduce unnecessary open files; the limit on the
2324% Acorn RISC OS is a mere 16 files.
2325\def\synindex#1 #2 {%
2326 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2327 \expandafter\closeout\csname#1indfile\endcsname
2328 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2329 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2330 \noexpand\doindex{#2}}%
2239}
2240
2241% @syncodeindex foo bar similar, but put all entries made for index foo
2242% inside @code.
2331}
2332
2333% @syncodeindex foo bar similar, but put all entries made for index foo
2334% inside @code.
2243\def\syncodeindex #1 #2 {%
2244\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2245\expandafter\let\csname#1indfile\endcsname=\synindexfoo
2246\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
2247\noexpand\docodeindex {#2}}%
2335\def\syncodeindex#1 #2 {%
2336 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
2337 \expandafter\closeout\csname#1indfile\endcsname
2338 \expandafter\let\csname#1indfile\endcsname=\synindexfoo
2339 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
2340 \noexpand\docodeindex{#2}}%
2248}
2249
2250% Define \doindex, the driver for all \fooindex macros.
2251% Argument #1 is generated by the calling \fooindex macro,
2252% and it is "foo", the name of the index.
2253
2254% \doindex just uses \parsearg; it calls \doind for the actual work.
2255% This is because \doind is more useful to call from other macros.

--- 4 unchanged lines hidden (view full) ---

2260\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
2261\def\singleindexer #1{\doind{\indexname}{#1}}
2262
2263% like the previous two, but they put @code around the argument.
2264\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
2265\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
2266
2267\def\indexdummies{%
2341}
2342
2343% Define \doindex, the driver for all \fooindex macros.
2344% Argument #1 is generated by the calling \fooindex macro,
2345% and it is "foo", the name of the index.
2346
2347% \doindex just uses \parsearg; it calls \doind for the actual work.
2348% This is because \doind is more useful to call from other macros.

--- 4 unchanged lines hidden (view full) ---

2353\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
2354\def\singleindexer #1{\doind{\indexname}{#1}}
2355
2356% like the previous two, but they put @code around the argument.
2357\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
2358\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
2359
2360\def\indexdummies{%
2361\def\ { }%
2268% Take care of the plain tex accent commands.
2269\def\"{\realbackslash "}%
2270\def\`{\realbackslash `}%
2271\def\'{\realbackslash '}%
2272\def\^{\realbackslash ^}%
2273\def\~{\realbackslash ~}%
2274\def\={\realbackslash =}%
2275\def\b{\realbackslash b}%

--- 25 unchanged lines hidden (view full) ---

2301\def\bf{\realbackslash bf }%
2302%\def\rm{\realbackslash rm }%
2303\def\sl{\realbackslash sl }%
2304\def\sf{\realbackslash sf}%
2305\def\tt{\realbackslash tt}%
2306\def\gtr{\realbackslash gtr}%
2307\def\less{\realbackslash less}%
2308\def\hat{\realbackslash hat}%
2362% Take care of the plain tex accent commands.
2363\def\"{\realbackslash "}%
2364\def\`{\realbackslash `}%
2365\def\'{\realbackslash '}%
2366\def\^{\realbackslash ^}%
2367\def\~{\realbackslash ~}%
2368\def\={\realbackslash =}%
2369\def\b{\realbackslash b}%

--- 25 unchanged lines hidden (view full) ---

2395\def\bf{\realbackslash bf }%
2396%\def\rm{\realbackslash rm }%
2397\def\sl{\realbackslash sl }%
2398\def\sf{\realbackslash sf}%
2399\def\tt{\realbackslash tt}%
2400\def\gtr{\realbackslash gtr}%
2401\def\less{\realbackslash less}%
2402\def\hat{\realbackslash hat}%
2309%\def\char{\realbackslash char}%
2310\def\TeX{\realbackslash TeX}%
2311\def\dots{\realbackslash dots }%
2312\def\result{\realbackslash result}%
2313\def\equiv{\realbackslash equiv}%
2314\def\expansion{\realbackslash expansion}%
2315\def\print{\realbackslash print}%
2316\def\error{\realbackslash error}%
2317\def\point{\realbackslash point}%
2318\def\copyright{\realbackslash copyright}%
2319\def\tclose##1{\realbackslash tclose {##1}}%
2320\def\code##1{\realbackslash code {##1}}%
2403\def\TeX{\realbackslash TeX}%
2404\def\dots{\realbackslash dots }%
2405\def\result{\realbackslash result}%
2406\def\equiv{\realbackslash equiv}%
2407\def\expansion{\realbackslash expansion}%
2408\def\print{\realbackslash print}%
2409\def\error{\realbackslash error}%
2410\def\point{\realbackslash point}%
2411\def\copyright{\realbackslash copyright}%
2412\def\tclose##1{\realbackslash tclose {##1}}%
2413\def\code##1{\realbackslash code {##1}}%
2414\def\uref##1{\realbackslash uref {##1}}%
2415\def\url##1{\realbackslash url {##1}}%
2416\def\env##1{\realbackslash env {##1}}%
2417\def\command##1{\realbackslash command {##1}}%
2418\def\option##1{\realbackslash option {##1}}%
2321\def\dotless##1{\realbackslash dotless {##1}}%
2322\def\samp##1{\realbackslash samp {##1}}%
2323\def\,##1{\realbackslash ,{##1}}%
2324\def\t##1{\realbackslash t {##1}}%
2325\def\r##1{\realbackslash r {##1}}%
2326\def\i##1{\realbackslash i {##1}}%
2327\def\b##1{\realbackslash b {##1}}%
2328\def\sc##1{\realbackslash sc {##1}}%
2329\def\cite##1{\realbackslash cite {##1}}%
2330\def\key##1{\realbackslash key {##1}}%
2331\def\file##1{\realbackslash file {##1}}%
2332\def\var##1{\realbackslash var {##1}}%
2333\def\kbd##1{\realbackslash kbd {##1}}%
2334\def\dfn##1{\realbackslash dfn {##1}}%
2335\def\emph##1{\realbackslash emph {##1}}%
2419\def\dotless##1{\realbackslash dotless {##1}}%
2420\def\samp##1{\realbackslash samp {##1}}%
2421\def\,##1{\realbackslash ,{##1}}%
2422\def\t##1{\realbackslash t {##1}}%
2423\def\r##1{\realbackslash r {##1}}%
2424\def\i##1{\realbackslash i {##1}}%
2425\def\b##1{\realbackslash b {##1}}%
2426\def\sc##1{\realbackslash sc {##1}}%
2427\def\cite##1{\realbackslash cite {##1}}%
2428\def\key##1{\realbackslash key {##1}}%
2429\def\file##1{\realbackslash file {##1}}%
2430\def\var##1{\realbackslash var {##1}}%
2431\def\kbd##1{\realbackslash kbd {##1}}%
2432\def\dfn##1{\realbackslash dfn {##1}}%
2433\def\emph##1{\realbackslash emph {##1}}%
2336\def\value##1{\realbackslash value {##1}}%
2434\def\acronym##1{\realbackslash acronym {##1}}%
2435%
2436% Handle some cases of @value -- where the variable name does not
2437% contain - or _, and the value does not contain any
2438% (non-fully-expandable) commands.
2439\let\value = \expandablevalue
2440%
2337\unsepspaces
2338}
2339
2340% If an index command is used in an @example environment, any spaces
2341% therein should become regular spaces in the raw index file, not the
2342% expansion of \tie (\\leavevmode \penalty \@M \ ).
2343{\obeyspaces
2344 \gdef\unsepspaces{\obeyspaces\let =\space}}

--- 41 unchanged lines hidden (view full) ---

2386\let\strong=\indexdummyfont
2387\let\cite=\indexdummyfont
2388\let\sc=\indexdummyfont
2389%Don't no-op \tt, since it isn't a user-level command
2390% and is used in the definitions of the active chars like <, >, |...
2391%\let\tt=\indexdummyfont
2392\let\tclose=\indexdummyfont
2393\let\code=\indexdummyfont
2441\unsepspaces
2442}
2443
2444% If an index command is used in an @example environment, any spaces
2445% therein should become regular spaces in the raw index file, not the
2446% expansion of \tie (\\leavevmode \penalty \@M \ ).
2447{\obeyspaces
2448 \gdef\unsepspaces{\obeyspaces\let =\space}}

--- 41 unchanged lines hidden (view full) ---

2490\let\strong=\indexdummyfont
2491\let\cite=\indexdummyfont
2492\let\sc=\indexdummyfont
2493%Don't no-op \tt, since it isn't a user-level command
2494% and is used in the definitions of the active chars like <, >, |...
2495%\let\tt=\indexdummyfont
2496\let\tclose=\indexdummyfont
2497\let\code=\indexdummyfont
2498\let\url=\indexdummyfont
2499\let\uref=\indexdummyfont
2500\let\env=\indexdummyfont
2501\let\command=\indexdummyfont
2502\let\option=\indexdummyfont
2394\let\file=\indexdummyfont
2395\let\samp=\indexdummyfont
2396\let\kbd=\indexdummyfont
2397\let\key=\indexdummyfont
2398\let\var=\indexdummyfont
2399\let\TeX=\indexdummytex
2400\let\dots=\indexdummydots
2401\def\@{@}%
2402}
2403
2404% To define \realbackslash, we must make \ not be an escape.
2405% We must first make another character (@) an escape
2406% so we do not become unable to do a definition.
2407
2408{\catcode`\@=0 \catcode`\\=\other
2503\let\file=\indexdummyfont
2504\let\samp=\indexdummyfont
2505\let\kbd=\indexdummyfont
2506\let\key=\indexdummyfont
2507\let\var=\indexdummyfont
2508\let\TeX=\indexdummytex
2509\let\dots=\indexdummydots
2510\def\@{@}%
2511}
2512
2513% To define \realbackslash, we must make \ not be an escape.
2514% We must first make another character (@) an escape
2515% so we do not become unable to do a definition.
2516
2517{\catcode`\@=0 \catcode`\\=\other
2409@gdef@realbackslash{\}}
2518 @gdef@realbackslash{\}}
2410
2411\let\indexbackslash=0 %overridden during \printindex.
2519
2520\let\indexbackslash=0 %overridden during \printindex.
2521\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
2412
2522
2413\let\SETmarginindex=\relax %initialize!
2414% workhorse for all \fooindexes
2415% #1 is name of index, #2 is stuff to put there
2416\def\doind #1#2{%
2523% For \ifx comparisons.
2524\def\emptymacro{\empty}
2525
2526% Most index entries go through here, but \dosubind is the general case.
2527%
2528\def\doind#1#2{\dosubind{#1}{#2}\empty}
2529
2530% Workhorse for all \fooindexes.
2531% #1 is name of index, #2 is stuff to put there, #3 is subentry --
2532% \empty if called from \doind, as we usually are. The main exception
2533% is with defuns, which call us directly.
2534%
2535\def\dosubind#1#2#3{%
2417 % Put the index entry in the margin if desired.
2418 \ifx\SETmarginindex\relax\else
2419 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
2420 \fi
2421 {%
2422 \count255=\lastpenalty
2423 {%
2424 \indexdummies % Must do this here, since \bf, etc expand at this stage
2425 \escapechar=`\\
2426 {%
2536 % Put the index entry in the margin if desired.
2537 \ifx\SETmarginindex\relax\else
2538 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
2539 \fi
2540 {%
2541 \count255=\lastpenalty
2542 {%
2543 \indexdummies % Must do this here, since \bf, etc expand at this stage
2544 \escapechar=`\\
2545 {%
2427 \let\folio=0% We will expand all macros now EXCEPT \folio.
2546 \let\folio = 0% We will expand all macros now EXCEPT \folio.
2428 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
2429 % so it will be output as is; and it will print as backslash.
2430 %
2547 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
2548 % so it will be output as is; and it will print as backslash.
2549 %
2550 \def\thirdarg{#3}%
2551 %
2552 % If third arg is present, precede it with space in sort key.
2553 \ifx\thirdarg\emptymacro
2554 \let\subentry = \empty
2555 \else
2556 \def\subentry{ #3}%
2557 \fi
2558 %
2431 % First process the index-string with all font commands turned off
2432 % to get the string to sort by.
2559 % First process the index-string with all font commands turned off
2560 % to get the string to sort by.
2433 {\indexnofonts \xdef\indexsorttmp{#2}}%
2561 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
2434 %
2435 % Now produce the complete index entry, with both the sort key and the
2436 % original text, including any font commands.
2437 \toks0 = {#2}%
2438 \edef\temp{%
2439 \write\csname#1indfile\endcsname{%
2440 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
2441 }%
2562 %
2563 % Now produce the complete index entry, with both the sort key and the
2564 % original text, including any font commands.
2565 \toks0 = {#2}%
2566 \edef\temp{%
2567 \write\csname#1indfile\endcsname{%
2568 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
2569 }%
2442 \temp
2570 %
2571 % If third (subentry) arg is present, add it to the index string.
2572 \ifx\thirdarg\emptymacro \else
2573 \toks0 = {#3}%
2574 \edef\temp{\temp{\the\toks0}}%
2575 \fi
2576 %
2577 % If a skip is the last thing on the list now, preserve it
2578 % by backing up by \lastskip, doing the \write, then inserting
2579 % the skip again. Otherwise, the whatsit generated by the
2580 % \write will make \lastskip zero. The result is that sequences
2581 % like this:
2582 % @end defun
2583 % @tindex whatever
2584 % @defun ...
2585 % will have extra space inserted, because the \medbreak in the
2586 % start of the @defun won't see the skip inserted by the @end of
2587 % the previous defun.
2588 %
2589 % But don't do any of this if we're not in vertical mode. We
2590 % don't want to do a \vskip and prematurely end a paragraph.
2591 %
2592 % Avoid page breaks due to these extra skips, too.
2593 %
2594 \iflinks
2595 \ifvmode
2596 \skip0 = \lastskip
2597 \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
2598 \fi
2599 %
2600 \temp % do the write
2601 %
2602 %
2603 \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
2604 \fi
2443 }%
2444 }%
2445 \penalty\count255
2446 }%
2447}
2448
2605 }%
2606 }%
2607 \penalty\count255
2608 }%
2609}
2610
2449\def\dosubind #1#2#3{%
2450{\count10=\lastpenalty %
2451{\indexdummies % Must do this here, since \bf, etc expand at this stage
2452\escapechar=`\\%
2453{\let\folio=0%
2454\def\rawbackslashxx{\indexbackslash}%
2455%
2456% Now process the index-string once, with all font commands turned off,
2457% to get the string to sort the index by.
2458{\indexnofonts
2459\xdef\temp1{#2 #3}%
2460}%
2461% Now produce the complete index entry. We process the index-string again,
2462% this time with font commands expanded, to get what to print in the index.
2463\edef\temp{%
2464\write \csname#1indfile\endcsname{%
2465\realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
2466\temp }%
2467}\penalty\count10}}
2468
2469% The index entry written in the file actually looks like
2470% \entry {sortstring}{page}{topic}
2471% or
2472% \entry {sortstring}{page}{topic}{subtopic}
2473% The texindex program reads in these files and writes files
2474% containing these kinds of lines:
2475% \initial {c}
2476% before the first topic whose initial is c

--- 28 unchanged lines hidden (view full) ---

2505\def\doprintindex#1{\begingroup
2506 \dobreak \chapheadingskip{10000}%
2507 %
2508 \indexfonts \rm
2509 \tolerance = 9500
2510 \indexbreaks
2511 %
2512 % See if the index file exists and is nonempty.
2611% The index entry written in the file actually looks like
2612% \entry {sortstring}{page}{topic}
2613% or
2614% \entry {sortstring}{page}{topic}{subtopic}
2615% The texindex program reads in these files and writes files
2616% containing these kinds of lines:
2617% \initial {c}
2618% before the first topic whose initial is c

--- 28 unchanged lines hidden (view full) ---

2647\def\doprintindex#1{\begingroup
2648 \dobreak \chapheadingskip{10000}%
2649 %
2650 \indexfonts \rm
2651 \tolerance = 9500
2652 \indexbreaks
2653 %
2654 % See if the index file exists and is nonempty.
2655 % Change catcode of @ here so that if the index file contains
2656 % \initial {@}
2657 % as its first line, TeX doesn't complain about mismatched braces
2658 % (because it thinks @} is a control sequence).
2659 \catcode`\@ = 11
2513 \openin 1 \jobname.#1s
2514 \ifeof 1
2515 % \enddoublecolumns gets confused if there is no text in the index,
2516 % and it loses the chapter title and the aux file entries for the
2517 % index. The easiest way to prevent this problem is to make sure
2518 % there is some text.
2519 (Index is nonexistent)
2520 \else

--- 5 unchanged lines hidden (view full) ---

2526 \ifeof 1
2527 (Index is empty)
2528 \else
2529 % Index files are almost Texinfo source, but we use \ as the escape
2530 % character. It would be better to use @, but that's too big a change
2531 % to make right now.
2532 \def\indexbackslash{\rawbackslashxx}%
2533 \catcode`\\ = 0
2660 \openin 1 \jobname.#1s
2661 \ifeof 1
2662 % \enddoublecolumns gets confused if there is no text in the index,
2663 % and it loses the chapter title and the aux file entries for the
2664 % index. The easiest way to prevent this problem is to make sure
2665 % there is some text.
2666 (Index is nonexistent)
2667 \else

--- 5 unchanged lines hidden (view full) ---

2673 \ifeof 1
2674 (Index is empty)
2675 \else
2676 % Index files are almost Texinfo source, but we use \ as the escape
2677 % character. It would be better to use @, but that's too big a change
2678 % to make right now.
2679 \def\indexbackslash{\rawbackslashxx}%
2680 \catcode`\\ = 0
2534 \catcode`\@ = 11
2535 \escapechar = `\\
2536 \begindoublecolumns
2537 \input \jobname.#1s
2538 \enddoublecolumns
2539 \fi
2540 \fi
2541 \closein 1
2542\endgroup}
2543
2544% These macros are used by the sorted index file itself.
2545% Change them to control the appearance of the index.
2546
2681 \escapechar = `\\
2682 \begindoublecolumns
2683 \input \jobname.#1s
2684 \enddoublecolumns
2685 \fi
2686 \fi
2687 \closein 1
2688\endgroup}
2689
2690% These macros are used by the sorted index file itself.
2691% Change them to control the appearance of the index.
2692
2547% Same as \bigskipamount except no shrink.
2548% \balancecolumns gets confused if there is any shrink.
2549\newskip\initialskipamount \initialskipamount 12pt plus4pt
2693\def\initial#1{{%
2694 % Some minor font changes for the special characters.
2695 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
2696 %
2697 % Remove any glue we may have, we'll be inserting our own.
2698 \removelastskip
2699 %
2700 % We like breaks before the index initials, so insert a bonus.
2701 \penalty -300
2702 %
2703 % Typeset the initial. Making this add up to a whole number of
2704 % baselineskips increases the chance of the dots lining up from column
2705 % to column. It still won't often be perfect, because of the stretch
2706 % we need before each entry, but it's better.
2707 %
2708 % No shrink because it confuses \balancecolumns.
2709 \vskip 1.67\baselineskip plus .5\baselineskip
2710 \leftline{\secbf #1}%
2711 \vskip .33\baselineskip plus .1\baselineskip
2712 %
2713 % Do our best not to break after the initial.
2714 \nobreak
2715}}
2550
2716
2551\def\initial #1{%
2552{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
2553\ifdim\lastskip<\initialskipamount
2554\removelastskip \penalty-200 \vskip \initialskipamount\fi
2555\line{\secbf#1\hfill}\kern 2pt\penalty10000}}
2556
2557% This typesets a paragraph consisting of #1, dot leaders, and then #2
2558% flush to the right margin. It is used for index and table of contents
2559% entries. The paragraph is indented by \leftskip.
2560%
2717% This typesets a paragraph consisting of #1, dot leaders, and then #2
2718% flush to the right margin. It is used for index and table of contents
2719% entries. The paragraph is indented by \leftskip.
2720%
2561\def\entry #1#2{\begingroup
2721\def\entry#1#2{\begingroup
2562 %
2563 % Start a new paragraph if necessary, so our assignments below can't
2564 % affect previous text.
2565 \par
2566 %
2567 % Do not fill out the last line with white space.
2568 \parfillskip = 0in
2569 %

--- 6 unchanged lines hidden (view full) ---

2576 % \hangindent is only relevant when the entry text and page number
2577 % don't both fit on one line. In that case, bob suggests starting the
2578 % dots pretty far over on the line. Unfortunately, a large
2579 % indentation looks wrong when the entry text itself is broken across
2580 % lines. So we use a small indentation and put up with long leaders.
2581 %
2582 % \hangafter is reset to 1 (which is the value we want) at the start
2583 % of each paragraph, so we need not do anything with that.
2722 %
2723 % Start a new paragraph if necessary, so our assignments below can't
2724 % affect previous text.
2725 \par
2726 %
2727 % Do not fill out the last line with white space.
2728 \parfillskip = 0in
2729 %

--- 6 unchanged lines hidden (view full) ---

2736 % \hangindent is only relevant when the entry text and page number
2737 % don't both fit on one line. In that case, bob suggests starting the
2738 % dots pretty far over on the line. Unfortunately, a large
2739 % indentation looks wrong when the entry text itself is broken across
2740 % lines. So we use a small indentation and put up with long leaders.
2741 %
2742 % \hangafter is reset to 1 (which is the value we want) at the start
2743 % of each paragraph, so we need not do anything with that.
2584 \hangindent=2em
2744 \hangindent = 2em
2585 %
2586 % When the entry text needs to be broken, just fill out the first line
2587 % with blank space.
2588 \rightskip = 0pt plus1fil
2589 %
2745 %
2746 % When the entry text needs to be broken, just fill out the first line
2747 % with blank space.
2748 \rightskip = 0pt plus1fil
2749 %
2750 % A bit of stretch before each entry for the benefit of balancing columns.
2751 \vskip 0pt plus1pt
2752 %
2590 % Start a ``paragraph'' for the index entry so the line breaking
2591 % parameters we've set above will have an effect.
2592 \noindent
2593 %
2594 % Insert the text of the index entry. TeX will do line-breaking on it.
2595 #1%
2596 % The following is kludged to not output a line of dots in the index if
2597 % there are no page numbers. The next person who breaks this will be

--- 82 unchanged lines hidden (view full) ---

2680 %
2681 \doublecolumnhsize = \hsize
2682 \advance\doublecolumnhsize by -.04154\hsize
2683 \divide\doublecolumnhsize by 2
2684 \hsize = \doublecolumnhsize
2685 %
2686 % Double the \vsize as well. (We don't need a separate register here,
2687 % since nobody clobbers \vsize.)
2753 % Start a ``paragraph'' for the index entry so the line breaking
2754 % parameters we've set above will have an effect.
2755 \noindent
2756 %
2757 % Insert the text of the index entry. TeX will do line-breaking on it.
2758 #1%
2759 % The following is kludged to not output a line of dots in the index if
2760 % there are no page numbers. The next person who breaks this will be

--- 82 unchanged lines hidden (view full) ---

2843 %
2844 \doublecolumnhsize = \hsize
2845 \advance\doublecolumnhsize by -.04154\hsize
2846 \divide\doublecolumnhsize by 2
2847 \hsize = \doublecolumnhsize
2848 %
2849 % Double the \vsize as well. (We don't need a separate register here,
2850 % since nobody clobbers \vsize.)
2851 \advance\vsize by -\ht\partialpage
2688 \vsize = 2\vsize
2689}
2852 \vsize = 2\vsize
2853}
2854
2855% The double-column output routine for all double-column pages except
2856% the last.
2857%
2690\def\doublecolumnout{%
2691 \splittopskip=\topskip \splitmaxdepth=\maxdepth
2692 % Get the available space for the double columns -- the normal
2693 % (undoubled) page height minus any material left over from the
2694 % previous page.
2858\def\doublecolumnout{%
2859 \splittopskip=\topskip \splitmaxdepth=\maxdepth
2860 % Get the available space for the double columns -- the normal
2861 % (undoubled) page height minus any material left over from the
2862 % previous page.
2695 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
2863 \dimen@ = \vsize
2864 \divide\dimen@ by 2
2865 %
2696 % box0 will be the left-hand column, box2 the right.
2697 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
2698 \onepageout\pagesofar
2699 \unvbox255
2700 \penalty\outputpenalty
2701}
2702\def\pagesofar{%
2703 % Re-output the contents of the output page -- any previous material,
2866 % box0 will be the left-hand column, box2 the right.
2867 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
2868 \onepageout\pagesofar
2869 \unvbox255
2870 \penalty\outputpenalty
2871}
2872\def\pagesofar{%
2873 % Re-output the contents of the output page -- any previous material,
2704 % followed by the two boxes we just split.
2874 % followed by the two boxes we just split, in box0 and box2.
2875 \advance\vsize by \ht\partialpage
2705 \unvbox\partialpage
2876 \unvbox\partialpage
2877 %
2706 \hsize = \doublecolumnhsize
2878 \hsize = \doublecolumnhsize
2707 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
2879 \wd0=\hsize \wd2=\hsize
2880 \hbox to\pagewidth{\box0\hfil\box2}%
2708}
2709\def\enddoublecolumns{%
2881}
2882\def\enddoublecolumns{%
2710 \output = {\balancecolumns}\eject % split what we have
2883 \output = {%
2884 % Split the last of the double-column material. Leave on the
2885 % current page, no automatic page break.
2886 \balancecolumns
2887 %
2888 % If we end up splitting too much material for the current page,
2889 % though, there will be another page break right after this \output
2890 % invocation ends. Having called \balancecolumns once, we do not
2891 % want to call it again. Therefore, reset \output to its normal
2892 % definition right away. (We hope \balancecolumns will never be
2893 % called on to balance too much material, but if it is, this makes
2894 % the output somewhat more palatable.)
2895 \global\output = {\onepageout{\pagecontents\PAGE}}%
2896 %
2897 % \pagegoal was set to the doubled \vsize above, since we restarted
2898 % the current page. We're now back to normal single-column
2899 % typesetting, so reset \pagegoal to the normal \vsize.
2900 \pagegoal = \vsize
2901 }%
2902 \eject
2711 \endgroup % started in \begindoublecolumns
2903 \endgroup % started in \begindoublecolumns
2712 %
2713 % Back to normal single-column typesetting, but take account of the
2714 % fact that we just accumulated some stuff on the output page.
2715 \pagegoal = \vsize
2716}
2717\def\balancecolumns{%
2718 % Called at the end of the double column material.
2904}
2905\def\balancecolumns{%
2906 % Called at the end of the double column material.
2719 \setbox0 = \vbox{\unvbox255}%
2907 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
2720 \dimen@ = \ht0
2721 \advance\dimen@ by \topskip
2722 \advance\dimen@ by-\baselineskip
2908 \dimen@ = \ht0
2909 \advance\dimen@ by \topskip
2910 \advance\dimen@ by-\baselineskip
2723 \divide\dimen@ by 2
2911 \divide\dimen@ by 2 % target to split to
2912 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
2724 \splittopskip = \topskip
2725 % Loop until we get a decent breakpoint.
2913 \splittopskip = \topskip
2914 % Loop until we get a decent breakpoint.
2726 {\vbadness=10000 \loop
2727 \global\setbox3=\copy0
2728 \global\setbox1=\vsplit3 to\dimen@
2729 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
2730 \repeat}%
2915 {%
2916 \vbadness = 10000
2917 \loop
2918 \global\setbox3 = \copy0
2919 \global\setbox1 = \vsplit3 to \dimen@
2920 \ifdim\ht3>\dimen@
2921 \global\advance\dimen@ by 1pt
2922 \repeat
2923 }%
2924 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
2731 \setbox0=\vbox to\dimen@{\unvbox1}%
2732 \setbox2=\vbox to\dimen@{\unvbox3}%
2925 \setbox0=\vbox to\dimen@{\unvbox1}%
2926 \setbox2=\vbox to\dimen@{\unvbox3}%
2927 %
2733 \pagesofar
2734}
2735\catcode`\@ = \other
2736
2737
2738\message{sectioning,}
2739% Define chapters, sections, etc.
2740
2741\newcount\chapno
2742\newcount\secno \secno=0
2743\newcount\subsecno \subsecno=0
2744\newcount\subsubsecno \subsubsecno=0
2745
2746% This counter is funny since it counts through charcodes of letters A, B, ...
2747\newcount\appendixno \appendixno = `\@
2748\def\appendixletter{\char\the\appendixno}
2749
2928 \pagesofar
2929}
2930\catcode`\@ = \other
2931
2932
2933\message{sectioning,}
2934% Define chapters, sections, etc.
2935
2936\newcount\chapno
2937\newcount\secno \secno=0
2938\newcount\subsecno \subsecno=0
2939\newcount\subsubsecno \subsubsecno=0
2940
2941% This counter is funny since it counts through charcodes of letters A, B, ...
2942\newcount\appendixno \appendixno = `\@
2943\def\appendixletter{\char\the\appendixno}
2944
2750\newwrite\contentsfile
2751% This is called from \setfilename.
2752\def\opencontents{\openout\contentsfile = \jobname.toc }
2753
2754% Each @chapter defines this as the name of the chapter.
2945% Each @chapter defines this as the name of the chapter.
2755% page headings and footings can use it. @section does likewise
2946% page headings and footings can use it. @section does likewise.
2947\def\thischapter{}
2948\def\thissection{}
2756
2949
2757\def\thischapter{} \def\thissection{}
2758\def\seccheck#1{\ifnum \pageno<0
2759 \errmessage{@#1 not allowed after generating table of contents}%
2760\fi}
2761
2762\def\chapternofonts{%
2763 \let\rawbackslash=\relax
2764 \let\frenchspacing=\relax
2765 \def\result{\realbackslash result}%
2766 \def\equiv{\realbackslash equiv}%
2767 \def\expansion{\realbackslash expansion}%
2768 \def\print{\realbackslash print}%
2769 \def\TeX{\realbackslash TeX}%
2770 \def\dots{\realbackslash dots}%
2771 \def\result{\realbackslash result}%
2772 \def\equiv{\realbackslash equiv}%
2773 \def\expansion{\realbackslash expansion}%
2774 \def\print{\realbackslash print}%
2775 \def\error{\realbackslash error}%
2776 \def\point{\realbackslash point}%
2777 \def\copyright{\realbackslash copyright}%
2778 \def\tt{\realbackslash tt}%
2779 \def\bf{\realbackslash bf}%
2780 \def\w{\realbackslash w}%
2781 \def\less{\realbackslash less}%
2782 \def\gtr{\realbackslash gtr}%
2783 \def\hat{\realbackslash hat}%
2784 \def\char{\realbackslash char}%
2785 \def\tclose##1{\realbackslash tclose{##1}}%
2786 \def\code##1{\realbackslash code{##1}}%
2787 \def\samp##1{\realbackslash samp{##1}}%
2788 \def\r##1{\realbackslash r{##1}}%
2789 \def\b##1{\realbackslash b{##1}}%
2790 \def\key##1{\realbackslash key{##1}}%
2791 \def\file##1{\realbackslash file{##1}}%
2792 \def\kbd##1{\realbackslash kbd{##1}}%
2793 % These are redefined because @smartitalic wouldn't work inside xdef.
2794 \def\i##1{\realbackslash i{##1}}%
2795 \def\cite##1{\realbackslash cite{##1}}%
2796 \def\var##1{\realbackslash var{##1}}%
2797 \def\emph##1{\realbackslash emph{##1}}%
2798 \def\dfn##1{\realbackslash dfn{##1}}%
2799}
2800
2801\newcount\absseclevel % used to calculate proper heading level
2802\newcount\secbase\secbase=0 % @raise/lowersections modify this count
2803
2804% @raisesections: treat @section as chapter, @subsection as section, etc.
2805\def\raisesections{\global\advance\secbase by -1}
2806\let\up=\raisesections % original BFox name
2807
2808% @lowersections: treat @chapter as section, @section as subsection, etc.

--- 54 unchanged lines hidden (view full) ---

2863 \ifnum \absseclevel<0
2864 \unnumberedzzz{#2}
2865 \else
2866 \unnumberedsubsubseczzz{#2}
2867 \fi
2868\fi
2869}
2870
2950\newcount\absseclevel % used to calculate proper heading level
2951\newcount\secbase\secbase=0 % @raise/lowersections modify this count
2952
2953% @raisesections: treat @section as chapter, @subsection as section, etc.
2954\def\raisesections{\global\advance\secbase by -1}
2955\let\up=\raisesections % original BFox name
2956
2957% @lowersections: treat @chapter as section, @section as subsection, etc.

--- 54 unchanged lines hidden (view full) ---

3012 \ifnum \absseclevel<0
3013 \unnumberedzzz{#2}
3014 \else
3015 \unnumberedsubsubseczzz{#2}
3016 \fi
3017\fi
3018}
3019
2871
3020% @chapter, @appendix, @unnumbered.
2872\def\thischaptername{No Chapter Title}
2873\outer\def\chapter{\parsearg\chapteryyy}
2874\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
3021\def\thischaptername{No Chapter Title}
3022\outer\def\chapter{\parsearg\chapteryyy}
3023\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
2875\def\chapterzzz #1{\seccheck{chapter}%
3024\def\chapterzzz #1{%
2876\secno=0 \subsecno=0 \subsubsecno=0
3025\secno=0 \subsecno=0 \subsubsecno=0
2877\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
3026\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%
2878\chapmacro {#1}{\the\chapno}%
2879\gdef\thissection{#1}%
2880\gdef\thischaptername{#1}%
2881% We don't substitute the actual chapter name into \thischapter
2882% because we don't want its macros evaluated now.
2883\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
3027\chapmacro {#1}{\the\chapno}%
3028\gdef\thissection{#1}%
3029\gdef\thischaptername{#1}%
3030% We don't substitute the actual chapter name into \thischapter
3031% because we don't want its macros evaluated now.
3032\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
2884{\chapternofonts%
2885\toks0 = {#1}%
3033\toks0 = {#1}%
2886\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
2887\escapechar=`\\%
2888\write \contentsfile \temp %
2889\donoderef %
3034\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
3035 {\the\chapno}}}%
3036\temp
3037\donoderef
2890\global\let\section = \numberedsec
2891\global\let\subsection = \numberedsubsec
2892\global\let\subsubsection = \numberedsubsubsec
3038\global\let\section = \numberedsec
3039\global\let\subsection = \numberedsubsec
3040\global\let\subsubsection = \numberedsubsubsec
2893}}
3041}
2894
2895\outer\def\appendix{\parsearg\appendixyyy}
2896\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
3042
3043\outer\def\appendix{\parsearg\appendixyyy}
3044\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
2897\def\appendixzzz #1{\seccheck{appendix}%
3045\def\appendixzzz #1{%
2898\secno=0 \subsecno=0 \subsubsecno=0
3046\secno=0 \subsecno=0 \subsubsecno=0
2899\global\advance \appendixno by 1 \message{Appendix \appendixletter}%
3047\global\advance \appendixno by 1
3048\message{\putwordAppendix\space \appendixletter}%
2900\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
2901\gdef\thissection{#1}%
2902\gdef\thischaptername{#1}%
2903\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
3049\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
3050\gdef\thissection{#1}%
3051\gdef\thischaptername{#1}%
3052\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
2904{\chapternofonts%
2905\toks0 = {#1}%
3053\toks0 = {#1}%
2906\edef\temp{{\realbackslash chapentry{\the\toks0}%
2907 {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
2908\escapechar=`\\%
2909\write \contentsfile \temp %
2910\appendixnoderef %
3054\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
3055 {\putwordAppendix{} \appendixletter}}}%
3056\temp
3057\appendixnoderef
2911\global\let\section = \appendixsec
2912\global\let\subsection = \appendixsubsec
2913\global\let\subsubsection = \appendixsubsubsec
3058\global\let\section = \appendixsec
3059\global\let\subsection = \appendixsubsec
3060\global\let\subsubsection = \appendixsubsubsec
2914}}
3061}
2915
2916% @centerchap is like @unnumbered, but the heading is centered.
2917\outer\def\centerchap{\parsearg\centerchapyyy}
2918\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
2919
3062
3063% @centerchap is like @unnumbered, but the heading is centered.
3064\outer\def\centerchap{\parsearg\centerchapyyy}
3065\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
3066
3067% @top is like @unnumbered.
2920\outer\def\top{\parsearg\unnumberedyyy}
3068\outer\def\top{\parsearg\unnumberedyyy}
3069
2921\outer\def\unnumbered{\parsearg\unnumberedyyy}
2922\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
3070\outer\def\unnumbered{\parsearg\unnumberedyyy}
3071\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
2923\def\unnumberedzzz #1{\seccheck{unnumbered}%
3072\def\unnumberedzzz #1{%
2924\secno=0 \subsecno=0 \subsubsecno=0
2925%
2926% This used to be simply \message{#1}, but TeX fully expands the
2927% argument to \message. Therefore, if #1 contained @-commands, TeX
2928% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
2929% expanded @cite (which turns out to cause errors because \cite is meant
2930% to be executed, not expanded).
2931%
2932% Anyway, we don't want the fully-expanded definition of @cite to appear
2933% as a result of the \message, we just want `@cite' itself. We use
2934% \the<toks register> to achieve this: TeX expands \the<toks> only once,
3073\secno=0 \subsecno=0 \subsubsecno=0
3074%
3075% This used to be simply \message{#1}, but TeX fully expands the
3076% argument to \message. Therefore, if #1 contained @-commands, TeX
3077% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
3078% expanded @cite (which turns out to cause errors because \cite is meant
3079% to be executed, not expanded).
3080%
3081% Anyway, we don't want the fully-expanded definition of @cite to appear
3082% as a result of the \message, we just want `@cite' itself. We use
3083% \the<toks register> to achieve this: TeX expands \the<toks> only once,
2935% simply yielding the contents of the <toks register>.
3084% simply yielding the contents of <toks register>. (We also do this for
3085% the toc entries.)
2936\toks0 = {#1}\message{(\the\toks0)}%
2937%
2938\unnumbchapmacro {#1}%
2939\gdef\thischapter{#1}\gdef\thissection{#1}%
3086\toks0 = {#1}\message{(\the\toks0)}%
3087%
3088\unnumbchapmacro {#1}%
3089\gdef\thischapter{#1}\gdef\thissection{#1}%
2940{\chapternofonts%
2941\toks0 = {#1}%
3090\toks0 = {#1}%
2942\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
2943\escapechar=`\\%
2944\write \contentsfile \temp %
2945\unnumbnoderef %
3091\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}%
3092\temp
3093\unnumbnoderef
2946\global\let\section = \unnumberedsec
2947\global\let\subsection = \unnumberedsubsec
2948\global\let\subsubsection = \unnumberedsubsubsec
3094\global\let\section = \unnumberedsec
3095\global\let\subsection = \unnumberedsubsec
3096\global\let\subsubsection = \unnumberedsubsubsec
2949}}
3097}
2950
3098
3099% Sections.
2951\outer\def\numberedsec{\parsearg\secyyy}
2952\def\secyyy #1{\numhead1{#1}} % normally calls seczzz
3100\outer\def\numberedsec{\parsearg\secyyy}
3101\def\secyyy #1{\numhead1{#1}} % normally calls seczzz
2953\def\seczzz #1{\seccheck{section}%
3102\def\seczzz #1{%
2954\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2955\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
3103\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3104\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
2956{\chapternofonts%
2957\toks0 = {#1}%
3105\toks0 = {#1}%
2958\edef\temp{{\realbackslash secentry %
2959{\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
2960\escapechar=`\\%
2961\write \contentsfile \temp %
2962\donoderef %
2963\penalty 10000 %
2964}}
3106\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
3107 {\the\chapno}{\the\secno}}}%
3108\temp
3109\donoderef
3110\nobreak
3111}
2965
2966\outer\def\appendixsection{\parsearg\appendixsecyyy}
2967\outer\def\appendixsec{\parsearg\appendixsecyyy}
2968\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
3112
3113\outer\def\appendixsection{\parsearg\appendixsecyyy}
3114\outer\def\appendixsec{\parsearg\appendixsecyyy}
3115\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
2969\def\appendixsectionzzz #1{\seccheck{appendixsection}%
3116\def\appendixsectionzzz #1{%
2970\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2971\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
3117\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
3118\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
2972{\chapternofonts%
2973\toks0 = {#1}%
3119\toks0 = {#1}%
2974\edef\temp{{\realbackslash secentry %
2975{\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
2976\escapechar=`\\%
2977\write \contentsfile \temp %
2978\appendixnoderef %
2979\penalty 10000 %
2980}}
3120\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
3121 {\appendixletter}{\the\secno}}}%
3122\temp
3123\appendixnoderef
3124\nobreak
3125}
2981
2982\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
2983\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
3126
3127\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
3128\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
2984\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
3129\def\unnumberedseczzz #1{%
2985\plainsecheading {#1}\gdef\thissection{#1}%
3130\plainsecheading {#1}\gdef\thissection{#1}%
2986{\chapternofonts%
2987\toks0 = {#1}%
3131\toks0 = {#1}%
2988\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
2989\escapechar=`\\%
2990\write \contentsfile \temp %
2991\unnumbnoderef %
2992\penalty 10000 %
2993}}
3132\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
3133\temp
3134\unnumbnoderef
3135\nobreak
3136}
2994
3137
3138% Subsections.
2995\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
2996\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
3139\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
3140\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
2997\def\numberedsubseczzz #1{\seccheck{subsection}%
3141\def\numberedsubseczzz #1{%
2998\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
2999\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
3142\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3143\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
3000{\chapternofonts%
3001\toks0 = {#1}%
3144\toks0 = {#1}%
3002\edef\temp{{\realbackslash subsecentry %
3003{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
3004\escapechar=`\\%
3005\write \contentsfile \temp %
3006\donoderef %
3007\penalty 10000 %
3008}}
3145\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
3146 {\the\chapno}{\the\secno}{\the\subsecno}}}%
3147\temp
3148\donoderef
3149\nobreak
3150}
3009
3010\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
3011\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
3151
3152\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
3153\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
3012\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
3154\def\appendixsubseczzz #1{%
3013\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3014\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
3155\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
3156\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
3015{\chapternofonts%
3016\toks0 = {#1}%
3157\toks0 = {#1}%
3017\edef\temp{{\realbackslash subsecentry %
3018{\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
3019\escapechar=`\\%
3020\write \contentsfile \temp %
3021\appendixnoderef %
3022\penalty 10000 %
3023}}
3158\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
3159 {\appendixletter}{\the\secno}{\the\subsecno}}}%
3160\temp
3161\appendixnoderef
3162\nobreak
3163}
3024
3025\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
3026\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
3164
3165\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
3166\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
3027\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
3167\def\unnumberedsubseczzz #1{%
3028\plainsubsecheading {#1}\gdef\thissection{#1}%
3168\plainsubsecheading {#1}\gdef\thissection{#1}%
3029{\chapternofonts%
3030\toks0 = {#1}%
3169\toks0 = {#1}%
3031\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
3032\escapechar=`\\%
3033\write \contentsfile \temp %
3034\unnumbnoderef %
3035\penalty 10000 %
3036}}
3170\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
3171 {\the\toks0}}}%
3172\temp
3173\unnumbnoderef
3174\nobreak
3175}
3037
3176
3177% Subsubsections.
3038\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
3039\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
3178\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
3179\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
3040\def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
3180\def\numberedsubsubseczzz #1{%
3041\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3042\subsubsecheading {#1}
3043 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3181\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3182\subsubsecheading {#1}
3183 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3044{\chapternofonts%
3045\toks0 = {#1}%
3184\toks0 = {#1}%
3046\edef\temp{{\realbackslash subsubsecentry{\the\toks0}
3047 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
3048 {\noexpand\folio}}}%
3049\escapechar=`\\%
3050\write \contentsfile \temp %
3051\donoderef %
3052\penalty 10000 %
3053}}
3185\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
3186 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
3187\temp
3188\donoderef
3189\nobreak
3190}
3054
3055\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
3056\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
3191
3192\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
3193\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
3057\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
3194\def\appendixsubsubseczzz #1{%
3058\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3059\subsubsecheading {#1}
3060 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3195\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
3196\subsubsecheading {#1}
3197 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
3061{\chapternofonts%
3062\toks0 = {#1}%
3198\toks0 = {#1}%
3063\edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
3064 {\appendixletter}
3065 {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
3066\escapechar=`\\%
3067\write \contentsfile \temp %
3068\appendixnoderef %
3069\penalty 10000 %
3070}}
3199\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
3200 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
3201\temp
3202\appendixnoderef
3203\nobreak
3204}
3071
3072\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
3073\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
3205
3206\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
3207\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
3074\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
3208\def\unnumberedsubsubseczzz #1{%
3075\plainsubsubsecheading {#1}\gdef\thissection{#1}%
3209\plainsubsubsecheading {#1}\gdef\thissection{#1}%
3076{\chapternofonts%
3077\toks0 = {#1}%
3210\toks0 = {#1}%
3078\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
3079\escapechar=`\\%
3080\write \contentsfile \temp %
3081\unnumbnoderef %
3082\penalty 10000 %
3083}}
3211\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
3212 {\the\toks0}}}%
3213\temp
3214\unnumbnoderef
3215\nobreak
3216}
3084
3085% These are variants which are not "outer", so they can appear in @ifinfo.
3086% Actually, they should now be obsolete; ordinary section commands should work.
3087\def\infotop{\parsearg\unnumberedzzz}
3088\def\infounnumbered{\parsearg\unnumberedzzz}
3089\def\infounnumberedsec{\parsearg\unnumberedseczzz}
3090\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
3091\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}

--- 12 unchanged lines hidden (view full) ---

3104% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
3105% Define them by default for a numbered chapter.
3106\global\let\section = \numberedsec
3107\global\let\subsection = \numberedsubsec
3108\global\let\subsubsection = \numberedsubsubsec
3109
3110% Define @majorheading, @heading and @subheading
3111
3217
3218% These are variants which are not "outer", so they can appear in @ifinfo.
3219% Actually, they should now be obsolete; ordinary section commands should work.
3220\def\infotop{\parsearg\unnumberedzzz}
3221\def\infounnumbered{\parsearg\unnumberedzzz}
3222\def\infounnumberedsec{\parsearg\unnumberedseczzz}
3223\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
3224\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}

--- 12 unchanged lines hidden (view full) ---

3237% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
3238% Define them by default for a numbered chapter.
3239\global\let\section = \numberedsec
3240\global\let\subsection = \numberedsubsec
3241\global\let\subsubsection = \numberedsubsubsec
3242
3243% Define @majorheading, @heading and @subheading
3244
3112% NOTE on use of \vbox for chapter headings, section headings, and
3113% such:
3245% NOTE on use of \vbox for chapter headings, section headings, and such:
3114% 1) We use \vbox rather than the earlier \line to permit
3115% overlong headings to fold.
3116% 2) \hyphenpenalty is set to 10000 because hyphenation in a
3117% heading is obnoxious; this forbids it.
3118% 3) Likewise, headings look best if no \parindent is used, and
3119% if justification is not attempted. Hence \raggedright.
3120
3121

--- 30 unchanged lines hidden (view full) ---

3152\newskip\chapheadingskip
3153
3154\def\chapbreak{\dobreak \chapheadingskip {-4000}}
3155\def\chappager{\par\vfill\supereject}
3156\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
3157
3158\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
3159
3246% 1) We use \vbox rather than the earlier \line to permit
3247% overlong headings to fold.
3248% 2) \hyphenpenalty is set to 10000 because hyphenation in a
3249% heading is obnoxious; this forbids it.
3250% 3) Likewise, headings look best if no \parindent is used, and
3251% if justification is not attempted. Hence \raggedright.
3252
3253

--- 30 unchanged lines hidden (view full) ---

3284\newskip\chapheadingskip
3285
3286\def\chapbreak{\dobreak \chapheadingskip {-4000}}
3287\def\chappager{\par\vfill\supereject}
3288\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
3289
3290\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
3291
3160\def\CHAPPAGoff{
3292\def\CHAPPAGoff{%
3161\global\let\contentsalignmacro = \chappager
3162\global\let\pchapsepmacro=\chapbreak
3163\global\let\pagealignmacro=\chappager}
3164
3293\global\let\contentsalignmacro = \chappager
3294\global\let\pchapsepmacro=\chapbreak
3295\global\let\pagealignmacro=\chappager}
3296
3165\def\CHAPPAGon{
3297\def\CHAPPAGon{%
3166\global\let\contentsalignmacro = \chappager
3167\global\let\pchapsepmacro=\chappager
3168\global\let\pagealignmacro=\chappager
3169\global\def\HEADINGSon{\HEADINGSsingle}}
3170
3171\def\CHAPPAGodd{
3172\global\let\contentsalignmacro = \chapoddpage
3173\global\let\pchapsepmacro=\chapoddpage

--- 37 unchanged lines hidden (view full) ---

3211 \chfplain{#1}{}%
3212}}
3213
3214\CHAPFplain % The default
3215
3216\def\unnchfopen #1{%
3217\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3218 \parindent=0pt\raggedright
3298\global\let\contentsalignmacro = \chappager
3299\global\let\pchapsepmacro=\chappager
3300\global\let\pagealignmacro=\chappager
3301\global\def\HEADINGSon{\HEADINGSsingle}}
3302
3303\def\CHAPPAGodd{
3304\global\let\contentsalignmacro = \chapoddpage
3305\global\let\pchapsepmacro=\chapoddpage

--- 37 unchanged lines hidden (view full) ---

3343 \chfplain{#1}{}%
3344}}
3345
3346\CHAPFplain % The default
3347
3348\def\unnchfopen #1{%
3349\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3350 \parindent=0pt\raggedright
3219 \rm #1\hfill}}\bigskip \par\penalty 10000 %
3351 \rm #1\hfill}}\bigskip \par\nobreak
3220}
3221
3222\def\chfopen #1#2{\chapoddpage {\chapfonts
3223\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
3224\par\penalty 5000 %
3225}
3226
3227\def\centerchfopen #1{%
3228\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3229 \parindent=0pt
3352}
3353
3354\def\chfopen #1#2{\chapoddpage {\chapfonts
3355\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
3356\par\penalty 5000 %
3357}
3358
3359\def\centerchfopen #1{%
3360\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
3361 \parindent=0pt
3230 \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 %
3362 \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
3231}
3232
3233\def\CHAPFopen{
3234\global\let\chapmacro=\chfopen
3235\global\let\unnumbchapmacro=\unnchfopen
3236\global\let\centerchapmacro=\centerchfopen}
3237
3238

--- 36 unchanged lines hidden (view full) ---

3275 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3276 \hangindent = \wd0 % zero if no section number
3277 \unhbox0 #3}%
3278 }%
3279 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
3280}
3281
3282
3363}
3364
3365\def\CHAPFopen{
3366\global\let\chapmacro=\chfopen
3367\global\let\unnumbchapmacro=\unnchfopen
3368\global\let\centerchapmacro=\centerchfopen}
3369
3370

--- 36 unchanged lines hidden (view full) ---

3407 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
3408 \hangindent = \wd0 % zero if no section number
3409 \unhbox0 #3}%
3410 }%
3411 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
3412}
3413
3414
3283\message{toc printing,}
3284% Finish up the main text and prepare to read what we've written
3285% to \contentsfile.
3415\message{toc,}
3416\newwrite\tocfile
3286
3417
3418% Write an entry to the toc file, opening it if necessary.
3419% Called from @chapter, etc. We supply {\folio} at the end of the
3420% argument, which will end up as the last argument to the \...entry macro.
3421%
3422% We open the .toc file here instead of at @setfilename or any other
3423% given time so that @contents can be put in the document anywhere.
3424%
3425\newif\iftocfileopened
3426\def\writetocentry#1{%
3427 \iftocfileopened\else
3428 \immediate\openout\tocfile = \jobname.toc
3429 \global\tocfileopenedtrue
3430 \fi
3431 \iflinks \write\tocfile{#1{\folio}}\fi
3432}
3433
3287\newskip\contentsrightmargin \contentsrightmargin=1in
3434\newskip\contentsrightmargin \contentsrightmargin=1in
3435\newcount\savepageno
3436\newcount\lastnegativepageno \lastnegativepageno = -1
3437
3438% Finish up the main text and prepare to read what we've written
3439% to \tocfile.
3440%
3288\def\startcontents#1{%
3289 % If @setchapternewpage on, and @headings double, the contents should
3290 % start on an odd page, unlike chapters. Thus, we maintain
3291 % \contentsalignmacro in parallel with \pagealignmacro.
3292 % From: Torbjorn Granlund <tege@matematik.su.se>
3293 \contentsalignmacro
3441\def\startcontents#1{%
3442 % If @setchapternewpage on, and @headings double, the contents should
3443 % start on an odd page, unlike chapters. Thus, we maintain
3444 % \contentsalignmacro in parallel with \pagealignmacro.
3445 % From: Torbjorn Granlund <tege@matematik.su.se>
3446 \contentsalignmacro
3294 \immediate\closeout \contentsfile
3295 \ifnum \pageno>0
3296 \pageno = -1 % Request roman numbered pages.
3297 \fi
3447 \immediate\closeout\tocfile
3448 %
3298 % Don't need to put `Contents' or `Short Contents' in the headline.
3299 % It is abundantly clear what they are.
3300 \unnumbchapmacro{#1}\def\thischapter{}%
3449 % Don't need to put `Contents' or `Short Contents' in the headline.
3450 % It is abundantly clear what they are.
3451 \unnumbchapmacro{#1}\def\thischapter{}%
3452 \savepageno = \pageno
3301 \begingroup % Set up to handle contents files properly.
3302 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
3303 % We can't do this, because then an actual ^ in a section
3304 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
3305 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
3306 \raggedbottom % Worry more about breakpoints than the bottom.
3307 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
3453 \begingroup % Set up to handle contents files properly.
3454 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
3455 % We can't do this, because then an actual ^ in a section
3456 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
3457 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
3458 \raggedbottom % Worry more about breakpoints than the bottom.
3459 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
3460 %
3461 % Roman numerals for page numbers.
3462 \ifnum \pageno>0 \pageno = \lastnegativepageno \fi
3308}
3309
3310
3311% Normal (long) toc.
3463}
3464
3465
3466% Normal (long) toc.
3312\outer\def\contents{%
3467\def\contents{%
3313 \startcontents{\putwordTableofContents}%
3468 \startcontents{\putwordTableofContents}%
3314 \input \jobname.toc
3469 \openin 1 \jobname.toc
3470 \ifeof 1 \else
3471 \closein 1
3472 \input \jobname.toc
3473 \fi
3474 \vfill \eject
3315 \endgroup
3475 \endgroup
3316 \vfill \eject
3476 \lastnegativepageno = \pageno
3477 \pageno = \savepageno
3317}
3318
3319% And just the chapters.
3478}
3479
3480% And just the chapters.
3320\outer\def\summarycontents{%
3481\def\summarycontents{%
3321 \startcontents{\putwordShortContents}%
3322 %
3323 \let\chapentry = \shortchapentry
3324 \let\unnumbchapentry = \shortunnumberedentry
3325 % We want a true roman here for the page numbers.
3326 \secfonts
3327 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
3328 \rm
3329 \hyphenpenalty = 10000
3330 \advance\baselineskip by 1pt % Open it up a little.
3331 \def\secentry ##1##2##3##4{}
3332 \def\unnumbsecentry ##1##2{}
3333 \def\subsecentry ##1##2##3##4##5{}
3334 \def\unnumbsubsecentry ##1##2{}
3335 \def\subsubsecentry ##1##2##3##4##5##6{}
3336 \def\unnumbsubsubsecentry ##1##2{}
3482 \startcontents{\putwordShortContents}%
3483 %
3484 \let\chapentry = \shortchapentry
3485 \let\unnumbchapentry = \shortunnumberedentry
3486 % We want a true roman here for the page numbers.
3487 \secfonts
3488 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
3489 \rm
3490 \hyphenpenalty = 10000
3491 \advance\baselineskip by 1pt % Open it up a little.
3492 \def\secentry ##1##2##3##4{}
3493 \def\unnumbsecentry ##1##2{}
3494 \def\subsecentry ##1##2##3##4##5{}
3495 \def\unnumbsubsecentry ##1##2{}
3496 \def\subsubsecentry ##1##2##3##4##5##6{}
3497 \def\unnumbsubsubsecentry ##1##2{}
3337 \input \jobname.toc
3498 \openin 1 \jobname.toc
3499 \ifeof 1 \else
3500 \closein 1
3501 \input \jobname.toc
3502 \fi
3503 \vfill \eject
3338 \endgroup
3504 \endgroup
3339 \vfill \eject
3505 \lastnegativepageno = \pageno
3506 \pageno = \savepageno
3340}
3341\let\shortcontents = \summarycontents
3342
3343% These macros generate individual entries in the table of contents.
3344% The first argument is the chapter or section name.
3345% The last argument is the page number.
3346% The arguments in between are the chapter number, section number, ...
3347

--- 74 unchanged lines hidden (view full) ---

3422 \subsubsecentryfonts \leftskip=3\tocindent
3423 \tocentry{#1}{\dopageno{#2}}%
3424\endgroup}
3425
3426% Final typesetting of a toc entry; we use the same \entry macro as for
3427% the index entries, but we want to suppress hyphenation here. (We
3428% can't do that in the \entry macro, since index entries might consist
3429% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
3507}
3508\let\shortcontents = \summarycontents
3509
3510% These macros generate individual entries in the table of contents.
3511% The first argument is the chapter or section name.
3512% The last argument is the page number.
3513% The arguments in between are the chapter number, section number, ...
3514

--- 74 unchanged lines hidden (view full) ---

3589 \subsubsecentryfonts \leftskip=3\tocindent
3590 \tocentry{#1}{\dopageno{#2}}%
3591\endgroup}
3592
3593% Final typesetting of a toc entry; we use the same \entry macro as for
3594% the index entries, but we want to suppress hyphenation here. (We
3595% can't do that in the \entry macro, since index entries might consist
3596% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
3430%
3431% \turnoffactive is for the sake of @" used for umlauts.
3432\def\tocentry#1#2{\begingroup
3433 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
3597\def\tocentry#1#2{\begingroup
3598 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
3434 \entry{\turnoffactive #1}{\turnoffactive #2}%
3599 % Do not use \turnoffactive in these arguments. Since the toc is
3600 % typeset in cmr, so characters such as _ would come out wrong; we
3601 % have to do the usual translation tricks.
3602 \entry{#1}{#2}%
3435\endgroup}
3436
3437% Space between chapter (or whatever) number and the title.
3438\def\labelspace{\hskip1em \relax}
3439
3440\def\dopageno#1{{\rm #1}}
3441\def\doshortpageno#1{{\rm #1}}
3442

--- 49 unchanged lines hidden (view full) ---

3492% The @error{} command.
3493\def\error{\leavevmode\lower.7ex\copy\errorbox}
3494
3495% @tex ... @end tex escapes into raw Tex temporarily.
3496% One exception: @ is still an escape character, so that @end tex works.
3497% But \@ or @@ will get a plain tex @ character.
3498
3499\def\tex{\begingroup
3603\endgroup}
3604
3605% Space between chapter (or whatever) number and the title.
3606\def\labelspace{\hskip1em \relax}
3607
3608\def\dopageno#1{{\rm #1}}
3609\def\doshortpageno#1{{\rm #1}}
3610

--- 49 unchanged lines hidden (view full) ---

3660% The @error{} command.
3661\def\error{\leavevmode\lower.7ex\copy\errorbox}
3662
3663% @tex ... @end tex escapes into raw Tex temporarily.
3664% One exception: @ is still an escape character, so that @end tex works.
3665% But \@ or @@ will get a plain tex @ character.
3666
3667\def\tex{\begingroup
3500\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
3501\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
3502\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
3503\catcode `\%=14
3504\catcode 43=12 % plus
3505\catcode`\"=12
3506\catcode`\==12
3507\catcode`\|=12
3508\catcode`\<=12
3509\catcode`\>=12
3510\escapechar=`\\
3511%
3512\let\,=\ptexcomma
3513\let\{=\ptexlbrace
3514\let\}=\ptexrbrace
3515\let\.=\ptexdot
3516\let\*=\ptexstar
3517\let\dots=\ptexdots
3518\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3519\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3520\def\@{@}%
3521\let\bullet=\ptexbullet
3522\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
3523%
3668 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
3669 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
3670 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
3671 \catcode `\%=14
3672 \catcode 43=12 % plus
3673 \catcode`\"=12
3674 \catcode`\==12
3675 \catcode`\|=12
3676 \catcode`\<=12
3677 \catcode`\>=12
3678 \escapechar=`\\
3679 %
3680 \let\b=\ptexb
3681 \let\bullet=\ptexbullet
3682 \let\c=\ptexc
3683 \let\,=\ptexcomma
3684 \let\.=\ptexdot
3685 \let\dots=\ptexdots
3686 \let\equiv=\ptexequiv
3687 \let\!=\ptexexclam
3688 \let\i=\ptexi
3689 \let\{=\ptexlbrace
3690 \let\+=\tabalign
3691 \let\}=\ptexrbrace
3692 \let\*=\ptexstar
3693 \let\t=\ptext
3694 %
3695 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3696 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3697 \def\@{@}%
3524\let\Etex=\endgroup}
3525
3526% Define @lisp ... @endlisp.
3527% @lisp does a \begingroup so it can rebind things,
3528% including the definition of @endlisp (which normally is erroneous).
3529
3530% Amount to narrow the margins by for @lisp.
3531\newskip\lispnarrowing \lispnarrowing=0.4in

--- 28 unchanged lines hidden (view full) ---

3560\endgraf \ifdim\lastskip<\envskipamount
3561\removelastskip \penalty-50 \vskip\envskipamount \fi}}
3562
3563\let\afterenvbreak = \aboveenvbreak
3564
3565% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
3566\let\nonarrowing=\relax
3567
3698\let\Etex=\endgroup}
3699
3700% Define @lisp ... @endlisp.
3701% @lisp does a \begingroup so it can rebind things,
3702% including the definition of @endlisp (which normally is erroneous).
3703
3704% Amount to narrow the margins by for @lisp.
3705\newskip\lispnarrowing \lispnarrowing=0.4in

--- 28 unchanged lines hidden (view full) ---

3734\endgraf \ifdim\lastskip<\envskipamount
3735\removelastskip \penalty-50 \vskip\envskipamount \fi}}
3736
3737\let\afterenvbreak = \aboveenvbreak
3738
3739% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
3740\let\nonarrowing=\relax
3741
3568%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3569% \cartouche: draw rectangle w/rounded corners around argument
3742% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
3743% environment contents.
3570\font\circle=lcircle10
3571\newdimen\circthick
3572\newdimen\cartouter\newdimen\cartinner
3573\newskip\normbskip\newskip\normpskip\newskip\normlskip
3574\circthick=\fontdimen8\circle
3575%
3576\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
3577\def\ctr{{\hskip 6pt\circle\char'010}}

--- 10 unchanged lines hidden (view full) ---

3588
3589\long\def\cartouche{%
3590\begingroup
3591 \lskip=\leftskip \rskip=\rightskip
3592 \leftskip=0pt\rightskip=0pt %we want these *outside*.
3593 \cartinner=\hsize \advance\cartinner by-\lskip
3594 \advance\cartinner by-\rskip
3595 \cartouter=\hsize
3744\font\circle=lcircle10
3745\newdimen\circthick
3746\newdimen\cartouter\newdimen\cartinner
3747\newskip\normbskip\newskip\normpskip\newskip\normlskip
3748\circthick=\fontdimen8\circle
3749%
3750\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
3751\def\ctr{{\hskip 6pt\circle\char'010}}

--- 10 unchanged lines hidden (view full) ---

3762
3763\long\def\cartouche{%
3764\begingroup
3765 \lskip=\leftskip \rskip=\rightskip
3766 \leftskip=0pt\rightskip=0pt %we want these *outside*.
3767 \cartinner=\hsize \advance\cartinner by-\lskip
3768 \advance\cartinner by-\rskip
3769 \cartouter=\hsize
3596 \advance\cartouter by 18pt % allow for 3pt kerns on either
3770 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
3597% side, and for 6pt waste from
3771% side, and for 6pt waste from
3598% each corner char
3772% each corner char, and rule thickness
3599 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
3600 % Flag to tell @lisp, etc., not to narrow margin.
3601 \let\nonarrowing=\comment
3602 \vbox\bgroup
3603 \baselineskip=0pt\parskip=0pt\lineskip=0pt
3604 \carttop
3605 \hbox\bgroup
3606 \hskip\lskip

--- 37 unchanged lines hidden (view full) ---

3644 \ifx\nonarrowing\relax
3645 \advance \leftskip by \lispnarrowing
3646 \exdentamount=\lispnarrowing
3647 \let\exdent=\nofillexdent
3648 \let\nonarrowing=\relax
3649 \fi
3650}
3651
3773 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
3774 % Flag to tell @lisp, etc., not to narrow margin.
3775 \let\nonarrowing=\comment
3776 \vbox\bgroup
3777 \baselineskip=0pt\parskip=0pt\lineskip=0pt
3778 \carttop
3779 \hbox\bgroup
3780 \hskip\lskip

--- 37 unchanged lines hidden (view full) ---

3818 \ifx\nonarrowing\relax
3819 \advance \leftskip by \lispnarrowing
3820 \exdentamount=\lispnarrowing
3821 \let\exdent=\nofillexdent
3822 \let\nonarrowing=\relax
3823 \fi
3824}
3825
3652% To ending an @example-like environment, we first end the paragraph
3653% (via \afterenvbreak's vertical glue), and then the group. That way we
3654% keep the zero \parskip that the environments set -- \parskip glue
3655% will be inserted at the beginning of the next paragraph in the
3656% document, after the environment.
3826% Define the \E... control sequence only if we are inside the particular
3827% environment, so the error checking in \end will work.
3828%
3829% To end an @example-like environment, we first end the paragraph (via
3830% \afterenvbreak's vertical glue), and then the group. That way we keep
3831% the zero \parskip that the environments set -- \parskip glue will be
3832% inserted at the beginning of the next paragraph in the document, after
3833% the environment.
3657%
3834%
3658\def\nonfillfinish{\afterenvbreak\endgroup}%
3835\def\nonfillfinish{\afterenvbreak\endgroup}
3659
3836
3837% @lisp: indented, narrowed, typewriter font.
3660\def\lisp{\begingroup
3661 \nonfillstart
3662 \let\Elisp = \nonfillfinish
3663 \tt
3838\def\lisp{\begingroup
3839 \nonfillstart
3840 \let\Elisp = \nonfillfinish
3841 \tt
3664 % Make @kbd do something special, if requested.
3665 \let\kbdfont\kbdexamplefont
3666 \rawbackslash % have \ input char produce \ char from current font
3667 \gobble
3842 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
3843 \gobble % eat return
3668}
3669
3844}
3845
3670% Define the \E... control sequence only if we are inside the
3671% environment, so the error checking in \end will work.
3672%
3673% We must call \lisp last in the definition, since it reads the
3674% return following the @example (or whatever) command.
3675%
3846% @example: Same as @lisp.
3676\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
3847\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
3677\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp}
3678\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
3679
3848
3680% @smallexample and @smalllisp. This is not used unless the @smallbook
3681% command is given. Originally contributed by Pavel@xerox.
3849% @small... is usually equivalent to the non-small (@smallbook
3850% redefines). We must call \example (or whatever) last in the
3851% definition, since it reads the return following the @example (or
3852% whatever) command.
3853%
3854% This actually allows (for example) @end display inside an
3855% @smalldisplay. Too bad, but makeinfo will catch the error anyway.
3682%
3856%
3857\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display}
3858\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp}
3859\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format}
3860\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
3861
3862% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts.
3863% Originally contributed by Pavel@xerox.
3683\def\smalllispx{\begingroup
3864\def\smalllispx{\begingroup
3684 \nonfillstart
3685 \let\Esmalllisp = \nonfillfinish
3686 \let\Esmallexample = \nonfillfinish
3687 %
3688 % Smaller fonts for small examples.
3689 \indexfonts \tt
3690 \rawbackslash % make \ output the \ character from the current font (tt)
3691 \gobble
3865 \def\Esmalllisp{\nonfillfinish\endgroup}%
3866 \def\Esmallexample{\nonfillfinish\endgroup}%
3867 \indexfonts
3868 \lisp
3692}
3693
3869}
3870
3694% This is @display; same as @lisp except use roman font.
3871% @display: same as @lisp except keep current font.
3695%
3696\def\display{\begingroup
3697 \nonfillstart
3698 \let\Edisplay = \nonfillfinish
3699 \gobble
3700}
3701
3872%
3873\def\display{\begingroup
3874 \nonfillstart
3875 \let\Edisplay = \nonfillfinish
3876 \gobble
3877}
3878
3702% This is @format; same as @display except don't narrow margins.
3879% @smalldisplay (when @smallbook): @display plus smaller fonts.
3703%
3880%
3881\def\smalldisplayx{\begingroup
3882 \def\Esmalldisplay{\nonfillfinish\endgroup}%
3883 \indexfonts \rm
3884 \display
3885}
3886
3887% @format: same as @display except don't narrow margins.
3888%
3704\def\format{\begingroup
3705 \let\nonarrowing = t
3706 \nonfillstart
3707 \let\Eformat = \nonfillfinish
3708 \gobble
3709}
3710
3889\def\format{\begingroup
3890 \let\nonarrowing = t
3891 \nonfillstart
3892 \let\Eformat = \nonfillfinish
3893 \gobble
3894}
3895
3711% @flushleft (same as @format) and @flushright.
3896% @smallformat (when @smallbook): @format plus smaller fonts.
3712%
3897%
3713\def\flushleft{\begingroup
3714 \let\nonarrowing = t
3715 \nonfillstart
3716 \let\Eflushleft = \nonfillfinish
3717 \gobble
3898\def\smallformatx{\begingroup
3899 \def\Esmallformat{\nonfillfinish\endgroup}%
3900 \indexfonts \rm
3901 \format
3718}
3902}
3903
3904% @flushleft (same as @format).
3905%
3906\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format}
3907
3908% @flushright.
3909%
3719\def\flushright{\begingroup
3720 \let\nonarrowing = t
3721 \nonfillstart
3722 \let\Eflushright = \nonfillfinish
3723 \advance\leftskip by 0pt plus 1fill
3910\def\flushright{\begingroup
3911 \let\nonarrowing = t
3912 \nonfillstart
3913 \let\Eflushright = \nonfillfinish
3914 \advance\leftskip by 0pt plus 1fill
3724 \gobble}
3915 \gobble
3916}
3725
3726% @quotation does normal linebreaking (hence we can't use \nonfillstart)
3727% and narrows the margins.
3728%
3729\def\quotation{%
3730 \begingroup\inENV %This group ends at the end of the @quotation body
3731 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
3732 \singlespace

--- 6 unchanged lines hidden (view full) ---

3739 \ifx\nonarrowing\relax
3740 \advance\leftskip by \lispnarrowing
3741 \advance\rightskip by \lispnarrowing
3742 \exdentamount = \lispnarrowing
3743 \let\nonarrowing = \relax
3744 \fi
3745}
3746
3917
3918% @quotation does normal linebreaking (hence we can't use \nonfillstart)
3919% and narrows the margins.
3920%
3921\def\quotation{%
3922 \begingroup\inENV %This group ends at the end of the @quotation body
3923 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
3924 \singlespace

--- 6 unchanged lines hidden (view full) ---

3931 \ifx\nonarrowing\relax
3932 \advance\leftskip by \lispnarrowing
3933 \advance\rightskip by \lispnarrowing
3934 \exdentamount = \lispnarrowing
3935 \let\nonarrowing = \relax
3936 \fi
3937}
3938
3939
3747\message{defuns,}
3748% Define formatter for defuns
3749% First, allow user to change definition object font (\df) internally
3750\def\setdeffont #1 {\csname DEF#1\endcsname}
3751
3752\newskip\defbodyindent \defbodyindent=.4in
3753\newskip\defargsindent \defargsindent=50pt
3754\newskip\deftypemargin \deftypemargin=12pt

--- 53 unchanged lines hidden (view full) ---

3808% #1 should be the function name.
3809% #2 should be the type of definition, such as "Function".
3810
3811\def\defname #1#2{%
3812% Get the values of \leftskip and \rightskip as they were
3813% outside the @def...
3814\dimen2=\leftskip
3815\advance\dimen2 by -\defbodyindent
3940\message{defuns,}
3941% Define formatter for defuns
3942% First, allow user to change definition object font (\df) internally
3943\def\setdeffont #1 {\csname DEF#1\endcsname}
3944
3945\newskip\defbodyindent \defbodyindent=.4in
3946\newskip\defargsindent \defargsindent=50pt
3947\newskip\deftypemargin \deftypemargin=12pt

--- 53 unchanged lines hidden (view full) ---

4001% #1 should be the function name.
4002% #2 should be the type of definition, such as "Function".
4003
4004\def\defname #1#2{%
4005% Get the values of \leftskip and \rightskip as they were
4006% outside the @def...
4007\dimen2=\leftskip
4008\advance\dimen2 by -\defbodyindent
3816\dimen3=\rightskip
3817\advance\dimen3 by -\defbodyindent
3818\noindent %
4009\noindent
3819\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
3820\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
3821\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
4010\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
4011\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
4012\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
3822\parshape 2 0in \dimen0 \defargsindent \dimen1 %
4013\parshape 2 0in \dimen0 \defargsindent \dimen1
3823% Now output arg 2 ("Function" or some such)
3824% ending at \deftypemargin from the right margin,
3825% but stuck inside a box of width 0 so it does not interfere with linebreaking
3826{% Adjust \hsize to exclude the ambient margins,
3827% so that \rightline will obey them.
4014% Now output arg 2 ("Function" or some such)
4015% ending at \deftypemargin from the right margin,
4016% but stuck inside a box of width 0 so it does not interfere with linebreaking
4017{% Adjust \hsize to exclude the ambient margins,
4018% so that \rightline will obey them.
3828\advance \hsize by -\dimen2 \advance \hsize by -\dimen3
3829\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
4019\advance \hsize by -\dimen2
4020\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%
3830% Make all lines underfull and no complaints:
3831\tolerance=10000 \hbadness=10000
3832\advance\leftskip by -\defbodyindent
3833\exdentamount=\defbodyindent
3834{\df #1}\enskip % Generate function name
3835}
3836
3837% Actually process the body of a definition

--- 4 unchanged lines hidden (view full) ---

3842
3843\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
3844\medbreak %
3845% Define the end token that this defining construct specifies
3846% so that it will exit this group.
3847\def#1{\endgraf\endgroup\medbreak}%
3848\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
3849\parindent=0in
4021% Make all lines underfull and no complaints:
4022\tolerance=10000 \hbadness=10000
4023\advance\leftskip by -\defbodyindent
4024\exdentamount=\defbodyindent
4025{\df #1}\enskip % Generate function name
4026}
4027
4028% Actually process the body of a definition

--- 4 unchanged lines hidden (view full) ---

4033
4034\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
4035\medbreak %
4036% Define the end token that this defining construct specifies
4037% so that it will exit this group.
4038\def#1{\endgraf\endgroup\medbreak}%
4039\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
4040\parindent=0in
3850\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4041\advance\leftskip by \defbodyindent
3851\exdentamount=\defbodyindent
3852\begingroup %
3853\catcode 61=\active % 61 is `='
3854\obeylines\activeparens\spacesplit#3}
3855
4042\exdentamount=\defbodyindent
4043\begingroup %
4044\catcode 61=\active % 61 is `='
4045\obeylines\activeparens\spacesplit#3}
4046
3856\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
4047% #1 is the \E... control sequence to end the definition (which we define).
4048% #2 is the \...x control sequence for consecutive fns (which we define).
4049% #3 is the control sequence to call to resume processing.
4050% #4, delimited by the space, is the class name.
4051%
4052\def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
3857\medbreak %
3858% Define the end token that this defining construct specifies
3859% so that it will exit this group.
3860\def#1{\endgraf\endgroup\medbreak}%
3861\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
3862\parindent=0in
4053\medbreak %
4054% Define the end token that this defining construct specifies
4055% so that it will exit this group.
4056\def#1{\endgraf\endgroup\medbreak}%
4057\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
4058\parindent=0in
3863\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4059\advance\leftskip by \defbodyindent
3864\exdentamount=\defbodyindent
3865\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
3866
4060\exdentamount=\defbodyindent
4061\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
4062
4063% @deftypemethod has an extra argument that nothing else does. Sigh.
4064% #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% #5 is the method's return type.
4069%
4070\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
4071\medbreak %
4072% Define the end token that this defining construct specifies
4073% so that it will exit this group.
4074\def#1{\endgraf\endgroup\medbreak}%
4075\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
4076\parindent=0in
4077\advance\leftskip by \defbodyindent
4078\exdentamount=\defbodyindent
4079\begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
4080
3867\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
3868\medbreak %
3869% Define the end token that this defining construct specifies
3870% so that it will exit this group.
3871\def#1{\endgraf\endgroup\medbreak}%
3872\def#2##1 ##2 {\def#4{##1}%
3873\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
3874\parindent=0in
4081\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
4082\medbreak %
4083% Define the end token that this defining construct specifies
4084% so that it will exit this group.
4085\def#1{\endgraf\endgroup\medbreak}%
4086\def#2##1 ##2 {\def#4{##1}%
4087\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
4088\parindent=0in
3875\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4089\advance\leftskip by \defbodyindent
3876\exdentamount=\defbodyindent
3877\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
3878
3879% These parsing functions are similar to the preceding ones
3880% except that they do not make parens into active characters.
3881% These are used for "variables" since they have no arguments.
3882
3883\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
3884\medbreak %
3885% Define the end token that this defining construct specifies
3886% so that it will exit this group.
3887\def#1{\endgraf\endgroup\medbreak}%
3888\def#2{\begingroup\obeylines\spacesplit#3}%
3889\parindent=0in
4090\exdentamount=\defbodyindent
4091\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
4092
4093% These parsing functions are similar to the preceding ones
4094% except that they do not make parens into active characters.
4095% These are used for "variables" since they have no arguments.
4096
4097\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
4098\medbreak %
4099% Define the end token that this defining construct specifies
4100% so that it will exit this group.
4101\def#1{\endgraf\endgroup\medbreak}%
4102\def#2{\begingroup\obeylines\spacesplit#3}%
4103\parindent=0in
3890\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4104\advance\leftskip by \defbodyindent
3891\exdentamount=\defbodyindent
3892\begingroup %
3893\catcode 61=\active %
3894\obeylines\spacesplit#3}
3895
3896% This is used for \def{tp,vr}parsebody. It could probably be used for
3897% some of the others, too, with some judicious conditionals.
3898%
3899\def\parsebodycommon#1#2#3{%
3900 \begingroup\inENV %
3901 \medbreak %
3902 % Define the end token that this defining construct specifies
3903 % so that it will exit this group.
3904 \def#1{\endgraf\endgroup\medbreak}%
3905 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
3906 \parindent=0in
4105\exdentamount=\defbodyindent
4106\begingroup %
4107\catcode 61=\active %
4108\obeylines\spacesplit#3}
4109
4110% This is used for \def{tp,vr}parsebody. It could probably be used for
4111% some of the others, too, with some judicious conditionals.
4112%
4113\def\parsebodycommon#1#2#3{%
4114 \begingroup\inENV %
4115 \medbreak %
4116 % Define the end token that this defining construct specifies
4117 % so that it will exit this group.
4118 \def#1{\endgraf\endgroup\medbreak}%
4119 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
4120 \parindent=0in
3907 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4121 \advance\leftskip by \defbodyindent
3908 \exdentamount=\defbodyindent
3909 \begingroup\obeylines
3910}
3911
3912\def\defvrparsebody#1#2#3#4 {%
3913 \parsebodycommon{#1}{#2}{#3}%
3914 \spacesplit{#3{#4}}%
3915}

--- 28 unchanged lines hidden (view full) ---

3944\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
3945\medbreak %
3946% Define the end token that this defining construct specifies
3947% so that it will exit this group.
3948\def#1{\endgraf\endgroup\medbreak}%
3949\def#2##1 ##2 {\def#4{##1}%
3950\begingroup\obeylines\spacesplit{#3{##2}}}%
3951\parindent=0in
4122 \exdentamount=\defbodyindent
4123 \begingroup\obeylines
4124}
4125
4126\def\defvrparsebody#1#2#3#4 {%
4127 \parsebodycommon{#1}{#2}{#3}%
4128 \spacesplit{#3{#4}}%
4129}

--- 28 unchanged lines hidden (view full) ---

4158\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
4159\medbreak %
4160% Define the end token that this defining construct specifies
4161% so that it will exit this group.
4162\def#1{\endgraf\endgroup\medbreak}%
4163\def#2##1 ##2 {\def#4{##1}%
4164\begingroup\obeylines\spacesplit{#3{##2}}}%
4165\parindent=0in
3952\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
4166\advance\leftskip by \defbodyindent
3953\exdentamount=\defbodyindent
3954\begingroup\obeylines\spacesplit{#3{#5}}}
3955
3956% Split up #2 at the first space token.
3957% call #1 with two arguments:
3958% the first is all of #2 before the space token,
3959% the second is all of #2 after that space token.
3960% If #2 contains no space token, all of it is passed as the first arg

--- 16 unchanged lines hidden (view full) ---

3977% Expand, preventing hyphenation at `-' chars.
3978% Note that groups don't affect changes in \hyphenchar.
3979\hyphenchar\tensl=0
3980#1%
3981\hyphenchar\tensl=45
3982\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
3983\interlinepenalty=10000
3984\advance\rightskip by 0pt plus 1fil
4167\exdentamount=\defbodyindent
4168\begingroup\obeylines\spacesplit{#3{#5}}}
4169
4170% Split up #2 at the first space token.
4171% call #1 with two arguments:
4172% the first is all of #2 before the space token,
4173% the second is all of #2 after that space token.
4174% If #2 contains no space token, all of it is passed as the first arg

--- 16 unchanged lines hidden (view full) ---

4191% Expand, preventing hyphenation at `-' chars.
4192% Note that groups don't affect changes in \hyphenchar.
4193\hyphenchar\tensl=0
4194#1%
4195\hyphenchar\tensl=45
4196\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
4197\interlinepenalty=10000
4198\advance\rightskip by 0pt plus 1fil
3985\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
4199\endgraf\nobreak\vskip -\parskip\nobreak
3986}
3987
3988\def\deftypefunargs #1{%
3989% Expand, preventing hyphenation at `-' chars.
3990% Note that groups don't affect changes in \hyphenchar.
3991% Use \boldbraxnoamp, not \functionparens, so that & is not special.
3992\boldbraxnoamp
3993\tclose{#1}% avoid \code because of side effects on active chars
3994\interlinepenalty=10000
3995\advance\rightskip by 0pt plus 1fil
4200}
4201
4202\def\deftypefunargs #1{%
4203% Expand, preventing hyphenation at `-' chars.
4204% Note that groups don't affect changes in \hyphenchar.
4205% Use \boldbraxnoamp, not \functionparens, so that & is not special.
4206\boldbraxnoamp
4207\tclose{#1}% avoid \code because of side effects on active chars
4208\interlinepenalty=10000
4209\advance\rightskip by 0pt plus 1fil
3996\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
4210\endgraf\nobreak\vskip -\parskip\nobreak
3997}
3998
3999% Do complete processing of one @defun or @defunx line already parsed.
4000
4001% @deffn Command forward-char nchars
4002
4003\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
4004

--- 71 unchanged lines hidden (view full) ---

4076% anywhere other than immediately after a @defun or @defunx.
4077
4078\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
4079\def\defunx #1 {\errmessage{@defunx in invalid context}}
4080\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
4081\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
4082\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
4083\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
4211}
4212
4213% Do complete processing of one @defun or @defunx line already parsed.
4214
4215% @deffn Command forward-char nchars
4216
4217\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
4218

--- 71 unchanged lines hidden (view full) ---

4290% anywhere other than immediately after a @defun or @defunx.
4291
4292\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
4293\def\defunx #1 {\errmessage{@defunx in invalid context}}
4294\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
4295\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
4296\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
4297\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
4084\def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
4298\def\deftypefunx #1 {\errmessage{@deftypefunx in invalid context}}
4085
4086% @defmethod, and so on
4087
4299
4300% @defmethod, and so on
4301
4088% @defop {Funny Method} foo-class frobnicate argument
4302% @defop CATEGORY CLASS OPERATION ARG...
4089
4090\def\defop #1 {\def\defoptype{#1}%
4091\defopparsebody\Edefop\defopx\defopheader\defoptype}
4092
4093\def\defopheader #1#2#3{%
4303
4304\def\defop #1 {\def\defoptype{#1}%
4305\defopparsebody\Edefop\defopx\defopheader\defoptype}
4306
4307\def\defopheader #1#2#3{%
4094\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
4308\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
4095\begingroup\defname {#2}{\defoptype{} on #1}%
4096\defunargs {#3}\endgroup %
4097}
4098
4309\begingroup\defname {#2}{\defoptype{} on #1}%
4310\defunargs {#3}\endgroup %
4311}
4312
4099% @deftypemethod foo-class return-type foo-method args
4313% @deftypemethod CLASS RETURN-TYPE METHOD ARG...
4100%
4101\def\deftypemethod{%
4314%
4315\def\deftypemethod{%
4102 \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
4316 \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
4103%
4104% #1 is the class name, #2 the data type, #3 the method name, #4 the args.
4105\def\deftypemethodheader#1#2#3#4{%
4317%
4318% #1 is the class name, #2 the data type, #3 the method name, #4 the args.
4319\def\deftypemethodheader#1#2#3#4{%
4106 \deftypefnheaderx{Method on #1}{#2}#3 #4\relax
4320 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
4321 \begingroup
4322 \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
4323 \deftypefunargs{#4}%
4324 \endgroup
4107}
4108
4109% @defmethod == @defop Method
4325}
4326
4327% @defmethod == @defop Method
4110
4328%
4111\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
4329\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
4112
4113\def\defmethodheader #1#2#3{%
4114\dosubind {fn}{\code{#2}}{on #1}% entry in function index
4115\begingroup\defname {#2}{Method on #1}%
4116\defunargs {#3}\endgroup %
4330%
4331% #1 is the class name, #2 the method name, #3 the args.
4332\def\defmethodheader#1#2#3{%
4333 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index
4334 \begingroup
4335 \defname{#2}{\putwordMethodon\ \code{#1}}%
4336 \defunargs{#3}%
4337 \endgroup
4117}
4118
4119% @defcv {Class Option} foo-class foo-flag
4120
4121\def\defcv #1 {\def\defcvtype{#1}%
4122\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
4123
4124\def\defcvarheader #1#2#3{%

--- 22 unchanged lines hidden (view full) ---

4147
4148% Now @defvar
4149
4150% First, define the processing that is wanted for arguments of @defvar.
4151% This is actually simple: just print them in roman.
4152% This must expand the args and terminate the paragraph they make up
4153\def\defvarargs #1{\normalparens #1%
4154\interlinepenalty=10000
4338}
4339
4340% @defcv {Class Option} foo-class foo-flag
4341
4342\def\defcv #1 {\def\defcvtype{#1}%
4343\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
4344
4345\def\defcvarheader #1#2#3{%

--- 22 unchanged lines hidden (view full) ---

4368
4369% Now @defvar
4370
4371% First, define the processing that is wanted for arguments of @defvar.
4372% This is actually simple: just print them in roman.
4373% This must expand the args and terminate the paragraph they make up
4374\def\defvarargs #1{\normalparens #1%
4375\interlinepenalty=10000
4155\endgraf\penalty 10000\vskip -\parskip\penalty 10000}
4376\endgraf\nobreak\vskip -\parskip\nobreak}
4156
4157% @defvr Counter foo-count
4158
4159\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
4160
4161\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
4162\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
4163

--- 20 unchanged lines hidden (view full) ---

4184\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
4185
4186% #1 is the data type. #2 is the name, perhaps followed by text that
4187% is actually part of the data type, which should not be put into the index.
4188\def\deftypevarheader #1#2{%
4189\dovarind#2 \relax% Make entry in variables index
4190\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
4191\interlinepenalty=10000
4377
4378% @defvr Counter foo-count
4379
4380\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
4381
4382\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
4383\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
4384

--- 20 unchanged lines hidden (view full) ---

4405\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
4406
4407% #1 is the data type. #2 is the name, perhaps followed by text that
4408% is actually part of the data type, which should not be put into the index.
4409\def\deftypevarheader #1#2{%
4410\dovarind#2 \relax% Make entry in variables index
4411\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
4412\interlinepenalty=10000
4192\endgraf\penalty 10000\vskip -\parskip\penalty 10000
4413\endgraf\nobreak\vskip -\parskip\nobreak
4193\endgroup}
4194\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
4195
4196% @deftypevr {Global Flag} int enable
4197
4198\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
4199
4200\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
4201\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
4202\interlinepenalty=10000
4414\endgroup}
4415\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
4416
4417% @deftypevr {Global Flag} int enable
4418
4419\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
4420
4421\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
4422\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
4423\interlinepenalty=10000
4203\endgraf\penalty 10000\vskip -\parskip\penalty 10000
4424\endgraf\nobreak\vskip -\parskip\nobreak
4204\endgroup}
4205
4206% This definition is run if you use @defvarx
4207% anywhere other than immediately after a @defvar or @defvarx.
4208
4209\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
4210\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
4211\def\defoptx #1 {\errmessage{@defoptx in invalid context}}

--- 13 unchanged lines hidden (view full) ---

4225\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
4226
4227% This definition is run if you use @deftpx, etc
4228% anywhere other than immediately after a @deftp, etc.
4229
4230\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
4231
4232
4425\endgroup}
4426
4427% This definition is run if you use @defvarx
4428% anywhere other than immediately after a @defvar or @defvarx.
4429
4430\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
4431\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
4432\def\defoptx #1 {\errmessage{@defoptx in invalid context}}

--- 13 unchanged lines hidden (view full) ---

4446\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
4447
4448% This definition is run if you use @deftpx, etc
4449% anywhere other than immediately after a @deftp, etc.
4450
4451\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
4452
4453
4233\message{cross reference,}
4234% Define cross-reference macros
4235\newwrite \auxfile
4454\message{macros,}
4455% @macro.
4236
4456
4237\newif\ifhavexrefs % True if xref values are known.
4457% To do this right we need a feature of e-TeX, \scantokens,
4458% which we arrange to emulate with a temporary file in ordinary TeX.
4459\ifx\eTeXversion\undefined
4460 \newwrite\macscribble
4461 \def\scanmacro#1{%
4462 \begingroup \newlinechar`\^^M
4463 \immediate\openout\macscribble=\jobname.tmp
4464 \immediate\write\macscribble{#1}%
4465 \immediate\closeout\macscribble
4466 \let\xeatspaces\eatspaces
4467 \input \jobname.tmp
4468 \endgroup
4469}
4470\else
4471\def\scanmacro#1{%
4472\begingroup \newlinechar`\^^M
4473\let\xeatspaces\eatspaces\scantokens{#1}\endgroup}
4474\fi
4475
4476\newcount\paramno % Count of parameters
4477\newtoks\macname % Macro name
4478\newif\ifrecursive % Is it recursive?
4479
4480% Utility routines.
4481% Thisdoes \let #1 = #2, except with \csnames.
4482\def\cslet#1#2{%
4483\expandafter\expandafter
4484\expandafter\let
4485\expandafter\expandafter
4486\csname#1\endcsname
4487\csname#2\endcsname}
4488
4489% Trim leading and trailing spaces off a string.
4490% Concepts from aro-bend problem 15 (see CTAN).
4491{\catcode`\@=11
4492\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
4493\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
4494\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
4495\def\unbrace#1{#1}
4496\unbrace{\gdef\trim@@@ #1 } #2@{#1}
4497}
4498
4499% Trim a single trailing ^^M off a string.
4500{\catcode`\^^M=12\catcode`\Q=3%
4501\gdef\eatcr #1{\eatcra #1Q^^MQ}%
4502\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
4503\gdef\eatcrb#1Q#2Q{#1}%
4504}
4505
4506% Macro bodies are absorbed as an argument in a context where
4507% all characters are catcode 10, 11 or 12, except \ which is active
4508% (as in normal texinfo). It is necessary to change the definition of \.
4509
4510% It's necessary to have hard CRs when the macro is executed. This is
4511% done by making ^^M (\endlinechar) catcode 12 when reading the macro
4512% body, and then making it the \newlinechar in \scanmacro.
4513
4514\def\macrobodyctxt{%
4515 \catcode`\~=12
4516 \catcode`\^=12
4517 \catcode`\_=12
4518 \catcode`\|=12
4519 \catcode`\<=12
4520 \catcode`\>=12
4521 \catcode`\+=12
4522 \catcode`\{=12
4523 \catcode`\}=12
4524 \catcode`\@=12
4525 \catcode`\^^M=12
4526 \usembodybackslash}
4527
4528\def\macroargctxt{%
4529 \catcode`\~=12
4530 \catcode`\^=12
4531 \catcode`\_=12
4532 \catcode`\|=12
4533 \catcode`\<=12
4534 \catcode`\>=12
4535 \catcode`\+=12
4536 \catcode`\@=12
4537 \catcode`\\=12}
4538
4539% \mbodybackslash is the definition of \ in @macro bodies.
4540% It maps \foo\ => \csname macarg.foo\endcsname => #N
4541% where N is the macro parameter number.
4542% We define \csname macarg.\endcsname to be \realbackslash, so
4543% \\ in macro replacement text gets you a backslash.
4544
4545{\catcode`@=0 @catcode`@\=@active
4546 @gdef@usembodybackslash{@let\=@mbodybackslash}
4547 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
4548}
4549\expandafter\def\csname macarg.\endcsname{\realbackslash}
4550
4551\def\macro{\recursivefalse\parsearg\macroxxx}
4552\def\rmacro{\recursivetrue\parsearg\macroxxx}
4553
4554\def\macroxxx#1{%
4555 \getargs{#1}% now \macname is the macname and \argl the arglist
4556 \ifx\argl\empty % no arguments
4557 \paramno=0%
4558 \else
4559 \expandafter\parsemargdef \argl;%
4560 \fi
4561 \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4562 \cslet{macsave.\the\macname}{\the\macname}%
4563 \else
4564 \message{Warning: redefining \the\macname}%
4565 \fi
4566 \begingroup \macrobodyctxt
4567 \ifrecursive \expandafter\parsermacbody
4568 \else \expandafter\parsemacbody
4569 \fi}
4570
4571\def\unmacro{\parsearg\unmacroxxx}
4572\def\unmacroxxx#1{%
4573 \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
4574 \errmessage{Macro \the\macname\ not defined.}%
4575 \else
4576 \cslet{#1}{macsave.#1}%
4577 \expandafter\let \csname macsave.\the\macname\endcsname \undefined
4578 \fi
4579}
4580
4581% This makes use of the obscure feature that if the last token of a
4582% <parameter list> is #, then the preceding argument is delimited by
4583% an opening brace, and that opening brace is not consumed.
4584\def\getargs#1{\getargsxxx#1{}}
4585\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
4586\def\getmacname #1 #2\relax{\macname={#1}}
4587\def\getmacargs#1{\def\argl{#1}}
4588
4589% Parse the optional {params} list. Set up \paramno and \paramlist
4590% so \defmacro knows what to do. Define \macarg.blah for each blah
4591% in the params list, to be ##N where N is the position in that list.
4592% That gets used by \mbodybackslash (above).
4593
4594% We need to get `macro parameter char #' into several definitions.
4595% The technique used is stolen from LaTeX: let \hash be something
4596% unexpandable, insert that wherever you need a #, and then redefine
4597% it to # just before using the token list produced.
4598%
4599% The same technique is used to protect \eatspaces till just before
4600% the macro is used.
4601
4602\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
4603 \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
4604\def\parsemargdefxxx#1,{%
4605 \if#1;\let\next=\relax
4606 \else \let\next=\parsemargdefxxx
4607 \advance\paramno by 1%
4608 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
4609 {\xeatspaces{\hash\the\paramno}}%
4610 \edef\paramlist{\paramlist\hash\the\paramno,}%
4611 \fi\next}
4612
4613% These two commands read recursive and nonrecursive macro bodies.
4614% (They're different since rec and nonrec macros end differently.)
4615
4616\long\def\parsemacbody#1@end macro%
4617{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
4618\long\def\parsermacbody#1@end rmacro%
4619{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
4620
4621% This defines the macro itself. There are six cases: recursive and
4622% nonrecursive macros of zero, one, and many arguments.
4623% Much magic with \expandafter here.
4624% \xdef is used so that macro definitions will survive the file
4625% they're defined in; @include reads the file inside a group.
4626\def\defmacro{%
4627 \let\hash=##% convert placeholders to macro parameter chars
4628 \ifrecursive
4629 \ifcase\paramno
4630 % 0
4631 \expandafter\xdef\csname\the\macname\endcsname{%
4632 \noexpand\scanmacro{\temp}}%
4633 \or % 1
4634 \expandafter\xdef\csname\the\macname\endcsname{%
4635 \bgroup\noexpand\macroargctxt
4636 \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4637 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
4638 \egroup\noexpand\scanmacro{\temp}}%
4639 \else % many
4640 \expandafter\xdef\csname\the\macname\endcsname{%
4641 \bgroup\noexpand\macroargctxt
4642 \noexpand\csname\the\macname xx\endcsname}
4643 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
4644 \csname\the\macname xxx\endcsname ##1,}%
4645 \expandafter\expandafter
4646 \expandafter\xdef
4647 \expandafter\expandafter
4648 \csname\the\macname xxx\endcsname
4649 \paramlist{\egroup\noexpand\scanmacro{\temp}}%
4650 \fi
4651 \else
4652 \ifcase\paramno
4653 % 0
4654 \expandafter\xdef\csname\the\macname\endcsname{%
4655 \noexpand\norecurse{\the\macname}%
4656 \noexpand\scanmacro{\temp}\egroup}%
4657 \or % 1
4658 \expandafter\xdef\csname\the\macname\endcsname{%
4659 \bgroup\noexpand\macroargctxt
4660 \noexpand\braceorline\csname\the\macname xxx\endcsname}%
4661 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
4662 \egroup
4663 \noexpand\norecurse{\the\macname}%
4664 \noexpand\scanmacro{\temp}\egroup}%
4665 \else % many
4666 \expandafter\xdef\csname\the\macname\endcsname{%
4667 \bgroup\noexpand\macroargctxt
4668 \noexpand\csname\the\macname xx\endcsname}
4669 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
4670 \csname\the\macname xxx\endcsname ##1,}%
4671 \expandafter\expandafter
4672 \expandafter\xdef
4673 \expandafter\expandafter
4674 \csname\the\macname xxx\endcsname
4675 \paramlist{%
4676 \egroup
4677 \noexpand\norecurse{\the\macname}%
4678 \noexpand\scanmacro{\temp}\egroup}%
4679 \fi
4680 \fi}
4681
4682\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
4683
4684% \braceorline decides whether the next nonwhitespace character is a
4685% {. If so it reads up to the closing }, if not, it reads the whole
4686% line. Whatever was read is then fed to the next control sequence
4687% as an argument (by \parsebrace or \parsearg)
4688\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
4689\def\braceorlinexxx{%
4690 \ifx\nchar\bgroup\else
4691 \expandafter\parsearg
4692 \fi \next}
4693
4694
4695\message{cross references,}
4696\newwrite\auxfile
4697
4698\newif\ifhavexrefs % True if xref values are known.
4238\newif\ifwarnedxrefs % True if we warned once that they aren't known.
4239
4699\newif\ifwarnedxrefs % True if we warned once that they aren't known.
4700
4240% @inforef is simple.
4701% @inforef is relatively simple.
4241\def\inforef #1{\inforefzzz #1,,,,**}
4242\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
4243 node \samp{\ignorespaces#1{}}}
4244
4702\def\inforef #1{\inforefzzz #1,,,,**}
4703\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
4704 node \samp{\ignorespaces#1{}}}
4705
4245% \setref{foo} defines a cross-reference point named foo.
4706% @node's job is to define \lastnode.
4707\def\node{\ENVcheck\parsearg\nodezzz}
4708\def\nodezzz#1{\nodexxx [#1,]}
4709\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
4710\let\nwnode=\node
4711\let\lastnode=\relax
4246
4712
4247\def\setref#1{%
4248\dosetq{#1-title}{Ytitle}%
4249\dosetq{#1-pg}{Ypagenumber}%
4250\dosetq{#1-snt}{Ysectionnumberandtype}}
4713% The sectioning commands (@chapter, etc.) call these.
4714\def\donoderef{%
4715 \ifx\lastnode\relax\else
4716 \expandafter\expandafter\expandafter\setref{\lastnode}%
4717 {Ysectionnumberandtype}%
4718 \global\let\lastnode=\relax
4719 \fi
4720}
4721\def\unnumbnoderef{%
4722 \ifx\lastnode\relax\else
4723 \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}%
4724 \global\let\lastnode=\relax
4725 \fi
4726}
4727\def\appendixnoderef{%
4728 \ifx\lastnode\relax\else
4729 \expandafter\expandafter\expandafter\setref{\lastnode}%
4730 {Yappendixletterandtype}%
4731 \global\let\lastnode=\relax
4732 \fi
4733}
4251
4734
4252\def\unnumbsetref#1{%
4253\dosetq{#1-title}{Ytitle}%
4254\dosetq{#1-pg}{Ypagenumber}%
4255\dosetq{#1-snt}{Ynothing}}
4256
4735
4257\def\appendixsetref#1{%
4258\dosetq{#1-title}{Ytitle}%
4259\dosetq{#1-pg}{Ypagenumber}%
4260\dosetq{#1-snt}{Yappendixletterandtype}}
4736% @anchor{NAME} -- define xref target at arbitrary point.
4737%
4738\def\anchor#1{\setref{#1}{Ynothing}}
4261
4739
4262% \xref, \pxref, and \ref generate cross-references to specified points.
4263% For \xrefX, #1 is the node name, #2 the name of the Info
4264% cross-reference, #3 the printed node name, #4 the name of the Info
4265% file, #5 the name of the printed manual. All but the node name can be
4266% omitted.
4740
4741% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
4742% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
4743% to set \indexdummies so commands such as @code in a section title
4744% aren't expanded. It would be nicer not to expand the titles in the
4745% first place, but there's so many layers that that is hard to do.
4746%
4747\def\setref#1#2{{%
4748 \indexdummies
4749 \dosetq{#1-title}{Ytitle}%
4750 \dosetq{#1-pg}{Ypagenumber}%
4751 \dosetq{#1-snt}{#2}
4752}}
4753
4754% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
4755% the node name, #2 the name of the Info cross-reference, #3 the printed
4756% node name, #4 the name of the Info file, #5 the name of the printed
4757% manual. All but the node name can be omitted.
4267%
4268\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
4269\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
4270\def\ref#1{\xrefX[#1,,,,,,,]}
4271\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
4272 \def\printedmanual{\ignorespaces #5}%
4273 \def\printednodename{\ignorespaces #3}%
4274 \setbox1=\hbox{\printedmanual}%
4275 \setbox0=\hbox{\printednodename}%
4276 \ifdim \wd0 = 0pt
4277 % No printed node name was explicitly given.
4278 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
4279 % Use the node name inside the square brackets.
4280 \def\printednodename{\ignorespaces #1}%
4281 \else
4282 % Use the actual chapter/section title appear inside
4283 % the square brackets. Use the real section title if we have it.
4758%
4759\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
4760\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
4761\def\ref#1{\xrefX[#1,,,,,,,]}
4762\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
4763 \def\printedmanual{\ignorespaces #5}%
4764 \def\printednodename{\ignorespaces #3}%
4765 \setbox1=\hbox{\printedmanual}%
4766 \setbox0=\hbox{\printednodename}%
4767 \ifdim \wd0 = 0pt
4768 % No printed node name was explicitly given.
4769 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
4770 % Use the node name inside the square brackets.
4771 \def\printednodename{\ignorespaces #1}%
4772 \else
4773 % Use the actual chapter/section title appear inside
4774 % the square brackets. Use the real section title if we have it.
4284 \ifdim \wd1>0pt%
4775 \ifdim \wd1 > 0pt
4285 % It is in another manual, so we don't have it.
4286 \def\printednodename{\ignorespaces #1}%
4287 \else
4288 \ifhavexrefs
4289 % We know the real title if we have the xref values.
4290 \def\printednodename{\refx{#1-title}{}}%
4291 \else
4292 % Otherwise just copy the Info node name.

--- 12 unchanged lines hidden (view full) ---

4305 \ifdim \wd1 > 0pt
4306 \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
4307 \else
4308 % _ (for example) has to be the character _ for the purposes of the
4309 % control sequence corresponding to the node, but it has to expand
4310 % into the usual \leavevmode...\vrule stuff for purposes of
4311 % printing. So we \turnoffactive for the \refx-snt, back on for the
4312 % printing, back off for the \refx-pg.
4776 % It is in another manual, so we don't have it.
4777 \def\printednodename{\ignorespaces #1}%
4778 \else
4779 \ifhavexrefs
4780 % We know the real title if we have the xref values.
4781 \def\printednodename{\refx{#1-title}{}}%
4782 \else
4783 % Otherwise just copy the Info node name.

--- 12 unchanged lines hidden (view full) ---

4796 \ifdim \wd1 > 0pt
4797 \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
4798 \else
4799 % _ (for example) has to be the character _ for the purposes of the
4800 % control sequence corresponding to the node, but it has to expand
4801 % into the usual \leavevmode...\vrule stuff for purposes of
4802 % printing. So we \turnoffactive for the \refx-snt, back on for the
4803 % printing, back off for the \refx-pg.
4313 {\turnoffactive \refx{#1-snt}{}}%
4314 \space [\printednodename],\space
4804 {\normalturnoffactive
4805 % Only output a following space if the -snt ref is nonempty; for
4806 % @unnumbered and @anchor, it won't be.
4807 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
4808 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
4809 }%
4810 % [mynode],
4811 [\printednodename],\space
4812 % page 3
4315 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
4316 \fi
4317\endgroup}
4318
4319% \dosetq is the interface for calls from other macros
4320
4813 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
4814 \fi
4815\endgroup}
4816
4817% \dosetq is the interface for calls from other macros
4818
4321% Use \turnoffactive so that punctuation chars such as underscore
4322% work in node names.
4323\def\dosetq #1#2{{\let\folio=0 \turnoffactive
4324\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
4325\next}}
4819% Use \normalturnoffactive so that punctuation chars such as underscore
4820% and backslash work in node names. (\turnoffactive doesn't do \.)
4821\def\dosetq#1#2{%
4822 {\let\folio=0
4823 \normalturnoffactive
4824 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
4825 \iflinks
4826 \next
4827 \fi
4828 }%
4829}
4326
4327% \internalsetq {foo}{page} expands into
4328% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
4329% When the aux file is read, ' is the escape character
4330
4331\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
4332
4333% Things to be expanded by \internalsetq

--- 34 unchanged lines hidden (view full) ---

4368\fi
4369
4370% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
4371% If its value is nonempty, SUFFIX is output afterward.
4372
4373\def\refx#1#2{%
4374 \expandafter\ifx\csname X#1\endcsname\relax
4375 % If not defined, say something at least.
4830
4831% \internalsetq {foo}{page} expands into
4832% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
4833% When the aux file is read, ' is the escape character
4834
4835\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
4836
4837% Things to be expanded by \internalsetq

--- 34 unchanged lines hidden (view full) ---

4872\fi
4873
4874% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
4875% If its value is nonempty, SUFFIX is output afterward.
4876
4877\def\refx#1#2{%
4878 \expandafter\ifx\csname X#1\endcsname\relax
4879 % If not defined, say something at least.
4376 $\langle$un\-de\-fined$\rangle$%
4377 \ifhavexrefs
4378 \message{\linenumber Undefined cross reference `#1'.}%
4379 \else
4380 \ifwarnedxrefs\else
4381 \global\warnedxrefstrue
4382 \message{Cross reference values unknown; you must run TeX again.}%
4880 \angleleft un\-de\-fined\angleright
4881 \iflinks
4882 \ifhavexrefs
4883 \message{\linenumber Undefined cross reference `#1'.}%
4884 \else
4885 \ifwarnedxrefs\else
4886 \global\warnedxrefstrue
4887 \message{Cross reference values unknown; you must run TeX again.}%
4888 \fi
4383 \fi
4384 \fi
4385 \else
4386 % It's defined, so just use it.
4387 \csname X#1\endcsname
4388 \fi
4389 #2% Output the suffix in any case.
4390}
4391
4392% This is the macro invoked by entries in the aux file.
4889 \fi
4890 \fi
4891 \else
4892 % It's defined, so just use it.
4893 \csname X#1\endcsname
4894 \fi
4895 #2% Output the suffix in any case.
4896}
4897
4898% This is the macro invoked by entries in the aux file.
4393\def\xrdef #1#2{{%
4394 \catcode`\'=\other
4395 \expandafter\gdef\csname X#1\endcsname{#2}%
4396}}
4899%
4900\def\xrdef#1{\begingroup
4901 % Reenable \ as an escape while reading the second argument.
4902 \catcode`\\ = 0
4903 \afterassignment\endgroup
4904 \expandafter\gdef\csname X#1\endcsname
4905}
4397
4398% Read the last existing aux file, if any. No error if none exists.
4399\def\readauxfile{\begingroup
4400 \catcode`\^^@=\other
4401 \catcode`\^^A=\other
4402 \catcode`\^^B=\other
4403 \catcode`\^^C=\other
4404 \catcode`\^^D=\other

--- 40 unchanged lines hidden (view full) ---

4445 \catcode`\"=\other
4446 \catcode`\_=\other
4447 \catcode`\|=\other
4448 \catcode`\<=\other
4449 \catcode`\>=\other
4450 \catcode`\$=\other
4451 \catcode`\#=\other
4452 \catcode`\&=\other
4906
4907% Read the last existing aux file, if any. No error if none exists.
4908\def\readauxfile{\begingroup
4909 \catcode`\^^@=\other
4910 \catcode`\^^A=\other
4911 \catcode`\^^B=\other
4912 \catcode`\^^C=\other
4913 \catcode`\^^D=\other

--- 40 unchanged lines hidden (view full) ---

4954 \catcode`\"=\other
4955 \catcode`\_=\other
4956 \catcode`\|=\other
4957 \catcode`\<=\other
4958 \catcode`\>=\other
4959 \catcode`\$=\other
4960 \catcode`\#=\other
4961 \catcode`\&=\other
4453 % `\+ does not work, so use 43.
4454 \catcode43=\other
4962 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
4455 % Make the characters 128-255 be printing characters
4456 {%
4457 \count 1=128
4458 \def\loop{%
4459 \catcode\count 1=\other
4460 \advance\count 1 by 1
4461 \ifnum \count 1<256 \loop \fi
4462 }%

--- 149 unchanged lines hidden (view full) ---

4612\def\finalout{\overfullrule=0pt}
4613
4614% @image. We use the macros from epsf.tex to support this.
4615% If epsf.tex is not installed and @image is used, we complain.
4616%
4617% Check for and read epsf.tex up front. If we read it only at @image
4618% time, we might be inside a group, and then its definitions would get
4619% undone and the next image would fail.
4963 % Make the characters 128-255 be printing characters
4964 {%
4965 \count 1=128
4966 \def\loop{%
4967 \catcode\count 1=\other
4968 \advance\count 1 by 1
4969 \ifnum \count 1<256 \loop \fi
4970 }%

--- 149 unchanged lines hidden (view full) ---

5120\def\finalout{\overfullrule=0pt}
5121
5122% @image. We use the macros from epsf.tex to support this.
5123% If epsf.tex is not installed and @image is used, we complain.
5124%
5125% Check for and read epsf.tex up front. If we read it only at @image
5126% time, we might be inside a group, and then its definitions would get
5127% undone and the next image would fail.
4620\openin 1 = xepsf.tex
5128\openin 1 = epsf.tex
4621\ifeof 1 \else
4622 \closein 1
5129\ifeof 1 \else
5130 \closein 1
4623 \def\epsfannounce{\toks0 = }% do not bother showing banner
5131 % Do not bother showing banner with post-v2.7 epsf.tex (available in
5132 % doc/epsf.tex until it shows up on ctan).
5133 \def\epsfannounce{\toks0 = }%
4624 \input epsf.tex
4625\fi
4626%
4627\newif\ifwarnednoepsf
4628\newhelp\noepsfhelp{epsf.tex must be installed for images to
4629 work. It is also included in the Texinfo distribution, or you can get
4630 it from ftp://ftp.tug.org/tex/epsf.tex.}
4631%

--- 13 unchanged lines hidden (view full) ---

4645% Arguments to @image:
4646% #1 is (mandatory) image filename; we tack on .eps extension.
4647% #2 is (optional) width, #3 is (optional) height.
4648% #4 is just the usual extra ignored arg for parsing this stuff.
4649\def\imagexxx#1,#2,#3,#4\finish{%
4650 % \epsfbox itself resets \epsf?size at each figure.
4651 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
4652 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
5134 \input epsf.tex
5135\fi
5136%
5137\newif\ifwarnednoepsf
5138\newhelp\noepsfhelp{epsf.tex must be installed for images to
5139 work. It is also included in the Texinfo distribution, or you can get
5140 it from ftp://ftp.tug.org/tex/epsf.tex.}
5141%

--- 13 unchanged lines hidden (view full) ---

5155% Arguments to @image:
5156% #1 is (mandatory) image filename; we tack on .eps extension.
5157% #2 is (optional) width, #3 is (optional) height.
5158% #4 is just the usual extra ignored arg for parsing this stuff.
5159\def\imagexxx#1,#2,#3,#4\finish{%
5160 % \epsfbox itself resets \epsf?size at each figure.
5161 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
5162 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
4653 \epsfbox{#1.eps}%
5163 % If the image is by itself, center it.
5164 \ifvmode
5165 \nobreak\medskip
5166 \nobreak
5167 \centerline{\epsfbox{#1.eps}}%
5168 \bigbreak
5169 \else
5170 \epsfbox{#1.eps}%
5171 \fi
4654}
4655
5172}
5173
4656% End of control word definitions.
4657
5174
5175\message{paper sizes,}
5176% And other related parameters.
4658
5177
4659\message{and turning on texinfo input format.}
4660
4661\def\openindices{%
4662 \newindex{cp}%
4663 \newcodeindex{fn}%
4664 \newcodeindex{vr}%
4665 \newcodeindex{tp}%
4666 \newcodeindex{ky}%
4667 \newcodeindex{pg}%
4668}
4669
4670% Set some numeric style parameters, for 8.5 x 11 format.
4671
4672\hsize = 6in
4673\hoffset = .25in
4674\newdimen\defaultparindent \defaultparindent = 15pt
5178\newdimen\defaultparindent \defaultparindent = 15pt
4675\parindent = \defaultparindent
4676\parskip 3pt plus 2pt minus 1pt
4677\setleading{13.2pt}
4678\advance\topskip by 1.2cm
4679
4680\chapheadingskip = 15pt plus 4pt minus 2pt
4681\secheadingskip = 12pt plus 3pt minus 2pt
4682\subsecheadingskip = 9pt plus 2pt minus 2pt
4683
4684% Prevent underfull vbox error messages.
5179
5180\chapheadingskip = 15pt plus 4pt minus 2pt
5181\secheadingskip = 12pt plus 3pt minus 2pt
5182\subsecheadingskip = 9pt plus 2pt minus 2pt
5183
5184% Prevent underfull vbox error messages.
4685\vbadness=10000
5185\vbadness = 10000
4686
5186
5187% Don't be so finicky about underfull hboxes, either.
5188\hbadness = 2000
5189
4687% Following George Bush, just get rid of widows and orphans.
4688\widowpenalty=10000
4689\clubpenalty=10000
4690
4691% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
4692% using an old version of TeX, don't do anything. We want the amount of
4693% stretch added to depend on the line length, hence the dependence on
5190% Following George Bush, just get rid of widows and orphans.
5191\widowpenalty=10000
5192\clubpenalty=10000
5193
5194% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
5195% using an old version of TeX, don't do anything. We want the amount of
5196% stretch added to depend on the line length, hence the dependence on
4694% \hsize. This makes it come to about 9pt for the 8.5x11 format.
5197% \hsize. This makes it come to about 9pt for the 8.5x11 format. We
5198% call this whenever the paper size is set.
4695%
5199%
4696\ifx\emergencystretch\thisisundefined
4697 % Allow us to assign to \emergencystretch anyway.
4698 \def\emergencystretch{\dimen0}%
4699\else
4700 \emergencystretch = \hsize
4701 \divide\emergencystretch by 45
4702\fi
5200\def\setemergencystretch{%
5201 \ifx\emergencystretch\thisisundefined
5202 % Allow us to assign to \emergencystretch anyway.
5203 \def\emergencystretch{\dimen0}%
5204 \else
5205 \emergencystretch = \hsize
5206 \divide\emergencystretch by 45
5207 \fi
5208}
4703
5209
4704% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25)
4705\def\smallbook{
4706 \global\chapheadingskip = 15pt plus 4pt minus 2pt
4707 \global\secheadingskip = 12pt plus 3pt minus 2pt
4708 \global\subsecheadingskip = 9pt plus 2pt minus 2pt
5210% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
5211% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
5212% set \parskip and call \setleading for \baselineskip.
5213%
5214\def\internalpagesizes#1#2#3#4#5#6{%
5215 \voffset = #3\relax
5216 \topskip = #6\relax
5217 \splittopskip = \topskip
4709 %
5218 %
4710 \global\lispnarrowing = 0.3in
4711 \setleading{12pt}
4712 \advance\topskip by -1cm
4713 \global\parskip 2pt plus 1pt
4714 \global\hsize = 5in
4715 \global\vsize=7.5in
4716 \global\tolerance=700
4717 \global\hfuzz=1pt
4718 \global\contentsrightmargin=0pt
4719 \global\deftypemargin=0pt
4720 \global\defbodyindent=.5cm
5219 \vsize = #1\relax
5220 \advance\vsize by \topskip
5221 \outervsize = \vsize
5222 \advance\outervsize by 2\topandbottommargin
5223 \pageheight = \vsize
4721 %
5224 %
4722 \global\pagewidth=\hsize
4723 \global\pageheight=\vsize
5225 \hsize = #2\relax
5226 \outerhsize = \hsize
5227 \advance\outerhsize by 0.5in
5228 \pagewidth = \hsize
4724 %
5229 %
4725 \global\let\smalllisp=\smalllispx
4726 \global\let\smallexample=\smalllispx
4727 \global\def\Esmallexample{\Esmalllisp}
5230 \normaloffset = #4\relax
5231 \bindingoffset = #5\relax
5232 %
5233 \parindent = \defaultparindent
5234 \setemergencystretch
4728}
4729
5235}
5236
4730% Use @afourpaper to print on European A4 paper.
4731\def\afourpaper{
4732\global\tolerance=700
4733\global\hfuzz=1pt
4734\setleading{12pt}
4735\global\parskip 15pt plus 1pt
5237% @letterpaper (the default).
5238\def\letterpaper{{\globaldefs = 1
5239 \parskip = 3pt plus 2pt minus 1pt
5240 \setleading{13.2pt}%
5241 %
5242 % If page is nothing but text, make it come out even.
5243 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
5244}}
4736
5245
4737\global\vsize= 53\baselineskip
4738\advance\vsize by \topskip
4739%\global\hsize= 5.85in % A4 wide 10pt
4740\global\hsize= 6.5in
4741\global\outerhsize=\hsize
4742\global\advance\outerhsize by 0.5in
4743\global\outervsize=\vsize
4744\global\advance\outervsize by 0.6in
5246% Use @smallbook to reset parameters for 7x9.5 (or so) format.
5247\def\smallbook{{\globaldefs = 1
5248 \parskip = 2pt plus 1pt
5249 \setleading{12pt}%
5250 %
5251 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
5252 %
5253 \lispnarrowing = 0.3in
5254 \tolerance = 700
5255 \hfuzz = 1pt
5256 \contentsrightmargin = 0pt
5257 \deftypemargin = 0pt
5258 \defbodyindent = .5cm
5259 %
5260 \let\smalldisplay = \smalldisplayx
5261 \let\smallexample = \smalllispx
5262 \let\smallformat = \smallformatx
5263 \let\smalllisp = \smalllispx
5264}}
4745
5265
4746\global\pagewidth=\hsize
4747\global\pageheight=\vsize
4748}
5266% Use @afourpaper to print on European A4 paper.
5267\def\afourpaper{{\globaldefs = 1
5268 \setleading{12pt}%
5269 \parskip = 3pt plus 2pt minus 1pt
5270 %
5271 \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
5272 %
5273 \tolerance = 700
5274 \hfuzz = 1pt
5275}}
4749
5276
4750\bindingoffset=0pt
4751\normaloffset=\hoffset
4752\pagewidth=\hsize
4753\pageheight=\vsize
4754
4755% Allow control of the text dimensions. Parameters in order: textheight;
4756% textwidth; voffset; hoffset; binding offset; topskip.
4757% All require a dimension;
4758% header is additional; added length extends the bottom of the page.
4759
4760\def\changepagesizes#1#2#3#4#5#6{
4761 \global\vsize= #1
4762 \global\topskip= #6
4763 \advance\vsize by \topskip
4764 \global\voffset= #3
4765 \global\hsize= #2
4766 \global\outerhsize=\hsize
4767 \global\advance\outerhsize by 0.5in
4768 \global\outervsize=\vsize
4769 \global\advance\outervsize by 0.6in
4770 \global\pagewidth=\hsize
4771 \global\pageheight=\vsize
4772 \global\normaloffset= #4
4773 \global\bindingoffset= #5}
4774
4775% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
4776% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
5277% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
5278% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
4777\def\afourlatex
4778 {\global\tolerance=700
4779 \global\hfuzz=1pt
4780 \setleading{12pt}
4781 \global\parskip 15pt plus 1pt
4782 \advance\baselineskip by 1.6pt
4783 \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}
4784 }
5279\def\afourlatex{{\globaldefs = 1
5280 \setleading{13.6pt}%
5281 %
5282 \afourpaper
5283 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
5284 %
5285 \globaldefs = 0
5286}}
4785
4786% Use @afourwide to print on European A4 paper in wide format.
5287
5288% Use @afourwide to print on European A4 paper in wide format.
4787\def\afourwide{\afourpaper
4788\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}}
5289\def\afourwide{%
5290 \afourpaper
5291 \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
5292 %
5293 \globaldefs = 0
5294}
4789
5295
5296% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
5297% Perhaps we should allow setting the margins, \topskip, \parskip,
5298% and/or leading, also. Or perhaps we should compute them somehow.
5299%
5300\def\pagesizes{\parsearg\pagesizesxxx}
5301\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
5302\def\pagesizesyyy#1,#2,#3\finish{{%
5303 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
5304 \globaldefs = 1
5305 %
5306 \parskip = 3pt plus 2pt minus 1pt
5307 \setleading{13.2pt}%
5308 %
5309 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
5310}}
5311
5312% Set default to letter.
5313%
5314\letterpaper
5315
5316\message{and turning on texinfo input format.}
5317
4790% Define macros to output various characters with catcode for normal text.
4791\catcode`\"=\other
4792\catcode`\~=\other
4793\catcode`\^=\other
4794\catcode`\_=\other
4795\catcode`\|=\other
4796\catcode`\<=\other
4797\catcode`\>=\other

--- 19 unchanged lines hidden (view full) ---

4817\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
4818
4819% Turn off all special characters except @
4820% (and those which the user can use as if they were ordinary).
4821% Most of these we simply print from the \tt font, but for some, we can
4822% use math or other variants that look better in normal text.
4823
4824\catcode`\"=\active
5318% Define macros to output various characters with catcode for normal text.
5319\catcode`\"=\other
5320\catcode`\~=\other
5321\catcode`\^=\other
5322\catcode`\_=\other
5323\catcode`\|=\other
5324\catcode`\<=\other
5325\catcode`\>=\other

--- 19 unchanged lines hidden (view full) ---

5345\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
5346
5347% Turn off all special characters except @
5348% (and those which the user can use as if they were ordinary).
5349% Most of these we simply print from the \tt font, but for some, we can
5350% use math or other variants that look better in normal text.
5351
5352\catcode`\"=\active
4825\def\activedoublequote{{\tt \char '042}}
5353\def\activedoublequote{{\tt\char34}}
4826\let"=\activedoublequote
4827\catcode`\~=\active
5354\let"=\activedoublequote
5355\catcode`\~=\active
4828\def~{{\tt \char '176}}
5356\def~{{\tt\char126}}
4829\chardef\hat=`\^
4830\catcode`\^=\active
4831\def^{{\tt \hat}}
4832
4833\catcode`\_=\active
4834\def_{\ifusingtt\normalunderscore\_}
4835% Subroutine for the previous macro.
4836\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
4837
4838\catcode`\|=\active
5357\chardef\hat=`\^
5358\catcode`\^=\active
5359\def^{{\tt \hat}}
5360
5361\catcode`\_=\active
5362\def_{\ifusingtt\normalunderscore\_}
5363% Subroutine for the previous macro.
5364\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
5365
5366\catcode`\|=\active
4839\def|{{\tt \char '174}}
5367\def|{{\tt\char124}}
4840\chardef \less=`\<
4841\catcode`\<=\active
4842\def<{{\tt \less}}
4843\chardef \gtr=`\>
4844\catcode`\>=\active
4845\def>{{\tt \gtr}}
4846\catcode`\+=\active
4847\def+{{\tt \char 43}}

--- 70 unchanged lines hidden (view full) ---

4918% the first `\{ in the file would cause an error. This macro tries to fix
4919% that, assuming it is called before the first `\' could plausibly occur.
4920% Also back turn on active characters that might appear in the input
4921% file name, in case not using a pre-dumped format.
4922%
4923@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
4924 @catcode`+=@active @catcode`@_=@active}
4925
5368\chardef \less=`\<
5369\catcode`\<=\active
5370\def<{{\tt \less}}
5371\chardef \gtr=`\>
5372\catcode`\>=\active
5373\def>{{\tt \gtr}}
5374\catcode`\+=\active
5375\def+{{\tt \char 43}}

--- 70 unchanged lines hidden (view full) ---

5446% the first `\{ in the file would cause an error. This macro tries to fix
5447% that, assuming it is called before the first `\' could plausibly occur.
5448% Also back turn on active characters that might appear in the input
5449% file name, in case not using a pre-dumped format.
5450%
5451@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
5452 @catcode`+=@active @catcode`@_=@active}
5453
4926%% These look ok in all fonts, so just make them not special. The @rm below
4927%% makes sure that the current font starts out as the newly loaded cmr10
5454% These look ok in all fonts, so just make them not special. The @rm below
5455% makes sure that the current font starts out as the newly loaded cmr10
4928@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
4929
4930@textfonts
4931@rm
4932
4933@c Local variables:
5456@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
5457
5458@textfonts
5459@rm
5460
5461@c Local variables:
5462@c eval: (add-hook 'write-file-hooks 'time-stamp)
4934@c page-delimiter: "^\\\\message"
5463@c page-delimiter: "^\\\\message"
5464@c time-stamp-start: "def\\\\texinfoversion{"
5465@c time-stamp-format: "%:y-%02m-%02d"
5466@c time-stamp-end: "}"
4935@c End:
5467@c End: