aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2019-03-10 23:03:48 -0700
committerPaul Eggert2019-03-10 23:05:30 -0700
commite2f35443796d423ea5f96a99da425a927327deb2 (patch)
tree2ca4cce0736f937dcc60881686500bb4c752a034 /doc
parent89082c823c738b8e3b436e4af1307eefe193eac9 (diff)
downloademacs-e2f35443796d423ea5f96a99da425a927327deb2.tar.gz
emacs-e2f35443796d423ea5f96a99da425a927327deb2.zip
Update from Gnulib
This incorporates: 2019-03-10 alloca-opt: Fix conflict mingw's new <alloca.h> file 2019-03-03 getloadavg: Write NULL for the null pointer Reported by Michal Privoznik <mprivozn@redhat.com>. * lib/getloadavg.c (getloadavg): Write NULL instead of 0. * build-aux/config.guess, build-aux/move-if-change: * doc/misc/texinfo.tex, lib/alloca.in.h, lib/getloadavg.c: * m4/alloca.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/texinfo.tex528
1 files changed, 260 insertions, 268 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 929418c760e..5ae97d767db 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2019-02-23.16} 6\def\texinfoversion{2019-03-09.13}
7 7
8% 8%
9% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc. 9% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
@@ -258,8 +258,8 @@
258 258
259% \domark is called twice inside \chapmacro, to add one 259% \domark is called twice inside \chapmacro, to add one
260% mark before the section break, and one after. 260% mark before the section break, and one after.
261% In the second call \prevchapterdefs is the same as \lastchapterdefs, 261% In the second call \prevchapterdefs is the same as \currentchapterdefs,
262% and \prevsectiondefs is the same as \lastsectiondefs. 262% and \prevsectiondefs is the same as \currentsectiondefs.
263% Then if the page is not broken at the mark, some of the previous 263% Then if the page is not broken at the mark, some of the previous
264% section appears on the page, and we can get the name of this section 264% section appears on the page, and we can get the name of this section
265% from \firstmark for @everyheadingmarks top. 265% from \firstmark for @everyheadingmarks top.
@@ -267,11 +267,11 @@
267% 267%
268% See page 260 of The TeXbook. 268% See page 260 of The TeXbook.
269\def\domark{% 269\def\domark{%
270 \toks0=\expandafter{\lastchapterdefs}% 270 \toks0=\expandafter{\currentchapterdefs}%
271 \toks2=\expandafter{\lastsectiondefs}% 271 \toks2=\expandafter{\currentsectiondefs}%
272 \toks4=\expandafter{\prevchapterdefs}% 272 \toks4=\expandafter{\prevchapterdefs}%
273 \toks6=\expandafter{\prevsectiondefs}% 273 \toks6=\expandafter{\prevsectiondefs}%
274 \toks8=\expandafter{\lastcolordefs}% 274 \toks8=\expandafter{\currentcolordefs}%
275 \mark{% 275 \mark{%
276 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top 276 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
277 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom 277 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
@@ -288,19 +288,19 @@
288% @setcolor (or @url, or @link, etc.) between @contents and the very 288% @setcolor (or @url, or @link, etc.) between @contents and the very
289% first @chapter. 289% first @chapter.
290\def\gettopheadingmarks{% 290\def\gettopheadingmarks{%
291 \ifcase0\topmark\fi 291 \ifcase0\the\savedtopmark\fi
292 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi 292 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
293} 293}
294\def\getbottomheadingmarks{\ifcase1\botmark\fi} 294\def\getbottomheadingmarks{\ifcase1\botmark\fi}
295\def\getcolormarks{\ifcase2\topmark\fi} 295\def\getcolormarks{\ifcase2\the\savedtopmark\fi}
296 296
297% Avoid "undefined control sequence" errors. 297% Avoid "undefined control sequence" errors.
298\def\lastchapterdefs{} 298\def\currentchapterdefs{}
299\def\lastsectiondefs{} 299\def\currentsectiondefs{}
300\def\lastsection{} 300\def\currentsection{}
301\def\prevchapterdefs{} 301\def\prevchapterdefs{}
302\def\prevsectiondefs{} 302\def\prevsectiondefs{}
303\def\lastcolordefs{} 303\def\currentcolordefs{}
304 304
305% Margin to add to right of even pages, to left of odd pages. 305% Margin to add to right of even pages, to left of odd pages.
306\newdimen\bindingoffset 306\newdimen\bindingoffset
@@ -310,11 +310,35 @@
310% Main output routine. 310% Main output routine.
311% 311%
312\chardef\PAGE = 255 312\chardef\PAGE = 255
313\output = {\onepageout{\pagecontents\PAGE}} 313\newtoks\defaultoutput
314\defaultoutput = {\savetopmark\onepageout{\pagecontents\PAGE}}
315\output=\expandafter{\the\defaultoutput}
314 316
315\newbox\headlinebox 317\newbox\headlinebox
316\newbox\footlinebox 318\newbox\footlinebox
317 319
320% When outputting the double column layout for indices, an output routine
321% is run several times, which hides the original value of \topmark. This
322% can lead to a page heading being output and duplicating the chapter heading
323% of the index. Hence, save the contents of \topmark at the beginning of
324% the output routine. The saved contents are valid until we actually
325% \shipout a page.
326%
327% (We used to run a short output routine to actually set \topmark and
328% \firstmark to the right values, but if this was called with an empty page
329% containing whatsits for writing index entries, the whatsits would be thrown
330% away and the index auxiliary file would remain empty.)
331%
332\newtoks\savedtopmark
333\newif\iftopmarksaved
334\topmarksavedtrue
335\def\savetopmark{%
336 \iftopmarksaved\else
337 \global\savedtopmark=\expandafter{\topmark}%
338 \global\topmarksavedtrue
339 \fi
340}
341
318% \onepageout takes a vbox as an argument. 342% \onepageout takes a vbox as an argument.
319% \shipout a vbox for a single page, adding an optional header, footer 343% \shipout a vbox for a single page, adding an optional header, footer
320% and footnote. This also causes index entries for this page to be written 344% and footnote. This also causes index entries for this page to be written
@@ -326,23 +350,17 @@
326 \ifodd\pageno \advance\hoffset by \bindingoffset 350 \ifodd\pageno \advance\hoffset by \bindingoffset
327 \else \advance\hoffset by -\bindingoffset\fi 351 \else \advance\hoffset by -\bindingoffset\fi
328 % 352 %
329 % Common context changes for both heading and footing.
330 % Do this outside of the \shipout so @code etc. will be expanded in
331 % the headline as they should be, not taken literally (outputting ''code).
332 \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
333 %
334 % Retrieve the information for the headings from the marks in the page, 353 % Retrieve the information for the headings from the marks in the page,
335 % and call Plain TeX's \makeheadline and \makefootline, which use the 354 % and call Plain TeX's \makeheadline and \makefootline, which use the
336 % values in \headline and \footline. 355 % values in \headline and \footline.
337 % 356 %
338 % This is used to check if we are on the first page of a chapter. 357 % This is used to check if we are on the first page of a chapter.
339 \ifcase1\topmark\fi 358 \ifcase1\the\savedtopmark\fi
340 \let\prevchaptername\thischaptername 359 \let\prevchaptername\thischaptername
341 \ifcase0\firstmark\fi 360 \ifcase0\firstmark\fi
342 \let\curchaptername\thischaptername 361 \let\curchaptername\thischaptername
343 % 362 %
344 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi 363 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
345 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
346 % 364 %
347 \ifx\curchaptername\prevchaptername 365 \ifx\curchaptername\prevchaptername
348 \let\thischapterheading\thischapter 366 \let\thischapterheading\thischapter
@@ -353,7 +371,14 @@
353 \def\thischapterheading{}% 371 \def\thischapterheading{}%
354 \fi 372 \fi
355 % 373 %
374 % Common context changes for both heading and footing.
375 % Do this outside of the \shipout so @code etc. will be expanded in
376 % the headline as they should be, not taken literally (outputting ''code).
377 \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
378 %
356 \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% 379 \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
380 %
381 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
357 \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% 382 \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
358 % 383 %
359 {% 384 {%
@@ -362,14 +387,8 @@
362 % take effect in \write's, yet the group defined by the \vbox ends 387 % take effect in \write's, yet the group defined by the \vbox ends
363 % before the \shipout runs. 388 % before the \shipout runs.
364 % 389 %
365 \indexdummies % don't expand commands in the output. 390 \atdummies % don't expand commands in the output.
366 \normalturnoffactive % \ in index entries must not stay \, e.g., if 391 \turnoffactive
367 % the page break happens to be in the middle of an example.
368 % We don't want .vr (or whatever) entries like this:
369 % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
370 % "\acronym" won't work when it's read back in;
371 % it needs to be
372 % {\code {{\backslashcurfont }acronym}
373 \shipout\vbox{% 392 \shipout\vbox{%
374 % Do this early so pdf references go to the beginning of the page. 393 % Do this early so pdf references go to the beginning of the page.
375 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi 394 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -384,8 +403,9 @@
384 \unvbox\footlinebox 403 \unvbox\footlinebox
385 \fi 404 \fi
386 % 405 %
387 }% end of \shipout\vbox 406 }%
388 }% end of group with \indexdummies 407 }%
408 \global\topmarksavedfalse
389 \advancepageno 409 \advancepageno
390 \ifnum\outputpenalty>-20000 \else\dosupereject\fi 410 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
391} 411}
@@ -1161,7 +1181,7 @@ output) for that.)}
1161 % Set color, and create a mark which defines \thiscolor accordingly, 1181 % Set color, and create a mark which defines \thiscolor accordingly,
1162 % so that \makeheadline knows which color to restore. 1182 % so that \makeheadline knows which color to restore.
1163 \def\setcolor#1{% 1183 \def\setcolor#1{%
1164 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% 1184 \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
1165 \domark 1185 \domark
1166 \pdfsetcolor{#1}% 1186 \pdfsetcolor{#1}%
1167 } 1187 }
@@ -1169,7 +1189,7 @@ output) for that.)}
1169 \def\maincolor{\rgbBlack} 1189 \def\maincolor{\rgbBlack}
1170 \pdfsetcolor{\maincolor} 1190 \pdfsetcolor{\maincolor}
1171 \edef\thiscolor{\maincolor} 1191 \edef\thiscolor{\maincolor}
1172 \def\lastcolordefs{} 1192 \def\currentcolordefs{}
1173 % 1193 %
1174 \def\makefootline{% 1194 \def\makefootline{%
1175 \baselineskip24pt 1195 \baselineskip24pt
@@ -1547,7 +1567,7 @@ output) for that.)}
1547 % Set color, and create a mark which defines \thiscolor accordingly, 1567 % Set color, and create a mark which defines \thiscolor accordingly,
1548 % so that \makeheadline knows which color to restore. 1568 % so that \makeheadline knows which color to restore.
1549 \def\setcolor#1{% 1569 \def\setcolor#1{%
1550 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% 1570 \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
1551 \domark 1571 \domark
1552 \pdfsetcolor{#1}% 1572 \pdfsetcolor{#1}%
1553 } 1573 }
@@ -1555,7 +1575,7 @@ output) for that.)}
1555 \def\maincolor{\rgbBlack} 1575 \def\maincolor{\rgbBlack}
1556 \pdfsetcolor{\maincolor} 1576 \pdfsetcolor{\maincolor}
1557 \edef\thiscolor{\maincolor} 1577 \edef\thiscolor{\maincolor}
1558 \def\lastcolordefs{} 1578 \def\currentcolordefs{}
1559 % 1579 %
1560 \def\makefootline{% 1580 \def\makefootline{%
1561 \baselineskip24pt 1581 \baselineskip24pt
@@ -3032,41 +3052,33 @@ end
3032 \global\def/{\normalslash} 3052 \global\def/{\normalslash}
3033} 3053}
3034 3054
3035% we put a little stretch before and after the breakable chars, to help 3055\def\urefcodeamp{\urefprebreak \&\urefpostbreak}
3036% line breaking of long url's. The unequal skips make look better in 3056\def\urefcodedot{\urefprebreak .\urefpostbreak}
3037% cmtt at least, especially for dots. 3057\def\urefcodehash{\urefprebreak \#\urefpostbreak}
3038\def\urefprestretchamount{.13em} 3058\def\urefcodequest{\urefprebreak ?\urefpostbreak}
3039\def\urefpoststretchamount{.1em}
3040\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
3041\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
3042%
3043\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
3044\def\urefcodedot{\urefprestretch .\urefpoststretch}
3045\def\urefcodehash{\urefprestretch \#\urefpoststretch}
3046\def\urefcodequest{\urefprestretch ?\urefpoststretch}
3047\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} 3059\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
3048{ 3060{
3049 \catcode`\/=\active 3061 \catcode`\/=\active
3050 \global\def\urefcodeslashfinish{% 3062 \global\def\urefcodeslashfinish{%
3051 \urefprestretch \slashChar 3063 \urefprebreak \slashChar
3052 % Allow line break only after the final / in a sequence of 3064 % Allow line break only after the final / in a sequence of
3053 % slashes, to avoid line break between the slashes in http://. 3065 % slashes, to avoid line break between the slashes in http://.
3054 \ifx\next/\else \urefpoststretch \fi 3066 \ifx\next/\else \urefpostbreak \fi
3055 } 3067 }
3056} 3068}
3057 3069
3058% One more complication: by default we'll break after the special 3070% By default we'll break after the special characters, but some people like to
3059% characters, but some people like to break before the special chars, so 3071% break before the special chars, so allow that. Also allow no breaking at
3060% allow that. Also allow no breaking at all, for manual control. 3072% all, for manual control.
3061% 3073%
3062\parseargdef\urefbreakstyle{% 3074\parseargdef\urefbreakstyle{%
3063 \def\txiarg{#1}% 3075 \def\txiarg{#1}%
3064 \ifx\txiarg\wordnone 3076 \ifx\txiarg\wordnone
3065 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} 3077 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
3066 \else\ifx\txiarg\wordbefore 3078 \else\ifx\txiarg\wordbefore
3067 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} 3079 \def\urefprebreak{\urefallowbreak}\def\urefpostbreak{\nobreak}
3068 \else\ifx\txiarg\wordafter 3080 \else\ifx\txiarg\wordafter
3069 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} 3081 \def\urefprebreak{\nobreak}\def\urefpostbreak{\urefallowbreak}
3070 \else 3082 \else
3071 \errhelp = \EMsimple 3083 \errhelp = \EMsimple
3072 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% 3084 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
@@ -3076,6 +3088,14 @@ end
3076\def\wordbefore{before} 3088\def\wordbefore{before}
3077\def\wordnone{none} 3089\def\wordnone{none}
3078 3090
3091% Allow a ragged right output to aid breaking long URL's. Putting stretch in
3092% between characters of the URL doesn't look good.
3093\def\urefallowbreak{%
3094 \hskip 0pt plus 1fil\relax
3095 \allowbreak
3096 \hskip 0pt plus -1fil\relax
3097}
3098
3079\urefbreakstyle after 3099\urefbreakstyle after
3080 3100
3081% @url synonym for @uref, since that's how everyone uses it. 3101% @url synonym for @uref, since that's how everyone uses it.
@@ -4832,23 +4852,8 @@ end
4832\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} 4852\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
4833 4853
4834 4854
4835% Used when writing an index entry out to an index file to prevent 4855% Used for the aux, toc and index files to prevent expansion of Texinfo
4836% expansion of Texinfo commands that can appear in an index entry. 4856% commands.
4837%
4838\def\indexdummies{%
4839 \escapechar = `\\ % use backslash in output files.
4840 \definedummyletter\@%
4841 \definedummyletter\ %
4842 %
4843 % For texindex which always views { and } as separators.
4844 \def\{{\lbracechar{}}%
4845 \def\}{\rbracechar{}}%
4846 %
4847 % Do the redefinitions.
4848 \definedummies
4849}
4850
4851% Used for the aux and toc files, where @ is the escape character.
4852% 4857%
4853\def\atdummies{% 4858\def\atdummies{%
4854 \definedummyletter\@% 4859 \definedummyletter\@%
@@ -4878,8 +4883,7 @@ end
4878\def\definedummyletter#1{\def#1{\string#1}}% 4883\def\definedummyletter#1{\def#1{\string#1}}%
4879\let\definedummyaccent\definedummyletter 4884\let\definedummyaccent\definedummyletter
4880 4885
4881% Called from \indexdummies and \atdummies, to effectively prevent 4886% Called from \atdummies to prevent the expansion of commands.
4882% the expansion of commands.
4883% 4887%
4884\def\definedummies{% 4888\def\definedummies{%
4885 % 4889 %
@@ -5044,11 +5048,9 @@ end
5044 \commondummyword\xref 5048 \commondummyword\xref
5045} 5049}
5046 5050
5047% This does nothing, but for a time it was recommended to use
5048% \usebracesinindexestrue to be able to use braces in index entries.
5049
5050\let\indexlbrace\relax 5051\let\indexlbrace\relax
5051\let\indexrbrace\relax 5052\let\indexrbrace\relax
5053\let\indexatchar\relax
5052 5054
5053{\catcode`\@=0 5055{\catcode`\@=0
5054\catcode`\\=13 5056\catcode`\\=13
@@ -5082,10 +5084,8 @@ end
5082 } 5084 }
5083 5085
5084 \gdef\indexnonalnumreappear{% 5086 \gdef\indexnonalnumreappear{%
5085 \useindexbackslash
5086 \let-\normaldash 5087 \let-\normaldash
5087 \let<\normalless 5088 \let<\normalless
5088 \def\@{@}%
5089 } 5089 }
5090} 5090}
5091 5091
@@ -5196,36 +5196,16 @@ end
5196 5196
5197 5197
5198 5198
5199\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
5200
5201% Most index entries go through here, but \dosubind is the general case.
5202% #1 is the index name, #2 is the entry text. 5199% #1 is the index name, #2 is the entry text.
5203\def\doind#1#2{\dosubind{#1}{#2}{}} 5200\def\doind#1#2{%
5204
5205% There is also \dosubind {index}{topic}{subtopic}
5206% which makes an entry in a two-level index such as the operation index.
5207% TODO: Two-level index? Operation index?
5208
5209% Workhorse for all indexes.
5210% #1 is name of index, #2 is stuff to put there, #3 is subentry --
5211% empty if called from \doind, as we usually are (the main exception
5212% is with most defuns, which call us directly).
5213%
5214\def\dosubind#1#2#3{%
5215 \iflinks 5201 \iflinks
5216 {% 5202 {%
5217 \requireopenindexfile{#1}%
5218 % Store the main index entry text (including the third arg).
5219 \toks0 = {#2}%
5220 % If third arg is present, precede it with a space.
5221 \def\thirdarg{#3}%
5222 \ifx\thirdarg\empty \else
5223 \toks0 = \expandafter{\the\toks0 \space #3}%
5224 \fi
5225 % 5203 %
5204 \requireopenindexfile{#1}%
5226 \edef\writeto{\csname#1indfile\endcsname}% 5205 \edef\writeto{\csname#1indfile\endcsname}%
5227 % 5206 %
5228 \safewhatsit\dosubindwrite 5207 \def\indextext{#2}%
5208 \safewhatsit\doindwrite
5229 }% 5209 }%
5230 \fi 5210 \fi
5231} 5211}
@@ -5247,21 +5227,7 @@ end
5247\fi} 5227\fi}
5248\def\indexisfl{fl} 5228\def\indexisfl{fl}
5249 5229
5250% Output \ as {\indexbackslash}, because \ is an escape character in 5230% Definition for writing index entry sort key.
5251% the index files.
5252\let\indexbackslash=\relax
5253{\catcode`\@=0 \catcode`\\=\active
5254 @gdef@useindexbackslash{@def\{{@indexbackslash}}}
5255}
5256
5257% Definition for writing index entry text.
5258\def\sortas#1{\ignorespaces}%
5259
5260% Definition for writing index entry sort key. Should occur at the at
5261% the beginning of the index entry, like
5262% @cindex @sortas{september} \september
5263% The \ignorespaces takes care of following space, but there's no way
5264% to remove space before it.
5265{ 5231{
5266\catcode`\-=13 5232\catcode`\-=13
5267\gdef\indexwritesortas{% 5233\gdef\indexwritesortas{%
@@ -5272,51 +5238,109 @@ end
5272 \xdef\indexsortkey{#1}\endgroup} 5238 \xdef\indexsortkey{#1}\endgroup}
5273} 5239}
5274 5240
5241% The default definition
5242\def\sortas#1{}%
5275 5243
5276% Write the entry in \toks0 to the index file. 5244% Given index entry text like "aaa @subentry bbb @sortas{ZZZ}":
5245% * Set \bracedtext to "{aaa}{bbb}"
5246% * Set \fullindexsortkey to "aaa @subentry ZZZ"
5277% 5247%
5278\def\dosubindwrite{% 5248\def\splitindexentry#1{%
5279 % Put the index entry in the margin if desired. 5249 \gdef\fullindexsortkey{}%
5280 \ifx\SETmarginindex\relax\else 5250 \xdef\bracedtext{}%
5281 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% 5251 \def\sep{}%
5252 \expandafter\doindexsegment#1\subentry\finish\subentry
5253}
5254
5255% append the results from the next segment
5256\def\doindexsegment#1\subentry{%
5257 \def\segment{#1}%
5258 \ifx\segment\isfinish
5259 \else
5260 %
5261 % Fully expand the segment, throwing away any @sortas directives, and
5262 % trim spaces.
5263 \edef\trimmed{\segment}%
5264 \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
5265 %
5266 \xdef\bracedtext{\bracedtext{\trimmed}}%
5267 %
5268 % Get the string to sort by. Process the segment with all
5269 % font commands turned off.
5270 \bgroup
5271 \let\sortas\indexwritesortas
5272 \indexnofonts
5273 % The braces around the commands are recognized by texindex.
5274 \def\lbracechar{{\indexlbrace}}%
5275 \def\rbracechar{{\indexrbrace}}%
5276 \let\{=\lbracechar
5277 \let\}=\rbracechar
5278 \def\@{{\indexatchar}}%
5279 \def\atchar##1{\@}%
5280 %
5281 \let\indexsortkey\empty
5282 % Execute the segment and throw away the typeset output. This executes
5283 % any @sortas commands in this segment.
5284 \setbox\dummybox = \hbox{\segment}%
5285 \ifx\indexsortkey\empty{%
5286 \indexnonalnumdisappear
5287 \xdef\trimmed{\segment}%
5288 \xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
5289 \xdef\indexsortkey{\trimmed}%
5290 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5291 }\fi
5292 %
5293 % Append to \fullindexsortkey.
5294 \edef\tmp{\gdef\noexpand\fullindexsortkey{%
5295 \fullindexsortkey\sep\indexsortkey}}%
5296 \tmp
5297 \egroup
5298 \def\sep{\subentry}%
5299 %
5300 \expandafter\doindexsegment
5282 \fi 5301 \fi
5302}
5303\def\isfinish{\finish}%
5304\newbox\dummybox % used above
5305
5306\let\subentry\relax
5307
5308% Write the entry in \toks0 to the index file.
5309%
5310\def\doindwrite{%
5311 \maybemarginindex
5283 % 5312 %
5284 % Remember, we are within a group. 5313 \atdummies
5285 \indexdummies % Must do this here, since \bf, etc expand at this stage 5314 %
5286 \useindexbackslash % \indexbackslash isn't defined now so it will be output 5315 % For texindex which always views { and } as separators.
5287 % as is; and it will print as backslash. 5316 \def\{{\lbracechar{}}%
5288 % The braces around \indexbrace are recognized by texindex. 5317 \def\}{\rbracechar{}}%
5289 % 5318 %
5290 % Get the string to sort by, by processing the index entry with all 5319 % Split the entry into primary entry and any subentries, and get the index
5291 % font commands turned off. 5320 % sort key.
5292 {\indexnofonts 5321 \splitindexentry\indextext
5293 \def\lbracechar{{\indexlbrace}}%
5294 \def\rbracechar{{\indexrbrace}}%
5295 \let\{=\lbracechar
5296 \let\}=\rbracechar
5297 \indexnonalnumdisappear
5298 \xdef\indexsortkey{}%
5299 \let\sortas=\indexwritesortas
5300 \edef\temp{\the\toks0}%
5301 \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
5302 \ifx\indexsortkey\empty
5303 \xdef\indexsortkey{\temp}%
5304 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5305 \fi
5306 }%
5307 % 5322 %
5308 % Set up the complete index entry, with both the sort key and 5323 % Set up the complete index entry, with both the sort key and
5309 % the original text, including any font commands. We write 5324 % the original text, including any font commands. We write
5310 % three arguments to \entry to the .?? file (four in the 5325 % three arguments to \entry to the .?? file (four in the
5311 % subentry case), texindex reduces to two when writing the .??s 5326 % subentry case), texindex reduces to two when writing the .??s
5312 % sorted result. 5327 % sorted result.
5328 %
5313 \edef\temp{% 5329 \edef\temp{%
5314 \write\writeto{% 5330 \write\writeto{%
5315 \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% 5331 \string\entry{\fullindexsortkey}{\noexpand\folio}\bracedtext}%
5316 }% 5332 }%
5317 \temp 5333 \temp
5318} 5334}
5319\newbox\dummybox % used above 5335
5336% Put the index entry in the margin if desired (undocumented).
5337\def\maybemarginindex{%
5338 \ifx\SETmarginindex\relax\else
5339 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \relax\indextext}}%
5340 \fi
5341}
5342\let\SETmarginindex=\relax
5343
5320 5344
5321% Take care of unwanted page breaks/skips around a whatsit: 5345% Take care of unwanted page breaks/skips around a whatsit:
5322% 5346%
@@ -5418,11 +5442,6 @@ end
5418\def\tindex {\tpindex} 5442\def\tindex {\tpindex}
5419\def\pindex {\pgindex} 5443\def\pindex {\pgindex}
5420 5444
5421\def\cindexsub {\begingroup\obeylines\cindexsub}
5422{\obeylines %
5423\gdef\cindexsub "#1" #2^^M{\endgroup %
5424\dosubind{cp}{#2}{#1}}}
5425
5426% Define the macros used in formatting output of the sorted index material. 5445% Define the macros used in formatting output of the sorted index material.
5427 5446
5428% @printindex causes a particular index (the ??s file) to get printed. 5447% @printindex causes a particular index (the ??s file) to get printed.
@@ -5436,14 +5455,10 @@ end
5436 \plainfrenchspacing 5455 \plainfrenchspacing
5437 \everypar = {}% don't want the \kern\-parindent from indentation suppression. 5456 \everypar = {}% don't want the \kern\-parindent from indentation suppression.
5438 % 5457 %
5439 % See if the index file exists and is nonempty.
5440 % Change catcode of @ here so that if the index file contains
5441 % \initial {@}
5442 % as its first line, TeX doesn't complain about mismatched braces
5443 % (because it thinks @} is a control sequence).
5444 \catcode`\@ = 12
5445 % See comment in \requireopenindexfile. 5458 % See comment in \requireopenindexfile.
5446 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi 5459 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
5460 %
5461 % See if the index file exists and is nonempty.
5447 \openin 1 \jobname.\indexname s 5462 \openin 1 \jobname.\indexname s
5448 \ifeof 1 5463 \ifeof 1
5449 % \enddoublecolumns gets confused if there is no text in the index, 5464 % \enddoublecolumns gets confused if there is no text in the index,
@@ -5453,8 +5468,6 @@ end
5453 \putwordIndexNonexistent 5468 \putwordIndexNonexistent
5454 \typeout{No file \jobname.\indexname s.}% 5469 \typeout{No file \jobname.\indexname s.}%
5455 \else 5470 \else
5456 \catcode`\\ = 0
5457 %
5458 % If the index file exists but is empty, then \openin leaves \ifeof 5471 % If the index file exists but is empty, then \openin leaves \ifeof
5459 % false. We have to make TeX try to read something from the file, so 5472 % false. We have to make TeX try to read something from the file, so
5460 % it can discover if there is anything in it. 5473 % it can discover if there is anything in it.
@@ -5462,29 +5475,7 @@ end
5462 \ifeof 1 5475 \ifeof 1
5463 \putwordIndexIsEmpty 5476 \putwordIndexIsEmpty
5464 \else 5477 \else
5465 % Index files are almost Texinfo source, but we use \ as the escape 5478 \expandafter\printindexzz\thisline\relax\relax\finish%
5466 % character. It would be better to use @, but that's too big a change
5467 % to make right now.
5468 \def\indexbackslash{\ttbackslash}%
5469 \let\indexlbrace\{ % Likewise, set these sequences for braces
5470 \let\indexrbrace\} % used in the sort key.
5471 \begindoublecolumns
5472 \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
5473 %
5474 % Read input from the index file line by line.
5475 \loopdo
5476 \ifeof1 \else
5477 \read 1 to \nextline
5478 \fi
5479 %
5480 \indexinputprocessing
5481 \thisline
5482 %
5483 \ifeof1\else
5484 \let\thisline\nextline
5485 \repeat
5486 %%
5487 \enddoublecolumns
5488 \fi 5479 \fi
5489 \fi 5480 \fi
5490 \closein 1 5481 \closein 1
@@ -5492,6 +5483,40 @@ end
5492\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} 5483\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
5493\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} 5484\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
5494 5485
5486% If the index file starts with a backslash, forgo reading the index
5487% file altogether. If somebody upgrades texinfo.tex they may still have
5488% old index files using \ as the escape character. Reading this would
5489% at best lead to typesetting garbage, at worst a TeX syntax error.
5490\def\printindexzz#1#2\finish{%
5491 % NB this won't work if the index file starts with a group...
5492 \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
5493 \message{skipping sorted index file}%
5494 (Skipped sorted index file in obsolete format)
5495 \else
5496 \printindexzzz
5497 \fi
5498}
5499
5500\def\printindexzzz{%
5501 \begindoublecolumns
5502 \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
5503 %
5504 % Read input from the index file line by line.
5505 \loopdo
5506 \ifeof1 \else
5507 \read 1 to \nextline
5508 \fi
5509 %
5510 \indexinputprocessing
5511 \thisline
5512 %
5513 \ifeof1\else
5514 \let\thisline\nextline
5515 \repeat
5516 %%
5517 \enddoublecolumns
5518}
5519
5495\def\indexinputprocessing{% 5520\def\indexinputprocessing{%
5496 \ifeof1 5521 \ifeof1
5497 \let\firsttoken\relax 5522 \let\firsttoken\relax
@@ -5511,12 +5536,18 @@ end
5511\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 5536\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
5512\catcode`\$=3 5537\catcode`\$=3
5513\gdef\initialglyphs{% 5538\gdef\initialglyphs{%
5539 % special control sequences used in the index sort key
5540 \let\indexlbrace\{%
5541 \let\indexrbrace\}%
5542 \let\indexatchar\@%
5543 %
5514 % Some changes for non-alphabetic characters. Using the glyphs from the 5544 % Some changes for non-alphabetic characters. Using the glyphs from the
5515 % math fonts looks more consistent than the typewriter font used elsewhere 5545 % math fonts looks more consistent than the typewriter font used elsewhere
5516 % for these characters. 5546 % for these characters.
5517 \def\indexbackslash{\math{\backslash}}% 5547 \uccode`\~=`\\ \uppercase{\def~{\math{\backslash}}}
5518 \let\\=\indexbackslash
5519 % 5548 %
5549 % In case @\ is used for backslash
5550 \uppercase{\let\\=~}
5520 % Can't get bold backslash so don't use bold forward slash 5551 % Can't get bold backslash so don't use bold forward slash
5521 \catcode`\/=13 5552 \catcode`\/=13
5522 \def/{{\secrmnotbold \normalslash}}% 5553 \def/{{\secrmnotbold \normalslash}}%
@@ -5793,34 +5824,13 @@ end
5793\newbox\partialpage 5824\newbox\partialpage
5794\newdimen\doublecolumnhsize 5825\newdimen\doublecolumnhsize
5795 5826
5796% Use inside an output routine to save \topmark and \firstmark
5797\def\savemarks{%
5798 \global\savedtopmark=\expandafter{\topmark }%
5799 \global\savedfirstmark=\expandafter{\firstmark }%
5800}
5801\newtoks\savedtopmark
5802\newtoks\savedfirstmark
5803
5804% Set \topmark and \firstmark for next time \output runs.
5805% Can't be run from withinside \output (because any material
5806% added while an output routine is active, including
5807% penalties, is saved for after it finishes). The page so far
5808% should be empty, otherwise what's on it will be thrown away.
5809\def\restoremarks{%
5810 \mark{\the\savedtopmark}%
5811 \bgroup\output = {%
5812 \setbox\dummybox=\box\PAGE
5813 }abc\eject\egroup
5814 % "abc" because output routine doesn't fire for a completely empty page.
5815 \mark{\the\savedfirstmark}%
5816}
5817
5818\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns 5827\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5819 % If not much space left on page, start a new page. 5828 % If not much space left on page, start a new page.
5820 \ifdim\pagetotal>0.8\vsize\vfill\eject\fi 5829 \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
5821 % 5830 %
5822 % Grab any single-column material above us. 5831 % Grab any single-column material above us.
5823 \output = {% 5832 \output = {%
5833 \savetopmark
5824 % 5834 %
5825 % Here is a possibility not foreseen in manmac: if we accumulate a 5835 % Here is a possibility not foreseen in manmac: if we accumulate a
5826 % whole lot of material, we might end up calling this \output 5836 % whole lot of material, we might end up calling this \output
@@ -5838,15 +5848,8 @@ end
5838 \unvbox\PAGE 5848 \unvbox\PAGE
5839 \kern-\topskip \kern\baselineskip 5849 \kern-\topskip \kern\baselineskip
5840 }% 5850 }%
5841 \savemarks
5842 }% 5851 }%
5843 \eject % run that output routine to set \partialpage 5852 \eject % run that output routine to set \partialpage
5844 \restoremarks
5845 %
5846 % We recover the two marks that the last output routine saved in order
5847 % to propagate the information in marks added around a chapter heading,
5848 % which could be otherwise be lost by the time the final page is output.
5849 %
5850 % 5853 %
5851 % Use the double-column output routine for subsequent pages. 5854 % Use the double-column output routine for subsequent pages.
5852 \output = {\doublecolumnout}% 5855 \output = {\doublecolumnout}%
@@ -5887,6 +5890,7 @@ end
5887% 5890%
5888\def\doublecolumnout{% 5891\def\doublecolumnout{%
5889 % 5892 %
5893 \savetopmark
5890 \splittopskip=\topskip \splitmaxdepth=\maxdepth 5894 \splittopskip=\topskip \splitmaxdepth=\maxdepth
5891 \dimen@ = \vsize 5895 \dimen@ = \vsize
5892 \divide\dimen@ by 2 5896 \divide\dimen@ by 2
@@ -5942,7 +5946,7 @@ end
5942 % 5946 %
5943 \output = {% 5947 \output = {%
5944 % Split the last of the double-column material. 5948 % Split the last of the double-column material.
5945 \savemarks 5949 \savetopmark
5946 \balancecolumns 5950 \balancecolumns
5947 }% 5951 }%
5948 \eject % call the \output just set 5952 \eject % call the \output just set
@@ -5950,10 +5954,9 @@ end
5950 % Having called \balancecolumns once, we do not 5954 % Having called \balancecolumns once, we do not
5951 % want to call it again. Therefore, reset \output to its normal 5955 % want to call it again. Therefore, reset \output to its normal
5952 % definition right away. 5956 % definition right away.
5953 \global\output = {\onepageout{\pagecontents\PAGE}}% 5957 \global\output=\expandafter{\the\defaultoutput}
5954 % 5958 %
5955 \endgroup % started in \begindoublecolumns 5959 \endgroup % started in \begindoublecolumns
5956 \restoremarks
5957 % Leave the double-column material on the current page, no automatic 5960 % Leave the double-column material on the current page, no automatic
5958 % page break. 5961 % page break.
5959 \box\balancedcolumns 5962 \box\balancedcolumns
@@ -6468,27 +6471,22 @@ end
6468 \expandafter\ifx\thisenv\titlepage\else 6471 \expandafter\ifx\thisenv\titlepage\else
6469 \checkenv{}% chapters, etc., should not start inside an environment. 6472 \checkenv{}% chapters, etc., should not start inside an environment.
6470 \fi 6473 \fi
6471 % FIXME: \chapmacro is currently called from inside \titlepage when
6472 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6473 % this should probably be done by \sectionheading with an option to print
6474 % in chapter size.
6475 %
6476 % Insert the first mark before the heading break (see notes for \domark). 6474 % Insert the first mark before the heading break (see notes for \domark).
6477 \let\prevchapterdefs=\lastchapterdefs 6475 \let\prevchapterdefs=\currentchapterdefs
6478 \let\prevsectiondefs=\lastsectiondefs 6476 \let\prevsectiondefs=\currentsectiondefs
6479 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% 6477 \gdef\currentsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6480 \gdef\thissection{}}% 6478 \gdef\thissection{}}%
6481 % 6479 %
6482 \def\temptype{#2}% 6480 \def\temptype{#2}%
6483 \ifx\temptype\Ynothingkeyword 6481 \ifx\temptype\Ynothingkeyword
6484 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% 6482 \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6485 \gdef\thischapter{\thischaptername}}% 6483 \gdef\thischapter{\thischaptername}}%
6486 \else\ifx\temptype\Yomitfromtockeyword 6484 \else\ifx\temptype\Yomitfromtockeyword
6487 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% 6485 \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6488 \gdef\thischapter{}}% 6486 \gdef\thischapter{}}%
6489 \else\ifx\temptype\Yappendixkeyword 6487 \else\ifx\temptype\Yappendixkeyword
6490 \toks0={#1}% 6488 \toks0={#1}%
6491 \xdef\lastchapterdefs{% 6489 \xdef\currentchapterdefs{%
6492 \gdef\noexpand\thischaptername{\the\toks0}% 6490 \gdef\noexpand\thischaptername{\the\toks0}%
6493 \gdef\noexpand\thischapternum{\appendixletter}% 6491 \gdef\noexpand\thischapternum{\appendixletter}%
6494 % \noexpand\putwordAppendix avoids expanding indigestible 6492 % \noexpand\putwordAppendix avoids expanding indigestible
@@ -6499,7 +6497,7 @@ end
6499 }% 6497 }%
6500 \else 6498 \else
6501 \toks0={#1}% 6499 \toks0={#1}%
6502 \xdef\lastchapterdefs{% 6500 \xdef\currentchapterdefs{%
6503 \gdef\noexpand\thischaptername{\the\toks0}% 6501 \gdef\noexpand\thischaptername{\the\toks0}%
6504 \gdef\noexpand\thischapternum{\the\chapno}% 6502 \gdef\noexpand\thischapternum{\the\chapno}%
6505 % \noexpand\putwordChapter avoids expanding indigestible 6503 % \noexpand\putwordChapter avoids expanding indigestible
@@ -6519,18 +6517,18 @@ end
6519 % 6517 %
6520 % Now the second mark, after the heading break. No break points 6518 % Now the second mark, after the heading break. No break points
6521 % between here and the heading. 6519 % between here and the heading.
6522 \let\prevchapterdefs=\lastchapterdefs 6520 \let\prevchapterdefs=\currentchapterdefs
6523 \let\prevsectiondefs=\lastsectiondefs 6521 \let\prevsectiondefs=\currentsectiondefs
6524 \domark 6522 \domark
6525 % 6523 %
6526 {% 6524 {%
6527 \chapfonts \rm 6525 \chapfonts \rm
6528 \let\footnote=\errfootnoteheading % give better error message 6526 \let\footnote=\errfootnoteheading % give better error message
6529 % 6527 %
6530 % Have to define \lastsection before calling \donoderef, because the 6528 % Have to define \currentsection before calling \donoderef, because the
6531 % xref code eventually uses it. On the other hand, it has to be called 6529 % xref code eventually uses it. On the other hand, it has to be called
6532 % after \pchapsepmacro, or the headline will change too soon. 6530 % after \pchapsepmacro, or the headline will change too soon.
6533 \gdef\lastsection{#1}% 6531 \gdef\currentsection{#1}%
6534 % 6532 %
6535 % Only insert the separating space if we have a chapter/appendix 6533 % Only insert the separating space if we have a chapter/appendix
6536 % number, and don't print the unnumbered ``number''. 6534 % number, and don't print the unnumbered ``number''.
@@ -6619,10 +6617,10 @@ end
6619 \csname #2fonts\endcsname \rm 6617 \csname #2fonts\endcsname \rm
6620 % 6618 %
6621 % Insert first mark before the heading break (see notes for \domark). 6619 % Insert first mark before the heading break (see notes for \domark).
6622 \let\prevsectiondefs=\lastsectiondefs 6620 \let\prevsectiondefs=\currentsectiondefs
6623 \ifx\temptype\Ynothingkeyword 6621 \ifx\temptype\Ynothingkeyword
6624 \ifx\sectionlevel\seckeyword 6622 \ifx\sectionlevel\seckeyword
6625 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% 6623 \gdef\currentsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6626 \gdef\thissection{\thissectionname}}% 6624 \gdef\thissection{\thissectionname}}%
6627 \fi 6625 \fi
6628 \else\ifx\temptype\Yomitfromtockeyword 6626 \else\ifx\temptype\Yomitfromtockeyword
@@ -6630,7 +6628,7 @@ end
6630 \else\ifx\temptype\Yappendixkeyword 6628 \else\ifx\temptype\Yappendixkeyword
6631 \ifx\sectionlevel\seckeyword 6629 \ifx\sectionlevel\seckeyword
6632 \toks0={#1}% 6630 \toks0={#1}%
6633 \xdef\lastsectiondefs{% 6631 \xdef\currentsectiondefs{%
6634 \gdef\noexpand\thissectionname{\the\toks0}% 6632 \gdef\noexpand\thissectionname{\the\toks0}%
6635 \gdef\noexpand\thissectionnum{#4}% 6633 \gdef\noexpand\thissectionnum{#4}%
6636 % \noexpand\putwordSection avoids expanding indigestible 6634 % \noexpand\putwordSection avoids expanding indigestible
@@ -6643,7 +6641,7 @@ end
6643 \else 6641 \else
6644 \ifx\sectionlevel\seckeyword 6642 \ifx\sectionlevel\seckeyword
6645 \toks0={#1}% 6643 \toks0={#1}%
6646 \xdef\lastsectiondefs{% 6644 \xdef\currentsectiondefs{%
6647 \gdef\noexpand\thissectionname{\the\toks0}% 6645 \gdef\noexpand\thissectionname{\the\toks0}%
6648 \gdef\noexpand\thissectionnum{#4}% 6646 \gdef\noexpand\thissectionnum{#4}%
6649 % \noexpand\putwordSection avoids expanding indigestible 6647 % \noexpand\putwordSection avoids expanding indigestible
@@ -6669,28 +6667,28 @@ end
6669 % 6667 %
6670 % Now the second mark, after the heading break. No break points 6668 % Now the second mark, after the heading break. No break points
6671 % between here and the heading. 6669 % between here and the heading.
6672 \global\let\prevsectiondefs=\lastsectiondefs 6670 \global\let\prevsectiondefs=\currentsectiondefs
6673 \domark 6671 \domark
6674 % 6672 %
6675 % Only insert the space after the number if we have a section number. 6673 % Only insert the space after the number if we have a section number.
6676 \ifx\temptype\Ynothingkeyword 6674 \ifx\temptype\Ynothingkeyword
6677 \setbox0 = \hbox{}% 6675 \setbox0 = \hbox{}%
6678 \def\toctype{unn}% 6676 \def\toctype{unn}%
6679 \gdef\lastsection{#1}% 6677 \gdef\currentsection{#1}%
6680 \else\ifx\temptype\Yomitfromtockeyword 6678 \else\ifx\temptype\Yomitfromtockeyword
6681 % for @headings -- no section number, don't include in toc, 6679 % for @headings -- no section number, don't include in toc,
6682 % and don't redefine \lastsection. 6680 % and don't redefine \currentsection.
6683 \setbox0 = \hbox{}% 6681 \setbox0 = \hbox{}%
6684 \def\toctype{omit}% 6682 \def\toctype{omit}%
6685 \let\sectionlevel=\empty 6683 \let\sectionlevel=\empty
6686 \else\ifx\temptype\Yappendixkeyword 6684 \else\ifx\temptype\Yappendixkeyword
6687 \setbox0 = \hbox{#4\enspace}% 6685 \setbox0 = \hbox{#4\enspace}%
6688 \def\toctype{app}% 6686 \def\toctype{app}%
6689 \gdef\lastsection{#1}% 6687 \gdef\currentsection{#1}%
6690 \else 6688 \else
6691 \setbox0 = \hbox{#4\enspace}% 6689 \setbox0 = \hbox{#4\enspace}%
6692 \def\toctype{num}% 6690 \def\toctype{num}%
6693 \gdef\lastsection{#1}% 6691 \gdef\currentsection{#1}%
6694 \fi\fi\fi 6692 \fi\fi\fi
6695 % 6693 %
6696 % Write the toc entry (before \donoderef). See comments in \chapmacro. 6694 % Write the toc entry (before \donoderef). See comments in \chapmacro.
@@ -7347,13 +7345,9 @@ end
7347 7345
7348 7346
7349% @raggedright does more-or-less normal line breaking but no right 7347% @raggedright does more-or-less normal line breaking but no right
7350% justification. From plain.tex. Don't stretch around special 7348% justification. From plain.tex.
7351% characters in urls in this environment, since the stretch at the right
7352% should be enough.
7353\envdef\raggedright{% 7349\envdef\raggedright{%
7354 \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax 7350 \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
7355 \def\urefprestretchamount{0pt}%
7356 \def\urefpoststretchamount{0pt}%
7357} 7351}
7358\let\Eraggedright\par 7352\let\Eraggedright\par
7359 7353
@@ -7728,6 +7722,21 @@ end
7728 \fi\fi 7722 \fi\fi
7729} 7723}
7730 7724
7725% \dosubind {index}{topic}{subtopic}
7726%
7727% If SUBTOPIC is present, precede it with a space, and call \doind.
7728% (At some time during the 20th century, this made a two-level entry in an
7729% index such as the operation index. Nobody seemed to notice the change in
7730% behaviour though.)
7731\def\dosubind#1#2#3{%
7732 \def\thirdarg{#3}%
7733 \ifx\thirdarg\empty
7734 \doind{#1}{#2}%
7735 \else
7736 \doind{#1}{#2\space#3}%
7737 \fi
7738}
7739
7731% Untyped functions: 7740% Untyped functions:
7732 7741
7733% @deffn category name args 7742% @deffn category name args
@@ -7742,7 +7751,6 @@ end
7742% \deffngeneral {subind}category name args 7751% \deffngeneral {subind}category name args
7743% 7752%
7744\def\deffngeneral#1#2 #3 #4\endheader{% 7753\def\deffngeneral#1#2 #3 #4\endheader{%
7745 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
7746 \dosubind{fn}{\code{#3}}{#1}% 7754 \dosubind{fn}{\code{#3}}{#1}%
7747 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% 7755 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
7748} 7756}
@@ -8033,33 +8041,17 @@ end
8033% alias because \c means cedilla in @tex or @math 8041% alias because \c means cedilla in @tex or @math
8034\let\texinfoc=\c 8042\let\texinfoc=\c
8035 8043
8036\newcount\savedcatcodeone
8037\newcount\savedcatcodetwo
8038
8039% Used at the time of macro expansion. 8044% Used at the time of macro expansion.
8040% Argument is macro body with arguments substituted 8045% Argument is macro body with arguments substituted
8041\def\scanmacro#1{% 8046\def\scanmacro#1{%
8042 \newlinechar`\^^M 8047 \newlinechar`\^^M
8043 \def\xeatspaces{\eatspaces}% 8048 \def\xeatspaces{\eatspaces}%
8044 % 8049 %
8045 % Temporarily undo catcode changes of \printindex. Set catcode of @ to
8046 % 0 so that @-commands in macro expansions aren't printed literally when
8047 % formatting an index file, where \ is used as the escape character.
8048 \savedcatcodeone=\catcode`\@
8049 \savedcatcodetwo=\catcode`\\
8050 \catcode`\@=0
8051 \catcode`\\=\active
8052 %
8053 % Process the macro body under the current catcode regime. 8050 % Process the macro body under the current catcode regime.
8054 \scantokens{#1@texinfoc}% 8051 \scantokens{#1@texinfoc}%
8055 % 8052 %
8056 \catcode`\@=\savedcatcodeone
8057 \catcode`\\=\savedcatcodetwo
8058 %
8059 % The \texinfoc is to remove the \newlinechar added by \scantokens, and 8053 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
8060 % can be noticed by \parsearg. 8054 % can be noticed by \parsearg.
8061 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
8062 % to allow macros to open or close groups themselves.
8063} 8055}
8064 8056
8065% Used for copying and captions 8057% Used for copying and captions
@@ -8754,7 +8746,7 @@ end
8754 8746
8755% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an 8747% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8756% anchor), which consists of three parts: 8748% anchor), which consists of three parts:
8757% 1) NAME-title - the current sectioning name taken from \lastsection, 8749% 1) NAME-title - the current sectioning name taken from \currentsection,
8758% or the anchor name. 8750% or the anchor name.
8759% 2) NAME-snt - section number and type, passed as the SNT arg, or 8751% 2) NAME-snt - section number and type, passed as the SNT arg, or
8760% empty for anchors. 8752% empty for anchors.
@@ -8776,7 +8768,7 @@ end
8776 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef 8768 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
8777 ##1}{##2}}% these are parameters of \writexrdef 8769 ##1}{##2}}% these are parameters of \writexrdef
8778 }% 8770 }%
8779 \toks0 = \expandafter{\lastsection}% 8771 \toks0 = \expandafter{\currentsection}%
8780 \immediate \writexrdef{title}{\the\toks0 }% 8772 \immediate \writexrdef{title}{\the\toks0 }%
8781 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. 8773 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
8782 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout 8774 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
@@ -9574,13 +9566,13 @@ end
9574 \global\advance\floatno by 1 9566 \global\advance\floatno by 1
9575 % 9567 %
9576 {% 9568 {%
9577 % This magic value for \lastsection is output by \setref as the 9569 % This magic value for \currentsection is output by \setref as the
9578 % XREFLABEL-title value. \xrefX uses it to distinguish float 9570 % XREFLABEL-title value. \xrefX uses it to distinguish float
9579 % labels (which have a completely different output format) from 9571 % labels (which have a completely different output format) from
9580 % node and anchor labels. And \xrdef uses it to construct the 9572 % node and anchor labels. And \xrdef uses it to construct the
9581 % lists of floats. 9573 % lists of floats.
9582 % 9574 %
9583 \edef\lastsection{\floatmagic=\safefloattype}% 9575 \edef\currentsection{\floatmagic=\safefloattype}%
9584 \setref{\floatlabel}{Yfloat}% 9576 \setref{\floatlabel}{Yfloat}%
9585 }% 9577 }%
9586 \fi 9578 \fi
@@ -9703,7 +9695,7 @@ end
9703 9695
9704% #1 is the control sequence we are passed; we expand into a conditional 9696% #1 is the control sequence we are passed; we expand into a conditional
9705% which is true if #1 represents a float ref. That is, the magic 9697% which is true if #1 represents a float ref. That is, the magic
9706% \lastsection value which we \setref above. 9698% \currentsection value which we \setref above.
9707% 9699%
9708\def\iffloat#1{\expandafter\doiffloat#1==\finish} 9700\def\iffloat#1{\expandafter\doiffloat#1==\finish}
9709% 9701%