diff options
| author | Paul Eggert | 2015-09-25 00:21:58 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-09-25 00:23:18 -0700 |
| commit | 1657ba799a873a7758219dc0bdebf6ab91908fa2 (patch) | |
| tree | 3605280690680eb218a5353dff1d981ae112593b /doc | |
| parent | da38b6a7cdcdc7670a3e9088777b3f2829b08bbd (diff) | |
| download | emacs-1657ba799a873a7758219dc0bdebf6ab91908fa2.tar.gz emacs-1657ba799a873a7758219dc0bdebf6ab91908fa2.zip | |
Merge from gnulib
This incorporates:
2015-09-25 c-ctype: rewrite to use inline functions
2015-09-24 maint: add coding cookies to non-ASCII sources
2015-09-24 gitlog-to-changelog: trim only trailing whitespaces
* build-aux/gitlog-to-changelog, doc/misc/texinfo.tex:
* lib/acl-internal.c, lib/acl-internal.h, lib/c-ctype.c:
* lib/c-ctype.h, lib/get-permissions.c, lib/qcopy-acl.c:
* lib/set-permissions.c:
Copy from gnulib.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/texinfo.tex | 602 |
1 files changed, 405 insertions, 197 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index aaabbc9c9f5..bff8eb017a0 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{2015-09-05.20} | 6 | \def\texinfoversion{2015-09-20.17} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| @@ -196,17 +196,6 @@ | |||
| 196 | wide-spread wrap-around | 196 | wide-spread wrap-around |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | % Margin to add to right of even pages, to left of odd pages. | ||
| 200 | \newdimen\bindingoffset | ||
| 201 | \newdimen\normaloffset | ||
| 202 | \newdimen\pagewidth \newdimen\pageheight | ||
| 203 | |||
| 204 | % For a final copy, take out the rectangles | ||
| 205 | % that mark overfull boxes (in case you have decided | ||
| 206 | % that the text looks ok even though it passes the margin). | ||
| 207 | % | ||
| 208 | \def\finalout{\overfullrule=0pt } | ||
| 209 | |||
| 210 | % Sometimes it is convenient to have everything in the transcript file | 199 | % Sometimes it is convenient to have everything in the transcript file |
| 211 | % and nothing on the terminal. We don't just call \tracingall here, | 200 | % and nothing on the terminal. We don't just call \tracingall here, |
| 212 | % since that produces some useless output on the terminal. We also make | 201 | % since that produces some useless output on the terminal. We also make |
| @@ -251,6 +240,15 @@ | |||
| 251 | \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount | 240 | \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount |
| 252 | \removelastskip\penalty-200\bigskip\fi\fi} | 241 | \removelastskip\penalty-200\bigskip\fi\fi} |
| 253 | 242 | ||
| 243 | % Output routine | ||
| 244 | % | ||
| 245 | |||
| 246 | % For a final copy, take out the rectangles | ||
| 247 | % that mark overfull boxes (in case you have decided | ||
| 248 | % that the text looks ok even though it passes the margin). | ||
| 249 | % | ||
| 250 | \def\finalout{\overfullrule=0pt } | ||
| 251 | |||
| 254 | % Do @cropmarks to get crop marks. | 252 | % Do @cropmarks to get crop marks. |
| 255 | % | 253 | % |
| 256 | \newif\ifcropmarks | 254 | \newif\ifcropmarks |
| @@ -290,6 +288,9 @@ | |||
| 290 | \noexpand\else \the\toks8 % 2: color marks | 288 | \noexpand\else \the\toks8 % 2: color marks |
| 291 | }% | 289 | }% |
| 292 | } | 290 | } |
| 291 | |||
| 292 | % \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. | ||
| 293 | % | ||
| 293 | % \topmark doesn't work for the very first chapter (after the title | 294 | % \topmark doesn't work for the very first chapter (after the title |
| 294 | % page or the contents), so we use \firstmark there -- this gets us | 295 | % page or the contents), so we use \firstmark there -- this gets us |
| 295 | % the mark with the chapter defs, unless the user sneaks in, e.g., | 296 | % the mark with the chapter defs, unless the user sneaks in, e.g., |
| @@ -310,6 +311,10 @@ | |||
| 310 | \def\prevsectiondefs{} | 311 | \def\prevsectiondefs{} |
| 311 | \def\lastcolordefs{} | 312 | \def\lastcolordefs{} |
| 312 | 313 | ||
| 314 | % Margin to add to right of even pages, to left of odd pages. | ||
| 315 | \newdimen\bindingoffset | ||
| 316 | \newdimen\normaloffset | ||
| 317 | \newdimen\pagewidth \newdimen\pageheight | ||
| 313 | 318 | ||
| 314 | % Main output routine. | 319 | % Main output routine. |
| 315 | % | 320 | % |
| @@ -319,25 +324,56 @@ | |||
| 319 | \newbox\headlinebox | 324 | \newbox\headlinebox |
| 320 | \newbox\footlinebox | 325 | \newbox\footlinebox |
| 321 | 326 | ||
| 322 | % \onepageout takes a vbox as an argument. Note that \pagecontents | 327 | % \onepageout takes a vbox as an argument. |
| 323 | % does insertions, but you have to call it yourself. | 328 | % \shipout a vbox for a single page, adding an optional header, footer, |
| 329 | % cropmarks, and footnote. This also causes index entries for this page | ||
| 330 | % to be written to the auxiliary files. | ||
| 331 | % | ||
| 324 | \def\onepageout#1{% | 332 | \def\onepageout#1{% |
| 325 | \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi | 333 | \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi |
| 326 | % | 334 | % |
| 327 | \ifodd\pageno \advance\hoffset by \bindingoffset | 335 | \ifodd\pageno \advance\hoffset by \bindingoffset |
| 328 | \else \advance\hoffset by -\bindingoffset\fi | 336 | \else \advance\hoffset by -\bindingoffset\fi |
| 329 | % | 337 | % |
| 338 | % Common context changes for both heading and footing. | ||
| 330 | % Do this outside of the \shipout so @code etc. will be expanded in | 339 | % 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). | 340 | % the headline as they should be, not taken literally (outputting ''code). |
| 332 | \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} | 341 | \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} |
| 333 | % | 342 | % |
| 334 | \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi | 343 | % Retrieve the information for the headings from the marks in the page, |
| 335 | \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% | 344 | % and call Plain TeX's \makeheadline and \makefootline, which use the |
| 345 | % values in \headline and \footline. | ||
| 346 | % | ||
| 347 | % This is used to check if we are on the first page of a chapter. | ||
| 348 | \ifcase0\topmark\fi | ||
| 349 | \ifx\thischapter\empty | ||
| 350 | % See comment for \gettopheadingmarks | ||
| 351 | \ifcase0\firstmark\fi | ||
| 352 | \let\curchaptername\thischaptername | ||
| 353 | \ifcase1\firstmark\fi | ||
| 354 | \let\prevchaptername\thischaptername | ||
| 355 | \else | ||
| 356 | \let\curchaptername\thischaptername | ||
| 357 | \ifcase1\topmark\fi | ||
| 358 | \let\prevchaptername\thischaptername | ||
| 359 | \fi | ||
| 336 | % | 360 | % |
| 361 | \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi | ||
| 337 | \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi | 362 | \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi |
| 363 | % | ||
| 364 | \ifx\curchaptername\prevchaptername | ||
| 365 | \else | ||
| 366 | % If on the first page of a chapter, clear @thischapter so it | ||
| 367 | % doesn't appear in the headline, because the chapter is already | ||
| 368 | % shown in the chapter heading. | ||
| 369 | \def\thischapter{}% | ||
| 370 | \fi | ||
| 371 | % | ||
| 372 | \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% | ||
| 338 | \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% | 373 | \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% |
| 339 | % | 374 | % |
| 340 | {% | 375 | {% |
| 376 | % Set context for writing to auxiliary files like index files. | ||
| 341 | % Have to do this stuff outside the \shipout because we want it to | 377 | % Have to do this stuff outside the \shipout because we want it to |
| 342 | % take effect in \write's, yet the group defined by the \vbox ends | 378 | % take effect in \write's, yet the group defined by the \vbox ends |
| 343 | % before the \shipout runs. | 379 | % before the \shipout runs. |
| @@ -407,6 +443,7 @@ | |||
| 407 | 443 | ||
| 408 | \newinsert\margin \dimen\margin=\maxdimen | 444 | \newinsert\margin \dimen\margin=\maxdimen |
| 409 | 445 | ||
| 446 | % Main part of page, including any footnotes | ||
| 410 | \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} | 447 | \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} |
| 411 | {\catcode`\@ =11 | 448 | {\catcode`\@ =11 |
| 412 | \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi | 449 | \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi |
| @@ -690,6 +727,12 @@ | |||
| 690 | \endgraf % Not \par, as it may have been set to \lisppar. | 727 | \endgraf % Not \par, as it may have been set to \lisppar. |
| 691 | \global\dimen1 = \prevdepth | 728 | \global\dimen1 = \prevdepth |
| 692 | \egroup % End the \vtop. | 729 | \egroup % End the \vtop. |
| 730 | \addgroupbox | ||
| 731 | \prevdepth = \dimen1 | ||
| 732 | \checkinserts | ||
| 733 | } | ||
| 734 | |||
| 735 | \def\addgroupbox{ | ||
| 693 | % \dimen0 is the vertical size of the group's box. | 736 | % \dimen0 is the vertical size of the group's box. |
| 694 | \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox | 737 | \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox |
| 695 | % \dimen2 is how much space is left on the page (more or less). | 738 | % \dimen2 is how much space is left on the page (more or less). |
| @@ -702,9 +745,8 @@ | |||
| 702 | \fi | 745 | \fi |
| 703 | \fi | 746 | \fi |
| 704 | \box\groupbox | 747 | \box\groupbox |
| 705 | \prevdepth = \dimen1 | ||
| 706 | \checkinserts | ||
| 707 | } | 748 | } |
| 749 | |||
| 708 | % | 750 | % |
| 709 | % TeX puts in an \escapechar (i.e., `@') at the beginning of the help | 751 | % TeX puts in an \escapechar (i.e., `@') at the beginning of the help |
| 710 | % message, so this ends up printing `@group can only ...'. | 752 | % message, so this ends up printing `@group can only ...'. |
| @@ -1046,32 +1088,8 @@ where each line of input produces a line of output.} | |||
| 1046 | % @refill is a no-op. | 1088 | % @refill is a no-op. |
| 1047 | \let\refill=\relax | 1089 | \let\refill=\relax |
| 1048 | 1090 | ||
| 1049 | % If working on a large document in chapters, it is convenient to | 1091 | % @setfilename INFO-FILENAME - ignored |
| 1050 | % be able to disable indexing, cross-referencing, and contents, for test runs. | 1092 | \let\setfilename=\comment |
| 1051 | % This is done with @novalidate (before @setfilename). | ||
| 1052 | % | ||
| 1053 | \newif\iflinks \linkstrue % by default we want the aux files. | ||
| 1054 | \let\novalidate = \linksfalse | ||
| 1055 | |||
| 1056 | % @setfilename is done at the beginning of every texinfo file. So open | ||
| 1057 | % here some of the files we need to have open while reading the input. | ||
| 1058 | % This makes it possible to make a .fmt file for texinfo. | ||
| 1059 | \def\setfilename{% | ||
| 1060 | \iflinks | ||
| 1061 | \tryauxfile | ||
| 1062 | % Open the new aux file. TeX will close it automatically at exit. | ||
| 1063 | \immediate\openout\auxfile=\jobname.aux | ||
| 1064 | \fi % \openindices needs to do some work in any case. | ||
| 1065 | \let\setfilename=\comment % Ignore extra @setfilename cmds. | ||
| 1066 | % | ||
| 1067 | % If texinfo.cnf is present on the system, read it. | ||
| 1068 | % Useful for site-wide @afourpaper, etc. | ||
| 1069 | \openin 1 texinfo.cnf | ||
| 1070 | \ifeof 1 \else \input texinfo.cnf \fi | ||
| 1071 | \closein 1 | ||
| 1072 | % | ||
| 1073 | \comment % Ignore the actual filename. | ||
| 1074 | } | ||
| 1075 | 1093 | ||
| 1076 | % @bye. | 1094 | % @bye. |
| 1077 | \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} | 1095 | \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} |
| @@ -1825,8 +1843,10 @@ end | |||
| 1825 | % A few fonts for @defun names and args. | 1843 | % A few fonts for @defun names and args. |
| 1826 | \setfont\defbf\bfshape{10}{\magstep1}{OT1} | 1844 | \setfont\defbf\bfshape{10}{\magstep1}{OT1} |
| 1827 | \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} | 1845 | \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} |
| 1846 | \setfont\defsl\slshape{10}{\magstep1}{OT1TT} | ||
| 1828 | \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} | 1847 | \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} |
| 1829 | \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} | 1848 | \def\df{\let\tentt=\deftt \let\tenbf = \defbf |
| 1849 | \let\tenttsl=\defttsl \let\tensl=\defsl \bf} | ||
| 1830 | 1850 | ||
| 1831 | % Fonts for indices, footnotes, small examples (9pt). | 1851 | % Fonts for indices, footnotes, small examples (9pt). |
| 1832 | \def\smallnominalsize{9pt} | 1852 | \def\smallnominalsize{9pt} |
| @@ -1957,8 +1977,10 @@ end | |||
| 1957 | % A few fonts for @defun names and args. | 1977 | % A few fonts for @defun names and args. |
| 1958 | \setfont\defbf\bfshape{10}{\magstephalf}{OT1} | 1978 | \setfont\defbf\bfshape{10}{\magstephalf}{OT1} |
| 1959 | \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} | 1979 | \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} |
| 1980 | \setfont\defsl\slshape{10}{\magstephalf}{OT1TT} | ||
| 1960 | \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} | 1981 | \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} |
| 1961 | \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} | 1982 | \def\df{\let\tentt=\deftt \let\tenbf = \defbf |
| 1983 | \let\tensl=\defsl \let\tenttsl=\defttsl \bf} | ||
| 1962 | 1984 | ||
| 1963 | % Fonts for indices, footnotes, small examples (9pt). | 1985 | % Fonts for indices, footnotes, small examples (9pt). |
| 1964 | \def\smallnominalsize{9pt} | 1986 | \def\smallnominalsize{9pt} |
| @@ -2777,11 +2799,6 @@ end | |||
| 2777 | % | 2799 | % |
| 2778 | \def\dmn#1{\thinspace #1} | 2800 | \def\dmn#1{\thinspace #1} |
| 2779 | 2801 | ||
| 2780 | % @l was never documented to mean ``switch to the Lisp font'', | ||
| 2781 | % and it is not used as such in any manual I can find. We need it for | ||
| 2782 | % Polish suppressed-l. --karl, 22sep96. | ||
| 2783 | %\def\l#1{{\li #1}\null} | ||
| 2784 | |||
| 2785 | % @acronym for "FBI", "NATO", and the like. | 2802 | % @acronym for "FBI", "NATO", and the like. |
| 2786 | % We print this one point size smaller, since it's intended for | 2803 | % We print this one point size smaller, since it's intended for |
| 2787 | % all-uppercase. | 2804 | % all-uppercase. |
| @@ -3392,7 +3409,7 @@ end | |||
| 3392 | \newtoks\evenfootline % footline on even pages | 3409 | \newtoks\evenfootline % footline on even pages |
| 3393 | \newtoks\oddfootline % footline on odd pages | 3410 | \newtoks\oddfootline % footline on odd pages |
| 3394 | 3411 | ||
| 3395 | % Now make TeX use those variables | 3412 | % Now make \makeheadline and \makefootline in Plain TeX use those variables |
| 3396 | \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline | 3413 | \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline |
| 3397 | \else \the\evenheadline \fi}} | 3414 | \else \the\evenheadline \fi}} |
| 3398 | \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline | 3415 | \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline |
| @@ -3448,6 +3465,10 @@ end | |||
| 3448 | % @everyheadingmarks | 3465 | % @everyheadingmarks |
| 3449 | % @everyfootingmarks | 3466 | % @everyfootingmarks |
| 3450 | 3467 | ||
| 3468 | % These define \getoddheadingmarks, \getevenheadingmarks, | ||
| 3469 | % \getoddfootingmarks, and \getevenfootingmarks, each to one of | ||
| 3470 | % \gettopheadingmarks, \getbottomheadingmarks. | ||
| 3471 | % | ||
| 3451 | \def\evenheadingmarks{\headingmarks{even}{heading}} | 3472 | \def\evenheadingmarks{\headingmarks{even}{heading}} |
| 3452 | \def\oddheadingmarks{\headingmarks{odd}{heading}} | 3473 | \def\oddheadingmarks{\headingmarks{odd}{heading}} |
| 3453 | \def\evenfootingmarks{\headingmarks{even}{footing}} | 3474 | \def\evenfootingmarks{\headingmarks{even}{footing}} |
| @@ -3737,7 +3758,12 @@ end | |||
| 3737 | \noindent | 3758 | \noindent |
| 3738 | \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% | 3759 | \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% |
| 3739 | % | 3760 | % |
| 3740 | \vadjust{\penalty 1200}}% not good to break after first line of item. | 3761 | \ifinner\else |
| 3762 | \vadjust{\penalty 1200}% not good to break after first line of item. | ||
| 3763 | \fi | ||
| 3764 | % We can be in inner vertical mode in a footnote, although an | ||
| 3765 | % @itemize looks awful there. | ||
| 3766 | }% | ||
| 3741 | \flushcr | 3767 | \flushcr |
| 3742 | } | 3768 | } |
| 3743 | 3769 | ||
| @@ -4436,8 +4462,6 @@ end | |||
| 4436 | 4462 | ||
| 4437 | % Used when writing an index entry out to an index file, to prevent | 4463 | % Used when writing an index entry out to an index file, to prevent |
| 4438 | % expansion of Texinfo commands that can appear in an index entry. | 4464 | % expansion of Texinfo commands that can appear in an index entry. |
| 4439 | % Since there are some commands we want to expand, and others we don't, | ||
| 4440 | % we have to laboriously prevent expansion for those that we don't. | ||
| 4441 | % | 4465 | % |
| 4442 | \def\indexdummies{% | 4466 | \def\indexdummies{% |
| 4443 | \escapechar = `\\ % use backslash in output files. | 4467 | \escapechar = `\\ % use backslash in output files. |
| @@ -4659,6 +4683,7 @@ end | |||
| 4659 | % that we make for arg2 (see \parsemargdef ff.). We want all this to be | 4683 | % that we make for arg2 (see \parsemargdef ff.). We want all this to be |
| 4660 | % expanded for the sake of the index, so we end up just seeing "bar". | 4684 | % expanded for the sake of the index, so we end up just seeing "bar". |
| 4661 | \let\xeatspaces = \eatspaces | 4685 | \let\xeatspaces = \eatspaces |
| 4686 | \let\xprocessmacroarg\eatspaces | ||
| 4662 | } | 4687 | } |
| 4663 | 4688 | ||
| 4664 | % For testing: output @{ and @} in index sort strings as \{ and \}. | 4689 | % For testing: output @{ and @} in index sort strings as \{ and \}. |
| @@ -4679,12 +4704,14 @@ end | |||
| 4679 | \backslashdisappear | 4704 | \backslashdisappear |
| 4680 | \def-{}% | 4705 | \def-{}% |
| 4681 | \def<{}% | 4706 | \def<{}% |
| 4707 | \def\@{}% | ||
| 4682 | } | 4708 | } |
| 4683 | 4709 | ||
| 4684 | \gdef\indexnonalnumreappear{% | 4710 | \gdef\indexnonalnumreappear{% |
| 4685 | \useindexbackslash | 4711 | \useindexbackslash |
| 4686 | \let-\normaldash | 4712 | \let-\normaldash |
| 4687 | \let<\normalless | 4713 | \let<\normalless |
| 4714 | \def\@{@}% | ||
| 4688 | } | 4715 | } |
| 4689 | } | 4716 | } |
| 4690 | 4717 | ||
| @@ -4837,7 +4864,10 @@ end | |||
| 4837 | \def\requireopenindexfile#1{% | 4864 | \def\requireopenindexfile#1{% |
| 4838 | \ifnum\csname #1indfile\endcsname=0 | 4865 | \ifnum\csname #1indfile\endcsname=0 |
| 4839 | \expandafter\newwrite \csname#1indfile\endcsname | 4866 | \expandafter\newwrite \csname#1indfile\endcsname |
| 4840 | \openout \csname#1indfile\endcsname \jobname.#1 % Open the file | 4867 | \immediate\openout\csname#1indfile\endcsname \jobname.#1 % Open the file |
| 4868 | % Using \immediate here prevents an object entering into the current box, | ||
| 4869 | % which could confound checks such as those in \safewhatsit for preceding | ||
| 4870 | % skips. | ||
| 4841 | \fi} | 4871 | \fi} |
| 4842 | 4872 | ||
| 4843 | % Output \ as {\indexbackslash}, because \ is an escape character in | 4873 | % Output \ as {\indexbackslash}, because \ is an escape character in |
| @@ -5037,11 +5067,13 @@ end | |||
| 5037 | % there is some text. | 5067 | % there is some text. |
| 5038 | \putwordIndexNonexistent | 5068 | \putwordIndexNonexistent |
| 5039 | \else | 5069 | \else |
| 5070 | \catcode`\\ = 0 | ||
| 5071 | \escapechar = `\\ | ||
| 5040 | % | 5072 | % |
| 5041 | % If the index file exists but is empty, then \openin leaves \ifeof | 5073 | % If the index file exists but is empty, then \openin leaves \ifeof |
| 5042 | % false. We have to make TeX try to read something from the file, so | 5074 | % false. We have to make TeX try to read something from the file, so |
| 5043 | % it can discover if there is anything in it. | 5075 | % it can discover if there is anything in it. |
| 5044 | \read 1 to \temp | 5076 | \read 1 to \thisline |
| 5045 | \ifeof 1 | 5077 | \ifeof 1 |
| 5046 | \putwordIndexIsEmpty | 5078 | \putwordIndexIsEmpty |
| 5047 | \else | 5079 | \else |
| @@ -5051,16 +5083,36 @@ end | |||
| 5051 | \def\indexbackslash{\ttbackslash}% | 5083 | \def\indexbackslash{\ttbackslash}% |
| 5052 | \let\indexlbrace\{ % Likewise, set these sequences for braces | 5084 | \let\indexlbrace\{ % Likewise, set these sequences for braces |
| 5053 | \let\indexrbrace\} % used in the sort key. | 5085 | \let\indexrbrace\} % used in the sort key. |
| 5054 | \catcode`\\ = 0 | ||
| 5055 | \escapechar = `\\ | ||
| 5056 | \begindoublecolumns | 5086 | \begindoublecolumns |
| 5057 | \input \jobname.#1s | 5087 | \let\entryorphanpenalty=\indexorphanpenalty |
| 5088 | % | ||
| 5089 | % Read input from the index file line by line. | ||
| 5090 | \loopdo | ||
| 5091 | \ifeof1 | ||
| 5092 | \let\firsttoken\relax | ||
| 5093 | \else | ||
| 5094 | \read 1 to \nextline | ||
| 5095 | \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% | ||
| 5096 | \act | ||
| 5097 | \fi | ||
| 5098 | \thisline | ||
| 5099 | % | ||
| 5100 | \ifeof1\else | ||
| 5101 | \let\thisline\nextline | ||
| 5102 | \repeat | ||
| 5103 | %% | ||
| 5058 | \enddoublecolumns | 5104 | \enddoublecolumns |
| 5059 | \fi | 5105 | \fi |
| 5060 | \fi | 5106 | \fi |
| 5061 | \closein 1 | 5107 | \closein 1 |
| 5062 | \endgroup} | 5108 | \endgroup} |
| 5063 | 5109 | ||
| 5110 | \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} | ||
| 5111 | \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} | ||
| 5112 | |||
| 5113 | \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} | ||
| 5114 | \def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} | ||
| 5115 | |||
| 5064 | % These macros are used by the sorted index file itself. | 5116 | % These macros are used by the sorted index file itself. |
| 5065 | % Change them to control the appearance of the index. | 5117 | % Change them to control the appearance of the index. |
| 5066 | 5118 | ||
| @@ -5078,8 +5130,8 @@ end | |||
| 5078 | \catcode`\/=13 | 5130 | \catcode`\/=13 |
| 5079 | \def/{{\secrmnotbold \normalslash}}% | 5131 | \def/{{\secrmnotbold \normalslash}}% |
| 5080 | \def-{{\normaldash\normaldash}}% en dash `--' | 5132 | \def-{{\normaldash\normaldash}}% en dash `--' |
| 5081 | \def^{{\chapbf \normalcaret}} | 5133 | \def^{{\chapbf \normalcaret}}% |
| 5082 | \let~=\normaltilde | 5134 | \def~{{\chapbf \normaltilde}}% |
| 5083 | \def\_{% | 5135 | \def\_{% |
| 5084 | \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% | 5136 | \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% |
| 5085 | \def|{$\vert$}% | 5137 | \def|{$\vert$}% |
| @@ -5102,9 +5154,9 @@ end | |||
| 5102 | % The glue before the bonus allows a little bit of space at the | 5154 | % The glue before the bonus allows a little bit of space at the |
| 5103 | % bottom of a column to reduce an increase in inter-line spacing. | 5155 | % bottom of a column to reduce an increase in inter-line spacing. |
| 5104 | \nobreak | 5156 | \nobreak |
| 5105 | \vskip 0pt plus 6\baselineskip | 5157 | \vskip 0pt plus 5\baselineskip |
| 5106 | \penalty -300 | 5158 | \penalty -300 |
| 5107 | \vskip 0pt plus -6\baselineskip | 5159 | \vskip 0pt plus -5\baselineskip |
| 5108 | % | 5160 | % |
| 5109 | % Typeset the initial. Making this add up to a whole number of | 5161 | % Typeset the initial. Making this add up to a whole number of |
| 5110 | % baselineskips increases the chance of the dots lining up from column | 5162 | % baselineskips increases the chance of the dots lining up from column |
| @@ -5112,8 +5164,8 @@ end | |||
| 5112 | % we need before each entry, but it's better. | 5164 | % we need before each entry, but it's better. |
| 5113 | % | 5165 | % |
| 5114 | % No shrink because it confuses \balancecolumns. | 5166 | % No shrink because it confuses \balancecolumns. |
| 5115 | \vskip 1.67\baselineskip plus .5\baselineskip | 5167 | \vskip 1.67\baselineskip plus 1\baselineskip |
| 5116 | \leftline{\secfonts \secbf #1}% | 5168 | \leftline{\secfonts \kern-0.05em \secbf #1}% |
| 5117 | % \secfonts is inside the argument of \leftline so that the change of | 5169 | % \secfonts is inside the argument of \leftline so that the change of |
| 5118 | % \baselineskip will not affect any glue inserted before the vbox that | 5170 | % \baselineskip will not affect any glue inserted before the vbox that |
| 5119 | % \leftline creates. | 5171 | % \leftline creates. |
| @@ -5123,6 +5175,9 @@ end | |||
| 5123 | \egroup % \initialglyphs | 5175 | \egroup % \initialglyphs |
| 5124 | } | 5176 | } |
| 5125 | 5177 | ||
| 5178 | \newdimen\entryrightmargin | ||
| 5179 | \entryrightmargin=0pt | ||
| 5180 | |||
| 5126 | % \entry typesets a paragraph consisting of the text (#1), dot leaders, and | 5181 | % \entry typesets a paragraph consisting of the text (#1), dot leaders, and |
| 5127 | % then page number (#2) flushed to the right margin. It is used for index | 5182 | % then page number (#2) flushed to the right margin. It is used for index |
| 5128 | % and table of contents entries. The paragraph is indented by \leftskip. | 5183 | % and table of contents entries. The paragraph is indented by \leftskip. |
| @@ -5134,38 +5189,46 @@ end | |||
| 5134 | % affect previous text. | 5189 | % affect previous text. |
| 5135 | \par | 5190 | \par |
| 5136 | % | 5191 | % |
| 5137 | % Do not fill out the last line with white space. | ||
| 5138 | \parfillskip = 0in | ||
| 5139 | % | ||
| 5140 | % No extra space above this paragraph. | 5192 | % No extra space above this paragraph. |
| 5141 | \parskip = 0in | 5193 | \parskip = 0in |
| 5142 | % | 5194 | % |
| 5195 | % When reading the text of entry, convert explicit line breaks | ||
| 5196 | % from @* into spaces. The user might give these in long section | ||
| 5197 | % titles, for instance. | ||
| 5198 | \def\*{\unskip\space\ignorespaces}% | ||
| 5199 | \def\entrybreak{\hfil\break}% | ||
| 5200 | % | ||
| 5201 | % A bit of stretch before each entry for the benefit of balancing | ||
| 5202 | % columns. | ||
| 5203 | \vskip 0pt plus0.5pt | ||
| 5204 | % | ||
| 5205 | % Badness calculation for paragraph affected by - | ||
| 5206 | % How much \indexdotfill is stretched, or how much \parfillskip is shrunk | ||
| 5207 | % Number of lines (\linepenalty) | ||
| 5208 | % | ||
| 5143 | % Do not prefer a separate line ending with a hyphen to fewer lines. | 5209 | % Do not prefer a separate line ending with a hyphen to fewer lines. |
| 5144 | \finalhyphendemerits = 0 | 5210 | \finalhyphendemerits = 0 |
| 5145 | % | 5211 | % |
| 5146 | % \hangindent is only relevant when the entry text and page number | 5212 | % Word spacing - no stretch |
| 5147 | % don't both fit on one line. In that case, bob suggests starting the | 5213 | \spaceskip=\fontdimen2\font minus \fontdimen4\font |
| 5148 | % dots pretty far over on the line. Unfortunately, a large | ||
| 5149 | % indentation looks wrong when the entry text itself is broken across | ||
| 5150 | % lines. So we use a small indentation and put up with long leaders. | ||
| 5151 | % | 5214 | % |
| 5152 | % \hangafter is reset to 1 (which is the value we want) at the start | 5215 | \linepenalty=1000 % Discourage line breaks. |
| 5153 | % of each paragraph, so we need not do anything with that. | 5216 | \hyphenpenalty=5000 % Discourage hyphenation. |
| 5154 | \hangindent = 2em | ||
| 5155 | % | 5217 | % |
| 5156 | % When the entry text needs to be broken, just fill out the first line | 5218 | % Ragged right margin, but not for the last line with the leaders in it. |
| 5157 | % with blank space. | 5219 | % When an index entry spans lines, this stretch competes with the stretch |
| 5158 | \rightskip = 0pt plus1fil | 5220 | % in \indexdotfill to determine how the line will be split. |
| 5221 | \rightskip=\entryrightmargin | ||
| 5222 | \advance\rightskip by 0pt plus .6\hsize | ||
| 5159 | % | 5223 | % |
| 5160 | % A bit of stretch before each entry for the benefit of balancing | 5224 | % \parfillskip is at the end of the line with the page number |
| 5161 | % columns. | 5225 | \parfillskip=0pt |
| 5162 | \vskip 0pt plus0.5pt | 5226 | % Cancel the \rightskip stretch |
| 5163 | % | 5227 | \advance \parfillskip by 0pt plus -.6\hsize |
| 5164 | % When reading the text of entry, convert explicit line breaks | 5228 | % Determine how far we can stretch into the margin. |
| 5165 | % from @* into spaces. The user might give these in long section | 5229 | % This allows, e.g., "Appendix H GNU Free Documentation License" to fit |
| 5166 | % titles, for instance. | 5230 | % on one line. |
| 5167 | \def\*{\unskip\space\ignorespaces}% | 5231 | \advance \parfillskip by 0pt minus .6\entryrightmargin |
| 5168 | \def\entrybreak{\hfil\break}% | ||
| 5169 | % | 5232 | % |
| 5170 | % Swallow the left brace of the text (first parameter): | 5233 | % Swallow the left brace of the text (first parameter): |
| 5171 | \afterassignment\doentry | 5234 | \afterassignment\doentry |
| @@ -5173,6 +5236,8 @@ end | |||
| 5173 | } | 5236 | } |
| 5174 | \def\entrybreak{\unskip\space\ignorespaces}% | 5237 | \def\entrybreak{\unskip\space\ignorespaces}% |
| 5175 | \def\doentry{% | 5238 | \def\doentry{% |
| 5239 | % Save the text of the entry in a \vtop. | ||
| 5240 | \global\setbox\entryindexbox=\vtop\bgroup | ||
| 5176 | \bgroup % Instead of the swallowed brace. | 5241 | \bgroup % Instead of the swallowed brace. |
| 5177 | \noindent | 5242 | \noindent |
| 5178 | \aftergroup\finishentry | 5243 | \aftergroup\finishentry |
| @@ -5189,29 +5254,70 @@ end | |||
| 5189 | \ % | 5254 | \ % |
| 5190 | \else | 5255 | \else |
| 5191 | % | 5256 | % |
| 5192 | % If we must, put the page number on a line of its own, and fill out | ||
| 5193 | % this line with blank space. (The \hfil is overwhelmed with the | ||
| 5194 | % fill leaders glue in \indexdotfill if the page number does fit.) | ||
| 5195 | \hfil\penalty50 | ||
| 5196 | \null\nobreak\indexdotfill % Have leaders before the page number. | 5257 | \null\nobreak\indexdotfill % Have leaders before the page number. |
| 5197 | % | 5258 | % |
| 5198 | % The `\ ' here is removed by the implicit \unskip that TeX does as | ||
| 5199 | % part of (the primitive) \par. Without it, a spurious underfull | ||
| 5200 | % \hbox ensues. | ||
| 5201 | \ifpdf | 5259 | \ifpdf |
| 5202 | \pdfgettoks#1.% | 5260 | \pdfgettoks#1.% |
| 5203 | \ \the\toksA | 5261 | \hskip\skip\thinshrinkable\the\toksA |
| 5204 | \else | 5262 | \else |
| 5205 | \ #1% | 5263 | \hskip\skip\thinshrinkable #1% |
| 5206 | \fi | 5264 | \fi |
| 5207 | \fi | 5265 | \fi |
| 5266 | % Parameters for formatting this paragraph, reset for each paragraph. | ||
| 5267 | % | ||
| 5268 | % \hangindent is only relevant when the entry text and page number | ||
| 5269 | % don't both fit on one line. In that case, bob suggests starting the | ||
| 5270 | % dots pretty far over on the line. Unfortunately, a large | ||
| 5271 | % indentation looks wrong when the entry text itself is broken across | ||
| 5272 | % lines. So we use a small indentation and put up with long leaders. | ||
| 5273 | % | ||
| 5274 | \hangafter = 1 | ||
| 5275 | \hangindent = 1em | ||
| 5208 | \par | 5276 | \par |
| 5277 | \egroup % The \vtop | ||
| 5209 | \endgroup | 5278 | \endgroup |
| 5279 | % delay text of entry until after penalty | ||
| 5280 | \bgroup\aftergroup\insertindexentrybox | ||
| 5281 | \entryorphanpenalty | ||
| 5282 | } | ||
| 5283 | |||
| 5284 | \newskip\thinshrinkable | ||
| 5285 | \skip\thinshrinkable=.15em minus .15em | ||
| 5286 | |||
| 5287 | \newbox\entryindexbox | ||
| 5288 | \def\insertindexentrybox{% | ||
| 5289 | \lineskip=.8ex plus .6ex % This comes into effect when the \vtop has a large | ||
| 5290 | % depth due to the paragraph in it having several | ||
| 5291 | % lines. | ||
| 5292 | \box\entryindexbox} | ||
| 5293 | |||
| 5294 | % Default is no penalty | ||
| 5295 | \let\entryorphanpenalty\egroup | ||
| 5296 | |||
| 5297 | % Used from \printindex. \firsttoken should be the first token | ||
| 5298 | % after the \entry. If it's not another \entry, we are at the last | ||
| 5299 | % line of a group of index entries, so insert a penalty to discourage | ||
| 5300 | % orphaned index entries. | ||
| 5301 | \long\def\indexorphanpenalty{% | ||
| 5302 | \def\isentry{\entry}% | ||
| 5303 | \ifx\firsttoken\isentry | ||
| 5304 | \else | ||
| 5305 | \unskip\penalty 9000 | ||
| 5306 | % The \unskip here stops breaking before the glue. It relies on the | ||
| 5307 | % \vskip above being there, otherwise there is an error | ||
| 5308 | % "You can't use `\unskip' in vertical mode". There has to be glue | ||
| 5309 | % in the current vertical list that hasn't been added to the | ||
| 5310 | % "current page". See Chapter 24 of the TeXbook. This contradicts | ||
| 5311 | % Section 8.3.7 in "TeX by Topic," though. | ||
| 5312 | \fi | ||
| 5313 | \egroup % now comes the box added with \aftergroup | ||
| 5210 | } | 5314 | } |
| 5211 | 5315 | ||
| 5212 | % Like plain.tex's \dotfill, except uses up at least 1 em. | 5316 | % Like plain.tex's \dotfill, except uses up at least 1 em. |
| 5317 | % Using a finite stretch encourages several words to appear on a second line | ||
| 5318 | % if the entry is broken. | ||
| 5213 | \def\indexdotfill{\cleaders | 5319 | \def\indexdotfill{\cleaders |
| 5214 | \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} | 5320 | \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus .4\hsize} |
| 5215 | 5321 | ||
| 5216 | \def\primary #1{\line{#1\hfil}} | 5322 | \def\primary #1{\line{#1\hfil}} |
| 5217 | 5323 | ||
| @@ -5238,6 +5344,9 @@ end | |||
| 5238 | \newbox\partialpage | 5344 | \newbox\partialpage |
| 5239 | \newdimen\doublecolumnhsize | 5345 | \newdimen\doublecolumnhsize |
| 5240 | 5346 | ||
| 5347 | \newtoks\savedtopmark % Used in \begindoublecolumns | ||
| 5348 | \newtoks\savedfirstmark | ||
| 5349 | |||
| 5241 | \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns | 5350 | \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns |
| 5242 | % Grab any single-column material above us. | 5351 | % Grab any single-column material above us. |
| 5243 | \output = {% | 5352 | \output = {% |
| @@ -5258,9 +5367,23 @@ end | |||
| 5258 | \unvbox\PAGE | 5367 | \unvbox\PAGE |
| 5259 | \kern-\topskip \kern\baselineskip | 5368 | \kern-\topskip \kern\baselineskip |
| 5260 | }% | 5369 | }% |
| 5370 | % Save \topmark and \firstmark | ||
| 5371 | \global\savedtopmark=\expandafter{\topmark}% | ||
| 5372 | \global\savedfirstmark=\expandafter{\firstmark}% | ||
| 5261 | }% | 5373 | }% |
| 5262 | \eject % run that output routine to set \partialpage | 5374 | \eject % run that output routine to set \partialpage |
| 5263 | % | 5375 | % |
| 5376 | % We recover the two marks that the last output routine saved in order | ||
| 5377 | % to propagate the information in marks added around a chapter heading, | ||
| 5378 | % which could be otherwise be lost by the time the final page is output. | ||
| 5379 | % | ||
| 5380 | \mark{\the\savedtopmark}% Only mark in page passed to following \output. | ||
| 5381 | \output = {% | ||
| 5382 | \setbox0=\box\PAGE % clear box 255 | ||
| 5383 | }abc\eject | ||
| 5384 | % | ||
| 5385 | \mark{\the\savedfirstmark}% | ||
| 5386 | % | ||
| 5264 | % Use the double-column output routine for subsequent pages. | 5387 | % Use the double-column output routine for subsequent pages. |
| 5265 | \output = {\doublecolumnout}% | 5388 | \output = {\doublecolumnout}% |
| 5266 | % | 5389 | % |
| @@ -5404,9 +5527,11 @@ end | |||
| 5404 | \divide\dimen@ii by 5 | 5527 | \divide\dimen@ii by 5 |
| 5405 | \ifdim\ht3<\dimen@ii | 5528 | \ifdim\ht3<\dimen@ii |
| 5406 | % Column heights are too different, so don't make their bottoms | 5529 | % Column heights are too different, so don't make their bottoms |
| 5407 | % flush with each other | 5530 | % flush with each other. The glue at the end of the second column |
| 5531 | % allows a second column to stretch, reducing the difference in | ||
| 5532 | % height between the two. | ||
| 5408 | \setbox0=\vbox to\dimen@{\unvbox1\vfill}% | 5533 | \setbox0=\vbox to\dimen@{\unvbox1\vfill}% |
| 5409 | \setbox2=\vbox to\dimen@{\unvbox3\vfill}% | 5534 | \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}% |
| 5410 | \else | 5535 | \else |
| 5411 | \setbox0=\vbox to\dimen@{\unvbox1}% | 5536 | \setbox0=\vbox to\dimen@{\unvbox1}% |
| 5412 | \setbox2=\vbox to\dimen@{\unvbox3}% | 5537 | \setbox2=\vbox to\dimen@{\unvbox3}% |
| @@ -5432,6 +5557,9 @@ end | |||
| 5432 | \let\lastnode=\empty % no node to associate with | 5557 | \let\lastnode=\empty % no node to associate with |
| 5433 | \writetocentry{part}{#1}{}% but put it in the toc | 5558 | \writetocentry{part}{#1}{}% but put it in the toc |
| 5434 | \headingsoff % no headline or footline on the part page | 5559 | \headingsoff % no headline or footline on the part page |
| 5560 | % This outputs a mark at the end of the page that clears \thischapter | ||
| 5561 | % and \thissection, like is done in \startcontents. | ||
| 5562 | \chapmacro{}{Yomitfromtoc}{}% | ||
| 5435 | \chapoddpage | 5563 | \chapoddpage |
| 5436 | \endgroup | 5564 | \endgroup |
| 5437 | } | 5565 | } |
| @@ -5676,9 +5804,6 @@ end | |||
| 5676 | 5804 | ||
| 5677 | % @centerchap is like @unnumbered, but the heading is centered. | 5805 | % @centerchap is like @unnumbered, but the heading is centered. |
| 5678 | \outer\parseargdef\centerchap{% | 5806 | \outer\parseargdef\centerchap{% |
| 5679 | % Well, we could do the following in a group, but that would break | ||
| 5680 | % an assumption that \chapmacro is called at the outermost level. | ||
| 5681 | % Thus we are safer this way: --kasal, 24feb04 | ||
| 5682 | \let\centerparametersmaybe = \centerparameters | 5807 | \let\centerparametersmaybe = \centerparameters |
| 5683 | \unnmhead0{#1}% | 5808 | \unnmhead0{#1}% |
| 5684 | \let\centerparametersmaybe = \relax | 5809 | \let\centerparametersmaybe = \relax |
| @@ -5802,7 +5927,11 @@ end | |||
| 5802 | 5927 | ||
| 5803 | % Define plain chapter starts, and page on/off switching for it. | 5928 | % Define plain chapter starts, and page on/off switching for it. |
| 5804 | \def\chapbreak{\dobreak \chapheadingskip {-4000}} | 5929 | \def\chapbreak{\dobreak \chapheadingskip {-4000}} |
| 5930 | |||
| 5931 | % Start a new page | ||
| 5805 | \def\chappager{\par\vfill\supereject} | 5932 | \def\chappager{\par\vfill\supereject} |
| 5933 | |||
| 5934 | % \chapoddpage - start on an odd page for a new chapter | ||
| 5806 | % Because \domark is called before \chapoddpage, the filler page will | 5935 | % Because \domark is called before \chapoddpage, the filler page will |
| 5807 | % get the headings for the next chapter, which is wrong. But we don't | 5936 | % get the headings for the next chapter, which is wrong. But we don't |
| 5808 | % care -- we just disable all headings on the filler page. | 5937 | % care -- we just disable all headings on the filler page. |
| @@ -5838,7 +5967,7 @@ end | |||
| 5838 | 5967 | ||
| 5839 | \CHAPPAGon | 5968 | \CHAPPAGon |
| 5840 | 5969 | ||
| 5841 | % Chapter opening. | 5970 | % \chapmacro - Chapter opening. |
| 5842 | % | 5971 | % |
| 5843 | % #1 is the text, #2 is the section type (Ynumbered, Ynothing, | 5972 | % #1 is the text, #2 is the section type (Ynumbered, Ynothing, |
| 5844 | % Yappendix, Yomitfromtoc), #3 the chapter number. | 5973 | % Yappendix, Yomitfromtoc), #3 the chapter number. |
| @@ -6232,7 +6361,7 @@ end | |||
| 6232 | \savepageno = \pageno | 6361 | \savepageno = \pageno |
| 6233 | \begingroup % Set up to handle contents files properly. | 6362 | \begingroup % Set up to handle contents files properly. |
| 6234 | \raggedbottom % Worry more about breakpoints than the bottom. | 6363 | \raggedbottom % Worry more about breakpoints than the bottom. |
| 6235 | \advance\hsize by -\contentsrightmargin % Don't use the full line length. | 6364 | \entryrightmargin=\contentsrightmargin % Don't use the full line length. |
| 6236 | % | 6365 | % |
| 6237 | % Roman numerals for page numbers. | 6366 | % Roman numerals for page numbers. |
| 6238 | \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi | 6367 | \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi |
| @@ -6337,7 +6466,7 @@ end | |||
| 6337 | 6466 | ||
| 6338 | % Chapters, in the main contents. | 6467 | % Chapters, in the main contents. |
| 6339 | \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} | 6468 | \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} |
| 6340 | % | 6469 | |
| 6341 | % Chapters, in the short toc. | 6470 | % Chapters, in the short toc. |
| 6342 | % See comments in \dochapentry re vbox and related settings. | 6471 | % See comments in \dochapentry re vbox and related settings. |
| 6343 | \def\shortchapentry#1#2#3#4{% | 6472 | \def\shortchapentry#1#2#3#4{% |
| @@ -6352,7 +6481,7 @@ end | |||
| 6352 | \setbox0 = \hbox{\putwordAppendix{} M}% | 6481 | \setbox0 = \hbox{\putwordAppendix{} M}% |
| 6353 | \hbox to \wd0{\putwordAppendix{} #1\hss}} | 6482 | \hbox to \wd0{\putwordAppendix{} #1\hss}} |
| 6354 | % | 6483 | % |
| 6355 | \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} | 6484 | \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} |
| 6356 | 6485 | ||
| 6357 | % Unnumbered chapters. | 6486 | % Unnumbered chapters. |
| 6358 | \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} | 6487 | \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} |
| @@ -6385,6 +6514,8 @@ end | |||
| 6385 | \def\dochapentry#1#2{% | 6514 | \def\dochapentry#1#2{% |
| 6386 | \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip | 6515 | \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip |
| 6387 | \begingroup | 6516 | \begingroup |
| 6517 | % Move the page numbers slightly to the right | ||
| 6518 | \advance\entryrightmargin by -0.05em | ||
| 6388 | \chapentryfonts | 6519 | \chapentryfonts |
| 6389 | \tocentry{#1}{\dopageno\bgroup#2\egroup}% | 6520 | \tocentry{#1}{\dopageno\bgroup#2\egroup}% |
| 6390 | \endgroup | 6521 | \endgroup |
| @@ -6504,6 +6635,24 @@ end | |||
| 6504 | \endgraf | 6635 | \endgraf |
| 6505 | \ifdim\lastskip<\envskipamount | 6636 | \ifdim\lastskip<\envskipamount |
| 6506 | \removelastskip | 6637 | \removelastskip |
| 6638 | \ifnum\lastpenalty<10000 | ||
| 6639 | % Penalize breaking before the environment, because preceding text | ||
| 6640 | % often leads into it. | ||
| 6641 | \penalty100 | ||
| 6642 | \fi | ||
| 6643 | \vskip\envskipamount | ||
| 6644 | \fi | ||
| 6645 | \fi | ||
| 6646 | }} | ||
| 6647 | |||
| 6648 | \def\afterenvbreak{{% | ||
| 6649 | % =10000 instead of <10000 because of a special case in \itemzzz and | ||
| 6650 | % \sectionheading, q.v. | ||
| 6651 | \ifnum \lastpenalty=10000 \else | ||
| 6652 | \advance\envskipamount by \parskip | ||
| 6653 | \endgraf | ||
| 6654 | \ifdim\lastskip<\envskipamount | ||
| 6655 | \removelastskip | ||
| 6507 | % it's not a good place to break if the last penalty was \nobreak | 6656 | % it's not a good place to break if the last penalty was \nobreak |
| 6508 | % or better ... | 6657 | % or better ... |
| 6509 | \ifnum\lastpenalty<10000 \penalty-50 \fi | 6658 | \ifnum\lastpenalty<10000 \penalty-50 \fi |
| @@ -6512,8 +6661,6 @@ end | |||
| 6512 | \fi | 6661 | \fi |
| 6513 | }} | 6662 | }} |
| 6514 | 6663 | ||
| 6515 | \let\afterenvbreak = \aboveenvbreak | ||
| 6516 | |||
| 6517 | % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will | 6664 | % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will |
| 6518 | % also clear it, so that its embedded environments do the narrowing again. | 6665 | % also clear it, so that its embedded environments do the narrowing again. |
| 6519 | \let\nonarrowing=\relax | 6666 | \let\nonarrowing=\relax |
| @@ -6557,7 +6704,7 @@ end | |||
| 6557 | % collide with the section heading. | 6704 | % collide with the section heading. |
| 6558 | \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi | 6705 | \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi |
| 6559 | % | 6706 | % |
| 6560 | \vbox\bgroup | 6707 | \setbox\groupbox=\vbox\bgroup |
| 6561 | \baselineskip=0pt\parskip=0pt\lineskip=0pt | 6708 | \baselineskip=0pt\parskip=0pt\lineskip=0pt |
| 6562 | \carttop | 6709 | \carttop |
| 6563 | \hbox\bgroup | 6710 | \hbox\bgroup |
| @@ -6581,6 +6728,7 @@ end | |||
| 6581 | \egroup | 6728 | \egroup |
| 6582 | \cartbot | 6729 | \cartbot |
| 6583 | \egroup | 6730 | \egroup |
| 6731 | \addgroupbox | ||
| 6584 | \checkinserts | 6732 | \checkinserts |
| 6585 | } | 6733 | } |
| 6586 | 6734 | ||
| @@ -7058,7 +7206,7 @@ end | |||
| 7058 | \temp | 7206 | \temp |
| 7059 | } | 7207 | } |
| 7060 | 7208 | ||
| 7061 | % \domakedefun \deffn \deffnx \deffnheader | 7209 | % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } |
| 7062 | % | 7210 | % |
| 7063 | % Define \deffn and \deffnx, without parameters. | 7211 | % Define \deffn and \deffnx, without parameters. |
| 7064 | % \deffnheader has to be defined explicitly. | 7212 | % \deffnheader has to be defined explicitly. |
| @@ -7407,6 +7555,8 @@ end | |||
| 7407 | \def\scanmacro#1{% | 7555 | \def\scanmacro#1{% |
| 7408 | \newlinechar`\^^M | 7556 | \newlinechar`\^^M |
| 7409 | \let\xeatspaces\eatspaces | 7557 | \let\xeatspaces\eatspaces |
| 7558 | % Reduce doubled backslashes to one | ||
| 7559 | \def\xprocessmacroarg{\passargtomacro\eatspaces}% | ||
| 7410 | % | 7560 | % |
| 7411 | % Process the macro body under the current catcode regime. | 7561 | % Process the macro body under the current catcode regime. |
| 7412 | \scantokens{#1\texinfoc}\aftermacro% | 7562 | \scantokens{#1\texinfoc}\aftermacro% |
| @@ -7526,6 +7676,7 @@ end | |||
| 7526 | % an argument to another Texinfo command. | 7676 | % an argument to another Texinfo command. |
| 7527 | \def\macroargctxt{% | 7677 | \def\macroargctxt{% |
| 7528 | \scanctxt | 7678 | \scanctxt |
| 7679 | \catcode`\^^M=\other | ||
| 7529 | \catcode`\\=\active | 7680 | \catcode`\\=\active |
| 7530 | } | 7681 | } |
| 7531 | 7682 | ||
| @@ -7605,59 +7756,36 @@ end | |||
| 7605 | \fi | 7756 | \fi |
| 7606 | } | 7757 | } |
| 7607 | 7758 | ||
| 7608 | % This makes use of the obscure feature that if the last token of a | 7759 | % \getargs -- Parse the arguments to a @macro line. Set \macname to |
| 7609 | % <parameter list> is #, then the preceding argument is delimited by | 7760 | % the name of the macro, and \argl to the braced argument list. |
| 7610 | % an opening brace, and that opening brace is not consumed. | ||
| 7611 | % | ||
| 7612 | \def\getargs#1{\getargsxxx#1{}} | 7761 | \def\getargs#1{\getargsxxx#1{}} |
| 7613 | \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} | 7762 | \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} |
| 7614 | \def\getmacname#1 #2\relax{\macname={#1}} | 7763 | \def\getmacname#1 #2\relax{\macname={#1}} |
| 7615 | \def\getmacargs#1{\def\argl{#1}} | 7764 | \def\getmacargs#1{\def\argl{#1}} |
| 7765 | % This made use of the feature that if the last token of a | ||
| 7766 | % <parameter list> is #, then the preceding argument is delimited by | ||
| 7767 | % an opening brace, and that opening brace is not consumed. | ||
| 7616 | 7768 | ||
| 7617 | % For macro processing make @ a letter so that we can make | 7769 | % Parse the optional {params} list to @macro or @rmacro. |
| 7618 | % private-to-Texinfo macro names. | 7770 | % Set \paramno to the number of arguments, |
| 7619 | \edef\texiatcatcode{\the\catcode`\@} | 7771 | % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a |
| 7620 | \catcode `@=11\relax | 7772 | % three-param macro.) Define \macarg.BLAH for each BLAH in the params |
| 7621 | 7773 | % list to some hook where the argument is to be expanded. If there are | |
| 7622 | % Parse the optional {params} list. Set up \paramno and \paramlist | 7774 | % less than 10 arguments that hook is to be replaced by ##N where N |
| 7623 | % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH | ||
| 7624 | % in the params list to some hook where the argument is to be expanded. If | ||
| 7625 | % there are less than 10 arguments that hook is to be replaced by ##N where N | ||
| 7626 | % is the position in that list, that is to say the macro arguments are to be | 7775 | % is the position in that list, that is to say the macro arguments are to be |
| 7627 | % defined `a la TeX in the macro body. | 7776 | % defined `a la TeX in the macro body. |
| 7628 | % | 7777 | % |
| 7629 | % That gets used by \mbodybackslash (above). | 7778 | % That gets used by \mbodybackslash (above). |
| 7630 | % | 7779 | % |
| 7631 | % We need to get `macro parameter char #' into several definitions. | 7780 | % If there are 10 or more arguments, a different technique is used: see |
| 7632 | % The technique used is stolen from LaTeX: let \hash be something | 7781 | % \parsemmanyargdef. |
| 7633 | % unexpandable, insert that wherever you need a #, and then redefine | ||
| 7634 | % it to # just before using the token list produced. | ||
| 7635 | % | ||
| 7636 | % The same technique is used to protect \eatspaces till just before | ||
| 7637 | % the macro is used. | ||
| 7638 | % | ||
| 7639 | % If there are 10 or more arguments, a different technique is used, where the | ||
| 7640 | % hook remains in the body, and when macro is to be expanded the body is | ||
| 7641 | % processed again to replace the arguments. | ||
| 7642 | % | ||
| 7643 | % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the | ||
| 7644 | % argument N value and then \edef the body (nothing else will expand because of | ||
| 7645 | % the catcode regime underwhich the body was input). | ||
| 7646 | % | 7782 | % |
| 7647 | % If you compile with TeX (not eTeX), and you have macros with 10 or more | ||
| 7648 | % arguments, no macro can have more than 256 arguments (else error). | ||
| 7649 | % | ||
| 7650 | \def\parsemargdef#1;{% | 7783 | \def\parsemargdef#1;{% |
| 7651 | \paramno=0\def\paramlist{}% | 7784 | \paramno=0\def\paramlist{}% |
| 7652 | \let\hash\relax | 7785 | \let\hash\relax |
| 7653 | \let\xeatspaces\relax | 7786 | % \hash is redefined to `#' later to get it into definitions |
| 7787 | \let\processmacroarg\relax | ||
| 7654 | \parsemargdefxxx#1,;,% | 7788 | \parsemargdefxxx#1,;,% |
| 7655 | % In case that there are 10 or more arguments we parse again the arguments | ||
| 7656 | % list to set new definitions for the \macarg.BLAH macros corresponding to | ||
| 7657 | % each BLAH argument. It was anyhow needed to parse already once this list | ||
| 7658 | % in order to count the arguments, and as macros with at most 9 arguments | ||
| 7659 | % are by far more frequent than macro with 10 or more arguments, defining | ||
| 7660 | % twice the \macarg.BLAH macros does not cost too much processing power. | ||
| 7661 | \ifnum\paramno<10\relax\else | 7789 | \ifnum\paramno<10\relax\else |
| 7662 | \paramno0\relax | 7790 | \paramno0\relax |
| 7663 | \parsemmanyargdef@@#1,;,% 10 or more arguments | 7791 | \parsemmanyargdef@@#1,;,% 10 or more arguments |
| @@ -7668,10 +7796,47 @@ end | |||
| 7668 | \else \let\next=\parsemargdefxxx | 7796 | \else \let\next=\parsemargdefxxx |
| 7669 | \advance\paramno by 1 | 7797 | \advance\paramno by 1 |
| 7670 | \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname | 7798 | \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname |
| 7671 | {\xeatspaces{\hash\the\paramno}}% | 7799 | {\processmacroarg{\hash\the\paramno}}% |
| 7672 | \edef\paramlist{\paramlist\hash\the\paramno,}% | 7800 | \edef\paramlist{\paramlist\hash\the\paramno,}% |
| 7673 | \fi\next} | 7801 | \fi\next} |
| 7674 | 7802 | ||
| 7803 | % \parsemacbody, \parsermacbody | ||
| 7804 | % | ||
| 7805 | % Read recursive and nonrecursive macro bodies. (They're different since | ||
| 7806 | % rec and nonrec macros end differently.) | ||
| 7807 | % | ||
| 7808 | % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro | ||
| 7809 | % body to be transformed. | ||
| 7810 | % Set \macrobody to the body of the macro, and call \defmacro. | ||
| 7811 | % | ||
| 7812 | {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% | ||
| 7813 | \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% | ||
| 7814 | {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% | ||
| 7815 | \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% | ||
| 7816 | |||
| 7817 | % Make @ a letter, so that we can make private-to-Texinfo macro names. | ||
| 7818 | \edef\texiatcatcode{\the\catcode`\@} | ||
| 7819 | \catcode `@=11\relax | ||
| 7820 | |||
| 7821 | %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% | ||
| 7822 | |||
| 7823 | % If there are 10 or more arguments, a different technique is used, where the | ||
| 7824 | % hook remains in the body, and when macro is to be expanded the body is | ||
| 7825 | % processed again to replace the arguments. | ||
| 7826 | % | ||
| 7827 | % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the | ||
| 7828 | % argument N value and then \edef the body (nothing else will expand because of | ||
| 7829 | % the catcode regime under which the body was input). | ||
| 7830 | % | ||
| 7831 | % If you compile with TeX (not eTeX), and you have macros with 10 or more | ||
| 7832 | % arguments, no macro can have more than 256 arguments (else error). | ||
| 7833 | % | ||
| 7834 | % In case that there are 10 or more arguments we parse again the arguments | ||
| 7835 | % list to set new definitions for the \macarg.BLAH macros corresponding to | ||
| 7836 | % each BLAH argument. It was anyhow needed to parse already once this list | ||
| 7837 | % in order to count the arguments, and as macros with at most 9 arguments | ||
| 7838 | % are by far more frequent than macro with 10 or more arguments, defining | ||
| 7839 | % twice the \macarg.BLAH macros does not cost too much processing power. | ||
| 7675 | \def\parsemmanyargdef@@#1,{% | 7840 | \def\parsemmanyargdef@@#1,{% |
| 7676 | \if#1;\let\next=\relax | 7841 | \if#1;\let\next=\relax |
| 7677 | \else | 7842 | \else |
| @@ -7687,15 +7852,6 @@ end | |||
| 7687 | \advance\paramno by 1\relax | 7852 | \advance\paramno by 1\relax |
| 7688 | \fi\next} | 7853 | \fi\next} |
| 7689 | 7854 | ||
| 7690 | % These two commands read recursive and nonrecursive macro bodies. | ||
| 7691 | % (They're different since rec and nonrec macros end differently.) | ||
| 7692 | % Set \temp to the body of the macro, and call \defmacro. | ||
| 7693 | \catcode `\@\texiatcatcode | ||
| 7694 | {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% | ||
| 7695 | \xdef\temp{\eatcr{#1}}\endgroup\defmacro}}% | ||
| 7696 | {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% | ||
| 7697 | \xdef\temp{\eatcr{#1}}\endgroup\defmacro}}% | ||
| 7698 | \catcode `\@=11\relax | ||
| 7699 | 7855 | ||
| 7700 | \let\endargs@\relax | 7856 | \let\endargs@\relax |
| 7701 | \let\nil@\relax | 7857 | \let\nil@\relax |
| @@ -7724,9 +7880,6 @@ end | |||
| 7724 | \getargvals@@ | 7880 | \getargvals@@ |
| 7725 | \fi | 7881 | \fi |
| 7726 | } | 7882 | } |
| 7727 | |||
| 7728 | % Internal for \getargsval@. | ||
| 7729 | % | ||
| 7730 | \def\getargvals@@{% | 7883 | \def\getargvals@@{% |
| 7731 | \ifx\paramlist\nilm@ | 7884 | \ifx\paramlist\nilm@ |
| 7732 | % Some sanity check needed here that \argvaluelist is also empty. | 7885 | % Some sanity check needed here that \argvaluelist is also empty. |
| @@ -7834,16 +7987,7 @@ end | |||
| 7834 | \next | 7987 | \next |
| 7835 | } | 7988 | } |
| 7836 | 7989 | ||
| 7837 | % Save the token stack pointer into macro #1: | 7990 | % Trailing missing arguments are set to empty. |
| 7838 | \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} | ||
| 7839 | % | ||
| 7840 | % Restore the token stack pointer from number in macro #1: | ||
| 7841 | \def\texirestoretoksstackpoint#1{\expandafter\mathchardef | ||
| 7842 | \expandafter\@cclvi#1\relax} | ||
| 7843 | % Variant \newtoks that can be used non-\outer: | ||
| 7844 | \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} | ||
| 7845 | |||
| 7846 | % Tailing missing arguments are set to empty. | ||
| 7847 | % | 7991 | % |
| 7848 | \def\setemptyargvalues@{% | 7992 | \def\setemptyargvalues@{% |
| 7849 | \ifx\paramlist\nilm@ | 7993 | \ifx\paramlist\nilm@ |
| @@ -7874,44 +8018,73 @@ end | |||
| 7874 | \long\def#2{#4}% | 8018 | \long\def#2{#4}% |
| 7875 | } | 8019 | } |
| 7876 | 8020 | ||
| 7877 | % This defines a Texinfo @macro. \temp has the body of the macro in it. | 8021 | |
| 8022 | %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% | ||
| 8023 | |||
| 8024 | |||
| 8025 | |||
| 8026 | % Remove following spaces at the expansion stage. | ||
| 8027 | % This works because spaces are discarded before each argument when TeX is | ||
| 8028 | % getting the arguments for a macro. | ||
| 8029 | % This must not be immediately followed by a }. | ||
| 8030 | \long\def\gobblespaces#1{#1} | ||
| 8031 | |||
| 8032 | % This defines a Texinfo @macro or @rmacro, called by \parsemacbody. | ||
| 8033 | % \macrobody has the body of the macro in it, with placeholders for | ||
| 8034 | % its parameters, looking like "\processmacroarg{\hash 1}". | ||
| 8035 | % \paramno is the number of parameters | ||
| 8036 | % \paramlist is a TeX parameter text, e.g. "#1,#2,#3," | ||
| 7878 | % There are eight cases: recursive and nonrecursive macros of zero, one, | 8037 | % There are eight cases: recursive and nonrecursive macros of zero, one, |
| 7879 | % up to nine, and many arguments. | 8038 | % up to nine, and many arguments. |
| 7880 | % Much magic with \expandafter here. | ||
| 7881 | % \xdef is used so that macro definitions will survive the file | 8039 | % \xdef is used so that macro definitions will survive the file |
| 7882 | % they're defined in; @include reads the file inside a group. | 8040 | % they're defined in: @include reads the file inside a group. |
| 7883 | % | 8041 | % |
| 7884 | \def\defmacro{% | 8042 | \def\defmacro{% |
| 7885 | \let\hash=##% convert placeholders to macro parameter chars | 8043 | \let\hash=##% convert placeholders to macro parameter chars |
| 8044 | \ifnum\paramno=1 | ||
| 8045 | \def\processmacroarg{\gobblespaces}% | ||
| 8046 | % This removes the pair of braces around the argument. We don't | ||
| 8047 | % use \eatspaces, because this can cause ends of lines to be lost | ||
| 8048 | % when the argument to \eatspaces is read, leading to line-based | ||
| 8049 | % commands like "@itemize" not being read correctly. | ||
| 8050 | \else | ||
| 8051 | \def\processmacroarg{\xprocessmacroarg}% | ||
| 8052 | \let\xprocessmacroarg\relax | ||
| 8053 | \fi | ||
| 7886 | \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 8054 | \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 7887 | \ifcase\paramno | 8055 | \ifcase\paramno |
| 7888 | % 0 | 8056 | % 0 |
| 7889 | \expandafter\xdef\csname\the\macname\endcsname{% | 8057 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7890 | \noexpand\scanmacro{\temp}}% | 8058 | \noexpand\scanmacro{\macrobody}}% |
| 7891 | \or % 1 | 8059 | \or % 1 |
| 7892 | \expandafter\xdef\csname\the\macname\endcsname{% | 8060 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7893 | \bgroup | 8061 | \bgroup |
| 7894 | \noexpand\braceorline | 8062 | \noexpand\braceorline |
| 7895 | \expandafter\noexpand\csname\the\macname xxx\endcsname}% | 8063 | \expandafter\noexpand\csname\the\macname @@@\endcsname}% |
| 7896 | \expandafter\xdef\csname\the\macname xxx\endcsname##1{% | 8064 | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
| 7897 | \egroup\noexpand\scanmacro{\temp}}% | 8065 | \expandafter\noexpand\csname\the\macname @@@@\endcsname{% |
| 8066 | \noexpand\gobblespaces##1\empty}% | ||
| 8067 | % The \empty is for \gobblespaces in case #1 is empty | ||
| 8068 | }% | ||
| 8069 | \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% | ||
| 8070 | \egroup\noexpand\scanmacro{\macrobody}}% | ||
| 7898 | \else | 8071 | \else |
| 7899 | \ifnum\paramno<10\relax % at most 9 | 8072 | \ifnum\paramno<10\relax % at most 9 |
| 7900 | \expandafter\xdef\csname\the\macname\endcsname{% | 8073 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7901 | \bgroup\noexpand\macroargctxt | 8074 | \bgroup\noexpand\macroargctxt |
| 7902 | \noexpand\csname\the\macname xx\endcsname}% | 8075 | \noexpand\csname\the\macname @@\endcsname}% |
| 7903 | \expandafter\xdef\csname\the\macname xx\endcsname##1{% | 8076 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| 7904 | \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% | 8077 | \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}% |
| 7905 | \expandafter\expandafter | 8078 | \expandafter\expandafter |
| 7906 | \expandafter\xdef | 8079 | \expandafter\xdef |
| 7907 | \expandafter\expandafter | 8080 | \expandafter\expandafter |
| 7908 | \csname\the\macname xxx\endcsname | 8081 | \csname\the\macname @@@\endcsname |
| 7909 | \paramlist{\egroup\noexpand\scanmacro{\temp}}% | 8082 | \paramlist{\egroup\noexpand\scanmacro{\macrobody}}% |
| 7910 | \else % 10 or more | 8083 | \else % 10 or more |
| 7911 | \expandafter\xdef\csname\the\macname\endcsname{% | 8084 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7912 | \noexpand\getargvals@{\the\macname}{\argl}% | 8085 | \noexpand\getargvals@{\the\macname}{\argl}% |
| 7913 | }% | 8086 | }% |
| 7914 | \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp | 8087 | \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody |
| 7915 | \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble | 8088 | \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble |
| 7916 | \fi | 8089 | \fi |
| 7917 | \fi | 8090 | \fi |
| @@ -7919,36 +8092,41 @@ end | |||
| 7919 | \ifcase\paramno | 8092 | \ifcase\paramno |
| 7920 | % 0 | 8093 | % 0 |
| 7921 | \expandafter\xdef\csname\the\macname\endcsname{% | 8094 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7922 | \noexpand\scanmacro{\temp}}% | 8095 | \noexpand\scanmacro{\macrobody}}% |
| 7923 | \or % 1 | 8096 | \or % 1 |
| 7924 | \expandafter\xdef\csname\the\macname\endcsname{% | 8097 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7925 | \bgroup | 8098 | \bgroup |
| 7926 | \noexpand\braceorline | 8099 | \noexpand\braceorline |
| 7927 | \expandafter\noexpand\csname\the\macname xxx\endcsname}% | 8100 | \expandafter\noexpand\csname\the\macname @@@\endcsname}% |
| 7928 | \expandafter\xdef\csname\the\macname xxx\endcsname##1{% | 8101 | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
| 8102 | \expandafter\noexpand\csname\the\macname @@@@\endcsname{% | ||
| 8103 | \noexpand\gobblespaces##1\empty}% | ||
| 8104 | % The \empty is for \gobblespaces in case #1 is empty | ||
| 8105 | }% | ||
| 8106 | \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% | ||
| 7929 | \egroup | 8107 | \egroup |
| 7930 | \noexpand\scanmacro{\temp}% | 8108 | \noexpand\scanmacro{\macrobody}% |
| 7931 | }% | 8109 | }% |
| 7932 | \else % at most 9 | 8110 | \else % at most 9 |
| 7933 | \ifnum\paramno<10\relax | 8111 | \ifnum\paramno<10\relax |
| 7934 | \expandafter\xdef\csname\the\macname\endcsname{% | 8112 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7935 | \bgroup\noexpand\macroargctxt | 8113 | \bgroup\noexpand\macroargctxt |
| 7936 | \expandafter\noexpand\csname\the\macname xx\endcsname}% | 8114 | \expandafter\noexpand\csname\the\macname @@\endcsname}% |
| 7937 | \expandafter\xdef\csname\the\macname xx\endcsname##1{% | 8115 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| 7938 | \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% | 8116 | \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}% |
| 7939 | \expandafter\expandafter | 8117 | \expandafter\expandafter |
| 7940 | \expandafter\xdef | 8118 | \expandafter\xdef |
| 7941 | \expandafter\expandafter | 8119 | \expandafter\expandafter |
| 7942 | \csname\the\macname xxx\endcsname | 8120 | \csname\the\macname @@@\endcsname |
| 7943 | \paramlist{% | 8121 | \paramlist{% |
| 7944 | \egroup | 8122 | \egroup |
| 7945 | \noexpand\scanmacro{\temp}% | 8123 | \noexpand\scanmacro{\macrobody}% |
| 7946 | }% | 8124 | }% |
| 7947 | \else % 10 or more: | 8125 | \else % 10 or more: |
| 7948 | \expandafter\xdef\csname\the\macname\endcsname{% | 8126 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 7949 | \noexpand\getargvals@{\the\macname}{\argl}% | 8127 | \noexpand\getargvals@{\the\macname}{\argl}% |
| 7950 | }% | 8128 | }% |
| 7951 | \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp | 8129 | \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody |
| 7952 | \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse | 8130 | \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse |
| 7953 | \fi | 8131 | \fi |
| 7954 | \fi | 8132 | \fi |
| @@ -8119,6 +8297,7 @@ end | |||
| 8119 | \pdfmkdest{#1}% | 8297 | \pdfmkdest{#1}% |
| 8120 | \iflinks | 8298 | \iflinks |
| 8121 | {% | 8299 | {% |
| 8300 | \requireauxfile | ||
| 8122 | \atdummies % preserve commands, but don't expand them | 8301 | \atdummies % preserve commands, but don't expand them |
| 8123 | \edef\writexrdef##1##2{% | 8302 | \edef\writexrdef##1##2{% |
| 8124 | \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef | 8303 | \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef |
| @@ -8383,6 +8562,7 @@ end | |||
| 8383 | % If its value is nonempty, SUFFIX is output afterward. | 8562 | % If its value is nonempty, SUFFIX is output afterward. |
| 8384 | % | 8563 | % |
| 8385 | \def\refx#1#2{% | 8564 | \def\refx#1#2{% |
| 8565 | \requireauxfile | ||
| 8386 | {% | 8566 | {% |
| 8387 | \indexnofonts | 8567 | \indexnofonts |
| 8388 | \otherbackslash | 8568 | \otherbackslash |
| @@ -8446,6 +8626,23 @@ end | |||
| 8446 | \fi | 8626 | \fi |
| 8447 | } | 8627 | } |
| 8448 | 8628 | ||
| 8629 | % If working on a large document in chapters, it is convenient to | ||
| 8630 | % be able to disable indexing, cross-referencing, and contents, for test runs. | ||
| 8631 | % This is done with @novalidate at the beginning of the file. | ||
| 8632 | % | ||
| 8633 | \newif\iflinks \linkstrue % by default we want the aux files. | ||
| 8634 | \let\novalidate = \linksfalse | ||
| 8635 | |||
| 8636 | % Used when writing to the aux file, or when using data from it. | ||
| 8637 | \def\requireauxfile{% | ||
| 8638 | \iflinks | ||
| 8639 | \tryauxfile | ||
| 8640 | % Open the new aux file. TeX will close it automatically at exit. | ||
| 8641 | \immediate\openout\auxfile=\jobname.aux | ||
| 8642 | \fi | ||
| 8643 | \global\let\requireauxfile=\relax % Only do this once. | ||
| 8644 | } | ||
| 8645 | |||
| 8449 | % Read the last existing aux file, if any. No error if none exists. | 8646 | % Read the last existing aux file, if any. No error if none exists. |
| 8450 | % | 8647 | % |
| 8451 | \def\tryauxfile{% | 8648 | \def\tryauxfile{% |
| @@ -8919,6 +9116,7 @@ end | |||
| 8919 | % \floatlabel-lof. Besides \floatident, we include the short | 9116 | % \floatlabel-lof. Besides \floatident, we include the short |
| 8920 | % caption if specified, else the full caption if specified, else nothing. | 9117 | % caption if specified, else the full caption if specified, else nothing. |
| 8921 | {% | 9118 | {% |
| 9119 | \requireauxfile | ||
| 8922 | \atdummies | 9120 | \atdummies |
| 8923 | % | 9121 | % |
| 8924 | % since we read the caption text in the macro world, where ^^M | 9122 | % since we read the caption text in the macro world, where ^^M |
| @@ -10477,6 +10675,16 @@ directory should work if nowhere else does.} | |||
| 10477 | % file name, in case not using a pre-dumped format. | 10675 | % file name, in case not using a pre-dumped format. |
| 10478 | @catcode`+=@active | 10676 | @catcode`+=@active |
| 10479 | @catcode`@_=@active | 10677 | @catcode`@_=@active |
| 10678 | % | ||
| 10679 | % If texinfo.cnf is present on the system, read it. | ||
| 10680 | % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets | ||
| 10681 | % called at the beginning of every Texinfo file. Not opening texinfo.cnf | ||
| 10682 | % directly in this file, texinfo.tex, makes it possible to make a format | ||
| 10683 | % file for Texinfo. | ||
| 10684 | % | ||
| 10685 | @openin 1 texinfo.cnf | ||
| 10686 | @ifeof 1 @else @input texinfo.cnf @fi | ||
| 10687 | @closein 1 | ||
| 10480 | } | 10688 | } |
| 10481 | 10689 | ||
| 10482 | 10690 | ||