diff options
| author | Paul Eggert | 2023-08-12 12:50:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2023-08-12 12:57:35 -0700 |
| commit | f3868cb9d1806b35186eabc0262393316ebe689a (patch) | |
| tree | b94176760150b6994aacf74292a12ba0890b9222 /doc | |
| parent | b66c16c789d8046ff40c48b9346b26238b1b97e1 (diff) | |
| download | emacs-f3868cb9d1806b35186eabc0262393316ebe689a.tar.gz emacs-f3868cb9d1806b35186eabc0262393316ebe689a.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/texinfo.tex | 257 |
1 files changed, 188 insertions, 69 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index b1d2999e5d7..6e521944b22 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{2023-07-02.10} | 6 | \def\texinfoversion{2023-07-27.21} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc. | 8 | % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc. |
| 9 | % | 9 | % |
| @@ -426,42 +426,21 @@ | |||
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | % First remove any @comment, then any @c comment. Pass the result on to | 428 | % First remove any @comment, then any @c comment. Pass the result on to |
| 429 | % \argcheckspaces. | 429 | % \argremovespace. |
| 430 | \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} | 430 | \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} |
| 431 | \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} | 431 | \def\argremovec#1\c#2\ArgTerm{\argremovespace#1$ $\ArgTerm} |
| 432 | 432 | % \argremovec might leave us with trailing space, though; e.g., | |
| 433 | % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. | ||
| 434 | % | ||
| 435 | % \argremovec might leave us with trailing space, e.g., | ||
| 436 | % @end itemize @c foo | 433 | % @end itemize @c foo |
| 437 | % This space token undergoes the same procedure and is eventually removed | 434 | % Note that the argument cannot contain the TeX $, as its catcode is |
| 438 | % by \finishparsearg. | 435 | % changed to \other when Texinfo source is read. |
| 439 | % | 436 | \def\argremovespace#1 $#2\ArgTerm{\finishparsearg#1$\ArgTerm} |
| 440 | \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} | ||
| 441 | \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} | ||
| 442 | \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% | ||
| 443 | \def\temp{#3}% | ||
| 444 | \ifx\temp\empty | ||
| 445 | % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: | ||
| 446 | \let\temp\finishparsearg | ||
| 447 | \else | ||
| 448 | \let\temp\argcheckspaces | ||
| 449 | \fi | ||
| 450 | % Put the space token in: | ||
| 451 | \temp#1 #3\ArgTerm | ||
| 452 | } | ||
| 453 | 437 | ||
| 454 | % If a _delimited_ argument is enclosed in braces, they get stripped; so | 438 | % If a _delimited_ argument is enclosed in braces, they get stripped; so |
| 455 | % to get _exactly_ the rest of the line, we had to prevent such situation. | 439 | % to get _exactly_ the rest of the line, we had to prevent such situation. |
| 456 | % We prepended an \empty token at the very beginning and we expand it now, | 440 | % We prepended an \empty token at the very beginning and we expand it |
| 457 | % just before passing the control to \argtorun. | 441 | % just before passing the control to \next. |
| 458 | % (Similarly, we have to think about #3 of \argcheckspacesY above: it is | 442 | % (But first, we have to remove the remaining $ or two.) |
| 459 | % either the null string, or it ends with \^^M---thus there is no danger | 443 | \def\finishparsearg#1$#2\ArgTerm{\expandafter\argtorun\expandafter{#1}} |
| 460 | % that a pair of braces would be stripped. | ||
| 461 | % | ||
| 462 | % But first, we have to remove the trailing space token. | ||
| 463 | % | ||
| 464 | \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} | ||
| 465 | 444 | ||
| 466 | 445 | ||
| 467 | % \parseargdef - define a command taking an argument on the line | 446 | % \parseargdef - define a command taking an argument on the line |
| @@ -5575,6 +5554,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 5575 | \newdimen\entryrightmargin | 5554 | \newdimen\entryrightmargin |
| 5576 | \entryrightmargin=0pt | 5555 | \entryrightmargin=0pt |
| 5577 | 5556 | ||
| 5557 | % amount to indent subsequent lines in an entry when it spans more than | ||
| 5558 | % one line. | ||
| 5559 | \newdimen\entrycontskip | ||
| 5560 | \entrycontskip=1em | ||
| 5561 | |||
| 5578 | % for PDF output, whether to make the text of the entry a link to the page | 5562 | % for PDF output, whether to make the text of the entry a link to the page |
| 5579 | % number. set for @contents and @shortcontents where there is only one | 5563 | % number. set for @contents and @shortcontents where there is only one |
| 5580 | % page number. | 5564 | % page number. |
| @@ -5684,25 +5668,30 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 5684 | \advance\dimen@ii by 1\dimen@i | 5668 | \advance\dimen@ii by 1\dimen@i |
| 5685 | \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line | 5669 | \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line |
| 5686 | \ifdim\dimen@ > 0.8\dimen@ii % due to long index text | 5670 | \ifdim\dimen@ > 0.8\dimen@ii % due to long index text |
| 5671 | % Undo changes above | ||
| 5672 | \advance \parfillskip by 0pt minus -1\dimen@i | ||
| 5673 | \advance\dimen@ii by -1\dimen@i | ||
| 5674 | % | ||
| 5687 | % Try to split the text roughly evenly. \dimen@ will be the length of | 5675 | % Try to split the text roughly evenly. \dimen@ will be the length of |
| 5688 | % the first line. | 5676 | % the first line. |
| 5689 | \dimen@ = 0.7\dimen@ | 5677 | \dimen@ = 0.7\dimen@ |
| 5690 | \dimen@ii = \hsize | 5678 | \dimen@ii = \hsize |
| 5691 | \ifnum\dimen@>\dimen@ii | 5679 | \ifnum\dimen@>\dimen@ii |
| 5692 | % If the entry is too long (for example, if it needs more than | 5680 | % If the entry is too long (for example, if it needs more than |
| 5693 | % two lines), use all the space in the first line. | 5681 | % two lines), use the same line length for all lines. |
| 5694 | \dimen@ = \dimen@ii | 5682 | \dimen@ = \dimen@ii |
| 5683 | \else | ||
| 5684 | \advance \dimen@ by 1\rightskip | ||
| 5695 | \fi | 5685 | \fi |
| 5696 | \advance\leftskip by 0pt plus 1fill % ragged right | 5686 | \advance\leftskip by 0pt plus 1fill % ragged right |
| 5697 | \advance \dimen@ by 1\rightskip | ||
| 5698 | \parshape = 2 0pt \dimen@ 0em \dimen@ii | 5687 | \parshape = 2 0pt \dimen@ 0em \dimen@ii |
| 5699 | % Ideally we'd add a finite glue at the end of the first line only, | 5688 | % Ideally we'd add a finite glue at the end of the first line only, |
| 5700 | % instead of using \parshape with explicit line lengths, but TeX | 5689 | % instead of using \parshape with explicit line lengths, but TeX |
| 5701 | % doesn't seem to provide a way to do such a thing. | 5690 | % doesn't seem to provide a way to do such a thing. |
| 5702 | % | 5691 | % |
| 5703 | % Indent all lines but the first one. | 5692 | % Indent all lines but the first one. |
| 5704 | \advance\leftskip by 1em | 5693 | \advance\leftskip by \entrycontskip |
| 5705 | \advance\parindent by -1em | 5694 | \advance\parindent by -\entrycontskip |
| 5706 | \fi\fi | 5695 | \fi\fi |
| 5707 | \indent % start paragraph | 5696 | \indent % start paragraph |
| 5708 | \unhbox\boxA | 5697 | \unhbox\boxA |
| @@ -6721,6 +6710,82 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6721 | \input \tocreadfilename | 6710 | \input \tocreadfilename |
| 6722 | } | 6711 | } |
| 6723 | 6712 | ||
| 6713 | % process toc file to find the maximum width of the section numbers for | ||
| 6714 | % each chapter | ||
| 6715 | \def\findsecnowidths{% | ||
| 6716 | \begingroup | ||
| 6717 | \setupdatafile | ||
| 6718 | \activecatcodes | ||
| 6719 | \secentryfonts | ||
| 6720 | % Redefinitions | ||
| 6721 | \def\numchapentry##1##2##3##4{% | ||
| 6722 | \def\curchapname{secnowidth-##2}% | ||
| 6723 | \curchapmax=0pt | ||
| 6724 | }% | ||
| 6725 | \let\appentry\numchapentry | ||
| 6726 | % | ||
| 6727 | \def\numsecentry##1##2##3##4{% | ||
| 6728 | \def\cursecname{secnowidth-##2}% | ||
| 6729 | \cursecmax=0pt | ||
| 6730 | % | ||
| 6731 | \setbox0=\hbox{##2}% | ||
| 6732 | \ifdim\wd0>\curchapmax | ||
| 6733 | \curchapmax=\wd0 | ||
| 6734 | \expandafter\xdef\csname\curchapname\endcsname{\the\wd0}% | ||
| 6735 | \fi | ||
| 6736 | }% | ||
| 6737 | \let\appsecentry\numsecentry | ||
| 6738 | % | ||
| 6739 | \def\numsubsecentry##1##2##3##4{% | ||
| 6740 | \def\curssecname{secnowidth-##2}% | ||
| 6741 | \curssecmax=0pt | ||
| 6742 | % | ||
| 6743 | \setbox0=\hbox{##2}% | ||
| 6744 | \ifdim\wd0>\cursecmax | ||
| 6745 | \cursecmax=\wd0 | ||
| 6746 | \expandafter\xdef\csname\cursecname\endcsname{\the\wd0}% | ||
| 6747 | \fi | ||
| 6748 | }% | ||
| 6749 | \let\appsubsecentry\numsubsecentry | ||
| 6750 | % | ||
| 6751 | \def\numsubsubsecentry##1##2##3##4{% | ||
| 6752 | \setbox0=\hbox{##2}% | ||
| 6753 | \ifdim\wd0>\curssecmax | ||
| 6754 | \curssecmax=\wd0 | ||
| 6755 | \expandafter\xdef\csname\curssecname\endcsname{\the\wd0}% | ||
| 6756 | \fi | ||
| 6757 | }% | ||
| 6758 | \let\appsubsubsecentry\numsubsubsecentry | ||
| 6759 | % | ||
| 6760 | % Discard any output by outputting to dummy vbox, in case the toc file | ||
| 6761 | % contains macros that we have not redefined above. | ||
| 6762 | \setbox\dummybox\vbox\bgroup | ||
| 6763 | \input \tocreadfilename\relax | ||
| 6764 | \egroup | ||
| 6765 | \endgroup | ||
| 6766 | } | ||
| 6767 | \newdimen\curchapmax | ||
| 6768 | \newdimen\cursecmax | ||
| 6769 | \newdimen\curssecmax | ||
| 6770 | |||
| 6771 | |||
| 6772 | % set #1 to the maximum section width for #2 | ||
| 6773 | \def\retrievesecnowidth#1#2{% | ||
| 6774 | \expandafter\let\expandafter\savedsecnowidth \csname secnowidth-#2\endcsname | ||
| 6775 | \ifx\savedsecnowidth\relax | ||
| 6776 | #1=0pt | ||
| 6777 | \else | ||
| 6778 | #1=\savedsecnowidth | ||
| 6779 | \fi | ||
| 6780 | } | ||
| 6781 | \newdimen\secnowidthchap | ||
| 6782 | \secnowidthchap=0pt | ||
| 6783 | \newdimen\secnowidthsec | ||
| 6784 | \secnowidthsec=0pt | ||
| 6785 | \newdimen\secnowidthssec | ||
| 6786 | \secnowidthssec=0pt | ||
| 6787 | |||
| 6788 | |||
| 6724 | \newskip\contentsrightmargin \contentsrightmargin=1in | 6789 | \newskip\contentsrightmargin \contentsrightmargin=1in |
| 6725 | \newcount\savepageno | 6790 | \newcount\savepageno |
| 6726 | \newcount\lastnegativepageno \lastnegativepageno = -1 | 6791 | \newcount\lastnegativepageno \lastnegativepageno = -1 |
| @@ -6766,6 +6831,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6766 | \startcontents{\putwordTOC}% | 6831 | \startcontents{\putwordTOC}% |
| 6767 | \openin 1 \tocreadfilename\space | 6832 | \openin 1 \tocreadfilename\space |
| 6768 | \ifeof 1 \else | 6833 | \ifeof 1 \else |
| 6834 | \findsecnowidths | ||
| 6769 | \readtocfile | 6835 | \readtocfile |
| 6770 | \fi | 6836 | \fi |
| 6771 | \vfill \eject | 6837 | \vfill \eject |
| @@ -6793,6 +6859,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6793 | \rm | 6859 | \rm |
| 6794 | \hyphenpenalty = 10000 | 6860 | \hyphenpenalty = 10000 |
| 6795 | \advance\baselineskip by 1pt % Open it up a little. | 6861 | \advance\baselineskip by 1pt % Open it up a little. |
| 6862 | \extrasecnoskip=0.4pt | ||
| 6796 | \def\numsecentry##1##2##3##4{} | 6863 | \def\numsecentry##1##2##3##4{} |
| 6797 | \let\appsecentry = \numsecentry | 6864 | \let\appsecentry = \numsecentry |
| 6798 | \let\unnsecentry = \numsecentry | 6865 | \let\unnsecentry = \numsecentry |
| @@ -6828,8 +6895,6 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6828 | % This space should be enough, since a single number is .5em, and the | 6895 | % This space should be enough, since a single number is .5em, and the |
| 6829 | % widest letter (M) is 1em, at least in the Computer Modern fonts. | 6896 | % widest letter (M) is 1em, at least in the Computer Modern fonts. |
| 6830 | % But use \hss just in case. | 6897 | % But use \hss just in case. |
| 6831 | % (This space doesn't include the extra space that gets added after | ||
| 6832 | % the label; that gets put in by \shortchapentry above.) | ||
| 6833 | % | 6898 | % |
| 6834 | % We'd like to right-justify chapter numbers, but that looks strange | 6899 | % We'd like to right-justify chapter numbers, but that looks strange |
| 6835 | % with appendix letters. And right-justifying numbers and | 6900 | % with appendix letters. And right-justifying numbers and |
| @@ -6839,10 +6904,15 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6839 | \hbox to 1em{#1\hss}% | 6904 | \hbox to 1em{#1\hss}% |
| 6840 | } | 6905 | } |
| 6841 | 6906 | ||
| 6842 | % These macros generate individual entries in the table of contents. | 6907 | % These macros generate individual entries in the table of contents, |
| 6843 | % The first argument is the chapter or section name. | 6908 | % and are read in from the *.toc file. |
| 6844 | % The last argument is the page number. | 6909 | % |
| 6845 | % The arguments in between are the chapter number, section number, ... | 6910 | % The arguments are like: |
| 6911 | % \def\numchapentry#1#2#3#4 | ||
| 6912 | % #1 - the chapter or section name. | ||
| 6913 | % #2 - section number | ||
| 6914 | % #3 - level of section (e.g "chap", "sec") | ||
| 6915 | % #4 - page number | ||
| 6846 | 6916 | ||
| 6847 | % Parts, in the main contents. Replace the part number, which doesn't | 6917 | % Parts, in the main contents. Replace the part number, which doesn't |
| 6848 | % exist, with an empty box. Let's hope all the numbers have the same width. | 6918 | % exist, with an empty box. Let's hope all the numbers have the same width. |
| @@ -6855,7 +6925,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6855 | \vskip 0pt plus 5\baselineskip | 6925 | \vskip 0pt plus 5\baselineskip |
| 6856 | \penalty-300 | 6926 | \penalty-300 |
| 6857 | \vskip 0pt plus -5\baselineskip | 6927 | \vskip 0pt plus -5\baselineskip |
| 6858 | \dochapentry{\numeralbox\labelspace#1}{}% | 6928 | \dochapentry{#1}{\numeralbox}{}% |
| 6859 | } | 6929 | } |
| 6860 | % | 6930 | % |
| 6861 | % Parts, in the short toc. | 6931 | % Parts, in the short toc. |
| @@ -6866,12 +6936,14 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6866 | } | 6936 | } |
| 6867 | 6937 | ||
| 6868 | % Chapters, in the main contents. | 6938 | % Chapters, in the main contents. |
| 6869 | \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} | 6939 | \def\numchapentry#1#2#3#4{% |
| 6940 | \retrievesecnowidth\secnowidthchap{#2}% | ||
| 6941 | \dochapentry{#1}{#2}{#4}% | ||
| 6942 | } | ||
| 6870 | 6943 | ||
| 6871 | % Chapters, in the short toc. | 6944 | % Chapters, in the short toc. |
| 6872 | % See comments in \dochapentry re vbox and related settings. | ||
| 6873 | \def\shortchapentry#1#2#3#4{% | 6945 | \def\shortchapentry#1#2#3#4{% |
| 6874 | \tocentry{\shortchaplabel{#2}\labelspace #1}{#4}% | 6946 | \tocentry{#1}{\shortchaplabel{#2}}{#4}% |
| 6875 | } | 6947 | } |
| 6876 | 6948 | ||
| 6877 | % Appendices, in the main contents. | 6949 | % Appendices, in the main contents. |
| @@ -6882,67 +6954,111 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 6882 | \setbox0 = \hbox{\putwordAppendix{} M}% | 6954 | \setbox0 = \hbox{\putwordAppendix{} M}% |
| 6883 | \hbox to \wd0{\putwordAppendix{} #1\hss}} | 6955 | \hbox to \wd0{\putwordAppendix{} #1\hss}} |
| 6884 | % | 6956 | % |
| 6885 | \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} | 6957 | \def\appentry#1#2#3#4{% |
| 6958 | \retrievesecnowidth\secnowidthchap{#2}% | ||
| 6959 | \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#4}% | ||
| 6960 | } | ||
| 6886 | 6961 | ||
| 6887 | % Unnumbered chapters. | 6962 | % Unnumbered chapters. |
| 6888 | \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} | 6963 | \def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#4}} |
| 6889 | \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{#4}} | 6964 | \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#4}} |
| 6890 | 6965 | ||
| 6891 | % Sections. | 6966 | % Sections. |
| 6892 | \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} | 6967 | \def\numsecentry#1#2#3#4{\dosecentry{#1}{#2}{#4}} |
| 6968 | |||
| 6969 | \def\numsecentry#1#2#3#4{% | ||
| 6970 | \retrievesecnowidth\secnowidthsec{#2}% | ||
| 6971 | \dosecentry{#1}{#2}{#4}% | ||
| 6972 | } | ||
| 6893 | \let\appsecentry=\numsecentry | 6973 | \let\appsecentry=\numsecentry |
| 6894 | \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} | 6974 | \def\unnsecentry#1#2#3#4{% |
| 6975 | \retrievesecnowidth\secnowidthsec{#2}% | ||
| 6976 | \dosecentry{#1}{}{#4}% | ||
| 6977 | } | ||
| 6895 | 6978 | ||
| 6896 | % Subsections. | 6979 | % Subsections. |
| 6897 | \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} | 6980 | \def\numsubsecentry#1#2#3#4{% |
| 6981 | \retrievesecnowidth\secnowidthssec{#2}% | ||
| 6982 | \dosubsecentry{#1}{#2}{#4}% | ||
| 6983 | } | ||
| 6898 | \let\appsubsecentry=\numsubsecentry | 6984 | \let\appsubsecentry=\numsubsecentry |
| 6899 | \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} | 6985 | \def\unnsubsecentry#1#2#3#4{% |
| 6986 | \retrievesecnowidth\secnowidthssec{#2}% | ||
| 6987 | \dosubsecentry{#1}{}{#4}% | ||
| 6988 | } | ||
| 6900 | 6989 | ||
| 6901 | % And subsubsections. | 6990 | % And subsubsections. |
| 6902 | \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} | 6991 | \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#4}} |
| 6903 | \let\appsubsubsecentry=\numsubsubsecentry | 6992 | \let\appsubsubsecentry=\numsubsubsecentry |
| 6904 | \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} | 6993 | \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#4}} |
| 6905 | 6994 | ||
| 6906 | % This parameter controls the indentation of the various levels. | 6995 | % This parameter controls the indentation of the various levels. |
| 6907 | % Same as \defaultparindent. | 6996 | % Same as \defaultparindent. |
| 6908 | \newdimen\tocindent \tocindent = 15pt | 6997 | \newdimen\tocindent \tocindent = 15pt |
| 6909 | 6998 | ||
| 6910 | % Now for the actual typesetting. In all these, #1 is the text and #2 is the | 6999 | % Now for the actual typesetting. In all these, #1 is the text, #2 is |
| 6911 | % page number. | 7000 | % a section number if present, and #3 is the page number. |
| 6912 | % | 7001 | % |
| 6913 | % If the toc has to be broken over pages, we want it to be at chapters | 7002 | % If the toc has to be broken over pages, we want it to be at chapters |
| 6914 | % if at all possible; hence the \penalty. | 7003 | % if at all possible; hence the \penalty. |
| 6915 | \def\dochapentry#1#2{% | 7004 | \def\dochapentry#1#2#3{% |
| 6916 | \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip | 7005 | \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip |
| 6917 | \begingroup | 7006 | \begingroup |
| 6918 | % Move the page numbers slightly to the right | 7007 | % Move the page numbers slightly to the right |
| 6919 | \advance\entryrightmargin by -0.05em | 7008 | \advance\entryrightmargin by -0.05em |
| 6920 | \chapentryfonts | 7009 | \chapentryfonts |
| 6921 | \tocentry{#1}{#2}% | 7010 | \extrasecnoskip=0.4em % separate chapter number more |
| 7011 | \tocentry{#1}{#2}{#3}% | ||
| 6922 | \endgroup | 7012 | \endgroup |
| 6923 | \nobreak\vskip .25\baselineskip plus.1\baselineskip | 7013 | \nobreak\vskip .25\baselineskip plus.1\baselineskip |
| 6924 | } | 7014 | } |
| 6925 | 7015 | ||
| 6926 | \def\dosecentry#1#2{\begingroup | 7016 | \def\dosecentry#1#2#3{\begingroup |
| 7017 | \secnowidth=\secnowidthchap | ||
| 6927 | \secentryfonts \leftskip=\tocindent | 7018 | \secentryfonts \leftskip=\tocindent |
| 6928 | \tocentry{#1}{#2}% | 7019 | \tocentry{#1}{#2}{#3}% |
| 6929 | \endgroup} | 7020 | \endgroup} |
| 6930 | 7021 | ||
| 6931 | \def\dosubsecentry#1#2{\begingroup | 7022 | \def\dosubsecentry#1#2#3{\begingroup |
| 7023 | \secnowidth=\secnowidthsec | ||
| 6932 | \subsecentryfonts \leftskip=2\tocindent | 7024 | \subsecentryfonts \leftskip=2\tocindent |
| 6933 | \tocentry{#1}{#2}% | 7025 | \tocentry{#1}{#2}{#3}% |
| 6934 | \endgroup} | 7026 | \endgroup} |
| 6935 | 7027 | ||
| 6936 | \def\dosubsubsecentry#1#2{\begingroup | 7028 | \def\dosubsubsecentry#1#2#3{\begingroup |
| 7029 | \secnowidth=\secnowidthssec | ||
| 6937 | \subsubsecentryfonts \leftskip=3\tocindent | 7030 | \subsubsecentryfonts \leftskip=3\tocindent |
| 6938 | \tocentry{#1}{#2}% | 7031 | \tocentry{#1}{#2}{#3}% |
| 6939 | \endgroup} | 7032 | \endgroup} |
| 6940 | 7033 | ||
| 6941 | % We use the same \entry macro as for the index entries. | 7034 | % Used for the maximum width of a section number so we can align |
| 6942 | \let\tocentry = \entry | 7035 | % section titles. |
| 7036 | \newdimen\secnowidth | ||
| 7037 | \secnowidth=0pt | ||
| 7038 | \newdimen\extrasecnoskip | ||
| 7039 | \extrasecnoskip=0pt | ||
| 6943 | 7040 | ||
| 6944 | % Space between chapter (or whatever) number and the title. | 7041 | % \tocentry{TITLE}{SEC NO}{PAGE} |
| 6945 | \def\labelspace{\hskip1em \relax} | 7042 | % |
| 7043 | \def\tocentry#1#2#3{% | ||
| 7044 | \def\secno{#2}% | ||
| 7045 | \ifx\empty\secno | ||
| 7046 | \entry{#1}{#3}% | ||
| 7047 | \else | ||
| 7048 | \ifdim 0pt=\secnowidth | ||
| 7049 | \setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}% | ||
| 7050 | \else | ||
| 7051 | \advance\secnowidth by \labelspace | ||
| 7052 | \advance\secnowidth by \extrasecnoskip | ||
| 7053 | \setbox0=\hbox to \secnowidth{% | ||
| 7054 | #2\hskip\labelspace\hskip\extrasecnoskip\hfill}% | ||
| 7055 | \fi | ||
| 7056 | \entrycontskip=\wd0 | ||
| 7057 | \entry{\box0 #1}{#3}% | ||
| 7058 | \fi | ||
| 7059 | } | ||
| 7060 | \newdimen\labelspace | ||
| 7061 | \labelspace=0.6em | ||
| 6946 | 7062 | ||
| 6947 | \def\chapentryfonts{\secfonts \rm} | 7063 | \def\chapentryfonts{\secfonts \rm} |
| 6948 | \def\secentryfonts{\textfonts} | 7064 | \def\secentryfonts{\textfonts} |
| @@ -7787,6 +7903,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7787 | \tolerance=10000 \hbadness=10000 | 7903 | \tolerance=10000 \hbadness=10000 |
| 7788 | \exdentamount=\defbodyindent | 7904 | \exdentamount=\defbodyindent |
| 7789 | {% | 7905 | {% |
| 7906 | \def\^^M{}% for line continuation | ||
| 7907 | % | ||
| 7790 | % defun fonts. We use typewriter by default (used to be bold) because: | 7908 | % defun fonts. We use typewriter by default (used to be bold) because: |
| 7791 | % . we're printing identifiers, they should be in tt in principle. | 7909 | % . we're printing identifiers, they should be in tt in principle. |
| 7792 | % . in languages with many accents, such as Czech or French, it's | 7910 | % . in languages with many accents, such as Czech or French, it's |
| @@ -7819,6 +7937,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7819 | % Print arguments. Use slanted for @def*, typewriter for @deftype*. | 7937 | % Print arguments. Use slanted for @def*, typewriter for @deftype*. |
| 7820 | \def\defunargs#1{% | 7938 | \def\defunargs#1{% |
| 7821 | \bgroup | 7939 | \bgroup |
| 7940 | \def\^^M{}% for line continuation | ||
| 7822 | \df \ifdoingtypefn \tt \else \sl \fi | 7941 | \df \ifdoingtypefn \tt \else \sl \fi |
| 7823 | \ifflagclear{txicodevaristt}{}% | 7942 | \ifflagclear{txicodevaristt}{}% |
| 7824 | {\def\var##1{{\setregularquotes \ttsl ##1}}}% | 7943 | {\def\var##1{{\setregularquotes \ttsl ##1}}}% |