Changeset 609 for branches/GNU/src/binutils/texinfo
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/texinfo/texinfo.tex
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 4 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 5 5 % 6 \def\texinfoversion{200 0-05-28.15}7 % 8 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 999 % Free Software Foundation, Inc.6 \def\texinfoversion{2003-02-03.16} 7 % 8 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 10 10 % 11 11 % This texinfo.tex file is free software; you can redistribute it and/or … … 30 30 % Please try the latest version of texinfo.tex before submitting bug 31 31 % reports; you can get the latest version from: 32 % ftp://ftp.gnu.org/gnu/texinfo.tex 33 % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) 34 % ftp://texinfo.org/tex/texinfo.tex 35 % ftp://us.ctan.org/macros/texinfo/texinfo.tex 36 % (and all CTAN mirrors, finger ctan@us.ctan.org for a list). 37 % /home/gd/gnu/doc/texinfo.tex on the GNU machines. 32 % ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex 33 % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) 34 % ftp://tug.org/tex/texinfo.tex 35 % (and all CTAN mirrors, see http://www.ctan.org), 36 % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. 37 % 38 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. 39 % 38 40 % The texinfo.tex in any given Texinfo distribution could well be out 39 41 % of date, so if that's what you're using, please check. 40 % Texinfo has a small home page at http://texinfo.org/. 41 % 42 % 42 43 % Send bug reports to bug-texinfo@gnu.org. Please include including a 43 44 % complete document in each bug report with which we can reproduce the … … 51 52 % tex foo.texi 52 53 % tex foo.texi 53 % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.54 % The extra runs of TeXget the cross-reference information correct.54 % dvips foo.dvi -o # or whatever; this makes foo.ps. 55 % The extra TeX runs get the cross-reference information correct. 55 56 % Sometimes one run after texindex suffices, and sometimes you need more 56 57 % than two; texi2dvi does it as many times as necessary. 57 % 58 % It is possible to adapt texinfo.tex for other languages. You can get 59 % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. 58 % 59 % It is possible to adapt texinfo.tex for other languages, to some 60 % extent. You can get the existing language-specific files from the 61 % full Texinfo distribution. 60 62 61 63 \message{Loading texinfo [version \texinfoversion]:} … … 66 68 \everyjob{\message{[Texinfo version \texinfoversion]}% 67 69 \catcode`+=\active \catcode`\_=\active} 70 71 \message{Basics,} 72 \chardef\other=12 73 74 % We never want plain's outer \+ definition in Texinfo. 75 % For @tex, we can use \tabalign. 76 \let\+ = \relax 68 77 69 78 % Save some parts of plain tex whose names we will redefine. … … 77 86 \let\ptexequiv=\equiv 78 87 \let\ptexexclam=\! 88 \let\ptexgtr=> 89 \let\ptexhat=^ 79 90 \let\ptexi=\i 80 91 \let\ptexlbrace=\{ 92 \let\ptexless=< 93 \let\ptexplus=+ 81 94 \let\ptexrbrace=\} 82 95 \let\ptexstar=\* 83 96 \let\ptext=\t 84 85 % We never want plain's outer \+ definition in Texinfo.86 % For @tex, we can use \tabalign.87 \let\+ = \relax88 89 \message{Basics,}90 \chardef\other=1291 97 92 98 % If this character appears in an error message or help string, it … … 136 142 \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi 137 143 144 % In some macros, we cannot use the `\? notation---the left quote is 145 % in some cases the escape char. 146 \chardef\colonChar = `\: 147 \chardef\commaChar = `\, 148 \chardef\dotChar = `\. 149 \chardef\equalChar = `\= 150 \chardef\exclamChar= `\! 151 \chardef\questChar = `\? 152 \chardef\semiChar = `\; 153 \chardef\spaceChar = `\ % 154 \chardef\underChar = `\_ 155 138 156 % Ignore a token. 139 157 % 140 158 \def\gobble#1{} 141 159 160 % True if #1 is the empty string, i.e., called like `\ifempty{}'. 161 % 162 \def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}% 163 \def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}% 164 165 % Hyphenation fixes. 142 166 \hyphenation{ap-pen-dix} 143 167 \hyphenation{mini-buf-fer mini-buf-fers} … … 146 170 147 171 % Margin to add to right of even pages, to left of odd pages. 148 \newdimen 149 \newdimen 172 \newdimen\bindingoffset 173 \newdimen\normaloffset 150 174 \newdimen\pagewidth \newdimen\pageheight 151 175 152 176 % Sometimes it is convenient to have everything in the transcript file 153 177 % and nothing on the terminal. We don't just call \tracingall here, 154 % since that produces some useless output on the terminal. 178 % since that produces some useless output on the terminal. We also make 179 % some effort to order the tracing commands to reduce output in the log 180 % file; cf. trace.sty in LaTeX. 155 181 % 156 182 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% 157 \ifx\eTeXversion\undefined 158 \def\loggingall{\tracingcommands2 \tracingstats2 159 \tracingpages1 \tracingoutput1 \tracinglostchars1 160 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 161 \showboxbreadth\maxdimen\showboxdepth\maxdimen 183 \def\loggingall{% 184 \tracingstats2 185 \tracingpages1 186 \tracinglostchars2 % 2 gives us more in etex 187 \tracingparagraphs1 188 \tracingoutput1 189 \tracingmacros2 190 \tracingrestores1 191 \showboxbreadth\maxdimen \showboxdepth\maxdimen 192 \ifx\eTeXversion\undefined\else % etex gives us more logging 193 \tracingscantokens1 194 \tracingifs1 195 \tracinggroups1 196 \tracingnesting2 197 \tracingassigns1 198 \fi 199 \tracingcommands3 % 3 gives us more in etex 200 \errorcontextlines\maxdimen 162 201 }% 163 \else 164 \def\loggingall{\tracingcommands3 \tracingstats2 165 \tracingpages1 \tracingoutput1 \tracinglostchars1 166 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 167 \tracingscantokens1 \tracingassigns1 \tracingifs1 168 \tracinggroups1 \tracingnesting2 169 \showboxbreadth\maxdimen\showboxdepth\maxdimen 170 }% 171 \fi 202 203 % add check for \lastpenalty to plain's definitions. If the last thing 204 % we did was a \nobreak, we don't want to insert more space. 205 % 206 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount 207 \removelastskip\penalty-50\smallskip\fi\fi} 208 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount 209 \removelastskip\penalty-100\medskip\fi\fi} 210 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount 211 \removelastskip\penalty-200\bigskip\fi\fi} 172 212 173 213 % For @cropmarks command. … … 264 304 \fi 265 305 }% end of \shipout\vbox 266 }% end of group with \ turnoffactive306 }% end of group with \normalturnoffactive 267 307 \advancepageno 268 308 \ifnum\outputpenalty>-20000 \else\dosupereject\fi … … 424 464 425 465 426 % Single-spacing is done by various environments (specifically, in427 % \nonfillstart and \quotations).428 \newskip\singlespaceskip \singlespaceskip = 12.5pt429 \def\singlespace{%430 % Why was this kern here? It messes up equalizing space above and below431 % environments. --karl, 6may93432 %{\advance \baselineskip by -\singlespaceskip433 %\kern \baselineskip}%434 \setleading \singlespaceskip435 }436 437 466 %% Simple single-character @ commands 438 467 … … 454 483 \let\}=\myrbrace 455 484 \begingroup 456 % Definitions to produce actual \{ & \} command in an index. 457 \catcode`\{ = 12 \catcode`\} = 12 485 % Definitions to produce \{ and \} commands for indices, 486 % and @{ and @} for the aux file. 487 \catcode`\{ = \other \catcode`\} = \other 458 488 \catcode`\[ = 1 \catcode`\] = 2 459 \catcode`\@ = 0 \catcode`\\ = 12 460 @gdef@lbracecmd[\{]% 461 @gdef@rbracecmd[\}]% 462 @endgroup 489 \catcode`\! = 0 \catcode`\\ = \other 490 !gdef!lbracecmd[\{]% 491 !gdef!rbracecmd[\}]% 492 !gdef!lbraceatcmd[@{]% 493 !gdef!rbraceatcmd[@}]% 494 !endgroup 463 495 464 496 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent 465 % Others are defined by plain TeX: @` @' @" @^ @~ @= @ v @H.497 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. 466 498 \let\, = \c 467 499 \let\dotaccent = \. … … 472 504 473 505 % Other special characters: @questiondown @exclamdown 474 % Plain TeX defines: @AA @AE @O @OE @L ( andlowercase versions) @ss.506 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. 475 507 \def\questiondown{?`} 476 508 \def\exclamdown{!`} … … 527 559 % the text is small, which looks bad. 528 560 % 561 % Another complication is that the group might be very large. This can 562 % cause the glue on the previous page to be unduly stretched, because it 563 % does not have much material. In this case, it's better to add an 564 % explicit \vfill so that the extra space is at the bottom. The 565 % threshold for doing this is if the group is more than \vfilllimit 566 % percent of a page (\vfilllimit can be changed inside of @tex). 567 % 568 \newbox\groupbox 569 \def\vfilllimit{0.7} 570 % 529 571 \def\group{\begingroup 530 572 \ifnum\catcode13=\active \else … … 540 582 \def\Egroup{% 541 583 \egroup % End the \vtop. 584 % \dimen0 is the vertical size of the group's box. 585 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox 586 % \dimen2 is how much space is left on the page (more or less). 587 \dimen2 = \pageheight \advance\dimen2 by -\pagetotal 588 % if the group doesn't fit on the current page, and it's a big big 589 % group, force a page break. 590 \ifdim \dimen0 > \dimen2 591 \ifdim \pagetotal < \vfilllimit\pageheight 592 \page 593 \fi 594 \fi 595 \copy\groupbox 542 596 \endgroup % End the \group. 543 597 }% 544 598 % 545 \ vtop\bgroup599 \setbox\groupbox = \vtop\bgroup 546 600 % We have to put a strut on the last line in case the @group is in 547 601 % the midst of an example, rather than completely enclosing it. … … 689 743 \leftline{\hskip\leftskip{\rm#1}}}} 690 744 691 % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. 692 693 \def\inmargin#1{% 694 \strut\vadjust{\nobreak\kern-\strutdepth 695 \vtop to \strutdepth{\baselineskip\strutdepth\vss 696 \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} 745 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current 746 % paragraph. For more general purposes, use the \margin insertion 747 % class. WHICH is `l' or `r'. 748 % 697 749 \newskip\inmarginspacing \inmarginspacing=1cm 698 750 \def\strutdepth{\dp\strutbox} 699 700 %\hbox{{\rm#1}}\hfil\break}} 751 % 752 \def\doinmargin#1#2{\strut\vadjust{% 753 \nobreak 754 \kern-\strutdepth 755 \vtop to \strutdepth{% 756 \baselineskip=\strutdepth 757 \vss 758 % if you have multiple lines of stuff to put here, you'll need to 759 % make the vbox yourself of the appropriate size. 760 \ifx#1l% 761 \llap{\ignorespaces #2\hskip\inmarginspacing}% 762 \else 763 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% 764 \fi 765 \null 766 }% 767 }} 768 \def\inleftmargin{\doinmargin l} 769 \def\inrightmargin{\doinmargin r} 770 % 771 % @inmargin{TEXT [, RIGHT-TEXT]} 772 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; 773 % else use TEXT for both). 774 % 775 \def\inmargin#1{\parseinmargin #1,,\finish} 776 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. 777 \setbox0 = \hbox{\ignorespaces #2}% 778 \ifdim\wd0 > 0pt 779 \def\lefttext{#1}% have both texts 780 \def\righttext{#2}% 781 \else 782 \def\lefttext{#1}% have only one text 783 \def\righttext{#1}% 784 \fi 785 % 786 \ifodd\pageno 787 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin 788 \else 789 \def\temp{\inleftmargin\lefttext}% 790 \fi 791 \temp 792 } 701 793 702 794 % @include file insert text of that file as input. 703 795 % Allow normal characters that we make active in the argument (a file name). 704 796 \def\include{\begingroup 705 \catcode`\\= 12706 \catcode`~= 12707 \catcode`^= 12708 \catcode`_= 12709 \catcode`|= 12710 \catcode`<= 12711 \catcode`>= 12712 \catcode`+= 12797 \catcode`\\=\other 798 \catcode`~=\other 799 \catcode`^=\other 800 \catcode`_=\other 801 \catcode`|=\other 802 \catcode`<=\other 803 \catcode`>=\other 804 \catcode`+=\other 713 805 \parsearg\includezzz} 714 806 % Restore active chars for included file. … … 716 808 % Read the included file in a group so nested @include's work. 717 809 \def\thisfile{#1}% 810 \let\value=\expandablevalue 718 811 \input\thisfile 719 812 \endgroup} … … 721 814 \def\thisfile{} 722 815 723 % @center line outputs that line, centered 724 725 \def\center{\parsearg\centerzzz} 726 \def\centerzzz #1{{\advance\hsize by -\leftskip 727 \advance\hsize by -\rightskip 728 \centerline{#1}}} 816 % @center line 817 % outputs that line, centered. 818 % 819 \def\center{\parsearg\docenter} 820 \def\docenter#1{{% 821 \ifhmode \hfil\break \fi 822 \advance\hsize by -\leftskip 823 \advance\hsize by -\rightskip 824 \line{\hfil \ignorespaces#1\unskip \hfil}% 825 \ifhmode \break \fi 826 }} 729 827 730 828 % @sp n outputs n lines of vertical space … … 786 884 \def\asis#1{#1} 787 885 788 % @math means output in math mode. 789 % We don't use $'s directly in the definition of \math because control 790 % sequences like \math are expanded when the toc file is written. Then, 791 % we read the toc file back, the $'s will be normal characters (as they 792 % should be, according to the definition of Texinfo). So we must use a 793 % control sequence to switch into and out of math mode. 794 % 795 % This isn't quite enough for @math to work properly in indices, but it 796 % seems unlikely it will ever be needed there. 797 % 798 \let\implicitmath = $ 799 \def\math#1{\implicitmath #1\implicitmath} 886 % @math outputs its argument in math mode. 887 % We don't use $'s directly in the definition of \math because we need 888 % to set catcodes according to plain TeX first, to allow for subscripts, 889 % superscripts, special math chars, etc. 890 % 891 \let\implicitmath = $%$ font-lock fix 892 % 893 % One complication: _ usually means subscripts, but it could also mean 894 % an actual _ character, as in @math{@var{some_variable} + 1}. So make 895 % _ within @math be active (mathcode "8000), and distinguish by seeing 896 % if the current family is \slfam, which is what @var uses. 897 % 898 {\catcode\underChar = \active 899 \gdef\mathunderscore{% 900 \catcode\underChar=\active 901 \def_{\ifnum\fam=\slfam \_\else\sb\fi}% 902 }} 903 % 904 % Another complication: we want \\ (and @\) to output a \ character. 905 % FYI, plain.tex uses \\ as a temporary control sequence (why?), but 906 % this is not advertised and we don't care. Texinfo does not 907 % otherwise define @\. 908 % 909 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. 910 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} 911 % 912 \def\math{% 913 \tex 914 \mathcode`\_="8000 \mathunderscore 915 \let\\ = \mathbackslash 916 \mathactive 917 \implicitmath\finishmath} 918 \def\finishmath#1{#1\implicitmath\Etex} 919 920 % Some active characters (such as <) are spaced differently in math. 921 % We have to reset their definitions in case the @math was an 922 % argument to a command which set the catcodes (such as @item or @section). 923 % 924 { 925 \catcode`^ = \active 926 \catcode`< = \active 927 \catcode`> = \active 928 \catcode`+ = \active 929 \gdef\mathactive{% 930 \let^ = \ptexhat 931 \let< = \ptexless 932 \let> = \ptexgtr 933 \let+ = \ptexplus 934 } 935 } 800 936 801 937 % @bullet and @minus need the same treatment as @math, just above. … … 880 1016 \def\imagewidth{#2}% 881 1017 \def\imageheight{#3}% 1018 % without \immediate, pdftex seg faults when the same image is 1019 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) 882 1020 \ifnum\pdftexversion < 14 883 \ pdfimage1021 \immediate\pdfimage 884 1022 \else 885 \ pdfximage1023 \immediate\pdfximage 886 1024 \fi 887 1025 \ifx\empty\imagewidth\else width \imagewidth \fi 888 1026 \ifx\empty\imageheight\else height \imageheight \fi 889 {#1.pdf}% 1027 \ifnum\pdftexversion<13 1028 #1.pdf% 1029 \else 1030 {#1.pdf}% 1031 \fi 890 1032 \ifnum\pdftexversion < 14 \else 891 1033 \pdfrefximage \pdflastximage 892 1034 \fi} 893 \def\pdfmkdest#1{ \pdfdest name{#1@} xyz}894 \def\pdfmkpgn#1{#1 @}1035 \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}} 1036 \def\pdfmkpgn#1{#1} 895 1037 \let\linkcolor = \Blue % was Cyan, but that seems light? 896 1038 \def\endlink{\Black\pdfendlink} … … 904 1046 \def\pdfmakeoutlines{{% 905 1047 \openin 1 \jobname.toc 906 \ifeof 1\else\b group1048 \ifeof 1\else\begingroup 907 1049 \closein 1 908 \indexnofonts909 \def\tt{}910 \let\_ = \normalunderscore911 1050 % Thanh's hack / proper braces in bookmarks 912 1051 \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace … … 914 1053 % 915 1054 \def\chapentry ##1##2##3{} 916 \def\unnumbchapentry ##1##2{}917 1055 \def\secentry ##1##2##3##4{\advancenumber{chap##2}} 918 \def\unnumbsecentry ##1##2{}919 1056 \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} 920 \def\unnumbsubsecentry ##1##2{}921 1057 \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} 922 \def\unnumbsubsubsecentry ##1##2{} 1058 \let\appendixentry = \chapentry 1059 \let\unnumbchapentry = \chapentry 1060 \let\unnumbsecentry = \secentry 1061 \let\unnumbsubsecentry = \subsecentry 1062 \let\unnumbsubsubsecentry = \subsubsecentry 923 1063 \input \jobname.toc 924 1064 \def\chapentry ##1##2##3{% 925 1065 \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} 926 \def\unnumbchapentry ##1##2{%927 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}928 1066 \def\secentry ##1##2##3##4{% 929 1067 \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} 930 \def\unnumbsecentry ##1##2{%931 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}932 1068 \def\subsecentry ##1##2##3##4##5{% 933 1069 \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} 934 \def\unnumbsubsecentry ##1##2{%935 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}936 1070 \def\subsubsecentry ##1##2##3##4##5##6{% 937 1071 \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} 938 \def\unnumbsubsubsecentry ##1##2{% 939 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} 1072 \let\appendixentry = \chapentry 1073 \let\unnumbchapentry = \chapentry 1074 \let\unnumbsecentry = \secentry 1075 \let\unnumbsubsecentry = \subsecentry 1076 \let\unnumbsubsubsecentry = \subsubsecentry 1077 % 1078 % Make special characters normal for writing to the pdf file. 1079 % 1080 \indexnofonts 1081 \let\tt=\relax 1082 \turnoffactive 940 1083 \input \jobname.toc 941 \e group\fi1084 \endgroup\fi 942 1085 }} 943 1086 \def\makelinks #1,{% … … 989 1132 \begingroup 990 1133 \normalturnoffactive\def\@{@}% 1134 \let\value=\expandablevalue 991 1135 \leavevmode\Red 992 1136 \startlink attr{/Border [0 0 0]}% … … 1016 1160 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} 1017 1161 \def\pdflink#1{% 1018 \startlink attr{/Border [0 0 0]} goto name{\ mkpgn{#1}}1162 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} 1019 1163 \linkcolor #1\endlink} 1020 \def\mkpgn#1{#1@}1021 1164 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} 1022 1165 \fi % \ifx\pdfoutput … … 1035 1178 \def\ttsl{\tenttsl} 1036 1179 1037 % Use Computer Modern fonts at \magstephalf (11pt). 1038 \newcount\mainmagstep 1039 \mainmagstep=\magstephalf 1180 % Default leading. 1181 \newdimen\textleading \textleading = 13.2pt 1182 1183 % Set the baselineskip to #1, and the lineskip and strut size 1184 % correspondingly. There is no deep meaning behind these magic numbers 1185 % used as factors; they just match (closely enough) what Knuth defined. 1186 % 1187 \def\lineskipfactor{.08333} 1188 \def\strutheightpercent{.70833} 1189 \def\strutdepthpercent {.29167} 1190 % 1191 \def\setleading#1{% 1192 \normalbaselineskip = #1\relax 1193 \normallineskip = \lineskipfactor\normalbaselineskip 1194 \normalbaselines 1195 \setbox\strutbox =\hbox{% 1196 \vrule width0pt height\strutheightpercent\baselineskip 1197 depth \strutdepthpercent \baselineskip 1198 }% 1199 } 1040 1200 1041 1201 % Set the font macro #1 to the font named #2, adding on the … … 1067 1227 \def\scbshape{csc} 1068 1228 1229 \newcount\mainmagstep 1069 1230 \ifx\bigger\relax 1070 \let\mainmagstep=\magstep1 1071 \setfont\textrm\rmshape{12}{1000} 1072 \setfont\texttt\ttshape{12}{1000} 1231 % not really supported. 1232 \mainmagstep=\magstep1 1233 \setfont\textrm\rmshape{12}{1000} 1234 \setfont\texttt\ttshape{12}{1000} 1073 1235 \else 1074 \setfont\textrm\rmshape{10}{\mainmagstep} 1075 \setfont\texttt\ttshape{10}{\mainmagstep} 1236 \mainmagstep=\magstephalf 1237 \setfont\textrm\rmshape{10}{\mainmagstep} 1238 \setfont\texttt\ttshape{10}{\mainmagstep} 1076 1239 \fi 1077 % Instead of cmb10, you ma ny want to use cmbx10.1240 % Instead of cmb10, you may want to use cmbx10. 1078 1241 % cmbx10 is a prettier font on its own, but cmb10 1079 % looks better when embedded in a line with cmr10. 1242 % looks better when embedded in a line with cmr10 1243 % (in Bob's opinion). 1080 1244 \setfont\textbf\bfshape{10}{\mainmagstep} 1081 1245 \setfont\textit\itshape{10}{\mainmagstep} … … 1103 1267 \font\smalli=cmmi9 1104 1268 \font\smallsy=cmsy9 1269 1270 % Fonts for small examples (8pt). 1271 \setfont\smallerrm\rmshape{8}{1000} 1272 \setfont\smallertt\ttshape{8}{1000} 1273 \setfont\smallerbf\bfshape{10}{800} 1274 \setfont\smallerit\itshape{8}{1000} 1275 \setfont\smallersl\slshape{8}{1000} 1276 \setfont\smallersf\sfshape{8}{1000} 1277 \setfont\smallersc\scshape{10}{800} 1278 \setfont\smallerttsl\ttslshape{10}{800} 1279 \font\smalleri=cmmi8 1280 \font\smallersy=cmsy8 1105 1281 1106 1282 % Fonts for title page: … … 1116 1292 \font\titlesy=cmsy10 scaled \magstep4 1117 1293 \def\authorrm{\secrm} 1294 \def\authortt{\sectt} 1118 1295 1119 1296 % Chapter (and unnumbered) fonts (17.28pt). … … 1140 1317 \font\seci=cmmi12 scaled \magstep1 1141 1318 \font\secsy=cmsy10 scaled \magstep2 1142 1143 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.1144 % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.1145 % \setfont\ssecsl\slshape{10}{\magstep1}1146 % \setfont\ssectt\ttshape{10}{\magstep1}1147 % \setfont\ssecsf\sfshape{10}{\magstep1}1148 1149 %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.1150 %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than1151 %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.1152 %\setfont\ssectt\ttshape{10}{1315}1153 %\setfont\ssecsf\sfshape{10}{1315}1154 1155 %\let\ssecbf=\ssecrm1156 1319 1157 1320 % Subsection fonts (13.15pt). … … 1171 1334 % In order for the font changes to affect most math symbols and letters, 1172 1335 % we have to define the \textfont of the standard families. Since 1173 % texinfo doesn't allow for producing subscripts and superscripts , we1174 % don't bother to reset \scriptfont and \scriptscriptfont (which would1175 % also require loading a lot more fonts).1336 % texinfo doesn't allow for producing subscripts and superscripts except 1337 % in the main text, we don't bother to reset \scriptfont and 1338 % \scriptscriptfont (which would also require loading a lot more fonts). 1176 1339 % 1177 1340 \def\resetmathfonts{% 1178 \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy 1179 \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf 1180 \textfont\ttfam = \tentt \textfont\sffam = \tensf 1181 } 1182 1341 \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy 1342 \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf 1343 \textfont\ttfam=\tentt \textfont\sffam=\tensf 1344 } 1183 1345 1184 1346 % The font-changing commands redefine the meanings of \tenSTYLE, instead … … 1192 1354 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc 1193 1355 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl 1194 \resetmathfonts }1356 \resetmathfonts \setleading{\textleading}} 1195 1357 \def\titlefonts{% 1196 1358 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl … … 1221 1383 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy 1222 1384 \let\tenttsl=\smallttsl 1223 \resetmathfonts \setleading{11pt}} 1385 \resetmathfonts \setleading{10.5pt}} 1386 \def\smallerfonts{% 1387 \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl 1388 \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc 1389 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy 1390 \let\tenttsl=\smallerttsl 1391 \resetmathfonts \setleading{9.5pt}} 1392 1393 % Set the fonts to use with the @small... environments. 1394 \let\smallexamplefonts = \smallfonts 1395 1396 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample 1397 % can fit this many characters: 1398 % 8.5x11=86 smallbook=72 a4=90 a5=69 1399 % If we use \smallerfonts (8pt), then we can fit this many characters: 1400 % 8.5x11=90+ smallbook=80 a4=90+ a5=77 1401 % For me, subjectively, the few extra characters that fit aren't worth 1402 % the additional smallness of 8pt. So I'm making the default 9pt. 1403 % 1404 % By the way, for comparison, here's what fits with @example (10pt): 1405 % 8.5x11=71 smallbook=60 a4=75 a5=58 1406 % 1407 % I wish we used A4 paper on this side of the Atlantic. 1408 % 1409 % --karl, 24jan03. 1410 1224 1411 1225 1412 % Set up the default fonts, so we can use them for creating boxes. … … 1238 1425 \setfont\shortcontbf\bxshape{12}{1000} 1239 1426 \setfont\shortcontsl\slshape{12}{1000} 1427 \setfont\shortconttt\ttshape{12}{1000} 1240 1428 1241 1429 %% Add scribe-like font environments, plus @l for inline lisp (usually sans … … 1245 1433 % unless the following character is such as not to need one. 1246 1434 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} 1247 \def\smartslanted#1{{\ sl #1}\futurelet\next\smartitalicx}1248 \def\smartitalic#1{{\i t #1}\futurelet\next\smartitalicx}1435 \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} 1436 \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} 1249 1437 1250 1438 \let\i=\smartitalic … … 1263 1451 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} 1264 1452 \def\restorehyphenation{\hyphenchar\font = `- } 1453 1454 % Set sfcode to normal for the chars that usually have another value. 1455 % Can't use plain's \frenchspacing because it uses the `\x notation, and 1456 % sometimes \x has an active definition that messes things up. 1457 % 1458 \catcode`@=11 1459 \def\frenchspacing{% 1460 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m 1461 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m 1462 } 1463 \catcode`@=\other 1265 1464 1266 1465 \def\t#1{% … … 1335 1534 \def\realdash{-} 1336 1535 \def\codedash{-\discretionary{}{}{}} 1337 \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} 1536 \def\codeunder{% 1537 % this is all so @math{@code{var_name}+1} can work. In math mode, _ 1538 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) 1539 % will therefore expand the active definition of _, which is us 1540 % (inside @code that is), therefore an endless loop. 1541 \ifusingtt{\ifmmode 1542 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. 1543 \else\normalunderscore \fi 1544 \discretionary{}{}{}}% 1545 {\_}% 1546 } 1338 1547 \def\codex #1{\tclose{#1}\endgroup} 1339 1340 %\let\exp=\tclose %Was temporary1341 1548 1342 1549 % @kbd is like @code, except that if the argument is just one @key command, … … 1355 1562 \else\ifx\arg\wordcode 1356 1563 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% 1564 \else 1565 \errhelp = \EMsimple 1566 \errmessage{Unknown @kbdinputstyle `\arg'}% 1357 1567 \fi\fi\fi 1358 1568 } … … 1361 1571 \def\wordcode{code} 1362 1572 1363 % Default is kbdinputdistinct. (Too much of a hassle to call the macro, 1364 % the catcodes are wrong for parsearg to work.) 1365 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} 1573 % Default is `distinct.' 1574 \kbdinputstyle distinct 1366 1575 1367 1576 \def\xkey{\key} … … 1477 1686 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% 1478 1687 % 1479 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% 1688 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines 1689 \let\tt=\authortt}% 1480 1690 % 1481 1691 % Leave some space at the very top of the page. … … 1524 1734 \endgroup 1525 1735 % 1736 % Need this before the \...aftertitlepage checks so that if they are 1737 % in effect the toc pages will come out with page numbers. 1738 \HEADINGSon 1739 % 1526 1740 % If they want short, they certainly want long too. 1527 1741 \ifsetshortcontentsaftertitlepage … … 1537 1751 \global\let\shortcontents = \relax 1538 1752 \fi 1539 %1540 \ifpdf \pdfmakepagedesttrue \fi1541 %1542 \HEADINGSon1543 1753 } 1544 1754 … … 1758 1968 \nobreak \vskip-\parskip 1759 1969 % 1760 % Stop a page break at the \parskip glue coming up. Unfortunately1970 % Stop a page break at the \parskip glue coming up. (Unfortunately 1761 1971 % we can't prevent a possible page break at the following 1762 % \baselineskip glue. 1763 \nobreak 1972 % \baselineskip glue.) However, if what follows is an environment 1973 % such as @example, there will be no \parskip glue; then 1974 % the negative vskip we just would cause the example and the item to 1975 % crash together. So we use this bizarre value of 10001 as a signal 1976 % to \aboveenvbreak to insert \parskip glue after all. 1977 % (Possibly there are other commands that could be followed by 1978 % @example which need the same treatment, but not section titles; or 1979 % maybe section titles are the only special case and they should be 1980 % penalty 10001...) 1981 \penalty 10001 1764 1982 \endgroup 1765 1983 \itemxneedsnegativevskipfalse … … 1866 2084 \def\itemcontents{#1}% 1867 2085 \let\item=\itemizeitem} 1868 1869 % Set sfcode to normal for the chars that usually have another value.1870 % These are `.?!:;,'1871 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=10001872 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }1873 2086 1874 2087 % \splitoff TOKENS\endmark defines \first to be the first token in … … 2093 2306 \else 2094 2307 \global\advance\colcount by 1 2095 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;2096 %typically that is always in the input, anyway.2308 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a 2309 % separator; typically that is always in the input, anyway. 2097 2310 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% 2098 2311 \fi … … 2109 2322 } 2110 2323 2111 % This used to have \hskip1sp. But then the space in a template line is2112 % not enough. That is bad. So let's go back to just & until we2113 % encounter the problem it was intended to solve again.2114 % --karl, nathan@acm.org, 20apr99.2115 \def\tab{&}2116 2117 2324 % @multitable ... @end multitable definitions: 2118 2325 % … … 2120 2327 \def\dotable#1{\bgroup 2121 2328 \vskip\parskip 2122 \let\item\crcr 2329 \let\item=\crcrwithfootnotes 2330 % A \tab used to include \hskip1sp. But then the space in a template 2331 % line is not enough. That is bad. So let's go back to just & until 2332 % we encounter the problem it was intended to solve again. --karl, 2333 % nathan@acm.org, 20apr99. 2334 \let\tab=&% 2335 \let\startfootins=\startsavedfootnote 2123 2336 \tolerance=9500 2124 2337 \hbadness=9500 … … 2128 2341 \overfullrule=0pt 2129 2342 \global\colcount=0 2130 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% 2343 \def\Emultitable{% 2344 \global\setpercentfalse 2345 \crcrwithfootnotes\crcr 2346 \egroup\egroup 2347 }% 2131 2348 % 2132 2349 % To parse everything between @multitable and @item: … … 2217 2434 \fi} 2218 2435 2436 % In case a @footnote appears inside an alignment, save the footnote 2437 % text to a box and make the \insert when a row of the table is 2438 % finished. Otherwise, the insertion is lost, it never migrates to the 2439 % main vertical list. --kasal, 22jan03. 2440 % 2441 \newbox\savedfootnotes 2442 % 2443 % \dotable \let's \startfootins to this, so that \dofootnote will call 2444 % it instead of starting the insertion right away. 2445 \def\startsavedfootnote{% 2446 \global\setbox\savedfootnotes = \vbox\bgroup 2447 \unvbox\savedfootnotes 2448 } 2449 \def\crcrwithfootnotes{% 2450 \crcr 2451 \ifvoid\savedfootnotes \else 2452 \noalign{\insert\footins{\box\savedfootnotes}}% 2453 \fi 2454 } 2219 2455 2220 2456 \message{conditionals,} … … 2252 2488 % incorrectly. 2253 2489 % 2490 % We use \empty instead of \relax for the @def... commands, so that \end 2491 % doesn't throw an error. For instance: 2492 % @ignore 2493 % @deffn ... 2494 % @end deffn 2495 % @end ignore 2496 % 2497 % The @end deffn is going to get expanded, because we're trying to allow 2498 % nested conditionals. But we don't want to expand the actual @deffn, 2499 % since it might be syntactically correct and intended to be ignored. 2500 % Since \end checks for \relax, using \empty does not cause an error. 2501 % 2254 2502 \def\ignoremorecommands{% 2255 2503 \let\defcodeindex = \relax 2256 \let\defcv = \relax 2257 \let\deffn = \relax 2258 \let\deffnx = \relax 2504 \let\defcv = \empty 2505 \let\defcvx = \empty 2506 \let\Edefcv = \empty 2507 \let\deffn = \empty 2508 \let\deffnx = \empty 2509 \let\Edeffn = \empty 2259 2510 \let\defindex = \relax 2260 \let\defivar = \relax 2261 \let\defmac = \relax 2262 \let\defmethod = \relax 2263 \let\defop = \relax 2264 \let\defopt = \relax 2265 \let\defspec = \relax 2266 \let\deftp = \relax 2267 \let\deftypefn = \relax 2268 \let\deftypefun = \relax 2269 \let\deftypeivar = \relax 2270 \let\deftypeop = \relax 2271 \let\deftypevar = \relax 2272 \let\deftypevr = \relax 2273 \let\defun = \relax 2274 \let\defvar = \relax 2275 \let\defvr = \relax 2276 \let\ref = \relax 2277 \let\xref = \relax 2511 \let\defivar = \empty 2512 \let\defivarx = \empty 2513 \let\Edefivar = \empty 2514 \let\defmac = \empty 2515 \let\defmacx = \empty 2516 \let\Edefmac = \empty 2517 \let\defmethod = \empty 2518 \let\defmethodx = \empty 2519 \let\Edefmethod = \empty 2520 \let\defop = \empty 2521 \let\defopx = \empty 2522 \let\Edefop = \empty 2523 \let\defopt = \empty 2524 \let\defoptx = \empty 2525 \let\Edefopt = \empty 2526 \let\defspec = \empty 2527 \let\defspecx = \empty 2528 \let\Edefspec = \empty 2529 \let\deftp = \empty 2530 \let\deftpx = \empty 2531 \let\Edeftp = \empty 2532 \let\deftypefn = \empty 2533 \let\deftypefnx = \empty 2534 \let\Edeftypefn = \empty 2535 \let\deftypefun = \empty 2536 \let\deftypefunx = \empty 2537 \let\Edeftypefun = \empty 2538 \let\deftypeivar = \empty 2539 \let\deftypeivarx = \empty 2540 \let\Edeftypeivar = \empty 2541 \let\deftypemethod = \empty 2542 \let\deftypemethodx = \empty 2543 \let\Edeftypemethod = \empty 2544 \let\deftypeop = \empty 2545 \let\deftypeopx = \empty 2546 \let\Edeftypeop = \empty 2547 \let\deftypevar = \empty 2548 \let\deftypevarx = \empty 2549 \let\Edeftypevar = \empty 2550 \let\deftypevr = \empty 2551 \let\deftypevrx = \empty 2552 \let\Edeftypevr = \empty 2553 \let\defun = \empty 2554 \let\defunx = \empty 2555 \let\Edefun = \empty 2556 \let\defvar = \empty 2557 \let\defvarx = \empty 2558 \let\Edefvar = \empty 2559 \let\defvr = \empty 2560 \let\defvrx = \empty 2561 \let\Edefvr = \empty 2562 \let\clear = \relax 2563 \let\down = \relax 2564 \let\evenfooting = \relax 2565 \let\evenheading = \relax 2566 \let\everyfooting = \relax 2567 \let\everyheading = \relax 2568 \let\headings = \relax 2569 \let\include = \relax 2570 \let\item = \relax 2571 \let\lowersections = \relax 2572 \let\oddfooting = \relax 2573 \let\oddheading = \relax 2278 2574 \let\printindex = \relax 2279 2575 \let\pxref = \relax 2280 \let\settitle = \relax 2576 \let\raisesections = \relax 2577 \let\ref = \relax 2578 \let\set = \relax 2281 2579 \let\setchapternewpage = \relax 2282 2580 \let\setchapterstyle = \relax 2283 \let\everyheading = \relax 2284 \let\evenheading = \relax 2285 \let\oddheading = \relax 2286 \let\everyfooting = \relax 2287 \let\evenfooting = \relax 2288 \let\oddfooting = \relax 2289 \let\headings = \relax 2290 \let\include = \relax 2291 \let\lowersections = \relax 2292 \let\down = \relax 2293 \let\raisesections = \relax 2581 \let\settitle = \relax 2294 2582 \let\up = \relax 2295 \let\set = \relax 2296 \let\clear = \relax 2297 \let\item = \relax 2298 } 2299 2300 % Ignore @ignore ... @end ignore. 2301 % 2583 \let\verbatiminclude = \relax 2584 \let\xref = \relax 2585 } 2586 2587 % Ignore @ignore, @ifhtml, @ifinfo, and the like. 2588 % 2589 \def\direntry{\doignore{direntry}} 2590 \def\documentdescriptionword{documentdescription} 2591 \def\documentdescription{\doignore{documentdescription}} 2592 \def\html{\doignore{html}} 2593 \def\ifhtml{\doignore{ifhtml}} 2594 \def\ifinfo{\doignore{ifinfo}} 2595 \def\ifnottex{\doignore{ifnottex}} 2596 \def\ifplaintext{\doignore{ifplaintext}} 2597 \def\ifxml{\doignore{ifxml}} 2302 2598 \def\ignore{\doignore{ignore}} 2303 2304 % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.2305 %2306 \def\ifinfo{\doignore{ifinfo}}2307 \def\ifhtml{\doignore{ifhtml}}2308 \def\ifnottex{\doignore{ifnottex}}2309 \def\html{\doignore{html}}2310 2599 \def\menu{\doignore{menu}} 2311 \def\ direntry{\doignore{direntry}}2600 \def\xml{\doignore{xml}} 2312 2601 2313 2602 % @dircategory CATEGORY -- specify a category of the dir file … … 2327 2616 % 2328 2617 % Make sure that spaces turn into tokens that match what \doignoretext wants. 2329 \catcode 32= 102618 \catcode\spaceChar = 10 2330 2619 % 2331 2620 % Ignore braces, too, so mismatched braces don't cause trouble. … … 2336 2625 \catcode`\@ = 12 2337 2626 % 2338 % Make the letter c a comment character so that the rest of the line 2339 % will be ignored. This way, the document can have (for example) 2340 % @c @end ifinfo 2341 % and the @end ifinfo will be properly ignored. 2342 % (We've just changed @ to catcode 12.) 2343 \catcode`\c = 14 2344 % 2345 % And now expand that command. 2627 \def\ignoreword{#1}% 2628 \ifx\ignoreword\documentdescriptionword 2629 % The c kludge breaks documentdescription, since 2630 % `documentdescription' contains a `c'. Means not everything will 2631 % be ignored inside @documentdescription, but oh well... 2632 \else 2633 % Make the letter c a comment character so that the rest of the line 2634 % will be ignored. This way, the document can have (for example) 2635 % @c @end ifinfo 2636 % and the @end ifinfo will be properly ignored. 2637 % (We've just changed @ to catcode 12.) 2638 \catcode`\c = 14 2639 \fi 2640 % 2641 % And now expand the command defined above. 2346 2642 \doignoretext 2347 2643 } … … 2362 2658 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} 2363 2659 \immediate\write16{ Then upgrade your TeX installation if you can.} 2364 \immediate\write16{ (See ftp://ftp.gnu.org/ pub/gnu/TeX.README.)}2660 \immediate\write16{ (See ftp://ftp.gnu.org/non-gnu/TeX.README.)} 2365 2661 \immediate\write16{If you are stuck with version 3.0, run the} 2366 2662 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} … … 2384 2680 % command, so that nested ignore constructs work. Thus, we put the 2385 2681 % text into a \vbox and then do nothing with the result. To minimize 2386 % the chan ge of memory overflow, we follow the approach outlined on2387 % page 401 of the TeXbook : make the current font be a dummy font.2682 % the chance of memory overflow, we follow the approach outlined on 2683 % page 401 of the TeXbook. 2388 2684 % 2389 2685 \setbox0 = \vbox\bgroup … … 2406 2702 % Set the current font to be \nullfont, a TeX primitive, and define 2407 2703 % all the font commands to also use \nullfont. We don't use 2408 % dummy.tfm, as suggested in the TeXbook, because not allsites2409 % might have that installed. Therefore, math mode will still2704 % dummy.tfm, as suggested in the TeXbook, because some sites 2705 % might not have that installed. Therefore, math mode will still 2410 2706 % produce output, but that should be an extremely small amount of 2411 2707 % stuff compared to the main input. … … 2415 2711 \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont 2416 2712 \let\tensf=\nullfont 2417 % Similarly for index fonts (mostly for their use in smallexample).2713 % Similarly for index fonts. 2418 2714 \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont 2419 2715 \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont 2420 2716 \let\smallsf=\nullfont 2717 % Similarly for smallexample fonts. 2718 \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont 2719 \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont 2720 \let\smallersf=\nullfont 2421 2721 % 2422 2722 % Don't complain when characters are missing from the fonts. … … 2432 2732 \pretolerance = 10000 2433 2733 % 2434 % Do not execute instructions in @tex 2734 % Do not execute instructions in @tex. 2435 2735 \def\tex{\doignore{tex}}% 2436 2736 % Do not execute macro definitions. … … 2477 2777 % such active characters to their normal equivalents. 2478 2778 \gdef\value{\begingroup 2479 \catcode`\-= 12 \catcode`\_=122779 \catcode`\-=\other \catcode`\_=\other 2480 2780 \indexbreaks \let_\normalunderscore 2481 2781 \valuexxx} … … 2486 2786 % properly in indexes (we \let\value to this in \indexdummies). Ones 2487 2787 % whose names contain - or _ still won't work, but we can't do anything 2488 % about that. The command has to be fully expandable, since the result 2489 % winds up in the index file. This means that if the variable's value 2490 % contains other Texinfo commands, it's almost certain it will fail 2491 % (although perhaps we could fix that with sufficient work to do a 2492 % one-level expansion on the result, instead of complete). 2788 % about that. The command has to be fully expandable (if the variable 2789 % is set), since the result winds up in the index file. This means that 2790 % if the variable's value contains other Texinfo commands, it's almost 2791 % certain it will fail (although perhaps we could fix that with 2792 % sufficient work to do a one-level expansion on the result, instead of 2793 % complete). 2493 2794 % 2494 2795 \def\expandablevalue#1{% 2495 2796 \expandafter\ifx\csname SET#1\endcsname\relax 2496 2797 {[No value for ``#1'']}% 2798 \message{Variable `#1', used in @value, is not set.}% 2497 2799 \else 2498 2800 \csname SET#1\endcsname … … 2503 2805 % with @set. 2504 2806 % 2505 \def\ifset{\parsearg\ ifsetxxx}2506 \def\ ifsetxxx#1{%2807 \def\ifset{\parsearg\doifset} 2808 \def\doifset#1{% 2507 2809 \expandafter\ifx\csname SET#1\endcsname\relax 2508 \ expandafter\ifsetfail2810 \let\next=\ifsetfail 2509 2811 \else 2510 \ expandafter\ifsetsucceed2812 \let\next=\ifsetsucceed 2511 2813 \fi 2814 \next 2512 2815 } 2513 2816 \def\ifsetsucceed{\conditionalsucceed{ifset}} … … 2518 2821 % defined with @set, or has been undefined with @clear. 2519 2822 % 2520 \def\ifclear{\parsearg\ ifclearxxx}2521 \def\ ifclearxxx#1{%2823 \def\ifclear{\parsearg\doifclear} 2824 \def\doifclear#1{% 2522 2825 \expandafter\ifx\csname SET#1\endcsname\relax 2523 \ expandafter\ifclearsucceed2826 \let\next=\ifclearsucceed 2524 2827 \else 2525 \ expandafter\ifclearfail2828 \let\next=\ifclearfail 2526 2829 \fi 2830 \next 2527 2831 } 2528 2832 \def\ifclearsucceed{\conditionalsucceed{ifclear}} … … 2530 2834 \defineunmatchedend{ifclear} 2531 2835 2532 % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text2533 % following, through the first @end iftex (etc.). Make `@end iftex'2534 % (etc.) valid only after an @iftex.2836 % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we 2837 % read the text following, through the first @end iftex (etc.). Make 2838 % `@end iftex' (etc.) valid only after an @iftex. 2535 2839 % 2536 2840 \def\iftex{\conditionalsucceed{iftex}} 2537 2841 \def\ifnothtml{\conditionalsucceed{ifnothtml}} 2538 2842 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} 2843 \def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}} 2539 2844 \defineunmatchedend{iftex} 2540 2845 \defineunmatchedend{ifnothtml} 2541 2846 \defineunmatchedend{ifnotinfo} 2542 2543 % We can't just want to start a group at @iftex (for example) and end it 2544 % at @end iftex, since then @set commands inside the conditional have no 2545 % effect (they'd get reverted at the end of the group). So we must 2546 % define \Eiftex to redefine itself to be its previous value. (We can't 2547 % just define it to fail again with an ``unmatched end'' error, since 2548 % the @ifset might be nested.) 2549 % 2550 \def\conditionalsucceed#1{% 2551 \edef\temp{% 2552 % Remember the current value of \E#1. 2553 \let\nece{prevE#1} = \nece{E#1}% 2554 % 2555 % At the `@end #1', redefine \E#1 to be its previous value. 2556 \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% 2557 }% 2558 \temp 2559 } 2560 2561 % We need to expand lots of \csname's, but we don't want to expand the 2562 % control sequences after we've constructed them. 2563 % 2564 \def\nece#1{\expandafter\noexpand\csname#1\endcsname} 2847 \defineunmatchedend{ifnotplaintext} 2848 2849 % True conditional. Since \set globally defines its variables, we can 2850 % just start and end a group (to keep the @end definition undefined at 2851 % the outer level). 2852 % 2853 \def\conditionalsucceed#1{\begingroup 2854 \expandafter\def\csname E#1\endcsname{\endgroup}% 2855 } 2565 2856 2566 2857 % @defininfoenclose. … … 2594 2885 2595 2886 % @defindex foo == \newindex{foo} 2596 2887 % 2597 2888 \def\defindex{\parsearg\newindex} 2598 2889 2599 2890 % Define @defcodeindex, like @defindex except put all entries in @code. 2600 2891 % 2892 \def\defcodeindex{\parsearg\newcodeindex} 2893 % 2601 2894 \def\newcodeindex#1{% 2602 2895 \iflinks … … 2605 2898 \fi 2606 2899 \expandafter\xdef\csname#1index\endcsname{% 2607 \noexpand\docodeindex{#1}} 2608 } 2609 2610 \def\defcodeindex{\parsearg\newcodeindex} 2900 \noexpand\docodeindex{#1}}% 2901 } 2902 2611 2903 2612 2904 % @synindex foo bar makes index foo feed into index bar. 2613 2905 % Do this instead of @defindex foo if you don't want it as a separate index. 2614 % The \closeout helps reduce unnecessary open files; the limit on the 2615 % Acorn RISC OS is a mere 16 files. 2616 \def\synindex#1 #2 {% 2617 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2618 \expandafter\closeout\csname#1indfile\endcsname 2619 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2620 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex 2621 \noexpand\doindex{#2}}% 2622 } 2623 2906 % 2624 2907 % @syncodeindex foo bar similar, but put all entries made for index foo 2625 2908 % inside @code. 2626 \def\syncodeindex#1 #2 {% 2627 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2628 \expandafter\closeout\csname#1indfile\endcsname 2629 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2630 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex 2631 \noexpand\docodeindex{#2}}% 2909 % 2910 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} 2911 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} 2912 2913 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), 2914 % #3 the target index (bar). 2915 \def\dosynindex#1#2#3{% 2916 % Only do \closeout if we haven't already done it, else we'll end up 2917 % closing the target index. 2918 \expandafter \ifx\csname donesynindex#2\endcsname \undefined 2919 % The \closeout helps reduce unnecessary open files; the limit on the 2920 % Acorn RISC OS is a mere 16 files. 2921 \expandafter\closeout\csname#2indfile\endcsname 2922 \expandafter\let\csname\donesynindex#2\endcsname = 1 2923 \fi 2924 % redefine \fooindfile: 2925 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname 2926 \expandafter\let\csname#2indfile\endcsname=\temp 2927 % redefine \fooindex: 2928 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% 2632 2929 } 2633 2930 … … 2649 2946 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} 2650 2947 2948 % Take care of Texinfo commands that can appear in an index entry. 2949 % Since there are some commands we want to expand, and others we don't, 2950 % we have to laboriously prevent expansion for those that we don't. 2951 % 2651 2952 \def\indexdummies{% 2652 \def\ { }% 2653 % Take care of the plain tex accent commands. 2654 \def\"{\realbackslash "}% 2655 \def\`{\realbackslash `}% 2656 \def\'{\realbackslash '}% 2657 \def\^{\realbackslash ^}% 2658 \def\~{\realbackslash ~}% 2659 \def\={\realbackslash =}% 2660 \def\b{\realbackslash b}% 2661 \def\c{\realbackslash c}% 2662 \def\d{\realbackslash d}% 2663 \def\u{\realbackslash u}% 2664 \def\v{\realbackslash v}% 2665 \def\H{\realbackslash H}% 2666 % Take care of the plain tex special European modified letters. 2667 \def\oe{\realbackslash oe}% 2668 \def\ae{\realbackslash ae}% 2669 \def\aa{\realbackslash aa}% 2670 \def\OE{\realbackslash OE}% 2671 \def\AE{\realbackslash AE}% 2672 \def\AA{\realbackslash AA}% 2673 \def\o{\realbackslash o}% 2674 \def\O{\realbackslash O}% 2675 \def\l{\realbackslash l}% 2676 \def\L{\realbackslash L}% 2677 \def\ss{\realbackslash ss}% 2678 % Take care of texinfo commands likely to appear in an index entry. 2679 % (Must be a way to avoid doing expansion at all, and thus not have to 2680 % laboriously list every single command here.) 2681 \def\@{@}% will be @@ when we switch to @ as escape char. 2682 % Need these in case \tex is in effect and \{ is a \delimiter again. 2683 % But can't use \lbracecmd and \rbracecmd because texindex assumes 2684 % braces and backslashes are used only as delimiters. 2685 \let\{ = \mylbrace 2686 \let\} = \myrbrace 2687 \def\_{{\realbackslash _}}% 2688 \def\w{\realbackslash w }% 2689 \def\bf{\realbackslash bf }% 2690 %\def\rm{\realbackslash rm }% 2691 \def\sl{\realbackslash sl }% 2692 \def\sf{\realbackslash sf}% 2693 \def\tt{\realbackslash tt}% 2694 \def\gtr{\realbackslash gtr}% 2695 \def\less{\realbackslash less}% 2696 \def\hat{\realbackslash hat}% 2697 \def\TeX{\realbackslash TeX}% 2698 \def\dots{\realbackslash dots }% 2699 \def\result{\realbackslash result}% 2700 \def\equiv{\realbackslash equiv}% 2701 \def\expansion{\realbackslash expansion}% 2702 \def\print{\realbackslash print}% 2703 \def\error{\realbackslash error}% 2704 \def\point{\realbackslash point}% 2705 \def\copyright{\realbackslash copyright}% 2706 \def\tclose##1{\realbackslash tclose {##1}}% 2707 \def\code##1{\realbackslash code {##1}}% 2708 \def\uref##1{\realbackslash uref {##1}}% 2709 \def\url##1{\realbackslash url {##1}}% 2710 \def\env##1{\realbackslash env {##1}}% 2711 \def\command##1{\realbackslash command {##1}}% 2712 \def\option##1{\realbackslash option {##1}}% 2713 \def\dotless##1{\realbackslash dotless {##1}}% 2714 \def\samp##1{\realbackslash samp {##1}}% 2715 \def\,##1{\realbackslash ,{##1}}% 2716 \def\t##1{\realbackslash t {##1}}% 2717 \def\r##1{\realbackslash r {##1}}% 2718 \def\i##1{\realbackslash i {##1}}% 2719 \def\b##1{\realbackslash b {##1}}% 2720 \def\sc##1{\realbackslash sc {##1}}% 2721 \def\cite##1{\realbackslash cite {##1}}% 2722 \def\key##1{\realbackslash key {##1}}% 2723 \def\file##1{\realbackslash file {##1}}% 2724 \def\var##1{\realbackslash var {##1}}% 2725 \def\kbd##1{\realbackslash kbd {##1}}% 2726 \def\dfn##1{\realbackslash dfn {##1}}% 2727 \def\emph##1{\realbackslash emph {##1}}% 2728 \def\acronym##1{\realbackslash acronym {##1}}% 2729 % 2730 % Handle some cases of @value -- where the variable name does not 2731 % contain - or _, and the value does not contain any 2732 % (non-fully-expandable) commands. 2733 \let\value = \expandablevalue 2734 % 2735 \unsepspaces 2736 % Turn off macro expansion 2737 \turnoffmacros 2953 \def\@{@}% change to @@ when we switch to @ as escape char in index files. 2954 \def\ {\realbackslash\space }% 2955 % Need these in case \tex is in effect and \{ is a \delimiter again. 2956 % But can't use \lbracecmd and \rbracecmd because texindex assumes 2957 % braces and backslashes are used only as delimiters. 2958 \let\{ = \mylbrace 2959 \let\} = \myrbrace 2960 % 2961 % \definedummyword defines \#1 as \realbackslash #1\space, thus 2962 % effectively preventing its expansion. This is used only for control 2963 % words, not control letters, because the \space would be incorrect 2964 % for control characters, but is needed to separate the control word 2965 % from whatever follows. 2966 % 2967 % For control letters, we have \definedummyletter, which omits the 2968 % space. 2969 % 2970 % These can be used both for control words that take an argument and 2971 % those that do not. If it is followed by {arg} in the input, then 2972 % that will dutifully get written to the index (or wherever). 2973 % 2974 \def\definedummyword##1{% 2975 \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% 2976 }% 2977 \def\definedummyletter##1{% 2978 \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% 2979 }% 2980 % 2981 % Do the redefinitions. 2982 \commondummies 2983 } 2984 2985 % For the aux file, @ is the escape character. So we want to redefine 2986 % everything using @ instead of \realbackslash. When everything uses 2987 % @, this will be simpler. 2988 % 2989 \def\atdummies{% 2990 \def\@{@@}% 2991 \def\ {@ }% 2992 \let\{ = \lbraceatcmd 2993 \let\} = \rbraceatcmd 2994 % 2995 % (See comments in \indexdummies.) 2996 \def\definedummyword##1{% 2997 \expandafter\def\csname ##1\endcsname{@##1\space}% 2998 }% 2999 \def\definedummyletter##1{% 3000 \expandafter\def\csname ##1\endcsname{@##1}% 3001 }% 3002 % 3003 % Do the redefinitions. 3004 \commondummies 3005 } 3006 3007 % Called from \indexdummies and \atdummies. \definedummyword and 3008 % \definedummyletter must be defined first. 3009 % 3010 \def\commondummies{% 3011 % 3012 \normalturnoffactive 3013 % 3014 % Control letters and accents. 3015 \definedummyletter{_}% 3016 \definedummyletter{,}% 3017 \definedummyletter{"}% 3018 \definedummyletter{`}% 3019 \definedummyletter{'}% 3020 \definedummyletter{^}% 3021 \definedummyletter{~}% 3022 \definedummyletter{=}% 3023 \definedummyword{u}% 3024 \definedummyword{v}% 3025 \definedummyword{H}% 3026 \definedummyword{dotaccent}% 3027 \definedummyword{ringaccent}% 3028 \definedummyword{tieaccent}% 3029 \definedummyword{ubaraccent}% 3030 \definedummyword{udotaccent}% 3031 \definedummyword{dotless}% 3032 % 3033 % Other non-English letters. 3034 \definedummyword{AA}% 3035 \definedummyword{AE}% 3036 \definedummyword{L}% 3037 \definedummyword{OE}% 3038 \definedummyword{O}% 3039 \definedummyword{aa}% 3040 \definedummyword{ae}% 3041 \definedummyword{l}% 3042 \definedummyword{oe}% 3043 \definedummyword{o}% 3044 \definedummyword{ss}% 3045 % 3046 % Although these internal commands shouldn't show up, sometimes they do. 3047 \definedummyword{bf}% 3048 \definedummyword{gtr}% 3049 \definedummyword{hat}% 3050 \definedummyword{less}% 3051 \definedummyword{sf}% 3052 \definedummyword{sl}% 3053 \definedummyword{tclose}% 3054 \definedummyword{tt}% 3055 % 3056 % Texinfo font commands. 3057 \definedummyword{b}% 3058 \definedummyword{i}% 3059 \definedummyword{r}% 3060 \definedummyword{sc}% 3061 \definedummyword{t}% 3062 % 3063 \definedummyword{TeX}% 3064 \definedummyword{acronym}% 3065 \definedummyword{cite}% 3066 \definedummyword{code}% 3067 \definedummyword{command}% 3068 \definedummyword{dfn}% 3069 \definedummyword{dots}% 3070 \definedummyword{emph}% 3071 \definedummyword{env}% 3072 \definedummyword{file}% 3073 \definedummyword{kbd}% 3074 \definedummyword{key}% 3075 \definedummyword{math}% 3076 \definedummyword{option}% 3077 \definedummyword{samp}% 3078 \definedummyword{strong}% 3079 \definedummyword{uref}% 3080 \definedummyword{url}% 3081 \definedummyword{var}% 3082 \definedummyword{w}% 3083 % 3084 % Assorted special characters. 3085 \definedummyword{bullet}% 3086 \definedummyword{copyright}% 3087 \definedummyword{dots}% 3088 \definedummyword{enddots}% 3089 \definedummyword{equiv}% 3090 \definedummyword{error}% 3091 \definedummyword{expansion}% 3092 \definedummyword{minus}% 3093 \definedummyword{pounds}% 3094 \definedummyword{point}% 3095 \definedummyword{print}% 3096 \definedummyword{result}% 3097 % 3098 % Handle some cases of @value -- where the variable name does not 3099 % contain - or _, and the value does not contain any 3100 % (non-fully-expandable) commands. 3101 \let\value = \expandablevalue 3102 % 3103 % Normal spaces, not active ones. 3104 \unsepspaces 3105 % 3106 % No macro expansion. 3107 \turnoffmacros 2738 3108 } 2739 3109 2740 3110 % If an index command is used in an @example environment, any spaces 2741 3111 % therein should become regular spaces in the raw index file, not the 2742 % expansion of \tie (\ \leavevmode \penalty \@M \ ).3112 % expansion of \tie (\leavevmode \penalty \@M \ ). 2743 3113 {\obeyspaces 2744 3114 \gdef\unsepspaces{\obeyspaces\let =\space}} 2745 3115 2746 % \indexnofonts no-ops all font-change commands. 2747 % This is used when outputting the strings to sort the index by. 2748 \def\indexdummyfont#1{#1} 3116 3117 % \indexnofonts is used when outputting the strings to sort the index 3118 % by, and when constructing control sequence names. It eliminates all 3119 % control sequences and just writes whatever the best ASCII sort string 3120 % would be for a given command (usually its argument). 3121 % 2749 3122 \def\indexdummytex{TeX} 2750 3123 \def\indexdummydots{...} 2751 3124 % 2752 3125 \def\indexnofonts{% 2753 % Just ignore accents. 2754 \let\,=\indexdummyfont 2755 \let\"=\indexdummyfont 2756 \let\`=\indexdummyfont 2757 \let\'=\indexdummyfont 2758 \let\^=\indexdummyfont 2759 \let\~=\indexdummyfont 2760 \let\==\indexdummyfont 2761 \let\b=\indexdummyfont 2762 \let\c=\indexdummyfont 2763 \let\d=\indexdummyfont 2764 \let\u=\indexdummyfont 2765 \let\v=\indexdummyfont 2766 \let\H=\indexdummyfont 2767 \let\dotless=\indexdummyfont 2768 % Take care of the plain tex special European modified letters. 2769 \def\oe{oe}% 2770 \def\ae{ae}% 2771 \def\aa{aa}% 2772 \def\OE{OE}% 2773 \def\AE{AE}% 2774 \def\AA{AA}% 2775 \def\o{o}% 2776 \def\O{O}% 2777 \def\l{l}% 2778 \def\L{L}% 2779 \def\ss{ss}% 2780 \let\w=\indexdummyfont 2781 \let\t=\indexdummyfont 2782 \let\r=\indexdummyfont 2783 \let\i=\indexdummyfont 2784 \let\b=\indexdummyfont 2785 \let\emph=\indexdummyfont 2786 \let\strong=\indexdummyfont 2787 \let\cite=\indexdummyfont 2788 \let\sc=\indexdummyfont 2789 %Don't no-op \tt, since it isn't a user-level command 2790 % and is used in the definitions of the active chars like <, >, |... 2791 %\let\tt=\indexdummyfont 2792 \let\tclose=\indexdummyfont 2793 \let\code=\indexdummyfont 2794 \let\url=\indexdummyfont 2795 \let\uref=\indexdummyfont 2796 \let\env=\indexdummyfont 2797 \let\acronym=\indexdummyfont 2798 \let\command=\indexdummyfont 2799 \let\option=\indexdummyfont 2800 \let\file=\indexdummyfont 2801 \let\samp=\indexdummyfont 2802 \let\kbd=\indexdummyfont 2803 \let\key=\indexdummyfont 2804 \let\var=\indexdummyfont 2805 \let\TeX=\indexdummytex 2806 \let\dots=\indexdummydots 2807 \def\@{@}% 2808 } 2809 2810 % To define \realbackslash, we must make \ not be an escape. 2811 % We must first make another character (@) an escape 2812 % so we do not become unable to do a definition. 2813 2814 {\catcode`\@=0 \catcode`\\=\other 2815 @gdef@realbackslash{\}} 3126 \def\ { }% 3127 \def\@{@}% 3128 % how to handle braces? 3129 \def\_{\normalunderscore}% 3130 % 3131 \let\,=\asis 3132 \let\"=\asis 3133 \let\`=\asis 3134 \let\'=\asis 3135 \let\^=\asis 3136 \let\~=\asis 3137 \let\==\asis 3138 \let\u=\asis 3139 \let\v=\asis 3140 \let\H=\asis 3141 \let\dotaccent=\asis 3142 \let\ringaccent=\asis 3143 \let\tieaccent=\asis 3144 \let\ubaraccent=\asis 3145 \let\udotaccent=\asis 3146 \let\dotless=\asis 3147 % 3148 % Other non-English letters. 3149 \def\AA{AA}% 3150 \def\AE{AE}% 3151 \def\L{L}% 3152 \def\OE{OE}% 3153 \def\O{O}% 3154 \def\aa{aa}% 3155 \def\ae{ae}% 3156 \def\l{l}% 3157 \def\oe{oe}% 3158 \def\o{o}% 3159 \def\ss{ss}% 3160 \def\exclamdown{!}% 3161 \def\questiondown{?}% 3162 % 3163 % Don't no-op \tt, since it isn't a user-level command 3164 % and is used in the definitions of the active chars like <, >, |, etc. 3165 % Likewise with the other plain tex font commands. 3166 %\let\tt=\asis 3167 % 3168 % Texinfo font commands. 3169 \let\b=\asis 3170 \let\i=\asis 3171 \let\r=\asis 3172 \let\sc=\asis 3173 \let\t=\asis 3174 % 3175 \let\TeX=\indexdummytex 3176 \let\acronym=\asis 3177 \let\cite=\asis 3178 \let\code=\asis 3179 \let\command=\asis 3180 \let\dfn=\asis 3181 \let\dots=\indexdummydots 3182 \let\emph=\asis 3183 \let\env=\asis 3184 \let\file=\asis 3185 \let\kbd=\asis 3186 \let\key=\asis 3187 \let\math=\asis 3188 \let\option=\asis 3189 \let\samp=\asis 3190 \let\strong=\asis 3191 \let\uref=\asis 3192 \let\url=\asis 3193 \let\var=\asis 3194 \let\w=\asis 3195 } 2816 3196 2817 3197 \let\indexbackslash=0 %overridden during \printindex. … … 2845 3225 % so it will be output as is; and it will print as backslash. 2846 3226 % 2847 \def\thirdarg{#3}% 3227 % The main index entry text. 3228 \toks0 = {#2}% 2848 3229 % 2849 3230 % If third arg is present, precede it with space in sort key. 2850 \ifx\thirdarg\emptymacro 2851 \let\subentry = \empty 2852 \else 2853 \def\subentry{ #3}% 2854 \fi 2855 % 2856 % First process the index entry with all font commands turned 2857 % off to get the string to sort by. 2858 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% 2859 % 2860 % Now the real index entry with the fonts. 2861 \toks0 = {#2}% 2862 % 2863 % If third (subentry) arg is present, add it to the index 2864 % string. And include a space. 3231 \def\thirdarg{#3}% 2865 3232 \ifx\thirdarg\emptymacro \else 3233 % If the third (subentry) arg is present, add it to the index 3234 % line to write. 2866 3235 \toks0 = \expandafter{\the\toks0 \space #3}% 2867 3236 \fi 2868 3237 % 2869 % Set up the complete index entry, with both the sort key 2870 % and the original text, including any font commands. We write 2871 % three arguments to \entry to the .?? file, texindex reduces to 2872 % two when writing the .??s sorted result. 3238 % Process the index entry with all font commands turned off, to 3239 % get the string to sort by. 3240 {\indexnofonts 3241 \edef\temp{\the\toks0}% need full expansion 3242 \xdef\indexsorttmp{\temp}% 3243 }% 3244 % 3245 % Set up the complete index entry, with both the sort key and 3246 % the original text, including any font commands. We write 3247 % three arguments to \entry to the .?? file (four in the 3248 % subentry case), texindex reduces to two when writing the .??s 3249 % sorted result. 2873 3250 \edef\temp{% 2874 3251 \write\csname#1indfile\endcsname{% … … 2896 3273 \ifvmode 2897 3274 \skip0 = \lastskip 2898 \ifdim\lastskip = 0pt \else \nobreak\vskip-\ lastskip\fi3275 \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi 2899 3276 \fi 2900 3277 % 2901 3278 \temp % do the write 2902 %2903 3279 % 2904 3280 \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi … … 3092 3468 3093 3469 \newskip\secondaryindent \secondaryindent=0.5cm 3094 3095 \def\secondary #1#2{ 3096 {\parfillskip=0in \parskip=0in 3097 \hangindent =1in \hangafter=1 3098 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par 3470 \def\secondary#1#2{{% 3471 \parfillskip=0in 3472 \parskip=0in 3473 \hangindent=1in 3474 \hangafter=1 3475 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill 3476 \ifpdf 3477 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. 3478 \else 3479 #2 3480 \fi 3481 \par 3099 3482 }} 3100 3483 … … 3156 3539 % Double the \vsize as well. (We don't need a separate register here, 3157 3540 % since nobody clobbers \vsize.) 3158 \advance\vsize by -\ht\partialpage3159 3541 \vsize = 2\vsize 3160 3542 } … … 3170 3552 \dimen@ = \vsize 3171 3553 \divide\dimen@ by 2 3554 \advance\dimen@ by -\ht\partialpage 3172 3555 % 3173 3556 % box0 will be the left-hand column, box2 the right. … … 3177 3560 \penalty\outputpenalty 3178 3561 } 3562 % 3563 % Re-output the contents of the output page -- any previous material, 3564 % followed by the two boxes we just split, in box0 and box2. 3179 3565 \def\pagesofar{% 3180 % Re-output the contents of the output page -- any previous material,3181 % followed by the two boxes we just split, in box0 and box2.3182 3566 \unvbox\partialpage 3183 3567 % … … 3186 3570 \hbox to\pagewidth{\box0\hfil\box2}% 3187 3571 } 3572 % 3573 % All done with double columns. 3188 3574 \def\enddoublecolumns{% 3189 3575 \output = {% … … 3210 3596 \pagegoal = \vsize 3211 3597 } 3598 % 3599 % Called at the end of the double column material. 3212 3600 \def\balancecolumns{% 3213 % Called at the end of the double column material.3214 3601 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. 3215 3602 \dimen@ = \ht0 … … 3366 3753 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz 3367 3754 \def\chapterzzz #1{% 3368 \secno=0 \subsecno=0 \subsubsecno=0 3369 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% 3370 \chapmacro {#1}{\the\chapno}% 3371 \gdef\thissection{#1}% 3372 \gdef\thischaptername{#1}% 3373 % We don't substitute the actual chapter name into \thischapter 3374 % because we don't want its macros evaluated now. 3375 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% 3376 \toks0 = {#1}% 3377 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% 3378 {\the\chapno}}}% 3379 \temp 3380 \donoderef 3381 \global\let\section = \numberedsec 3382 \global\let\subsection = \numberedsubsec 3383 \global\let\subsubsection = \numberedsubsubsec 3384 } 3755 \secno=0 \subsecno=0 \subsubsecno=0 3756 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% 3757 \chapmacro {#1}{\the\chapno}% 3758 \gdef\thissection{#1}% 3759 \gdef\thischaptername{#1}% 3760 % We don't substitute the actual chapter name into \thischapter 3761 % because we don't want its macros evaluated now. 3762 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% 3763 \writetocentry{chap}{#1}{{\the\chapno}} 3764 \donoderef 3765 \global\let\section = \numberedsec 3766 \global\let\subsection = \numberedsubsec 3767 \global\let\subsubsection = \numberedsubsubsec 3768 } 3769 3770 % we use \chapno to avoid indenting back 3771 \def\appendixbox#1{% 3772 \setbox0 = \hbox{\putwordAppendix{} \the\chapno}% 3773 \hbox to \wd0{#1\hss}} 3385 3774 3386 3775 \outer\def\appendix{\parsearg\appendixyyy} 3387 3776 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz 3388 3777 \def\appendixzzz #1{% 3389 \secno=0 \subsecno=0 \subsubsecno=0 3390 \global\advance \appendixno by 1 3391 \message{\putwordAppendix\space \appendixletter}% 3392 \chapmacro {#1}{\putwordAppendix{} \appendixletter}% 3393 \gdef\thissection{#1}% 3394 \gdef\thischaptername{#1}% 3395 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% 3396 \toks0 = {#1}% 3397 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% 3398 {\putwordAppendix{} \appendixletter}}}% 3399 \temp 3400 \appendixnoderef 3401 \global\let\section = \appendixsec 3402 \global\let\subsection = \appendixsubsec 3403 \global\let\subsubsection = \appendixsubsubsec 3778 \secno=0 \subsecno=0 \subsubsecno=0 3779 \global\advance \appendixno by 1 3780 \message{\putwordAppendix\space \appendixletter}% 3781 \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% 3782 \gdef\thissection{#1}% 3783 \gdef\thischaptername{#1}% 3784 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% 3785 \writetocentry{appendix}{#1}{{\appendixletter}} 3786 \appendixnoderef 3787 \global\let\section = \appendixsec 3788 \global\let\subsection = \appendixsubsec 3789 \global\let\subsubsection = \appendixsubsubsec 3404 3790 } 3405 3791 … … 3414 3800 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz 3415 3801 \def\unnumberedzzz #1{% 3416 \secno=0 \subsecno=0 \subsubsecno=0 3417 % 3418 % This used to be simply \message{#1}, but TeX fully expands the 3419 % argument to \message. Therefore, if #1 contained @-commands, TeX 3420 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX 3421 % expanded @cite (which turns out to cause errors because \cite is meant 3422 % to be executed, not expanded). 3423 % 3424 % Anyway, we don't want the fully-expanded definition of @cite to appear 3425 % as a result of the \message, we just want `@cite' itself. We use 3426 % \the<toks register> to achieve this: TeX expands \the<toks> only once, 3427 % simply yielding the contents of <toks register>. (We also do this for 3428 % the toc entries.) 3429 \toks0 = {#1}\message{(\the\toks0)}% 3430 % 3431 \unnumbchapmacro {#1}% 3432 \gdef\thischapter{#1}\gdef\thissection{#1}% 3433 \toks0 = {#1}% 3434 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% 3435 \temp 3436 \unnumbnoderef 3437 \global\let\section = \unnumberedsec 3438 \global\let\subsection = \unnumberedsubsec 3439 \global\let\subsubsection = \unnumberedsubsubsec 3802 \secno=0 \subsecno=0 \subsubsecno=0 3803 % 3804 % This used to be simply \message{#1}, but TeX fully expands the 3805 % argument to \message. Therefore, if #1 contained @-commands, TeX 3806 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX 3807 % expanded @cite (which turns out to cause errors because \cite is meant 3808 % to be executed, not expanded). 3809 % 3810 % Anyway, we don't want the fully-expanded definition of @cite to appear 3811 % as a result of the \message, we just want `@cite' itself. We use 3812 % \the<toks register> to achieve this: TeX expands \the<toks> only once, 3813 % simply yielding the contents of <toks register>. (We also do this for 3814 % the toc entries.) 3815 \toks0 = {#1}\message{(\the\toks0)}% 3816 % 3817 \unnumbchapmacro {#1}% 3818 \gdef\thischapter{#1}\gdef\thissection{#1}% 3819 \writetocentry{unnumbchap}{#1}{{\the\chapno}} 3820 \unnumbnoderef 3821 \global\let\section = \unnumberedsec 3822 \global\let\subsection = \unnumberedsubsec 3823 \global\let\subsubsection = \unnumberedsubsubsec 3440 3824 } 3441 3825 … … 3444 3828 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz 3445 3829 \def\seczzz #1{% 3446 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 3447 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% 3448 \toks0 = {#1}% 3449 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% 3450 {\the\chapno}{\the\secno}}}% 3451 \temp 3452 \donoderef 3453 \nobreak 3830 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 3831 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% 3832 \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} 3833 \donoderef 3834 \nobreak 3454 3835 } 3455 3836 … … 3458 3839 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz 3459 3840 \def\appendixsectionzzz #1{% 3460 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 3461 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% 3462 \toks0 = {#1}% 3463 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% 3464 {\appendixletter}{\the\secno}}}% 3465 \temp 3466 \appendixnoderef 3467 \nobreak 3841 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 3842 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% 3843 \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} 3844 \appendixnoderef 3845 \nobreak 3468 3846 } 3469 3847 … … 3471 3849 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz 3472 3850 \def\unnumberedseczzz #1{% 3473 \plainsecheading {#1}\gdef\thissection{#1}% 3474 \toks0 = {#1}% 3475 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% 3476 \temp 3477 \unnumbnoderef 3478 \nobreak 3851 \plainsecheading {#1}\gdef\thissection{#1}% 3852 \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} 3853 \unnumbnoderef 3854 \nobreak 3479 3855 } 3480 3856 … … 3483 3859 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz 3484 3860 \def\numberedsubseczzz #1{% 3485 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 3486 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% 3487 \toks0 = {#1}% 3488 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% 3489 {\the\chapno}{\the\secno}{\the\subsecno}}}% 3490 \temp 3491 \donoderef 3492 \nobreak 3861 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 3862 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% 3863 \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} 3864 \donoderef 3865 \nobreak 3493 3866 } 3494 3867 … … 3496 3869 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz 3497 3870 \def\appendixsubseczzz #1{% 3498 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 3499 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% 3500 \toks0 = {#1}% 3501 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% 3502 {\appendixletter}{\the\secno}{\the\subsecno}}}% 3503 \temp 3504 \appendixnoderef 3505 \nobreak 3871 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 3872 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% 3873 \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} 3874 \appendixnoderef 3875 \nobreak 3506 3876 } 3507 3877 … … 3509 3879 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz 3510 3880 \def\unnumberedsubseczzz #1{% 3511 \plainsubsecheading {#1}\gdef\thissection{#1}% 3512 \toks0 = {#1}% 3513 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% 3514 {\the\toks0}}}% 3515 \temp 3516 \unnumbnoderef 3517 \nobreak 3881 \plainsubsecheading {#1}\gdef\thissection{#1}% 3882 \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} 3883 \unnumbnoderef 3884 \nobreak 3518 3885 } 3519 3886 … … 3522 3889 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz 3523 3890 \def\numberedsubsubseczzz #1{% 3524 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3525 \subsubsecheading {#1} 3526 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3527 \toks0 = {#1}% 3528 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% 3529 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% 3530 \temp 3531 \donoderef 3532 \nobreak 3891 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3892 \subsubsecheading {#1} 3893 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3894 \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} 3895 \donoderef 3896 \nobreak 3533 3897 } 3534 3898 … … 3536 3900 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz 3537 3901 \def\appendixsubsubseczzz #1{% 3538 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3539 \subsubsecheading {#1} 3540 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3541 \toks0 = {#1}% 3542 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% 3543 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% 3544 \temp 3545 \appendixnoderef 3546 \nobreak 3902 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3903 \subsubsecheading {#1} 3904 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3905 \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} 3906 \appendixnoderef 3907 \nobreak 3547 3908 } 3548 3909 … … 3550 3911 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz 3551 3912 \def\unnumberedsubsubseczzz #1{% 3552 \plainsubsubsecheading {#1}\gdef\thissection{#1}% 3553 \toks0 = {#1}% 3554 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% 3555 {\the\toks0}}}% 3556 \temp 3557 \unnumbnoderef 3558 \nobreak 3913 \plainsubsubsecheading {#1}\gdef\thissection{#1}% 3914 \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} 3915 \unnumbnoderef 3916 \nobreak 3559 3917 } 3560 3918 … … 3597 3955 \def\majorheading{\parsearg\majorheadingzzz} 3598 3956 \def\majorheadingzzz #1{% 3599 {\advance\chapheadingskip by 10pt \chapbreak }%3600 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=50003601 \parindent=0pt\raggedright3602 \rm #1\hfill}}\bigskip \par\penalty 200}3957 {\advance\chapheadingskip by 10pt \chapbreak }% 3958 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 3959 \parindent=0pt\raggedright 3960 \rm #1\hfill}}\bigskip \par\penalty 200} 3603 3961 3604 3962 \def\chapheading{\parsearg\chapheadingzzz} 3605 3963 \def\chapheadingzzz #1{\chapbreak % 3606 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=50003607 \parindent=0pt\raggedright3608 \rm #1\hfill}}\bigskip \par\penalty 200}3964 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 3965 \parindent=0pt\raggedright 3966 \rm #1\hfill}}\bigskip \par\penalty 200} 3609 3967 3610 3968 % @heading, @subheading, @subsubheading. … … 3752 4110 \unhbox0 #3}% 3753 4111 }% 3754 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak 4112 % Add extra space after the heading -- either a line space or a 4113 % paragraph space, whichever is more. (Some people like to set 4114 % \parskip to large values for some reason.) Don't allow stretch, though. 4115 \nobreak 4116 \ifdim\parskip>\normalbaselineskip 4117 \kern\parskip 4118 \else 4119 \kern\normalbaselineskip 4120 \fi 4121 \nobreak 3755 4122 } 3756 4123 … … 3764 4131 % argument, which will end up as the last argument to the \...entry macro. 3765 4132 % 3766 % We open the .toc file here instead of at @setfilename or any other 3767 % given time so that @contents can be put in the document anywhere. 4133 % Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} 4134 % We open the .toc file for writing here instead of at @setfilename (or 4135 % any other fixed time) so that @contents can be anywhere in the document. 3768 4136 % 3769 4137 \newif\iftocfileopened 3770 \def\writetocentry#1 {%4138 \def\writetocentry#1#2#3{% 3771 4139 \iftocfileopened\else 3772 4140 \immediate\openout\tocfile = \jobname.toc 3773 4141 \global\tocfileopenedtrue 3774 4142 \fi 3775 \iflinks \write\tocfile{#1{\folio}}\fi 4143 % 4144 \iflinks 4145 \toks0 = {#2}% 4146 \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% 4147 \temp 4148 \fi 4149 % 4150 % Tell \shipout to create a page destination if we're doing pdf, which 4151 % will be the target of the links in the table of contents. We can't 4152 % just do it on every page because the title pages are numbered 1 and 4153 % 2 (the page numbers aren't printed), and so are the first two pages 4154 % of the document. Thus, we'd have two destinations named `1', and 4155 % two named `2'. 4156 \ifpdf \pdfmakepagedesttrue \fi 3776 4157 } 3777 4158 … … 3804 4185 % 3805 4186 % Roman numerals for page numbers. 3806 \ifnum \pageno>0 \ pageno = \lastnegativepageno \fi4187 \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi 3807 4188 } 3808 4189 … … 3821 4202 \endgroup 3822 4203 \lastnegativepageno = \pageno 3823 \ pageno = \savepageno4204 \global\pageno = \savepageno 3824 4205 } 3825 4206 … … 3829 4210 % 3830 4211 \let\chapentry = \shortchapentry 4212 \let\appendixentry = \shortappendixentry 3831 4213 \let\unnumbchapentry = \shortunnumberedentry 3832 4214 % We want a true roman here for the page numbers. 3833 4215 \secfonts 3834 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl 4216 \let\rm=\shortcontrm \let\bf=\shortcontbf 4217 \let\sl=\shortcontsl \let\tt=\shortconttt 3835 4218 \rm 3836 4219 \hyphenpenalty = 10000 3837 4220 \advance\baselineskip by 1pt % Open it up a little. 3838 4221 \def\secentry ##1##2##3##4{} 3839 \def\unnumbsecentry ##1##2{}3840 4222 \def\subsecentry ##1##2##3##4##5{} 3841 \def\unnumbsubsecentry ##1##2{}3842 4223 \def\subsubsecentry ##1##2##3##4##5##6{} 3843 \def\unnumbsubsubsecentry ##1##2{} 4224 \let\unnumbsecentry = \secentry 4225 \let\unnumbsubsecentry = \subsecentry 4226 \let\unnumbsubsubsecentry = \subsubsecentry 3844 4227 \openin 1 \jobname.toc 3845 4228 \ifeof 1 \else … … 3851 4234 \endgroup 3852 4235 \lastnegativepageno = \pageno 3853 \ pageno = \savepageno4236 \global\pageno = \savepageno 3854 4237 } 3855 4238 \let\shortcontents = \summarycontents … … 3864 4247 % The arguments in between are the chapter number, section number, ... 3865 4248 3866 % Chapter -level things, for both the long and shortcontents.4249 % Chapters, in the main contents. 3867 4250 \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} 3868 3869 % See comments in \dochapentry re vbox and related settings 4251 % 4252 % Chapters, in the short toc. 4253 % See comments in \dochapentry re vbox and related settings. 3870 4254 \def\shortchapentry#1#2#3{% 3871 4255 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% 3872 4256 } 3873 4257 4258 % Appendices, in the main contents. 4259 \def\appendixentry#1#2#3{% 4260 \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}} 4261 % 4262 % Appendices, in the short toc. 4263 \let\shortappendixentry = \shortchapentry 4264 3874 4265 % Typeset the label for a chapter or appendix for the short contents. 3875 % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.4266 % The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter. 3876 4267 % We could simplify the code here by writing out an \appendixentry 3877 4268 % command in the toc file for appendices, instead of using \chapentry … … 3881 4272 % 3882 4273 \def\shortchaplabel#1{% 3883 % Compute width of word "Appendix", may change with language. 3884 \setbox0 = \hbox{\shortcontrm \putwordAppendix}% 3885 \shortappendixwidth = \wd0 3886 % 3887 % We typeset #1 in a box of constant width, regardless of the text of 3888 % #1, so the chapter titles will come out aligned. 3889 \setbox0 = \hbox{#1}% 3890 \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi 3891 % 3892 % This space should be plenty, since a single number is .5em, and the 4274 % This space should be enough, since a single number is .5em, and the 3893 4275 % widest letter (M) is 1em, at least in the Computer Modern fonts. 4276 % But use \hss just in case. 3894 4277 % (This space doesn't include the extra space that gets added after 3895 4278 % the label; that gets put in by \shortchapentry above.) 3896 \advance\dimen0 by 1.1em 3897 \hbox to \dimen0{#1\hfil}% 3898 } 3899 3900 \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} 3901 \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} 4279 \dimen0 = 1em 4280 \hbox to \dimen0{#1\hss}% 4281 } 4282 4283 % Unnumbered chapters. 4284 \def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}} 4285 \def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}} 3902 4286 3903 4287 % Sections. 3904 4288 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} 3905 \def\unnumbsecentry#1#2 {\dosecentry{#1}{#2}}4289 \def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}} 3906 4290 3907 4291 % Subsections. 3908 4292 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} 3909 \def\unnumbsubsecentry#1#2 {\dosubsecentry{#1}{#2}}4293 \def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}} 3910 4294 3911 4295 % And subsubsections. 3912 4296 \def\subsubsecentry#1#2#3#4#5#6{% 3913 4297 \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} 3914 \def\unnumbsubsubsecentry#1#2 {\dosubsubsecentry{#1}{#2}}4298 \def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}} 3915 4299 3916 4300 % This parameter controls the indentation of the various levels. … … 3953 4337 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks 3954 4338 % Do not use \turnoffactive in these arguments. Since the toc is 3955 % typeset in cmr, socharacters such as _ would come out wrong; we4339 % typeset in cmr, characters such as _ would come out wrong; we 3956 4340 % have to do the usual translation tricks. 3957 4341 \entry{#1}{#2}% … … 3973 4357 % @foo ... @end foo. 3974 4358 4359 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. 4360 % 3975 4361 % Since these characters are used in examples, it should be an even number of 3976 4362 % \tt widths. Each \tt character is 1en, so two makes it 1em. 3977 % Furthermore, these definitions must come after we define our fonts. 3978 \newbox\dblarrowbox \newbox\longdblarrowbox 3979 \newbox\pushcharbox \newbox\bullbox 3980 \newbox\equivbox \newbox\errorbox 3981 3982 %{\tentt 3983 %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} 3984 %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} 3985 %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} 3986 %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} 3987 % Adapted from the manmac format (p.420 of TeXbook) 3988 %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex 3989 % depth .1ex\hfil} 3990 %} 3991 3992 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. 4363 % 3993 4364 \def\point{$\star$} 3994 4365 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} … … 3997 4368 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} 3998 4369 4370 % The @error{} command. 3999 4371 % Adapted from the TeXbook's \boxit. 4372 % 4373 \newbox\errorbox 4374 % 4000 4375 {\tentt \global\dimen0 = 3em}% Width of the box. 4001 4376 \dimen2 = .55pt % Thickness of rules 4002 4377 % The text. (`r' is open on the right, `e' somewhat less so on the left.) 4003 4378 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} 4004 4379 % 4005 4380 \global\setbox\errorbox=\hbox to \dimen0{\hfil 4006 4381 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. … … 4013 4388 \hrule height\dimen2} 4014 4389 \hfil} 4015 4016 % The @error{} command. 4390 % 4017 4391 \def\error{\leavevmode\lower.7ex\copy\errorbox} 4018 4392 … … 4024 4398 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 4025 4399 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 4026 \catcode `\^=7 \catcode `\_=8 \catcode `\~= 13\let~=\tie4400 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie 4027 4401 \catcode `\%=14 4028 \catcode 43=12 % plus4029 \catcode `\"=124030 \catcode `\==124031 \catcode `\|=124032 \catcode `\<=124033 \catcode `\>=124402 \catcode `\+=\other 4403 \catcode `\"=\other 4404 \catcode `\==\other 4405 \catcode `\|=\other 4406 \catcode `\<=\other 4407 \catcode `\>=\other 4034 4408 \escapechar=`\\ 4035 4409 % … … 4054 4428 \let\Etex=\endgroup} 4055 4429 4056 % Define @lisp ... @end lisp.4430 % Define @lisp ... @end lisp. 4057 4431 % @lisp does a \begingroup so it can rebind things, 4058 % including the definition of @end lisp (which normally is erroneous).4432 % including the definition of @end lisp (which normally is erroneous). 4059 4433 4060 4434 % Amount to narrow the margins by for @lisp. … … 4085 4459 % to help in doing that, since in @example-like environments \parskip 4086 4460 % is reset to zero; thus the \afterenvbreak inserts no space -- but the 4087 % start of the next paragraph will insert \parskip 4088 % 4089 \def\aboveenvbreak{{\advance\envskipamount by \parskip 4090 \endgraf \ifdim\lastskip<\envskipamount 4091 \removelastskip \penalty-50 \vskip\envskipamount \fi}} 4461 % start of the next paragraph will insert \parskip. 4462 % 4463 \def\aboveenvbreak{{% 4464 % =10000 instead of <10000 because of a special case in \itemzzz, q.v. 4465 \ifnum \lastpenalty=10000 \else 4466 \advance\envskipamount by \parskip 4467 \endgraf 4468 \ifdim\lastskip<\envskipamount 4469 \removelastskip 4470 % it's not a good place to break if the last penalty was \nobreak 4471 % or better ... 4472 \ifnum\lastpenalty>10000 \else \penalty-50 \fi 4473 \vskip\envskipamount 4474 \fi 4475 \fi 4476 }} 4092 4477 4093 4478 \let\afterenvbreak = \aboveenvbreak … … 4117 4502 \newskip\lskip\newskip\rskip 4118 4503 4119 \long\def\cartouche{% 4504 \def\cartouche{% 4505 \par % can't be in the midst of a paragraph. 4120 4506 \begingroup 4121 4507 \lskip=\leftskip \rskip=\rightskip … … 4164 4550 \hfuzz = 12pt % Don't be fussy 4165 4551 \sepspaces % Make spaces be word-separators rather than space tokens. 4166 \singlespace4167 4552 \let\par = \lisppar % don't ignore blank lines 4168 4553 \obeylines % each line of input is a line of output … … 4203 4588 \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} 4204 4589 4205 % @small... is usually equivalent to the non-small (@smallbook 4206 % redefines). We must call \example (or whatever) last in the 4207 % definition, since it reads the return following the @example (or 4208 % whatever) command. 4209 % 4210 % This actually allows (for example) @end display inside an 4211 % @smalldisplay. Too bad, but makeinfo will catch the error anyway. 4212 % 4213 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} 4214 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} 4215 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} 4216 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} 4217 4218 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. 4590 % @smallexample and @smalllisp: use smaller fonts. 4219 4591 % Originally contributed by Pavel@xerox. 4220 \def\smalllisp x{\begingroup4592 \def\smalllisp{\begingroup 4221 4593 \def\Esmalllisp{\nonfillfinish\endgroup}% 4222 4594 \def\Esmallexample{\nonfillfinish\endgroup}% 4223 \small fonts4595 \smallexamplefonts 4224 4596 \lisp 4225 4597 } 4598 \let\smallexample = \smalllisp 4599 4226 4600 4227 4601 % @display: same as @lisp except keep current font. … … 4232 4606 \gobble 4233 4607 } 4234 4235 % @smalldisplay (when @smallbook): @display plus smaller fonts.4236 % 4237 \def\smalldisplay x{\begingroup4608 % 4609 % @smalldisplay: @display plus smaller fonts. 4610 % 4611 \def\smalldisplay{\begingroup 4238 4612 \def\Esmalldisplay{\nonfillfinish\endgroup}% 4239 \small fonts \rm4613 \smallexamplefonts \rm 4240 4614 \display 4241 4615 } … … 4249 4623 \gobble 4250 4624 } 4251 4252 % @smallformat (when @smallbook): @format plus smaller fonts.4253 % 4254 \def\smallformat x{\begingroup4625 % 4626 % @smallformat: @format plus smaller fonts. 4627 % 4628 \def\smallformat{\begingroup 4255 4629 \def\Esmallformat{\nonfillfinish\endgroup}% 4256 \small fonts \rm4630 \smallexamplefonts \rm 4257 4631 \format 4258 4632 } … … 4272 4646 } 4273 4647 4648 4274 4649 % @quotation does normal linebreaking (hence we can't use \nonfillstart) 4275 4650 % and narrows the margins. … … 4278 4653 \begingroup\inENV %This group ends at the end of the @quotation body 4279 4654 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip 4280 \singlespace4281 4655 \parindent=0pt 4282 4656 % We have retained a nonzero parskip for the environment, since we're … … 4294 4668 4295 4669 4670 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} 4671 % If we want to allow any <char> as delimiter, 4672 % we need the curly braces so that makeinfo sees the @verb command, eg: 4673 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org 4674 % 4675 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. 4676 % 4677 % [Knuth] p.344; only we need to do the other characters Texinfo sets 4678 % active too. Otherwise, they get lost as the first character on a 4679 % verbatim line. 4680 \def\dospecials{% 4681 \do\ \do\\\do\{\do\}\do\$\do\&% 4682 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% 4683 \do\<\do\>\do\|\do\@\do+\do\"% 4684 } 4685 % 4686 % [Knuth] p. 380 4687 \def\uncatcodespecials{% 4688 \def\do##1{\catcode`##1=12}\dospecials} 4689 % 4690 % [Knuth] pp. 380,381,391 4691 % Disable Spanish ligatures ?` and !` of \tt font 4692 \begingroup 4693 \catcode`\`=\active\gdef`{\relax\lq} 4694 \endgroup 4695 % 4696 % Setup for the @verb command. 4697 % 4698 % Eight spaces for a tab 4699 \begingroup 4700 \catcode`\^^I=\active 4701 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} 4702 \endgroup 4703 % 4704 \def\setupverb{% 4705 \tt % easiest (and conventionally used) font for verbatim 4706 \def\par{\leavevmode\endgraf}% 4707 \catcode`\`=\active 4708 \tabeightspaces 4709 % Respect line breaks, 4710 % print special symbols as themselves, and 4711 % make each space count 4712 % must do in this order: 4713 \obeylines \uncatcodespecials \sepspaces 4714 } 4715 4716 % Setup for the @verbatim environment 4717 % 4718 % Real tab expansion 4719 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount 4720 % 4721 \def\starttabbox{\setbox0=\hbox\bgroup} 4722 \begingroup 4723 \catcode`\^^I=\active 4724 \gdef\tabexpand{% 4725 \catcode`\^^I=\active 4726 \def^^I{\leavevmode\egroup 4727 \dimen0=\wd0 % the width so far, or since the previous tab 4728 \divide\dimen0 by\tabw 4729 \multiply\dimen0 by\tabw % compute previous multiple of \tabw 4730 \advance\dimen0 by\tabw % advance to next multiple of \tabw 4731 \wd0=\dimen0 \box0 \starttabbox 4732 }% 4733 } 4734 \endgroup 4735 \def\setupverbatim{% 4736 % Easiest (and conventionally used) font for verbatim 4737 \tt 4738 \def\par{\leavevmode\egroup\box0\endgraf}% 4739 \catcode`\`=\active 4740 \tabexpand 4741 % Respect line breaks, 4742 % print special symbols as themselves, and 4743 % make each space count 4744 % must do in this order: 4745 \obeylines \uncatcodespecials \sepspaces 4746 \everypar{\starttabbox}% 4747 } 4748 4749 % Do the @verb magic: verbatim text is quoted by unique 4750 % delimiter characters. Before first delimiter expect a 4751 % right brace, after last delimiter expect closing brace: 4752 % 4753 % \def\doverb'{'<char>#1<char>'}'{#1} 4754 % 4755 % [Knuth] p. 382; only eat outer {} 4756 \begingroup 4757 \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 4758 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] 4759 \endgroup 4760 % 4761 \def\verb{\begingroup\setupverb\doverb} 4762 % 4763 % 4764 % Do the @verbatim magic: define the macro \doverbatim so that 4765 % the (first) argument ends when '@end verbatim' is reached, ie: 4766 % 4767 % \def\doverbatim#1@end verbatim{#1} 4768 % 4769 % For Texinfo it's a lot easier than for LaTeX, 4770 % because texinfo's \verbatim doesn't stop at '\end{verbatim}': 4771 % we need not redefine '\', '{' and '}'. 4772 % 4773 % Inspired by LaTeX's verbatim command set [latex.ltx] 4774 %% Include LaTeX hack for completeness -- never know 4775 %% \begingroup 4776 %% \catcode`|=0 \catcode`[=1 4777 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active 4778 %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ 4779 %% #1|endgroup|def|Everbatim[]|end[verbatim]] 4780 %% |endgroup 4781 % 4782 \begingroup 4783 \catcode`\ =\active 4784 \obeylines % 4785 % ignore everything up to the first ^^M, that's the newline at the end 4786 % of the @verbatim input line itself. Otherwise we get an extra blank 4787 % line in the output. 4788 \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% 4789 \endgroup 4790 % 4791 \def\verbatim{% 4792 \def\Everbatim{\nonfillfinish\endgroup}% 4793 \begingroup 4794 \nonfillstart 4795 \advance\leftskip by -\defbodyindent 4796 \begingroup\setupverbatim\doverbatim 4797 } 4798 4799 % @verbatiminclude FILE - insert text of file in verbatim environment. 4800 % 4801 % Allow normal characters that we make active in the argument (a file name). 4802 \def\verbatiminclude{% 4803 \begingroup 4804 \catcode`\\=\other 4805 \catcode`~=\other 4806 \catcode`^=\other 4807 \catcode`_=\other 4808 \catcode`|=\other 4809 \catcode`<=\other 4810 \catcode`>=\other 4811 \catcode`+=\other 4812 \parsearg\doverbatiminclude 4813 } 4814 \def\setupverbatiminclude{% 4815 \begingroup 4816 \nonfillstart 4817 \advance\leftskip by -\defbodyindent 4818 \begingroup\setupverbatim 4819 } 4820 % 4821 \def\doverbatiminclude#1{% 4822 % Restore active chars for included file. 4823 \endgroup 4824 \begingroup 4825 \let\value=\expandablevalue 4826 \def\thisfile{#1}% 4827 \expandafter\expandafter\setupverbatiminclude\input\thisfile 4828 \endgroup 4829 \nonfillfinish 4830 \endgroup 4831 } 4832 4833 % @copying ... @end copying. 4834 % Save the text away for @insertcopying later. Many commands won't be 4835 % allowed in this context, but that's ok. 4836 % 4837 % We save the uninterpreted tokens, rather than creating a box. 4838 % Saving the text in a box would be much easier, but then all the 4839 % typesetting commands (@smallbook, font changes, etc.) have to be done 4840 % beforehand -- and a) we want @copying to be done first in the source 4841 % file; b) letting users define the frontmatter in as flexible order as 4842 % possible is very desirable. 4843 % 4844 \def\copying{\begingroup 4845 % Define a command to swallow text until we reach `@end copying'. 4846 % \ is the escape char in this texinfo.tex file, so it is the 4847 % delimiter for the command; @ will be the escape char when we read 4848 % it, but that doesn't matter. 4849 \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% 4850 % 4851 % We must preserve ^^M's in the input file; see \insertcopying below. 4852 \catcode`\^^M = \active 4853 \docopying 4854 } 4855 4856 % What we do to finish off the copying text. 4857 % 4858 \def\enddocopying{\endgroup\ignorespaces} 4859 4860 % @insertcopying. Here we must play games with ^^M's. On the one hand, 4861 % we need them to delimit commands such as `@end quotation', so they 4862 % must be active. On the other hand, we certainly don't want every 4863 % end-of-line to be a \par, as would happen with the normal active 4864 % definition of ^^M. On the third hand, two ^^M's in a row should still 4865 % generate a \par. 4866 % 4867 % Our approach is to make ^^M insert a space and a penalty1 normally; 4868 % then it can also check if \lastpenalty=1. If it does, then manually 4869 % do \par. 4870 % 4871 % This messes up the normal definitions of @c[omment], so we redefine 4872 % it. Similarly for @ignore. (These commands are used in the gcc 4873 % manual for man page generation.) 4874 % 4875 % Seems pretty fragile, most line-oriented commands will presumably 4876 % fail, but for the limited use of getting the copying text (which 4877 % should be quite simple) inserted, we can hope it's ok. 4878 % 4879 {\catcode`\^^M=\active % 4880 \gdef\insertcopying{\begingroup % 4881 \parindent = 0pt % looks wrong on title page 4882 \def^^M{% 4883 \ifnum \lastpenalty=1 % 4884 \par % 4885 \else % 4886 \space \penalty 1 % 4887 \fi % 4888 }% 4889 % 4890 % Fix @c[omment] for catcode 13 ^^M's. 4891 \def\c##1^^M{\ignorespaces}% 4892 \let\comment = \c % 4893 % 4894 % Don't bother jumping through all the hoops that \doignore does, it 4895 % would be very hard since the catcodes are already set. 4896 \long\def\ignore##1\end ignore{\ignorespaces}% 4897 % 4898 \copyingtext % 4899 \endgroup}% 4900 } 4901 4296 4902 \message{defuns,} 4297 4903 % @defun etc. 4298 4904 4299 4905 % Allow user to change definition object font (\df) internally 4300 \def\setdeffont 4906 \def\setdeffont#1 {\csname DEF#1\endcsname} 4301 4907 4302 4908 \newskip\defbodyindent \defbodyindent=.4in 4303 4909 \newskip\defargsindent \defargsindent=50pt 4304 \newskip\deftypemargin \deftypemargin=12pt4305 4910 \newskip\deflastargmargin \deflastargmargin=18pt 4306 4911 4307 4912 \newcount\parencount 4308 % define \functionparens, which makes ( and ) and & do special things. 4309 % \functionparens affects the group it is contained in. 4913 4914 % We want ()&[] to print specially on the defun line. 4915 % 4310 4916 \def\activeparens{% 4311 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active 4312 \catcode`\[=\active \catcode`\]=\active} 4917 \catcode`\(=\active \catcode`\)=\active 4918 \catcode`\&=\active 4919 \catcode`\[=\active \catcode`\]=\active 4920 } 4313 4921 4314 4922 % Make control sequences which act like normal parenthesis chars. … … 4357 4965 % Active &'s sneak into the index arguments, so make sure it's defined. 4358 4966 { 4359 \catcode`& = 134967 \catcode`& = \active 4360 4968 \global\let& = \ampnr 4361 4969 } 4362 4970 4363 % First, defname, which formats the header line itself. 4364 % #1 should be the function name. 4365 % #2 should be the type of definition, such as "Function". 4366 4367 \def\defname #1#2{% 4368 % Get the values of \leftskip and \rightskip as they were 4369 % outside the @def... 4370 \dimen2=\leftskip 4371 \advance\dimen2 by -\defbodyindent 4372 \noindent 4373 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% 4374 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line 4375 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations 4376 \parshape 2 0in \dimen0 \defargsindent \dimen1 4377 % Now output arg 2 ("Function" or some such) 4378 % ending at \deftypemargin from the right margin, 4379 % but stuck inside a box of width 0 so it does not interfere with linebreaking 4380 {% Adjust \hsize to exclude the ambient margins, 4381 % so that \rightline will obey them. 4382 \advance \hsize by -\dimen2 4383 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% 4384 % Make all lines underfull and no complaints: 4385 \tolerance=10000 \hbadness=10000 4386 \advance\leftskip by -\defbodyindent 4387 \exdentamount=\defbodyindent 4388 {\df #1}\enskip % Generate function name 4389 } 4390 4391 % Actually process the body of a definition 4392 % #1 should be the terminating control sequence, such as \Edefun. 4393 % #2 should be the "another name" control sequence, such as \defunx. 4394 % #3 should be the control sequence that actually processes the header, 4395 % such as \defunheader. 4396 4397 \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody 4398 \medbreak % 4399 % Define the end token that this defining construct specifies 4400 % so that it will exit this group. 4401 \def#1{\endgraf\endgroup\medbreak}% 4402 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% 4403 \parindent=0in 4404 \advance\leftskip by \defbodyindent 4405 \exdentamount=\defbodyindent 4406 \begingroup % 4407 \catcode 61=\active % 61 is `=' 4408 \obeylines\activeparens\spacesplit#3} 4409 4971 % \defname, which formats the name of the @def (not the args). 4972 % #1 is the function name. 4973 % #2 is the type of definition, such as "Function". 4974 % 4975 \def\defname#1#2{% 4976 % How we'll output the type name. Putting it in brackets helps 4977 % distinguish it from the body text that may end up on the next line 4978 % just below it. 4979 \ifempty{#2}% 4980 \def\defnametype{}% 4981 \else 4982 \def\defnametype{[\rm #2]}% 4983 \fi 4984 % 4985 % Get the values of \leftskip and \rightskip as they were outside the @def... 4986 \dimen2=\leftskip 4987 \advance\dimen2 by -\defbodyindent 4988 % 4989 % Figure out values for the paragraph shape. 4990 \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% 4991 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line 4992 \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations 4993 \parshape 2 0in \dimen0 \defargsindent \dimen1 4994 % 4995 % Output arg 2 ("Function" or some such) but stuck inside a box of 4996 % width 0 so it does not interfere with linebreaking. 4997 \noindent 4998 % 4999 {% Adjust \hsize to exclude the ambient margins, 5000 % so that \rightline will obey them. 5001 \advance \hsize by -\dimen2 5002 \dimen3 = 0pt % was -1.25pc 5003 \rlap{\rightline{\defnametype\kern\dimen3}}% 5004 }% 5005 % 5006 % Allow all lines to be underfull without complaint: 5007 \tolerance=10000 \hbadness=10000 5008 \advance\leftskip by -\defbodyindent 5009 \exdentamount=\defbodyindent 5010 {\df #1}\enskip % output function name 5011 % \defunargs will be called next to output the arguments, if any. 5012 } 5013 5014 % Common pieces to start any @def... 4410 5015 % #1 is the \E... control sequence to end the definition (which we define). 4411 % #2 is the \...x control sequence for consecutive fns (which we define). 4412 % #3 is the control sequence to call to resume processing. 4413 % #4, delimited by the space, is the class name. 4414 % 4415 \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % 4416 \medbreak % 4417 % Define the end token that this defining construct specifies 4418 % so that it will exit this group. 4419 \def#1{\endgraf\endgroup\medbreak}% 4420 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% 4421 \parindent=0in 4422 \advance\leftskip by \defbodyindent 4423 \exdentamount=\defbodyindent 4424 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} 4425 4426 % Used for @deftypemethod and @deftypeivar. 4427 % #1 is the \E... control sequence to end the definition (which we define). 4428 % #2 is the \...x control sequence for consecutive fns (which we define). 4429 % #3 is the control sequence to call to resume processing. 4430 % #4, delimited by a space, is the class name. 4431 % #5 is the method's return type. 4432 % 4433 \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV 5016 % #2 is the \...x control sequence (which our caller defines). 5017 % #3 is the control sequence to process the header, such as \defunheader. 5018 % 5019 \def\parsebodycommon#1#2#3{% 5020 \begingroup\inENV 5021 % If there are two @def commands in a row, we'll have a \nobreak, 5022 % which is there to keep the function description together with its 5023 % header. But if there's nothing but headers, we want to allow a 5024 % break after all. Check for penalty 10002 (inserted by 5025 % \defargscommonending) instead of 10000, since the sectioning 5026 % commands insert a \penalty10000, and we don't want to allow a break 5027 % between a section heading and a defun. 5028 \ifnum\lastpenalty=10002 \penalty0 \fi 4434 5029 \medbreak 5030 % 5031 % Define the \E... end token that this defining construct specifies 5032 % so that it will exit this group. 4435 5033 \def#1{\endgraf\endgroup\medbreak}% 4436 \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%5034 % 4437 5035 \parindent=0in 4438 5036 \advance\leftskip by \defbodyindent 4439 5037 \exdentamount=\defbodyindent 4440 \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} 5038 } 5039 5040 % Common part of the \...x definitions. 5041 % 5042 \def\defxbodycommon{% 5043 % As with \parsebodycommon above, allow line break if we have multiple 5044 % x headers in a row. It's not a great place, though. 5045 \ifnum\lastpenalty=10000 \penalty1000 \fi 5046 % 5047 \begingroup\obeylines 5048 } 5049 5050 % Process body of @defun, @deffn, @defmac, etc. 5051 % 5052 \def\defparsebody#1#2#3{% 5053 \parsebodycommon{#1}{#2}{#3}% 5054 \def#2{\defxbodycommon \activeparens \spacesplit#3}% 5055 \catcode\equalChar=\active 5056 \begingroup\obeylines\activeparens 5057 \spacesplit#3% 5058 } 5059 5060 % #1, #2, #3 are the common arguments (see \parsebodycommon above). 5061 % #4, delimited by the space, is the class name. 5062 % 5063 \def\defmethparsebody#1#2#3#4 {% 5064 \parsebodycommon{#1}{#2}{#3}% 5065 \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% 5066 \begingroup\obeylines\activeparens 5067 % The \empty here prevents misinterpretation of a construct such as 5068 % @deffn {whatever} {Enharmonic comma} 5069 % See comments at \deftpparsebody, although in our case we don't have 5070 % to remove the \empty afterwards, since it is empty. 5071 \spacesplit{#3{#4}}\empty 5072 } 5073 5074 % Used for @deftypemethod and @deftypeivar. 5075 % #1, #2, #3 are the common arguments (see \defparsebody). 5076 % #4, delimited by a space, is the class name. 5077 % #5 is the method's return type. 5078 % 5079 \def\deftypemethparsebody#1#2#3#4 #5 {% 5080 \parsebodycommon{#1}{#2}{#3}% 5081 \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% 5082 \begingroup\obeylines\activeparens 5083 \spacesplit{#3{#4}{#5}}% 5084 } 4441 5085 4442 5086 % Used for @deftypeop. The change from \deftypemethparsebody is an … … 4447 5091 % the \E... definition to assign the category name to. 4448 5092 % 4449 \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV 4450 \medbreak 4451 \def#1{\endgraf\endgroup\medbreak}% 4452 \def#2##1 ##2 ##3 {% 4453 \def#4{##1}% 4454 \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% 4455 \parindent=0in 4456 \advance\leftskip by \defbodyindent 4457 \exdentamount=\defbodyindent 4458 \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} 4459 4460 \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % 4461 \medbreak % 4462 % Define the end token that this defining construct specifies 4463 % so that it will exit this group. 4464 \def#1{\endgraf\endgroup\medbreak}% 4465 \def#2##1 ##2 {\def#4{##1}% 4466 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% 4467 \parindent=0in 4468 \advance\leftskip by \defbodyindent 4469 \exdentamount=\defbodyindent 4470 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} 5093 \def\deftypeopparsebody#1#2#3#4#5 #6 {% 5094 \parsebodycommon{#1}{#2}{#3}% 5095 \def#2##1 ##2 ##3 {\def#4{##1}% 5096 \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% 5097 \begingroup\obeylines\activeparens 5098 \spacesplit{#3{#5}{#6}}% 5099 } 5100 5101 % For @defop. 5102 \def\defopparsebody #1#2#3#4#5 {% 5103 \parsebodycommon{#1}{#2}{#3}% 5104 \def#2##1 ##2 {\def#4{##1}% 5105 \defxbodycommon \activeparens \spacesplit{#3{##2}}}% 5106 \begingroup\obeylines\activeparens 5107 \spacesplit{#3{#5}}% 5108 } 4471 5109 4472 5110 % These parsing functions are similar to the preceding ones 4473 5111 % except that they do not make parens into active characters. 4474 5112 % These are used for "variables" since they have no arguments. 4475 4476 \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody 4477 \medbreak % 4478 % Define the end token that this defining construct specifies 4479 % so that it will exit this group. 4480 \def#1{\endgraf\endgroup\medbreak}% 4481 \def#2{\begingroup\obeylines\spacesplit#3}% 4482 \parindent=0in 4483 \advance\leftskip by \defbodyindent 4484 \exdentamount=\defbodyindent 4485 \begingroup % 4486 \catcode 61=\active % 4487 \obeylines\spacesplit#3} 4488 4489 % This is used for \def{tp,vr}parsebody. It could probably be used for 4490 % some of the others, too, with some judicious conditionals. 4491 % 4492 \def\parsebodycommon#1#2#3{% 4493 \begingroup\inENV % 4494 \medbreak % 4495 % Define the end token that this defining construct specifies 4496 % so that it will exit this group. 4497 \def#1{\endgraf\endgroup\medbreak}% 4498 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% 4499 \parindent=0in 4500 \advance\leftskip by \defbodyindent 4501 \exdentamount=\defbodyindent 5113 % 5114 \def\defvarparsebody #1#2#3{% 5115 \parsebodycommon{#1}{#2}{#3}% 5116 \def#2{\defxbodycommon \spacesplit#3}% 5117 \catcode\equalChar=\active 4502 5118 \begingroup\obeylines 5119 \spacesplit#3% 5120 } 5121 5122 % @defopvar. 5123 \def\defopvarparsebody #1#2#3#4#5 {% 5124 \parsebodycommon{#1}{#2}{#3}% 5125 \def#2##1 ##2 {\def#4{##1}% 5126 \defxbodycommon \spacesplit{#3{##2}}}% 5127 \begingroup\obeylines 5128 \spacesplit{#3{#5}}% 4503 5129 } 4504 5130 4505 5131 \def\defvrparsebody#1#2#3#4 {% 4506 5132 \parsebodycommon{#1}{#2}{#3}% 5133 \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% 5134 \begingroup\obeylines 4507 5135 \spacesplit{#3{#4}}% 4508 5136 } … … 4519 5147 \def\deftpparsebody #1#2#3#4 {% 4520 5148 \parsebodycommon{#1}{#2}{#3}% 5149 \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% 5150 \begingroup\obeylines 4521 5151 \spacesplit{\parsetpheaderline{#3{#4}}}\empty 4522 5152 } … … 4535 5165 }% 4536 5166 4537 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % 4538 \medbreak % 4539 % Define the end token that this defining construct specifies 4540 % so that it will exit this group. 4541 \def#1{\endgraf\endgroup\medbreak}% 4542 \def#2##1 ##2 {\def#4{##1}% 4543 \begingroup\obeylines\spacesplit{#3{##2}}}% 4544 \parindent=0in 4545 \advance\leftskip by \defbodyindent 4546 \exdentamount=\defbodyindent 4547 \begingroup\obeylines\spacesplit{#3{#5}}} 4548 4549 % Split up #2 at the first space token. 5167 % Split up #2 (the rest of the input line) at the first space token. 4550 5168 % call #1 with two arguments: 4551 5169 % the first is all of #2 before the space token, … … 4553 5171 % If #2 contains no space token, all of it is passed as the first arg 4554 5172 % and the second is passed as empty. 4555 4556 {\obeylines 4557 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% 4558 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% 4559 \ifx\relax #3% 4560 #1{#2}{}\else #1{#2}{#3#4}\fi}} 4561 4562 % So much for the things common to all kinds of definitions. 5173 % 5174 {\obeylines % 5175 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% 5176 \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% 5177 \ifx\relax #3% 5178 #1{#2}{}% 5179 \else % 5180 #1{#2}{#3#4}% 5181 \fi}% 5182 } 4563 5183 4564 5184 % Define @defun. 4565 5185 4566 % First, define the processing that is wanted for arguments of \defun 4567 % Use this to expand the args and terminate the paragraph they make up 4568 5186 % This is called to end the arguments processing for all the @def... commands. 5187 % 5188 \def\defargscommonending{% 5189 \interlinepenalty = 10000 5190 \advance\rightskip by 0pt plus 1fil 5191 \endgraf 5192 \nobreak\vskip -\parskip 5193 \penalty 10002 % signal to \parsebodycommon. 5194 } 5195 5196 % This expands the args and terminates the paragraph they comprise. 5197 % 4569 5198 \def\defunargs#1{\functionparens \sl 4570 5199 % Expand, preventing hyphenation at `-' chars. … … 4575 5204 {\tensl\hyphenchar\font=45}% 4576 5205 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% 4577 \interlinepenalty=10000 4578 \advance\rightskip by 0pt plus 1fil 4579 \endgraf\nobreak\vskip -\parskip\nobreak 5206 \defargscommonending 4580 5207 } 4581 5208 … … 4586 5213 \boldbraxnoamp 4587 5214 \tclose{#1}% avoid \code because of side effects on active chars 4588 \interlinepenalty=10000 4589 \advance\rightskip by 0pt plus 1fil 4590 \endgraf\nobreak\vskip -\parskip\nobreak 5215 \defargscommonending 4591 5216 } 4592 5217 … … 4599 5224 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% 4600 5225 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % 4601 \catcode 61=\other % Turn off change made in \defparsebody5226 \catcode\equalChar=\other % Turn off change made in \defparsebody 4602 5227 } 4603 5228 … … 4609 5234 \begingroup\defname {#1}{\putwordDeffunc}% 4610 5235 \defunargs {#2}\endgroup % 4611 \catcode 61=\other % Turn off change made in \defparsebody5236 \catcode\equalChar=\other % Turn off change made in \defparsebody 4612 5237 } 4613 5238 … … 4621 5246 \def\deftypefunheaderx #1#2 #3\relax{% 4622 5247 \doind {fn}{\code{#2}}% Make entry in function index 4623 \begingroup\defname {\defheaderxcond#1\relax$ $$#2}{\putwordDeftypefun}%5248 \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% 4624 5249 \deftypefunargs {#3}\endgroup % 4625 \catcode 61=\other % Turn off change made in \defparsebody5250 \catcode\equalChar=\other % Turn off change made in \defparsebody 4626 5251 } 4627 5252 … … 4630 5255 \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} 4631 5256 4632 % \defheaderxcond#1\relax$ $$5257 % \defheaderxcond#1\relax$.$ 4633 5258 % puts #1 in @code, followed by a space, but does nothing if #1 is null. 4634 \def\defheaderxcond#1#2$ $${\ifx#1\relax\else\code{#1#2} \fi}5259 \def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi} 4635 5260 4636 5261 % #1 is the classification. #2 is the data type. #3 is the name and args. … … 4642 5267 \normalparens % notably, turn off `&' magic, which prevents 4643 5268 % at least some C++ text from working 4644 \defname {\defheaderxcond#2\relax$ $$#3}{#1}%5269 \defname {\defheaderxcond#2\relax$.$#3}{#1}% 4645 5270 \deftypefunargs {#4}\endgroup % 4646 \catcode 61=\other % Turn off change made in \defparsebody5271 \catcode\equalChar=\other % Turn off change made in \defparsebody 4647 5272 } 4648 5273 … … 4654 5279 \begingroup\defname {#1}{\putwordDefmac}% 4655 5280 \defunargs {#2}\endgroup % 4656 \catcode 61=\other % Turn off change made in \defparsebody5281 \catcode\equalChar=\other % Turn off change made in \defparsebody 4657 5282 } 4658 5283 … … 4664 5289 \begingroup\defname {#1}{\putwordDefspec}% 4665 5290 \defunargs {#2}\endgroup % 4666 \catcode 61=\other % Turn off change made in \defparsebody5291 \catcode\equalChar=\other % Turn off change made in \defparsebody 4667 5292 } 4668 5293 … … 4673 5298 % 4674 5299 \def\defopheader#1#2#3{% 4675 \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index 4676 \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% 4677 \defunargs {#3}\endgroup % 5300 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry 5301 \begingroup 5302 \defname{#2}{\defoptype\ \putwordon\ #1}% 5303 \defunargs{#3}% 5304 \endgroup 4678 5305 } 4679 5306 … … 4688 5315 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index 4689 5316 \begingroup 4690 \defname{\defheaderxcond#2\relax$ $$#3}5317 \defname{\defheaderxcond#2\relax$.$#3} 4691 5318 {\deftypeopcategory\ \putwordon\ \code{#1}}% 4692 5319 \deftypefunargs{#4}% … … 4703 5330 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index 4704 5331 \begingroup 4705 \defname{\defheaderxcond#2\relax$ $$#3}{\putwordMethodon\ \code{#1}}%5332 \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}% 4706 5333 \deftypefunargs{#4}% 4707 5334 \endgroup … … 4717 5344 \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index 4718 5345 \begingroup 4719 \defname{\defheaderxcond#2\relax$ $$#3}5346 \defname{\defheaderxcond#2\relax$.$#3} 4720 5347 {\putwordInstanceVariableof\ \code{#1}}% 4721 5348 \defvarargs{#3}% … … 4742 5369 4743 5370 \def\defcvarheader #1#2#3{% 4744 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index 4745 \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% 4746 \defvarargs {#3}\endgroup % 5371 \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry 5372 \begingroup 5373 \defname{#2}{\defcvtype\ \putwordof\ #1}% 5374 \defvarargs{#3}% 5375 \endgroup 4747 5376 } 4748 5377 … … 4752 5381 % 4753 5382 \def\defivarheader#1#2#3{% 4754 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index5383 \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index 4755 5384 \begingroup 4756 5385 \defname{#2}{\putwordInstanceVariableof\ #1}% … … 4764 5393 % This must expand the args and terminate the paragraph they make up 4765 5394 \def\defvarargs #1{\normalparens #1% 4766 \interlinepenalty=10000 4767 \endgraf\nobreak\vskip -\parskip\nobreak}5395 \defargscommonending 5396 } 4768 5397 4769 5398 % @defvr Counter foo-count … … 4800 5429 \def\deftypevarheader #1#2{% 4801 5430 \dovarind#2 \relax% Make entry in variables index 4802 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% 4803 \interlinepenalty=10000 4804 \endgraf\nobreak\vskip -\parskip\nobreak 5431 \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% 5432 \defargscommonending 4805 5433 \endgroup} 4806 5434 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} … … 4811 5439 4812 5440 \def\deftypevrheader #1#2#3{\dovarind#3 \relax% 4813 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} 4814 \interlinepenalty=10000 4815 \endgraf\nobreak\vskip -\parskip\nobreak 5441 \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} 5442 \defargscommonending 4816 5443 \endgroup} 4817 5444 … … 4862 5489 \begingroup \newlinechar`\^^M 4863 5490 % Undo catcode changes of \startcontents and \doprintindex 4864 \catcode`\@=0 \catcode`\\= 12\escapechar=`\@5491 \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ 4865 5492 % Append \endinput to make sure that TeX does not see the ending newline. 4866 5493 \toks0={#1\endinput}% … … 4876 5503 \begingroup \newlinechar`\^^M 4877 5504 % Undo catcode changes of \startcontents and \doprintindex 4878 \catcode`\@=0 \catcode`\\= 12\escapechar=`\@5505 \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ 4879 5506 \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} 4880 5507 \fi … … 4906 5533 4907 5534 % Trim a single trailing ^^M off a string. 4908 {\catcode`\^^M= 12\catcode`\Q=3%5535 {\catcode`\^^M=\other \catcode`\Q=3% 4909 5536 \gdef\eatcr #1{\eatcra #1Q^^MQ}% 4910 5537 \gdef\eatcra#1^^MQ{\eatcrb#1Q}% … … 4921 5548 4922 5549 \def\macrobodyctxt{% 4923 \catcode`\~= 124924 \catcode`\^= 124925 \catcode`\_= 124926 \catcode`\|= 124927 \catcode`\<= 124928 \catcode`\>= 124929 \catcode`\+= 124930 \catcode`\{= 124931 \catcode`\}= 124932 \catcode`\@= 124933 \catcode`\^^M= 125550 \catcode`\~=\other 5551 \catcode`\^=\other 5552 \catcode`\_=\other 5553 \catcode`\|=\other 5554 \catcode`\<=\other 5555 \catcode`\>=\other 5556 \catcode`\+=\other 5557 \catcode`\{=\other 5558 \catcode`\}=\other 5559 \catcode`\@=\other 5560 \catcode`\^^M=\other 4934 5561 \usembodybackslash} 4935 5562 4936 5563 \def\macroargctxt{% 4937 \catcode`\~= 124938 \catcode`\^= 124939 \catcode`\_= 124940 \catcode`\|= 124941 \catcode`\<= 124942 \catcode`\>= 124943 \catcode`\+= 124944 \catcode`\@= 124945 \catcode`\\= 12}5564 \catcode`\~=\other 5565 \catcode`\^=\other 5566 \catcode`\_=\other 5567 \catcode`\|=\other 5568 \catcode`\<=\other 5569 \catcode`\>=\other 5570 \catcode`\+=\other 5571 \catcode`\@=\other 5572 \catcode`\\=\other} 4946 5573 4947 5574 % \mbodybackslash is the definition of \ in @macro bodies. … … 4971 5598 \else 4972 5599 \expandafter\ifx\csname \the\macname\endcsname \relax 4973 \else \errmessage{ The name \the\macname\space is reserved}\fi5600 \else \errmessage{Macro name \the\macname\space already defined}\fi 4974 5601 \global\cslet{macsave.\the\macname}{\the\macname}% 4975 5602 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% … … 4984 5611 \fi} 4985 5612 4986 \def\unmacro{\parsearg\ unmacroxxx}4987 \def\ unmacroxxx#1{%5613 \def\unmacro{\parsearg\dounmacro} 5614 \def\dounmacro#1{% 4988 5615 \if1\csname ismacro.#1\endcsname 4989 5616 \global\cslet{#1}{macsave.#1}% 4990 5617 \global\expandafter\let \csname ismacro.#1\endcsname=0% 4991 % Remove the macro name from \macrolist 5618 % Remove the macro name from \macrolist: 4992 5619 \begingroup 4993 \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% 4994 \def\do##1{% 4995 \def\tempb{##1}% 4996 \ifx\tempa\tempb 4997 % remove this 4998 \else 4999 \toks0 = \expandafter{\newmacrolist\do}% 5000 \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% 5001 \fi}% 5002 \def\newmacrolist{}% 5003 % Execute macro list to define \newmacrolist 5004 \macrolist 5005 \global\let\macrolist\newmacrolist 5620 \expandafter\let\csname#1\endcsname \relax 5621 \let\do\unmacrodo 5622 \xdef\macrolist{\macrolist}% 5006 5623 \endgroup 5007 5624 \else 5008 5625 \errmessage{Macro #1 not defined}% 5626 \fi 5627 } 5628 5629 % Called by \do from \dounmacro on each macro. The idea is to omit any 5630 % macro definitions that have been changed to \relax. 5631 % 5632 \def\unmacrodo#1{% 5633 \ifx#1\relax 5634 % remove this 5635 \else 5636 \noexpand\do \noexpand #1% 5009 5637 \fi 5010 5638 } … … 5192 5820 \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} 5193 5821 5194 % \setref{NAME}{SNT} defines a cross-reference point NAME, namely 5195 % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have 5196 % to set \indexdummies so commands such as @code in a section title 5197 % aren't expanded. It would be nicer not to expand the titles in the 5198 % first place, but there's so many layers that that is hard to do. 5199 % 5822 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an 5823 % anchor), namely NAME-title (the corresponding @chapter/etc. name), 5824 % NAME-pg (the page number), and NAME-snt (section number and type). 5825 % Called from \foonoderef. 5826 % 5827 % We have to set \indexdummies so commands such as @code in a section 5828 % title aren't expanded. It would be nicer not to expand the titles in 5829 % the first place, but there's so many layers that that is hard to do. 5830 % 5831 % Likewise, use \turnoffactive so that punctuation chars such as underscore 5832 % and backslash work in node names. 5833 % 5200 5834 \def\setref#1#2{{% 5201 \ indexdummies5835 \atdummies 5202 5836 \pdfmkdest{#1}% 5837 % 5838 \turnoffactive 5203 5839 \dosetq{#1-title}{Ytitle}% 5204 5840 \dosetq{#1-pg}{Ypagenumber}% … … 5252 5888 \leavevmode 5253 5889 \getfilename{#4}% 5254 \ifnum\filenamelength>0 5255 \startlink attr{/Border [0 0 0]}% 5256 goto file{\the\filename.pdf} name{#1@}% 5257 \else 5258 \startlink attr{/Border [0 0 0]}% 5259 goto name{#1@}% 5260 \fi 5890 {\turnoffactive \otherbackslash 5891 \ifnum\filenamelength>0 5892 \startlink attr{/Border [0 0 0]}% 5893 goto file{\the\filename.pdf} name{#1}% 5894 \else 5895 \startlink attr{/Border [0 0 0]}% 5896 goto name{#1}% 5897 \fi 5898 }% 5261 5899 \linkcolor 5262 5900 \fi … … 5270 5908 % printing. So we \turnoffactive for the \refx-snt, back on for the 5271 5909 % printing, back off for the \refx-pg. 5272 {\ normalturnoffactive5910 {\turnoffactive \otherbackslash 5273 5911 % Only output a following space if the -snt ref is nonempty; for 5274 5912 % @unnumbered and @anchor, it won't be. … … 5279 5917 [\printednodename],\space 5280 5918 % page 3 5281 \turnoffactive \ putwordpage\tie\refx{#1-pg}{}%5919 \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% 5282 5920 \fi 5283 5921 \endlink 5284 5922 \endgroup} 5285 5923 5286 % \dosetq is the interface for calls from other macros 5287 5288 % Use \normalturnoffactive so that punctuation chars such as underscore 5289 % and backslash work in node names. (\turnoffactive doesn't do \.) 5924 % \dosetq is called from \setref to do the actual \write (\iflinks). 5925 % 5290 5926 \def\dosetq#1#2{% 5291 5927 {\let\folio=0% 5292 \normalturnoffactive5293 5928 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% 5294 \iflinks 5295 \next 5296 \fi 5929 \iflinks \next \fi 5297 5930 }% 5298 5931 } 5299 5932 5300 % \internalsetq {foo}{page} expands into 5301 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} 5302 % When the aux file is read, ' is the escape character 5303 5304 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} 5305 5306 % Things to be expanded by \internalsetq 5307 5933 % \internalsetq{foo}{page} expands into 5934 % CHARACTERS @xrdef{foo}{...expansion of \page...} 5935 \def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} 5936 5937 % Things to be expanded by \internalsetq. 5938 % 5308 5939 \def\Ypagenumber{\folio} 5309 5310 5940 \def\Ytitle{\thissection} 5311 5312 5941 \def\Ynothing{} 5313 5314 5942 \def\Ysectionnumberandtype{% 5315 \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % 5316 \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % 5317 \else \ifnum \subsubsecno=0 % 5318 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % 5319 \else % 5320 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % 5321 \fi \fi \fi } 5943 \ifnum\secno=0 5944 \putwordChapter@tie \the\chapno 5945 \else \ifnum\subsecno=0 5946 \putwordSection@tie \the\chapno.\the\secno 5947 \else \ifnum\subsubsecno=0 5948 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno 5949 \else 5950 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno 5951 \fi\fi\fi 5952 } 5322 5953 5323 5954 \def\Yappendixletterandtype{% 5324 \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% 5325 \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % 5326 \else \ifnum \subsubsecno=0 % 5327 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % 5328 \else % 5329 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % 5330 \fi \fi \fi } 5331 5332 \gdef\xreftie{'tie} 5955 \ifnum\secno=0 5956 \putwordAppendix@tie @char\the\appendixno{}% 5957 \else \ifnum\subsecno=0 5958 \putwordSection@tie @char\the\appendixno.\the\secno 5959 \else \ifnum\subsubsecno=0 5960 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno 5961 \else 5962 \putwordSection@tie 5963 @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno 5964 \fi\fi\fi 5965 } 5333 5966 5334 5967 % Use TeX 3.0's \inputlineno to get the line number, for better error … … 5336 5969 % 5337 5970 \ifx\inputlineno\thisisundefined 5338 \let\linenumber = \empty % Non-3.0.5971 \let\linenumber = \empty % Pre-3.0. 5339 5972 \else 5340 5973 \def\linenumber{\the\inputlineno:\space} … … 5343 5976 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. 5344 5977 % If its value is nonempty, SUFFIX is output afterward. 5345 5978 % 5346 5979 \def\refx#1#2{% 5347 \expandafter\ifx\csname X#1\endcsname\relax 5980 {% 5981 \indexnofonts 5982 \otherbackslash 5983 \expandafter\global\expandafter\let\expandafter\thisrefX 5984 \csname X#1\endcsname 5985 }% 5986 \ifx\thisrefX\relax 5348 5987 % If not defined, say something at least. 5349 5988 \angleleft un\-de\-fined\angleright … … 5360 5999 \else 5361 6000 % It's defined, so just use it. 5362 \ csname X#1\endcsname6001 \thisrefX 5363 6002 \fi 5364 6003 #2% Output the suffix in any case. … … 5367 6006 % This is the macro invoked by entries in the aux file. 5368 6007 % 5369 \def\xrdef#1{\begingroup 5370 % Reenable \ as an escape while reading the second argument. 5371 \catcode`\\ = 0 5372 \afterassignment\endgroup 5373 \expandafter\gdef\csname X#1\endcsname 5374 } 6008 \def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} 5375 6009 5376 6010 % Read the last existing aux file, if any. No error if none exists. … … 5403 6037 \catcode`\^^^=\other 5404 6038 \catcode`\^^_=\other 5405 \catcode`\@=\other 5406 \catcode`\^=\other 5407 % It was suggested to define this as 7, which would allow ^^e4 etc. 6039 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. 5408 6040 % in xref tags, i.e., node names. But since ^^e4 notation isn't 5409 6041 % supported in the main text, it doesn't seem desirable. Furthermore, … … 5418 6050 % and then to call \auxhat in \setq. 5419 6051 % 6052 \catcode`\^=\other 6053 % 6054 % Special characters. Should be turned off anyway, but... 5420 6055 \catcode`\~=\other 5421 6056 \catcode`\[=\other … … 5429 6064 \catcode`\#=\other 5430 6065 \catcode`\&=\other 6066 \catcode`\%=\other 5431 6067 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off 6068 % 5432 6069 % Make the characters 128-255 be printing characters 5433 6070 {% … … 5439 6076 }% 5440 6077 }% 5441 % The aux file uses ' as the escape (for now).6078 % 5442 6079 % Turn off \ as an escape so we do not lose on 5443 6080 % entries which were dumped with control sequences in their names. 5444 % For example, 'xrdef{$\leq $-fun}{page ...} made by @defun ^^6081 % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ 5445 6082 % Reference to such entries still does not work the way one would wish, 5446 6083 % but at least they do not bomb out when the aux file is read in. 6084 \catcode`\\=\other 6085 % 6086 % @ is our escape character in .aux files. 5447 6087 \catcode`\{=1 5448 6088 \catcode`\}=2 5449 \catcode`\%=\other 5450 \catcode`\'=0 5451 \catcode`\\=\other 6089 \catcode`\@=0 5452 6090 % 5453 6091 \openin 1 \jobname.aux … … 5494 6132 \unskip 5495 6133 \thisfootno\@sf 5496 \ footnotezzz6134 \dofootnote 5497 6135 }% 5498 6136 … … 5504 6142 % the footnote is read. --karl, 16nov96. 5505 6143 % 5506 \long\gdef\footnotezzz{\insert\footins\bgroup 6144 % The start of the footnote looks usually like this: 6145 \gdef\startfootins{\insert\footins\bgroup} 6146 % 6147 % ... but this macro is redefined inside @multitable. 6148 % 6149 \gdef\dofootnote{% 6150 \startfootins 5507 6151 % We want to typeset this text as a normal paragraph, even if the 5508 6152 % footnote reference occurs in (for example) a display environment. 5509 6153 % So reset some parameters. 6154 \hsize=\pagewidth 5510 6155 \interlinepenalty\interfootnotelinepenalty 5511 6156 \splittopskip\ht\strutbox % top baseline for broken footnotes … … 5520 6165 \smallfonts \rm 5521 6166 % 5522 % Hang the footnote text off the number. 5523 \hang 6167 % Because we use hanging indentation in footnotes, a @noindent appears 6168 % to exdent this text, so make it be a no-op. makeinfo does not use 6169 % hanging indentation so @noindent can still be needed within footnote 6170 % text after an @example or the like (not that this is good style). 6171 \let\noindent = \relax 6172 % 6173 % Hang the footnote text off the number. Use \everypar in case the 6174 % footnote extends for more than one paragraph. 6175 \everypar = {\hang}% 5524 6176 \textindent{\thisfootno}% 5525 6177 % … … 5530 6182 \futurelet\next\fo@t 5531 6183 } 5532 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t5533 \else\let\next\f@t\fi \next}5534 \def\f@@t{\bgroup\aftergroup\@foot\let\next}5535 \def\f@t#1{#1\@foot}5536 \def\@foot{\strut\par\egroup}5537 5538 6184 }%end \catcode `\@=11 5539 5540 % Set the baselineskip to #1, and the lineskip and strut size5541 % correspondingly. There is no deep meaning behind these magic numbers5542 % used as factors; they just match (closely enough) what Knuth defined.5543 %5544 \def\lineskipfactor{.08333}5545 \def\strutheightpercent{.70833}5546 \def\strutdepthpercent {.29167}5547 %5548 \def\setleading#1{%5549 \normalbaselineskip = #1\relax5550 \normallineskip = \lineskipfactor\normalbaselineskip5551 \normalbaselines5552 \setbox\strutbox =\hbox{%5553 \vrule width0pt height\strutheightpercent\baselineskip5554 depth \strutdepthpercent \baselineskip5555 }%5556 }5557 6185 5558 6186 % @| inserts a changebar to the left of the current line. It should … … 5600 6228 \ifeof 1 \else 5601 6229 \closein 1 5602 % Do not bother showing banner with post-v2.7 epsf.tex(available in5603 % doc/epsf.tex until it shows upon ctan).6230 % Do not bother showing banner with epsf.tex v2.7k (available in 6231 % doc/epsf.tex and on ctan). 5604 6232 \def\epsfannounce{\toks0 = }% 5605 6233 \input epsf.tex … … 5620 6248 \fi 5621 6249 \else 5622 \imagexxx #1,,, \finish6250 \imagexxx #1,,,,,\finish 5623 6251 \fi 5624 6252 } … … 5627 6255 % #1 is (mandatory) image filename; we tack on .eps extension. 5628 6256 % #2 is (optional) width, #3 is (optional) height. 5629 % #4 is just the usual extra ignored arg for parsing this stuff. 5630 \def\imagexxx#1,#2,#3,#4\finish{% 6257 % #4 is (ignored optional) html alt text. 6258 % #5 is (ignored optional) extension. 6259 % #6 is just the usual extra ignored arg for parsing this stuff. 6260 \newif\ifimagevmode 6261 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup 6262 \catcode`\^^M = 5 % in case we're inside an example 6263 \normalturnoffactive % allow _ et al. in names 6264 % If the image is by itself, center it. 6265 \ifvmode 6266 \imagevmodetrue 6267 \nobreak\bigskip 6268 % Usually we'll have text after the image which will insert 6269 % \parskip glue, so insert it here too to equalize the space 6270 % above and below. 6271 \nobreak\vskip\parskip 6272 \nobreak 6273 \line\bgroup\hss 6274 \fi 6275 % 6276 % Output the image. 5631 6277 \ifpdf 5632 \ centerline{\dopdfimage{#1}{#2}{#3}}%6278 \dopdfimage{#1}{#2}{#3}% 5633 6279 \else 5634 6280 % \epsfbox itself resets \epsf?size at each figure. 5635 6281 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi 5636 6282 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi 5637 \begingroup 5638 \catcode`\^^M = 5 % in case we're inside an example 5639 % If the image is by itself, center it. 5640 \ifvmode 5641 \nobreak\bigskip 5642 % Usually we'll have text after the image which will insert 5643 % \parskip glue, so insert it here too to equalize the space 5644 % above and below. 5645 \nobreak\vskip\parskip 5646 \nobreak 5647 \centerline{\epsfbox{#1.eps}}% 5648 \bigbreak 5649 \else 5650 % In the middle of a paragraph, no extra space. 5651 \epsfbox{#1.eps}% 5652 \fi 5653 \endgroup 6283 \epsfbox{#1.eps}% 5654 6284 \fi 5655 } 6285 % 6286 \ifimagevmode \hss \egroup \bigbreak \fi % space after the image 6287 \endgroup} 5656 6288 5657 6289 … … 5722 6354 5723 6355 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; 5724 % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can 5725 % set \parskip and call \setleading for \baselineskip. 5726 % 5727 \def\internalpagesizes#1#2#3#4#5#6{% 6356 % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) 6357 % physical page width. 6358 % 6359 % We also call \setleading{\textleading}, so the caller should define 6360 % \textleading. The caller should also set \parskip. 6361 % 6362 \def\internalpagesizes#1#2#3#4#5#6#7#8{% 5728 6363 \voffset = #3\relax 5729 6364 \topskip = #6\relax … … 5744 6379 \bindingoffset = #5\relax 5745 6380 % 6381 \ifpdf 6382 \pdfpageheight #7\relax 6383 \pdfpagewidth #8\relax 6384 \fi 6385 % 6386 \setleading{\textleading} 6387 % 5746 6388 \parindent = \defaultparindent 5747 6389 \setemergencystretch … … 5751 6393 \def\letterpaper{{\globaldefs = 1 5752 6394 \parskip = 3pt plus 2pt minus 1pt 5753 \ setleading{13.2pt}%6395 \textleading = 13.2pt 5754 6396 % 5755 6397 % If page is nothing but text, make it come out even. 5756 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% 6398 \internalpagesizes{46\baselineskip}{6in}% 6399 {\voffset}{.25in}% 6400 {\bindingoffset}{36pt}% 6401 {11in}{8.5in}% 5757 6402 }} 5758 6403 … … 5760 6405 \def\smallbook{{\globaldefs = 1 5761 6406 \parskip = 2pt plus 1pt 5762 \setleading{12pt}% 5763 % 5764 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% 6407 \textleading = 12pt 6408 % 6409 \internalpagesizes{7.5in}{5in}% 6410 {\voffset}{.25in}% 6411 {\bindingoffset}{16pt}% 6412 {9.25in}{7in}% 5765 6413 % 5766 6414 \lispnarrowing = 0.3in … … 5768 6416 \hfuzz = 1pt 5769 6417 \contentsrightmargin = 0pt 5770 \deftypemargin = 0pt5771 6418 \defbodyindent = .5cm 5772 %5773 \let\smalldisplay = \smalldisplayx5774 \let\smallexample = \smalllispx5775 \let\smallformat = \smallformatx5776 \let\smalllisp = \smalllispx5777 6419 }} 5778 6420 5779 6421 % Use @afourpaper to print on European A4 paper. 5780 6422 \def\afourpaper{{\globaldefs = 1 5781 \setleading{12pt}%5782 6423 \parskip = 3pt plus 2pt minus 1pt 5783 % 5784 \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% 6424 \textleading = 13.2pt 6425 % 6426 % Double-side printing via postscript on Laserjet 4050 6427 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. 6428 % To change the settings for a different printer or situation, adjust 6429 % \normaloffset until the front-side and back-side texts align. Then 6430 % do the same for \bindingoffset. You can set these for testing in 6431 % your texinfo source file like this: 6432 % @tex 6433 % \global\normaloffset = -6mm 6434 % \global\bindingoffset = 10mm 6435 % @end tex 6436 \internalpagesizes{51\baselineskip}{160mm} 6437 {\voffset}{\hoffset}% 6438 {\bindingoffset}{44pt}% 6439 {297mm}{210mm}% 5785 6440 % 5786 6441 \tolerance = 700 5787 6442 \hfuzz = 1pt 6443 \contentsrightmargin = 0pt 6444 \defbodyindent = 5mm 5788 6445 }} 5789 6446 5790 % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin 5791 % 29mm, hence bottom margin 28mm, nominal side margin 3cm. 6447 % Use @afivepaper to print on European A5 paper. 6448 % From romildo@urano.iceb.ufop.br, 2 July 2000. 6449 % He also recommends making @example and @lisp be small. 6450 \def\afivepaper{{\globaldefs = 1 6451 \parskip = 2pt plus 1pt minus 0.1pt 6452 \textleading = 12.5pt 6453 % 6454 \internalpagesizes{160mm}{120mm}% 6455 {\voffset}{\hoffset}% 6456 {\bindingoffset}{8pt}% 6457 {210mm}{148mm}% 6458 % 6459 \lispnarrowing = 0.2in 6460 \tolerance = 800 6461 \hfuzz = 1.2pt 6462 \contentsrightmargin = 0pt 6463 \defbodyindent = 2mm 6464 \tableindent = 12mm 6465 }} 6466 6467 % A specific text layout, 24x15cm overall, intended for A4 paper. 5792 6468 \def\afourlatex{{\globaldefs = 1 5793 \setleading{13.6pt}%5794 %5795 6469 \afourpaper 5796 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% 5797 % 6470 \internalpagesizes{237mm}{150mm}% 6471 {\voffset}{4.6mm}% 6472 {\bindingoffset}{7mm}% 6473 {297mm}{210mm}% 6474 % 6475 % Must explicitly reset to 0 because we call \afourpaper. 5798 6476 \globaldefs = 0 5799 6477 }} 5800 6478 5801 % Use @afourwide to print on European A4 paper in wide format.5802 \def\afourwide{ %6479 % Use @afourwide to print on A4 paper in landscape format. 6480 \def\afourwide{{\globaldefs = 1 5803 6481 \afourpaper 5804 \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% 5805 % 6482 \internalpagesizes{241mm}{165mm}% 6483 {\voffset}{-2.95mm}% 6484 {\bindingoffset}{7mm}% 6485 {297mm}{210mm}% 5806 6486 \globaldefs = 0 5807 } 6487 }} 5808 6488 5809 6489 % @pagesizes TEXTHEIGHT[,TEXTWIDTH] … … 5818 6498 % 5819 6499 \parskip = 3pt plus 2pt minus 1pt 5820 \setleading{13.2pt}% 5821 % 5822 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% 6500 \setleading{\textleading}% 6501 % 6502 \dimen0 = #1 6503 \advance\dimen0 by \voffset 6504 % 6505 \dimen2 = \hsize 6506 \advance\dimen2 by \normaloffset 6507 % 6508 \internalpagesizes{#1}{\hsize}% 6509 {\voffset}{\normaloffset}% 6510 {\bindingoffset}{44pt}% 6511 {\dimen0}{\dimen2}% 5823 6512 }} 5824 6513 … … 5848 6537 \def\normalgreater{>} 5849 6538 \def\normalplus{+} 5850 \def\normaldollar{$} 6539 \def\normaldollar{$}%$ font-lock fix 5851 6540 5852 6541 % This macro is used to make a character print one way in ttfont … … 5884 6573 \def_{\ifusingtt\normalunderscore\_} 5885 6574 % Subroutine for the previous macro. 5886 \def\_{\leavevmode \kern.0 6em \vbox{\hrule width.3em height.1ex}}6575 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } 5887 6576 5888 6577 \catcode`\|=\active … … 5897 6586 \def+{{\tt \char 43}} 5898 6587 \catcode`\$=\active 5899 \def${\ifusingit{{\sl\$}}\normaldollar} 5900 %\catcode 27=\active 5901 %\def^^[{$\diamondsuit$} 6588 \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix 5902 6589 5903 6590 % Set up an active definition for =, but don't enable it most of the time. … … 5916 6603 \catcode`\@=0 5917 6604 5918 % \rawbackslashxx output one backslash character in current font 6605 % \rawbackslashxx outputs one backslash character in current font, 6606 % as in \char`\\. 5919 6607 \global\chardef\rawbackslashxx=`\\ 5920 %{\catcode`\\=\other 5921 % @gdef@rawbackslashxx{\}}5922 5923 % \rawbackslash redefines \ as input to do \rawbackslashxx.6608 6609 % \rawbackslash defines an active \ to do \rawbackslashxx. 6610 % \otherbackslash defines an active \ to be a literal `\' character with 6611 % catcode other. 5924 6612 {\catcode`\\=\active 5925 @gdef@rawbackslash{@let\=@rawbackslashxx }} 6613 @gdef@rawbackslash{@let\=@rawbackslashxx} 6614 @gdef@otherbackslash{@let\=@realbackslash} 6615 } 6616 6617 % \realbackslash is an actual character `\' with catcode other. 6618 {\catcode`\\=\other @gdef@realbackslash{\}} 5926 6619 5927 6620 % \normalbackslash outputs one backslash in fixed width font. 5928 6621 \def\normalbackslash{{\tt\rawbackslashxx}} 5929 6622 5930 % \catcode 17=0 % Define control-q5931 6623 \catcode`\\=\active 5932 6624 5933 6625 % Used sometimes to turn off (effectively) the active characters 5934 6626 % even after parsing them. 5935 @def@turnoffactive{@let"=@normaldoublequote 5936 @let\=@realbackslash 5937 @let~=@normaltilde 5938 @let^=@normalcaret 5939 @let_=@normalunderscore 5940 @let|=@normalverticalbar 5941 @let<=@normalless 5942 @let>=@normalgreater 5943 @let+=@normalplus 5944 @let$=@normaldollar} 5945 5946 @def@normalturnoffactive{@let"=@normaldoublequote 5947 @let\=@normalbackslash 5948 @let~=@normaltilde 5949 @let^=@normalcaret 5950 @let_=@normalunderscore 5951 @let|=@normalverticalbar 5952 @let<=@normalless 5953 @let>=@normalgreater 5954 @let+=@normalplus 5955 @let$=@normaldollar} 6627 @def@turnoffactive{% 6628 @let"=@normaldoublequote 6629 @let\=@realbackslash 6630 @let~=@normaltilde 6631 @let^=@normalcaret 6632 @let_=@normalunderscore 6633 @let|=@normalverticalbar 6634 @let<=@normalless 6635 @let>=@normalgreater 6636 @let+=@normalplus 6637 @let$=@normaldollar %$ font-lock fix 6638 } 6639 6640 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of 6641 % the literal character `\'. (Thus, \ is not expandable when this is in 6642 % effect.) 6643 % 6644 @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} 5956 6645 5957 6646 % Make _ and + \other characters, temporarily. -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.