comparison man/texinfo.tex @ 175:2d532a89d707 r20-3b14

Import from CVS: tag r20-3b14
author cvs
date Mon, 13 Aug 2007 09:50:14 +0200
parents 360340f9fd5f
children bfd6434d15b3
comparison
equal deleted inserted replaced
174:bb3568571b84 175:2d532a89d707
1 %% TeX macros to handle texinfo files 1 %% TeX macros to handle Texinfo files.
2 %% $Id: texinfo.tex,v 1.3 1997/07/19 22:11:48 steve Exp $
2 3
3 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 4 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
4 % 94, 95, 1996 Free Software Foundation, Inc. 5 % 94, 95, 96, 97 Free Software Foundation, Inc.
5 6
6 %This texinfo.tex file is free software; you can redistribute it and/or 7 %This texinfo.tex file is free software; you can redistribute it and/or
7 %modify it under the terms of the GNU General Public License as 8 %modify it under the terms of the GNU General Public License as
8 %published by the Free Software Foundation; either version 2, or (at 9 %published by the Free Software Foundation; either version 2, or (at
9 %your option) any later version. 10 %your option) any later version.
33 % Added by gildea November 1993. 34 % Added by gildea November 1993.
34 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 35 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
35 36
36 % This automatically updates the version number based on RCS. 37 % This automatically updates the version number based on RCS.
37 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} 38 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
38 \deftexinfoversion$Revision: 1.2 $ 39 \deftexinfoversion$Revision: 1.3 $
39 \message{Loading texinfo package [Version \texinfoversion]:} 40 \message{Loading texinfo package [Version \texinfoversion]:}
40 41
41 % If in a .fmt file, print the version number 42 % If in a .fmt file, print the version number
42 % and turn on active characters that we couldn't do earlier because 43 % and turn on active characters that we couldn't do earlier because
43 % they might have appeared in the input file name. 44 % they might have appeared in the input file name.
57 \let\ptexi=\i 58 \let\ptexi=\i
58 \let\ptexlbrace=\{ 59 \let\ptexlbrace=\{
59 \let\ptexrbrace=\} 60 \let\ptexrbrace=\}
60 \let\ptexstar=\* 61 \let\ptexstar=\*
61 \let\ptext=\t 62 \let\ptext=\t
62 \let\ptextilde=\~
63 63
64 % Be sure we're in horizontal mode when doing a tie, since we make space 64 % Be sure we're in horizontal mode when doing a tie, since we make space
65 % equivalent to this in @example-like environments. Otherwise, a space 65 % equivalent to this in @example-like environments. Otherwise, a space
66 % at the beginning of a line will start with \penalty -- and 66 % at the beginning of a line will start with \penalty -- and
67 % since \penalty is valid in vertical mode, we'd end up putting the 67 % since \penalty is valid in vertical mode, we'd end up putting the
70 % Avoid using \@M directly, because that causes trouble 70 % Avoid using \@M directly, because that causes trouble
71 % if the definition is written into an index file. 71 % if the definition is written into an index file.
72 \global\let\tiepenalty = \@M 72 \global\let\tiepenalty = \@M
73 \gdef\tie{\leavevmode\penalty\tiepenalty\ } 73 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
74 } 74 }
75 \let\~ = \tie % And make it available as @~.
76 75
77 76
78 \message{Basics,} 77 \message{Basics,}
79 \chardef\other=12 78 \chardef\other=12
80 79
100 \def\gobble#1{} 99 \def\gobble#1{}
101 100
102 \hyphenation{ap-pen-dix} 101 \hyphenation{ap-pen-dix}
103 \hyphenation{mini-buf-fer mini-buf-fers} 102 \hyphenation{mini-buf-fer mini-buf-fers}
104 \hyphenation{eshell} 103 \hyphenation{eshell}
104 \hyphenation{white-space}
105 105
106 % Margin to add to right of even pages, to left of odd pages. 106 % Margin to add to right of even pages, to left of odd pages.
107 \newdimen \bindingoffset 107 \newdimen \bindingoffset
108 \newdimen \normaloffset 108 \newdimen \normaloffset
109 \newdimen\pagewidth \newdimen\pageheight 109 \newdimen\pagewidth \newdimen\pageheight
110 110
111 % Sometimes it is convenient to have everything in the transcript file 111 % Sometimes it is convenient to have everything in the transcript file
112 % and nothing on the terminal. We don't just call \tracingall here, 112 % and nothing on the terminal. We don't just call \tracingall here,
113 % since that produces some useless output on the terminal. 113 % since that produces some useless output on the terminal.
117 \tracingpages1 \tracingoutput1 \tracinglostchars1 117 \tracingpages1 \tracingoutput1 \tracinglostchars1
118 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 118 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
119 \showboxbreadth\maxdimen\showboxdepth\maxdimen 119 \showboxbreadth\maxdimen\showboxdepth\maxdimen
120 }% 120 }%
121 121
122 %---------------------Begin change----------------------- 122 % For @cropmarks command.
123 % 123 % Do @cropmarks to get crop marks.
124 %%%% For @cropmarks command. 124 %
125 % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 125 \newif\ifcropmarks
126 \let\cropmarks = \cropmarkstrue
127 %
128 % Dimensions to add cropmarks at corners.
129 % Added by P. A. MacKay, 12 Nov. 1986
126 % 130 %
127 \newdimen\cornerlong \newdimen\cornerthick 131 \newdimen\cornerlong \newdimen\cornerthick
128 \newdimen \topandbottommargin 132 \newdimen\topandbottommargin
129 \newdimen \outerhsize \newdimen \outervsize 133 \newdimen\outerhsize \newdimen\outervsize
130 \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks 134 \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
131 \outerhsize=7in 135 \outerhsize=7in
132 %\outervsize=9.5in 136 %\outervsize=9.5in
133 % Alternative @smallbook page size is 9.25in 137 % Alternative @smallbook page size is 9.25in
134 \outervsize=9.25in 138 \outervsize=9.25in
135 \topandbottommargin=.75in 139 \topandbottommargin=.75in
136 % 140
137 %---------------------End change----------------------- 141 % Main output routine.
142 \chardef\PAGE = 255
143 \output = {\onepageout{\pagecontents\PAGE}}
144
145 \newbox\headlinebox
146 \newbox\footlinebox
138 147
139 % \onepageout takes a vbox as an argument. Note that \pagecontents 148 % \onepageout takes a vbox as an argument. Note that \pagecontents
140 % does insertions, but you have to call it yourself. 149 % does insertions, but you have to call it yourself.
141 \chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
142 \def\onepageout#1{% 150 \def\onepageout#1{%
143 \hoffset=\normaloffset 151 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
152 %
144 \ifodd\pageno \advance\hoffset by \bindingoffset 153 \ifodd\pageno \advance\hoffset by \bindingoffset
145 \else \advance\hoffset by -\bindingoffset\fi 154 \else \advance\hoffset by -\bindingoffset\fi
155 %
156 % Do this outside of the \shipout so @code etc. will be expanded in
157 % the headline as they should be, not taken literally (outputting ''code).
158 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
159 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
160 %
146 {% 161 {%
147 \escapechar = `\\ % use backslash in output files. 162 % Have to do this stuff outside the \shipout because we want it to
148 \indexdummies 163 % take effect in \write's, yet the group defined by the \vbox ends
164 % before the \shipout runs.
165 %
166 \escapechar = `\\ % use backslash in output files.
167 \indexdummies % don't expand commands in the output.
168 \normalturnoffactive % \ in index entries must not stay \, e.g., if
169 % the page break happens to be in the middle of an example.
149 \shipout\vbox{% 170 \shipout\vbox{%
150 {\let\hsize=\pagewidth \makeheadline}% 171 \ifcropmarks \vbox to \outervsize\bgroup
172 \hsize = \outerhsize
173 \line{\ewtop\hfil\ewtop}%
174 \nointerlineskip
175 \line{%
176 \vbox{\moveleft\cornerthick\nstop}%
177 \hfill
178 \vbox{\moveright\cornerthick\nstop}%
179 }%
180 \vskip\topandbottommargin
181 \line\bgroup
182 \hfil % center the page within the outer (page) hsize.
183 \ifodd\pageno\hskip\bindingoffset\fi
184 \vbox\bgroup
185 \fi
186 %
187 \unvbox\headlinebox
151 \pagebody{#1}% 188 \pagebody{#1}%
152 {\let\hsize=\pagewidth \makefootline}% 189 \ifdim\ht\footlinebox > 0pt
153 }% 190 % Only leave this space if the footline is nonempty.
154 }% 191 % (We lessened \vsize for it in \oddfootingxxx.)
192 % The \baselineskip=24pt in plain's \makefootline has no effect.
193 \vskip 2\baselineskip
194 \unvbox\footlinebox
195 \fi
196 %
197 \ifcropmarks
198 \egroup % end of \vbox\bgroup
199 \hfil\egroup % end of (centering) \line\bgroup
200 \vskip\topandbottommargin plus1fill minus1fill
201 \boxmaxdepth = \cornerthick
202 \line{%
203 \vbox{\moveleft\cornerthick\nsbot}%
204 \hfill
205 \vbox{\moveright\cornerthick\nsbot}%
206 }%
207 \nointerlineskip
208 \line{\ewbot\hfil\ewbot}%
209 \egroup % \vbox from first cropmarks clause
210 \fi
211 }% end of \shipout\vbox
212 }% end of group with \turnoffactive
155 \advancepageno 213 \advancepageno
156 \ifnum\outputpenalty>-20000 \else\dosupereject\fi 214 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
157 } 215 }
158
159 %%%% For @cropmarks command %%%%
160
161 % Here is a modification of the main output routine for Near East Publications
162 % This provides right-angle cropmarks at all four corners.
163 % The contents of the page are centerlined into the cropmarks,
164 % and any desired binding offset is added as an \hskip on either
165 % site of the centerlined box. (P. A. MacKay, 12 November, 1986)
166 %
167 \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
168 {\escapechar=`\\\relax % makes sure backslash is used in output files.
169 \shipout
170 \vbox to \outervsize{\hsize=\outerhsize
171 \vbox{\line{\ewtop\hfill\ewtop}}
172 \nointerlineskip
173 \line{\vbox{\moveleft\cornerthick\nstop}
174 \hfill
175 \vbox{\moveright\cornerthick\nstop}}
176 \vskip \topandbottommargin
177 \centerline{\ifodd\pageno\hskip\bindingoffset\fi
178 \vbox{
179 {\let\hsize=\pagewidth \makeheadline}
180 \pagebody{#1}
181 {\let\hsize=\pagewidth \makefootline}}
182 \ifodd\pageno\else\hskip\bindingoffset\fi}
183 \vskip \topandbottommargin plus1fill minus1fill
184 \boxmaxdepth\cornerthick
185 \line{\vbox{\moveleft\cornerthick\nsbot}
186 \hfill
187 \vbox{\moveright\cornerthick\nsbot}}
188 \nointerlineskip
189 \vbox{\line{\ewbot\hfill\ewbot}}
190 }}
191 \advancepageno
192 \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
193 %
194 % Do @cropmarks to get crop marks
195 \def\cropmarks{\let\onepageout=\croppageout }
196 216
197 \newinsert\margin \dimen\margin=\maxdimen 217 \newinsert\margin \dimen\margin=\maxdimen
198 218
199 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} 219 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
200 {\catcode`\@ =11 220 {\catcode`\@ =11
205 \dimen@=\dp#1 \unvbox#1 225 \dimen@=\dp#1 \unvbox#1
206 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi 226 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
207 \ifr@ggedbottom \kern-\dimen@ \vfil \fi} 227 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
208 } 228 }
209 229
210 %
211 % Here are the rules for the cropmarks. Note that they are 230 % Here are the rules for the cropmarks. Note that they are
212 % offset so that the space between them is truly \outerhsize or \outervsize 231 % offset so that the space between them is truly \outerhsize or \outervsize
213 % (P. A. MacKay, 12 November, 1986) 232 % (P. A. MacKay, 12 November, 1986)
214 % 233 %
215 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} 234 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
715 734
716 % Ignore @ignore ... @end ignore. 735 % Ignore @ignore ... @end ignore.
717 % 736 %
718 \def\ignore{\doignore{ignore}} 737 \def\ignore{\doignore{ignore}}
719 738
720 % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. 739 % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
721 % 740 %
722 \def\ifinfo{\doignore{ifinfo}} 741 \def\ifinfo{\doignore{ifinfo}}
723 \def\ifhtml{\doignore{ifhtml}} 742 \def\ifhtml{\doignore{ifhtml}}
743 \def\ifnottex{\doignore{ifnottex}}
724 \def\html{\doignore{html}} 744 \def\html{\doignore{html}}
725 \def\menu{\doignore{menu}} 745 \def\menu{\doignore{menu}}
726 \def\direntry{\doignore{direntry}} 746 \def\direntry{\doignore{direntry}}
727 747
728 % Also ignore @macro ... @end macro. The user must run texi2dvi, 748 % Also ignore @macro ... @end macro. The user must run texi2dvi,
744 % Define a command to swallow text until we reach `@end #1'. 764 % Define a command to swallow text until we reach `@end #1'.
745 \long\def\doignoretext##1\end #1{\enddoignore}% 765 \long\def\doignoretext##1\end #1{\enddoignore}%
746 % 766 %
747 % Make sure that spaces turn into tokens that match what \doignoretext wants. 767 % Make sure that spaces turn into tokens that match what \doignoretext wants.
748 \catcode32 = 10 768 \catcode32 = 10
769 %
770 % Ignore braces, too, so mismatched braces don't cause trouble.
771 \catcode`\{ = 9
772 \catcode`\} = 9
749 % 773 %
750 % And now expand that command. 774 % And now expand that command.
751 \doignoretext 775 \doignoretext
752 } 776 }
753 777
836 % 860 %
837 % Do minimal line-breaking. 861 % Do minimal line-breaking.
838 \pretolerance = 10000 862 \pretolerance = 10000
839 % 863 %
840 % Do not execute instructions in @tex 864 % Do not execute instructions in @tex
841 \def\tex{\doignore{tex}} 865 \def\tex{\doignore{tex}}%
842 } 866 }
843 867
844 % @set VAR sets the variable VAR to an empty value. 868 % @set VAR sets the variable VAR to an empty value.
845 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. 869 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
846 % 870 %
848 % empty), we can't just use \parsearg; we have to insert a space of our 872 % empty), we can't just use \parsearg; we have to insert a space of our
849 % own to delimit the rest of the line, and then take it out again if we 873 % own to delimit the rest of the line, and then take it out again if we
850 % didn't need it. Make sure the catcode of space is correct to avoid 874 % didn't need it. Make sure the catcode of space is correct to avoid
851 % losing inside @example, for instance. 875 % losing inside @example, for instance.
852 % 876 %
853 \def\set{\begingroup\catcode` =10 \parsearg\setxxx} 877 \def\set{\begingroup\catcode` =10
878 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
879 \parsearg\setxxx}
854 \def\setxxx#1{\setyyy#1 \endsetyyy} 880 \def\setxxx#1{\setyyy#1 \endsetyyy}
855 \def\setyyy#1 #2\endsetyyy{% 881 \def\setyyy#1 #2\endsetyyy{%
856 \def\temp{#2}% 882 \def\temp{#2}%
857 \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty 883 \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
858 \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. 884 \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
869 \def\clear{\parsearg\clearxxx} 895 \def\clear{\parsearg\clearxxx}
870 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} 896 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
871 897
872 % @value{foo} gets the text saved in variable foo. 898 % @value{foo} gets the text saved in variable foo.
873 % 899 %
874 \def\value#1{\expandafter 900 \def\value{\begingroup
875 \ifx\csname SET#1\endcsname\relax 901 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
876 {\{No value for ``#1''\}} 902 \valuexxx}
877 \else \csname SET#1\endcsname \fi} 903 \def\valuexxx#1{%
904 \expandafter\ifx\csname SET#1\endcsname\relax
905 {\{No value for ``#1''\}}%
906 \else
907 \csname SET#1\endcsname
908 \fi
909 \endgroup}
878 910
879 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined 911 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
880 % with @set. 912 % with @set.
881 % 913 %
882 \def\ifset{\parsearg\ifsetxxx} 914 \def\ifset{\parsearg\ifsetxxx}
904 } 936 }
905 \def\ifclearsucceed{\conditionalsucceed{ifclear}} 937 \def\ifclearsucceed{\conditionalsucceed{ifclear}}
906 \def\ifclearfail{\nestedignore{ifclear}} 938 \def\ifclearfail{\nestedignore{ifclear}}
907 \defineunmatchedend{ifclear} 939 \defineunmatchedend{ifclear}
908 940
909 % @iftex always succeeds; we read the text following, through @end 941 % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
910 % iftex). But `@end iftex' should be valid only after an @iftex. 942 % following, through the first @end iftex (etc.). Make `@end iftex'
943 % (etc.) valid only after an @iftex.
911 % 944 %
912 \def\iftex{\conditionalsucceed{iftex}} 945 \def\iftex{\conditionalsucceed{iftex}}
946 \def\ifnothtml{\conditionalsucceed{ifnothtml}}
947 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
913 \defineunmatchedend{iftex} 948 \defineunmatchedend{iftex}
949 \defineunmatchedend{ifnothtml}
950 \defineunmatchedend{ifnotinfo}
914 951
915 % We can't just want to start a group at @iftex (for example) and end it 952 % We can't just want to start a group at @iftex (for example) and end it
916 % at @end iftex, since then @set commands inside the conditional have no 953 % at @end iftex, since then @set commands inside the conditional have no
917 % effect (they'd get reverted at the end of the group). So we must 954 % effect (they'd get reverted at the end of the group). So we must
918 % define \Eiftex to redefine itself to be its previous value. (We can't 955 % define \Eiftex to redefine itself to be its previous value. (We can't
984 \readauxfile 1021 \readauxfile
985 \opencontents 1022 \opencontents
986 \openindices 1023 \openindices
987 \fixbackslash % Turn off hack to swallow `\input texinfo'. 1024 \fixbackslash % Turn off hack to swallow `\input texinfo'.
988 \global\let\setfilename=\comment % Ignore extra @setfilename cmds. 1025 \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
1026 %
1027 % If texinfo.cnf is present on the system, read it.
1028 % Useful for site-wide @afourpaper, etc.
1029 % Just to be on the safe side, close the input stream before the \input.
1030 \openin 1 texinfo.cnf
1031 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
1032 \closein1
1033 \temp
1034 %
989 \comment % Ignore the actual filename. 1035 \comment % Ignore the actual filename.
990 } 1036 }
991 1037
992 % @bye. 1038 % @bye.
993 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} 1039 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1019 \let\li = \sf % Sometimes we call it \li, not \sf. 1065 \let\li = \sf % Sometimes we call it \li, not \sf.
1020 1066
1021 % We don't need math for this one. 1067 % We don't need math for this one.
1022 \def\ttsl{\tenttsl} 1068 \def\ttsl{\tenttsl}
1023 1069
1024 %% Try out Computer Modern fonts at \magstephalf 1070 % Use Computer Modern fonts at \magstephalf (11pt).
1025 \let\mainmagstep=\magstephalf 1071 \newcount\mainmagstep
1072 \mainmagstep=\magstephalf
1026 1073
1027 % Set the font macro #1 to the font named #2, adding on the 1074 % Set the font macro #1 to the font named #2, adding on the
1028 % specified font prefix (normally `cm'). 1075 % specified font prefix (normally `cm').
1029 % #3 is the font's design size, #4 is a scale factor 1076 % #3 is the font's design size, #4 is a scale factor
1030 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} 1077 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
1092 \let\indbf=\indrm 1139 \let\indbf=\indrm
1093 \setfont\indsc\scshape{10}{900} 1140 \setfont\indsc\scshape{10}{900}
1094 \font\indi=cmmi9 1141 \font\indi=cmmi9
1095 \font\indsy=cmsy9 1142 \font\indsy=cmsy9
1096 1143
1144 % Fonts for title page:
1145 \setfont\titlerm\rmbshape{12}{\magstep3}
1146 \setfont\titleit\itbshape{10}{\magstep4}
1147 \setfont\titlesl\slbshape{10}{\magstep4}
1148 \setfont\titlett\ttbshape{12}{\magstep3}
1149 \setfont\titlettsl\ttslshape{10}{\magstep4}
1150 \setfont\titlesf\sfbshape{17}{\magstep1}
1151 \let\titlebf=\titlerm
1152 \setfont\titlesc\scbshape{10}{\magstep4}
1153 \font\titlei=cmmi12 scaled \magstep3
1154 \font\titlesy=cmsy10 scaled \magstep4
1155 \def\authorrm{\secrm}
1156
1097 % Chapter (and unnumbered) fonts (17.28pt). 1157 % Chapter (and unnumbered) fonts (17.28pt).
1098 \setfont\chaprm\rmbshape{12}{\magstep2} 1158 \setfont\chaprm\rmbshape{12}{\magstep2}
1099 \setfont\chapit\itbshape{10}{\magstep3} 1159 \setfont\chapit\itbshape{10}{\magstep3}
1100 \setfont\chapsl\slbshape{10}{\magstep3} 1160 \setfont\chapsl\slbshape{10}{\magstep3}
1101 \setfont\chaptt\ttbshape{12}{\magstep2} 1161 \setfont\chaptt\ttbshape{12}{\magstep2}
1102 \setfont\chapttsl\ttslshape{10}{\magstep3} 1162 \setfont\chapttsl\ttslshape{10}{\magstep3}
1103 \setfont\chapsf\sfbshape{12}{\magstep2} 1163 \setfont\chapsf\sfbshape{17}{1000}
1104 \let\chapbf=\chaprm 1164 \let\chapbf=\chaprm
1105 \setfont\chapsc\scbshape{10}{\magstep3} 1165 \setfont\chapsc\scbshape{10}{\magstep3}
1106 \font\chapi=cmmi12 scaled \magstep2 1166 \font\chapi=cmmi12 scaled \magstep2
1107 \font\chapsy=cmsy10 scaled \magstep3 1167 \font\chapsy=cmsy10 scaled \magstep3
1108 1168
1135 % Subsection fonts (13.15pt). 1195 % Subsection fonts (13.15pt).
1136 \setfont\ssecrm\rmbshape{12}{\magstephalf} 1196 \setfont\ssecrm\rmbshape{12}{\magstephalf}
1137 \setfont\ssecit\itbshape{10}{1315} 1197 \setfont\ssecit\itbshape{10}{1315}
1138 \setfont\ssecsl\slbshape{10}{1315} 1198 \setfont\ssecsl\slbshape{10}{1315}
1139 \setfont\ssectt\ttbshape{12}{\magstephalf} 1199 \setfont\ssectt\ttbshape{12}{\magstephalf}
1140 \setfont\ssecttsl\ttslshape{10}{\magstep1} 1200 \setfont\ssecttsl\ttslshape{10}{1315}
1141 \setfont\ssecsf\sfbshape{12}{\magstephalf} 1201 \setfont\ssecsf\sfbshape{12}{\magstephalf}
1142 \let\ssecbf\ssecrm 1202 \let\ssecbf\ssecrm
1143 \setfont\ssecsc\scbshape{10}{\magstep1} 1203 \setfont\ssecsc\scbshape{10}{\magstep1}
1144 \font\sseci=cmmi12 scaled \magstephalf 1204 \font\sseci=cmmi12 scaled \magstephalf
1145 \font\ssecsy=cmsy10 scaled \magstep1 1205 \font\ssecsy=cmsy10 scaled 1315
1146 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, 1206 % The smallcaps and symbol fonts should actually be scaled \magstep1.5,
1147 % but that is not a standard magnification. 1207 % but that is not a standard magnification.
1148
1149 % Fonts for title page:
1150 \setfont\titlerm\rmbshape{12}{\magstep3}
1151 \let\authorrm = \secrm
1152 1208
1153 % In order for the font changes to affect most math symbols and letters, 1209 % In order for the font changes to affect most math symbols and letters,
1154 % we have to define the \textfont of the standard families. Since 1210 % we have to define the \textfont of the standard families. Since
1155 % texinfo doesn't allow for producing subscripts and superscripts, we 1211 % texinfo doesn't allow for producing subscripts and superscripts, we
1156 % don't bother to reset \scriptfont and \scriptscriptfont (which would 1212 % don't bother to reset \scriptfont and \scriptscriptfont (which would
1172 \def\textfonts{% 1228 \def\textfonts{%
1173 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl 1229 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
1174 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc 1230 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
1175 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl 1231 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
1176 \resetmathfonts} 1232 \resetmathfonts}
1233 \def\titlefonts{%
1234 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
1235 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
1236 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
1237 \let\tenttsl=\titlettsl
1238 \resetmathfonts \setleading{25pt}}
1239 \def\titlefont#1{{\titlefonts #1}}
1177 \def\chapfonts{% 1240 \def\chapfonts{%
1178 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 1241 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1179 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc 1242 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1180 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl 1243 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1181 \resetmathfonts \setleading{19pt}} 1244 \resetmathfonts \setleading{19pt}}
1249 % The old definition, with no lozenge: 1312 % The old definition, with no lozenge:
1250 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} 1313 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1251 \def\ctrl #1{{\tt \rawbackslash \hat}#1} 1314 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
1252 1315
1253 \let\file=\samp 1316 \let\file=\samp
1254 \let\url=\samp % perhaps include a hypertex \special eventually
1255 \def\email#1{$\langle${\tt #1}$\rangle$}
1256 1317
1257 % @code is a modification of @t, 1318 % @code is a modification of @t,
1258 % which makes spaces the same size as normal in the surrounding text. 1319 % which makes spaces the same size as normal in the surrounding text.
1259 \def\tclose#1{% 1320 \def\tclose#1{%
1260 {% 1321 {%
1287 % and arrange explicitly to hyphenate at a dash. 1348 % and arrange explicitly to hyphenate at a dash.
1288 % -- rms. 1349 % -- rms.
1289 { 1350 {
1290 \catcode`\-=\active 1351 \catcode`\-=\active
1291 \catcode`\_=\active 1352 \catcode`\_=\active
1353 \catcode`\|=\active
1292 \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} 1354 \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
1293 % The following is used by \doprintindex to insure that long function names 1355 % The following is used by \doprintindex to insure that long function names
1294 % wrap around. It is necessary for - and _ to be active before the index is 1356 % wrap around. It is necessary for - and _ to be active before the index is
1295 % read from the file, as \entry parses the arguments long before \code is 1357 % read from the file, as \entry parses the arguments long before \code is
1296 % ever called. -- mycroft 1358 % ever called. -- mycroft
1297 \global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder} 1359 % _ is always active; and it shouldn't be \let = to an _ that is a
1360 % subscript character anyway. Then, @cindex @samp{_} (for example)
1361 % fails. --karl
1362 \global\def\indexbreaks{%
1363 \catcode`\-=\active \let-\realdash
1364 }
1298 } 1365 }
1299 1366
1300 \def\realdash{-} 1367 \def\realdash{-}
1301 \def\realunder{_}
1302 \def\codedash{-\discretionary{}{}{}} 1368 \def\codedash{-\discretionary{}{}{}}
1303 \def\codeunder{\normalunderscore\discretionary{}{}{}} 1369 \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
1304 \def\codex #1{\tclose{#1}\endgroup} 1370 \def\codex #1{\tclose{#1}\endgroup}
1305 1371
1306 %\let\exp=\tclose %Was temporary 1372 %\let\exp=\tclose %Was temporary
1307 1373
1308 % @kbd is like @code, except that if the argument is just one @key command, 1374 % @kbd is like @code, except that if the argument is just one @key command,
1309 % then @kbd has no effect. 1375 % then @kbd has no effect.
1310 % 1376
1377 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
1378 % `example' (@kbd uses ttsl only inside of @example and friends),
1379 % or `code' (@kbd uses normal tty font always).
1380 \def\kbdinputstyle{\parsearg\kbdinputstylexxx}
1381 \def\kbdinputstylexxx#1{%
1382 \def\arg{#1}%
1383 \ifx\arg\worddistinct
1384 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
1385 \else\ifx\arg\wordexample
1386 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1387 \else\ifx\arg\wordcode
1388 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1389 \fi\fi\fi
1390 }
1391 \def\worddistinct{distinct}
1392 \def\wordexample{example}
1393 \def\wordcode{code}
1394
1395 % Default is kbdinputdistinct. (Too much of a hassle to call the macro,
1396 % the catcodes are wrong for parsearg to work.)
1397 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
1398
1311 \def\xkey{\key} 1399 \def\xkey{\key}
1312 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% 1400 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
1313 \ifx\one\xkey\ifx\threex\three \key{#2}% 1401 \ifx\one\xkey\ifx\threex\three \key{#2}%
1314 \else{\tclose{\ttsl\look}}\fi 1402 \else{\tclose{\kbdfont\look}}\fi
1315 \else{\tclose{\ttsl\look}}\fi} 1403 \else{\tclose{\kbdfont\look}}\fi}
1404
1405 % @url, @email. Quotes do not seem necessary.
1406 \let\url=\code % perhaps include a hypertex \special eventually
1407 % rms does not like the angle brackets --karl, 17may97.
1408 %\def\email#1{$\langle${\tt #1}$\rangle$}
1409 \let\email=\code
1410
1411 % @uref (abbreviation for `urlref') takes an optional second argument
1412 % specifying the text to display. First (mandatory) arg is the url.
1413 %
1414 \def\uref#1{\urefxxx #1,,\finish}
1415 \def\urefxxx#1,#2,#3\finish{%
1416 \setbox0 = \hbox{\ignorespaces #2}%
1417 \ifdim\wd0 > 0pt
1418 \unhbox0\ (\code{#1})%
1419 \else
1420 \code{#1}%
1421 \fi
1422 }
1316 1423
1317 % Check if we are currently using a typewriter font. Since all the 1424 % Check if we are currently using a typewriter font. Since all the
1318 % Computer Modern typewriter fonts have zero interword stretch (and 1425 % Computer Modern typewriter fonts have zero interword stretch (and
1319 % shrink), and it is reasonable to expect all typewriter fonts to have 1426 % shrink), and it is reasonable to expect all typewriter fonts to have
1320 % this property, we can check that font parameter. 1427 % this property, we can check that font parameter.
1321 % 1428 %
1322 \def\ifmonospace{\ifdim\fontdimen3\font=0pt } 1429 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
1323 1430
1324 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the 1431 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
1325 % argument is to make the input look right: @dmn{pt} instead of 1432 % argument is to make the input look right: @dmn{pt} instead of
1326 % @dmn{}pt. 1433 % @dmn{}pt.
1347 1454
1348 \newskip\titlepagetopglue \titlepagetopglue = 1.5in 1455 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
1349 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc 1456 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
1350 1457
1351 % First the title page. Must do @settitle before @titlepage. 1458 % First the title page. Must do @settitle before @titlepage.
1352 \def\titlefont#1{{\titlerm #1}}
1353
1354 \newif\ifseenauthor 1459 \newif\ifseenauthor
1355 \newif\iffinishedtitlepage 1460 \newif\iffinishedtitlepage
1356 1461
1357 \def\shorttitlepage{\parsearg\shorttitlepagezzz} 1462 \def\shorttitlepage{\parsearg\shorttitlepagezzz}
1358 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% 1463 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
1370 % Leave some space at the very top of the page. 1475 % Leave some space at the very top of the page.
1371 \vglue\titlepagetopglue 1476 \vglue\titlepagetopglue
1372 % 1477 %
1373 % Now you can print the title using @title. 1478 % Now you can print the title using @title.
1374 \def\title{\parsearg\titlezzz}% 1479 \def\title{\parsearg\titlezzz}%
1375 \def\titlezzz##1{\leftline{\titlefont{##1}} 1480 \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
1376 % print a rule at the page bottom also. 1481 % print a rule at the page bottom also.
1377 \finishedtitlepagefalse 1482 \finishedtitlepagefalse
1378 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% 1483 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
1379 % No rule at page bottom unless we print one at the top with @title. 1484 % No rule at page bottom unless we print one at the top with @title.
1380 \finishedtitlepagetrue 1485 \finishedtitlepagetrue
1459 1564
1460 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} 1565 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
1461 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% 1566 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
1462 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1567 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1463 1568
1464 \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} 1569 \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
1465 \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
1466 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
1467 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1468 1570
1469 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} 1571 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
1470 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% 1572 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
1471 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1573 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
1472 1574
1473 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} 1575 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
1474 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% 1576 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
1475 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1577 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
1476 1578 %
1477 \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} 1579 % Leave some space for the footline. Hopefully ok to assume
1478 \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% 1580 % @evenfooting will not be used by itself.
1479 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} 1581 \global\advance\pageheight by -\baselineskip
1480 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1582 \global\advance\vsize by -\baselineskip
1583 }
1584
1585 \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
1481 % 1586 %
1482 }% unbind the catcode of @. 1587 }% unbind the catcode of @.
1483 1588
1484 % @headings double turns headings on for double-sided printing. 1589 % @headings double turns headings on for double-sided printing.
1485 % @headings single turns headings on for single-sided printing. 1590 % @headings single turns headings on for single-sided printing.
1859 % Definition of @item while inside @itemize. 1964 % Definition of @item while inside @itemize.
1860 1965
1861 \def\itemizeitem{% 1966 \def\itemizeitem{%
1862 \advance\itemno by 1 1967 \advance\itemno by 1
1863 {\let\par=\endgraf \smallbreak}% 1968 {\let\par=\endgraf \smallbreak}%
1864 \ifhmode \errmessage{\in hmode at itemizeitem}\fi 1969 \ifhmode \errmessage{In hmode at itemizeitem}\fi
1865 {\parskip=0in \hskip 0pt 1970 {\parskip=0in \hskip 0pt
1866 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% 1971 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
1867 \vadjust{\penalty 1200}}% 1972 \vadjust{\penalty 1200}}%
1868 \flushcr} 1973 \flushcr}
1869 1974
1877 1982
1878 % Table can continue over pages but will only break between lines. 1983 % Table can continue over pages but will only break between lines.
1879 1984
1880 % To make preamble: 1985 % To make preamble:
1881 % 1986 %
1882 % Either define widths of columns in terms of percent of \hsize: 1987 % Either define widths of columns in terms of percent of \hsize:
1883 % @multitable @columnfractions .25 .3 .45 1988 % @multitable @columnfractions .25 .3 .45
1884 % @item ... 1989 % @item ...
1885 % 1990 %
1886 % Numbers following @columnfractions are the percent of the total 1991 % Numbers following @columnfractions are the percent of the total
1887 % current hsize to be used for each column. You may use as many 1992 % current hsize to be used for each column. You may use as many
1895 % 2000 %
1896 % For those who want to use more than one line's worth of words in 2001 % For those who want to use more than one line's worth of words in
1897 % the preamble, break the line within one argument and it 2002 % the preamble, break the line within one argument and it
1898 % will parse correctly, i.e., 2003 % will parse correctly, i.e.,
1899 % 2004 %
1900 % @multitable {Column 1 template} {Column 2 template} {Column 3 2005 % @multitable {Column 1 template} {Column 2 template} {Column 3
1901 % template} 2006 % template}
1902 % Not: 2007 % Not:
1903 % @multitable {Column 1 template} {Column 2 template} 2008 % @multitable {Column 1 template} {Column 2 template}
1904 % {Column 3 template} 2009 % {Column 3 template}
1905 2010
1906 % Each new table line starts with @item, each subsequent new column 2011 % Each new table line starts with @item, each subsequent new column
1907 % starts with @tab. Empty columns may be produced by supplying @tab's 2012 % starts with @tab. Empty columns may be produced by supplying @tab's
1908 % with nothing between them for as many times as empty columns are needed, 2013 % with nothing between them for as many times as empty columns are needed,
1909 % ie, @tab@tab@tab will produce two empty columns. 2014 % ie, @tab@tab@tab will produce two empty columns.
1910 2015
1911 % @item, @tab, @multitable or @end multitable do not need to be on their 2016 % @item, @tab, @multitable or @end multitable do not need to be on their
1913 2018
1914 % Sample multitable: 2019 % Sample multitable:
1915 2020
1916 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} 2021 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
1917 % @item first col stuff @tab second col stuff @tab third col 2022 % @item first col stuff @tab second col stuff @tab third col
1918 % @item 2023 % @item
1919 % first col stuff 2024 % first col stuff
1920 % @tab 2025 % @tab
1921 % second col stuff 2026 % second col stuff
1922 % @tab 2027 % @tab
1923 % third col 2028 % third col
1924 % @item first col stuff @tab second col stuff 2029 % @item first col stuff @tab second col stuff
1925 % @tab Many paragraphs of text may be used in any column. 2030 % @tab Many paragraphs of text may be used in any column.
1926 % 2031 %
1927 % They will wrap at the width determined by the template. 2032 % They will wrap at the width determined by the template.
1928 % @item@tab@tab This will be in third column. 2033 % @item@tab@tab This will be in third column.
1929 % @end multitable 2034 % @end multitable
1930 2035
1931 % Default dimensions may be reset by user. 2036 % Default dimensions may be reset by user.
1935 % @multitablelinespace is space to leave between table items, baseline 2040 % @multitablelinespace is space to leave between table items, baseline
1936 % to baseline. 2041 % to baseline.
1937 % 0pt means it depends on current normal line spacing. 2042 % 0pt means it depends on current normal line spacing.
1938 2043
1939 %%%% 2044 %%%%
1940 % Dimensions 2045 % Dimensions
1941 2046
1942 \newskip\multitableparskip 2047 \newskip\multitableparskip
1943 \newskip\multitableparindent 2048 \newskip\multitableparindent
1944 \newdimen\multitablecolspace 2049 \newdimen\multitablecolspace
1945 \newskip\multitablelinespace 2050 \newskip\multitablelinespace
2005 \global\colcount=0\relax% 2110 \global\colcount=0\relax%
2006 \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% 2111 \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
2007 % To parse everything between @multitable and @item : 2112 % To parse everything between @multitable and @item :
2008 \setuptable#1 \endsetuptable 2113 \setuptable#1 \endsetuptable
2009 % Need to reset this to 0 after \setuptable. 2114 % Need to reset this to 0 after \setuptable.
2010 \global\colcount=0\relax% 2115 \global\colcount=0\relax%
2011 % 2116 %
2012 % This preamble sets up a generic column definition, which will 2117 % This preamble sets up a generic column definition, which will
2013 % be used as many times as user calls for columns. 2118 % be used as many times as user calls for columns.
2014 % \vtop will set a single line and will also let text wrap and 2119 % \vtop will set a single line and will also let text wrap and
2015 % continue for many paragraphs if desired. 2120 % continue for many paragraphs if desired.
2016 \halign\bgroup&\global\advance\colcount by 1\relax% 2121 \halign\bgroup&\global\advance\colcount by 1\relax%
2017 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname 2122 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2018 % In order to keep entries from bumping into each other 2123 % In order to keep entries from bumping into each other
2019 % we will add a \leftskip of \multitablecolspace to all columns after 2124 % we will add a \leftskip of \multitablecolspace to all columns after
2020 % the first one. 2125 % the first one.
2021 % If a template has been used, we will add \multitablecolspace 2126 % If a template has been used, we will add \multitablecolspace
2022 % to the width of each template entry. 2127 % to the width of each template entry.
2023 % If user has set preamble in terms of percent of \hsize 2128 % If user has set preamble in terms of percent of \hsize
2024 % we will use that dimension as the width of the column, and 2129 % we will use that dimension as the width of the column, and
2025 % the \leftskip will keep entries from bumping into each other. 2130 % the \leftskip will keep entries from bumping into each other.
2026 % Table will start at left margin and final column will justify at 2131 % Table will start at left margin and final column will justify at
2028 \ifnum\colcount=1 2133 \ifnum\colcount=1
2029 \else 2134 \else
2030 \ifsetpercent 2135 \ifsetpercent
2031 \else 2136 \else
2032 % If user has <not> set preamble in terms of percent of \hsize 2137 % If user has <not> set preamble in terms of percent of \hsize
2033 % we will advance \hsize by \multitablecolspace 2138 % we will advance \hsize by \multitablecolspace
2034 \advance\hsize by \multitablecolspace 2139 \advance\hsize by \multitablecolspace
2035 \fi 2140 \fi
2036 % In either case we will make \leftskip=\multitablecolspace: 2141 % In either case we will make \leftskip=\multitablecolspace:
2037 \leftskip=\multitablecolspace 2142 \leftskip=\multitablecolspace
2038 \fi 2143 \fi
2039 \noindent##\multistrut}\cr% 2144 % Ignoring space at the beginning and end avoids an occasional spurious
2145 % blank line, when TeX decides to break the line at the space before the
2146 % box from the multistrut, so the strut ends up on a line by itself.
2147 % For example:
2148 % @multitable @columnfractions .11 .89
2149 % @item @code{#}
2150 % @tab Legal holiday which is valid in major parts of the whole country.
2151 % Is automatically provided with highlighting sequences respectively marking
2152 % characters.
2153 \noindent\ignorespaces##\unskip\multistrut}\cr
2040 % \everycr will reset column counter, \colcount, at the end of 2154 % \everycr will reset column counter, \colcount, at the end of
2041 % each line. Every column entry will cause \colcount to advance by one. 2155 % each line. Every column entry will cause \colcount to advance by one.
2042 % The table preamble 2156 % The table preamble
2043 % looks at the current \colcount to find the correct column width. 2157 % looks at the current \colcount to find the correct column width.
2044 \global\everycr{\noalign{% 2158 \global\everycr{\noalign{%
2045 \filbreak%% keeps underfull box messages off when table breaks over pages. 2159 % \filbreak%% keeps underfull box messages off when table breaks over pages.
2160 % Maybe so, but it also creates really weird page breaks when the table
2161 % breaks over pages Wouldn't \vfil be better? Wait until the problem
2162 % manifests itself, so it can be fixed for real --karl.
2046 \global\colcount=0\relax}} 2163 \global\colcount=0\relax}}
2047 } 2164 }
2048 2165
2049 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. 2166 \def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2050 % If so, do nothing. If not, give it an appropriate dimension based on 2167 % If so, do nothing. If not, give it an appropriate dimension based on
2052 \ifdim\multitablelinespace=0pt 2169 \ifdim\multitablelinespace=0pt
2053 %% strut to put in table in case some entry doesn't have descenders, 2170 %% strut to put in table in case some entry doesn't have descenders,
2054 %% to keep lines equally spaced 2171 %% to keep lines equally spaced
2055 \let\multistrut = \strut 2172 \let\multistrut = \strut
2056 %% Test to see if parskip is larger than space between lines of 2173 %% Test to see if parskip is larger than space between lines of
2057 %% table. If not, do nothing. 2174 %% table. If not, do nothing.
2058 %% If so, set to same dimension as multitablelinespace. 2175 %% If so, set to same dimension as multitablelinespace.
2059 \else 2176 \else
2060 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 2177 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0
2061 width0pt\relax} \fi 2178 width0pt\relax} \fi
2062 \ifdim\multitableparskip>\multitablelinespace 2179 \ifdim\multitableparskip>\multitablelinespace
2187 \def\less{\realbackslash less}% 2304 \def\less{\realbackslash less}%
2188 \def\hat{\realbackslash hat}% 2305 \def\hat{\realbackslash hat}%
2189 %\def\char{\realbackslash char}% 2306 %\def\char{\realbackslash char}%
2190 \def\TeX{\realbackslash TeX}% 2307 \def\TeX{\realbackslash TeX}%
2191 \def\dots{\realbackslash dots }% 2308 \def\dots{\realbackslash dots }%
2192 \def\copyright{\realbackslash copyright }% 2309 \def\result{\realbackslash result}%
2310 \def\equiv{\realbackslash equiv}%
2311 \def\expansion{\realbackslash expansion}%
2312 \def\print{\realbackslash print}%
2313 \def\error{\realbackslash error}%
2314 \def\point{\realbackslash point}%
2315 \def\copyright{\realbackslash copyright}%
2193 \def\tclose##1{\realbackslash tclose {##1}}% 2316 \def\tclose##1{\realbackslash tclose {##1}}%
2194 \def\code##1{\realbackslash code {##1}}% 2317 \def\code##1{\realbackslash code {##1}}%
2195 \def\dotless##1{\realbackslash dotless {##1}}% 2318 \def\dotless##1{\realbackslash dotless {##1}}%
2196 \def\samp##1{\realbackslash samp {##1}}% 2319 \def\samp##1{\realbackslash samp {##1}}%
2197 \def\,##1{\realbackslash ,{##1}}% 2320 \def\,##1{\realbackslash ,{##1}}%
2198 \def\t##1{\realbackslash t {##1}}% 2321 \def\t##1{\realbackslash t {##1}}%
2199 \def\r##1{\realbackslash r {##1}}% 2322 \def\r##1{\realbackslash r {##1}}%
2200 \def\i##1{\realbackslash i {##1}}% 2323 \def\i##1{\realbackslash i {##1}}%
2201 \def\b##1{\realbackslash b {##1}}% 2324 \def\b##1{\realbackslash b {##1}}%
2325 \def\sc##1{\realbackslash sc {##1}}%
2202 \def\cite##1{\realbackslash cite {##1}}% 2326 \def\cite##1{\realbackslash cite {##1}}%
2203 \def\key##1{\realbackslash key {##1}}% 2327 \def\key##1{\realbackslash key {##1}}%
2204 \def\file##1{\realbackslash file {##1}}% 2328 \def\file##1{\realbackslash file {##1}}%
2205 \def\var##1{\realbackslash var {##1}}% 2329 \def\var##1{\realbackslash var {##1}}%
2206 \def\kbd##1{\realbackslash kbd {##1}}% 2330 \def\kbd##1{\realbackslash kbd {##1}}%
2207 \def\dfn##1{\realbackslash dfn {##1}}% 2331 \def\dfn##1{\realbackslash dfn {##1}}%
2208 \def\emph##1{\realbackslash emph {##1}}% 2332 \def\emph##1{\realbackslash emph {##1}}%
2333 \def\value##1{\realbackslash value {##1}}%
2209 \unsepspaces 2334 \unsepspaces
2210 } 2335 }
2211 2336
2212 % If an index command is used in an @example environment, any spaces 2337 % If an index command is used in an @example environment, any spaces
2213 % therein should become regular spaces in the raw index file, not the 2338 % therein should become regular spaces in the raw index file, not the
2294 \count255=\lastpenalty 2419 \count255=\lastpenalty
2295 {% 2420 {%
2296 \indexdummies % Must do this here, since \bf, etc expand at this stage 2421 \indexdummies % Must do this here, since \bf, etc expand at this stage
2297 \escapechar=`\\ 2422 \escapechar=`\\
2298 {% 2423 {%
2299 \let\folio=0 % We will expand all macros now EXCEPT \folio. 2424 \let\folio=0% We will expand all macros now EXCEPT \folio.
2300 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now 2425 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
2301 % so it will be output as is; and it will print as backslash. 2426 % so it will be output as is; and it will print as backslash.
2302 % 2427 %
2303 % First process the index-string with all font commands turned off 2428 % First process the index-string with all font commands turned off
2304 % to get the string to sort by. 2429 % to get the string to sort by.
2368 \gdef\cindexsub "#1" #2^^M{\endgroup % 2493 \gdef\cindexsub "#1" #2^^M{\endgroup %
2369 \dosubind{cp}{#2}{#1}}} 2494 \dosubind{cp}{#2}{#1}}}
2370 2495
2371 % Define the macros used in formatting output of the sorted index material. 2496 % Define the macros used in formatting output of the sorted index material.
2372 2497
2373 % This is what you call to cause a particular index to get printed. 2498 % @printindex causes a particular index (the ??s file) to get printed.
2374 % Write 2499 % It does not print any chapter heading (usually an @unnumbered).
2375 % @unnumbered Function Index 2500 %
2376 % @printindex fn
2377
2378 \def\printindex{\parsearg\doprintindex} 2501 \def\printindex{\parsearg\doprintindex}
2379
2380 \def\doprintindex#1{\begingroup 2502 \def\doprintindex#1{\begingroup
2381 \dobreak \chapheadingskip{10000}% 2503 \dobreak \chapheadingskip{10000}%
2382 % 2504 %
2383 \indexfonts \rm 2505 \indexfonts \rm
2384 \tolerance = 9500 2506 \tolerance = 9500
2385 \indexbreaks 2507 \indexbreaks
2386 \def\indexbackslash{\rawbackslashxx}%
2387 % Index files are almost Texinfo source, but we use \ as the escape
2388 % character. It would be better to use @, but that's too big a change
2389 % to make right now.
2390 \catcode`\\ = 0
2391 \catcode`\@ = 11
2392 \escapechar = `\\
2393 \begindoublecolumns
2394 % 2508 %
2395 % See if the index file exists and is nonempty. 2509 % See if the index file exists and is nonempty.
2396 \openin 1 \jobname.#1s 2510 \openin 1 \jobname.#1s
2397 \ifeof 1 2511 \ifeof 1
2398 % \enddoublecolumns gets confused if there is no text in the index, 2512 % \enddoublecolumns gets confused if there is no text in the index,
2407 % it can discover if there is anything in it. 2521 % it can discover if there is anything in it.
2408 \read 1 to \temp 2522 \read 1 to \temp
2409 \ifeof 1 2523 \ifeof 1
2410 (Index is empty) 2524 (Index is empty)
2411 \else 2525 \else
2526 % Index files are almost Texinfo source, but we use \ as the escape
2527 % character. It would be better to use @, but that's too big a change
2528 % to make right now.
2529 \def\indexbackslash{\rawbackslashxx}%
2530 \catcode`\\ = 0
2531 \catcode`\@ = 11
2532 \escapechar = `\\
2533 \begindoublecolumns
2412 \input \jobname.#1s 2534 \input \jobname.#1s
2535 \enddoublecolumns
2413 \fi 2536 \fi
2414 \fi 2537 \fi
2415 \closein 1 2538 \closein 1
2416 \enddoublecolumns
2417 \endgroup} 2539 \endgroup}
2418 2540
2419 % These macros are used by the sorted index file itself. 2541 % These macros are used by the sorted index file itself.
2420 % Change them to control the appearance of the index. 2542 % Change them to control the appearance of the index.
2421 2543
2513 \newbox\partialpage 2635 \newbox\partialpage
2514 \newdimen\doublecolumnhsize 2636 \newdimen\doublecolumnhsize
2515 2637
2516 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns 2638 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
2517 % Grab any single-column material above us. 2639 % Grab any single-column material above us.
2518 \output = {\global\setbox\partialpage 2640 \output = {\global\setbox\partialpage = \vbox{%
2519 =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% 2641 %
2642 % Here is a possibility not foreseen in manmac: if we accumulate a
2643 % whole lot of material, we might end up calling this \output
2644 % routine twice in a row (see the doublecol-lose test, which is
2645 % essentially a couple of indexes with @setchapternewpage off). In
2646 % that case, we must prevent the second \partialpage from
2647 % simply overwriting the first, causing us to lose the page.
2648 % This will preserve it until a real output routine can ship it
2649 % out. Generally, \partialpage will be empty when this runs and
2650 % this will be a no-op.
2651 \unvbox\partialpage
2652 %
2653 % Unvbox the main output page.
2654 \unvbox255
2655 \kern-\topskip \kern\baselineskip
2656 }}%
2520 \eject 2657 \eject
2521 % 2658 %
2522 % Now switch to the double-column output routine. 2659 % Use the double-column output routine for subsequent pages.
2523 \output={\doublecolumnout}% 2660 \output = {\doublecolumnout}%
2524 % 2661 %
2525 % Change the page size parameters. We could do this once outside this 2662 % Change the page size parameters. We could do this once outside this
2526 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 2663 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
2527 % format, but then we repeat the same computation. Repeating a couple 2664 % format, but then we repeat the same computation. Repeating a couple
2528 % of assignments once per index is clearly meaningless for the 2665 % of assignments once per index is clearly meaningless for the
2529 % execution time, so we may as well do it once. 2666 % execution time, so we may as well do it in one place.
2530 % 2667 %
2531 % First we halve the line length, less a little for the gutter between 2668 % First we halve the line length, less a little for the gutter between
2532 % the columns. We compute the gutter based on the line length, so it 2669 % the columns. We compute the gutter based on the line length, so it
2533 % changes automatically with the paper format. The magic constant 2670 % changes automatically with the paper format. The magic constant
2534 % below is chosen so that the gutter has the same value (well, +- < 2671 % below is chosen so that the gutter has the same value (well, +-<1pt)
2535 % 1pt) as it did when we hard-coded it. 2672 % as it did when we hard-coded it.
2536 % 2673 %
2537 % We put the result in a separate register, \doublecolumhsize, so we 2674 % We put the result in a separate register, \doublecolumhsize, so we
2538 % can restore it in \pagesofar, after \hsize itself has (potentially) 2675 % can restore it in \pagesofar, after \hsize itself has (potentially)
2539 % been clobbered. 2676 % been clobbered.
2540 % 2677 %
2551 \splittopskip=\topskip \splitmaxdepth=\maxdepth 2688 \splittopskip=\topskip \splitmaxdepth=\maxdepth
2552 % Get the available space for the double columns -- the normal 2689 % Get the available space for the double columns -- the normal
2553 % (undoubled) page height minus any material left over from the 2690 % (undoubled) page height minus any material left over from the
2554 % previous page. 2691 % previous page.
2555 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage 2692 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
2556 % box0 will be the left-hand column, box1 the right. 2693 % box0 will be the left-hand column, box2 the right.
2557 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ 2694 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
2558 \onepageout\pagesofar 2695 \onepageout\pagesofar
2559 \unvbox255 \penalty\outputpenalty 2696 \unvbox255
2697 \penalty\outputpenalty
2560 } 2698 }
2561 \def\pagesofar{% 2699 \def\pagesofar{%
2562 % The contents of the output page -- any previous material, 2700 % Re-output the contents of the output page -- any previous material,
2563 % followed by the two boxes we just split. 2701 % followed by the two boxes we just split.
2564 \unvbox\partialpage 2702 \unvbox\partialpage
2565 \hsize = \doublecolumnhsize 2703 \hsize = \doublecolumnhsize
2566 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% 2704 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
2567 } 2705 }
2568 \def\enddoublecolumns{% 2706 \def\enddoublecolumns{%
2569 \output={\balancecolumns}\eject % split what we have 2707 \output = {\balancecolumns}\eject % split what we have
2570 \endgroup 2708 \endgroup % started in \begindoublecolumns
2709 %
2571 % Back to normal single-column typesetting, but take account of the 2710 % Back to normal single-column typesetting, but take account of the
2572 % fact that we just accumulated some stuff on the output page. 2711 % fact that we just accumulated some stuff on the output page.
2573 \pagegoal=\vsize 2712 \pagegoal = \vsize
2574 } 2713 }
2575 \def\balancecolumns{% 2714 \def\balancecolumns{%
2576 % Called on the last page of the double column material. 2715 % Called at the end of the double column material.
2577 \setbox0=\vbox{\unvbox255}% 2716 \setbox0 = \vbox{\unvbox255}%
2578 \dimen@ = \ht0 2717 \dimen@ = \ht0
2579 \advance\dimen@ by \topskip 2718 \advance\dimen@ by \topskip
2580 \advance\dimen@ by-\baselineskip 2719 \advance\dimen@ by-\baselineskip
2581 \divide\dimen@ by 2 2720 \divide\dimen@ by 2
2582 \splittopskip = \topskip 2721 \splittopskip = \topskip
2583 % Loop until we get a decent breakpoint. 2722 % Loop until we get a decent breakpoint.
2584 {\vbadness=10000 \loop \global\setbox3=\copy0 2723 {\vbadness=10000 \loop
2724 \global\setbox3=\copy0
2585 \global\setbox1=\vsplit3 to\dimen@ 2725 \global\setbox1=\vsplit3 to\dimen@
2586 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}% 2726 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
2727 \repeat}%
2587 \setbox0=\vbox to\dimen@{\unvbox1}% 2728 \setbox0=\vbox to\dimen@{\unvbox1}%
2588 \setbox2=\vbox to\dimen@{\unvbox3}% 2729 \setbox2=\vbox to\dimen@{\unvbox3}%
2589 \pagesofar 2730 \pagesofar
2590 } 2731 }
2591 \catcode `\@=\other 2732 \catcode`\@ = \other
2592 2733
2593 2734
2594 \message{sectioning,} 2735 \message{sectioning,}
2595 % Define chapters, sections, etc. 2736 % Define chapters, sections, etc.
2596 2737
2597 \newcount \chapno 2738 \newcount\chapno
2598 \newcount \secno \secno=0 2739 \newcount\secno \secno=0
2599 \newcount \subsecno \subsecno=0 2740 \newcount\subsecno \subsecno=0
2600 \newcount \subsubsecno \subsubsecno=0 2741 \newcount\subsubsecno \subsubsecno=0
2601 2742
2602 % This counter is funny since it counts through charcodes of letters A, B, ... 2743 % This counter is funny since it counts through charcodes of letters A, B, ...
2603 \newcount \appendixno \appendixno = `\@ 2744 \newcount\appendixno \appendixno = `\@
2604 \def\appendixletter{\char\the\appendixno} 2745 \def\appendixletter{\char\the\appendixno}
2605 2746
2606 \newwrite \contentsfile 2747 \newwrite\contentsfile
2607 % This is called from \setfilename. 2748 % This is called from \setfilename.
2608 \def\opencontents{\openout \contentsfile = \jobname.toc} 2749 \def\opencontents{\openout\contentsfile = \jobname.toc }
2609 2750
2610 % Each @chapter defines this as the name of the chapter. 2751 % Each @chapter defines this as the name of the chapter.
2611 % page headings and footings can use it. @section does likewise 2752 % page headings and footings can use it. @section does likewise
2612 2753
2613 \def\thischapter{} \def\thissection{} 2754 \def\thischapter{} \def\thissection{}
2614 \def\seccheck#1{\if \pageno<0 % 2755 \def\seccheck#1{\ifnum \pageno<0
2615 \errmessage{@#1 not allowed after generating table of contents}\fi 2756 \errmessage{@#1 not allowed after generating table of contents}%
2616 % 2757 \fi}
2617 }
2618 2758
2619 \def\chapternofonts{% 2759 \def\chapternofonts{%
2620 \let\rawbackslash=\relax% 2760 \let\rawbackslash=\relax
2621 \let\frenchspacing=\relax% 2761 \let\frenchspacing=\relax
2622 \def\result{\realbackslash result} 2762 \def\result{\realbackslash result}%
2623 \def\equiv{\realbackslash equiv} 2763 \def\equiv{\realbackslash equiv}%
2624 \def\expansion{\realbackslash expansion} 2764 \def\expansion{\realbackslash expansion}%
2625 \def\print{\realbackslash print} 2765 \def\print{\realbackslash print}%
2626 \def\TeX{\realbackslash TeX} 2766 \def\TeX{\realbackslash TeX}%
2627 \def\dots{\realbackslash dots} 2767 \def\dots{\realbackslash dots}%
2628 \def\copyright{\realbackslash copyright} 2768 \def\result{\realbackslash result}%
2629 \def\tt{\realbackslash tt} 2769 \def\equiv{\realbackslash equiv}%
2630 \def\bf{\realbackslash bf } 2770 \def\expansion{\realbackslash expansion}%
2631 \def\w{\realbackslash w} 2771 \def\print{\realbackslash print}%
2632 \def\less{\realbackslash less} 2772 \def\error{\realbackslash error}%
2633 \def\gtr{\realbackslash gtr} 2773 \def\point{\realbackslash point}%
2634 \def\hat{\realbackslash hat} 2774 \def\copyright{\realbackslash copyright}%
2635 \def\char{\realbackslash char} 2775 \def\tt{\realbackslash tt}%
2636 \def\tclose##1{\realbackslash tclose {##1}} 2776 \def\bf{\realbackslash bf}%
2637 \def\code##1{\realbackslash code {##1}} 2777 \def\w{\realbackslash w}%
2638 \def\samp##1{\realbackslash samp {##1}} 2778 \def\less{\realbackslash less}%
2639 \def\r##1{\realbackslash r {##1}} 2779 \def\gtr{\realbackslash gtr}%
2640 \def\b##1{\realbackslash b {##1}} 2780 \def\hat{\realbackslash hat}%
2641 \def\key##1{\realbackslash key {##1}} 2781 \def\char{\realbackslash char}%
2642 \def\file##1{\realbackslash file {##1}} 2782 \def\tclose##1{\realbackslash tclose{##1}}%
2643 \def\kbd##1{\realbackslash kbd {##1}} 2783 \def\code##1{\realbackslash code{##1}}%
2644 % These are redefined because @smartitalic wouldn't work inside xdef. 2784 \def\samp##1{\realbackslash samp{##1}}%
2645 \def\i##1{\realbackslash i {##1}} 2785 \def\r##1{\realbackslash r{##1}}%
2646 \def\cite##1{\realbackslash cite {##1}} 2786 \def\b##1{\realbackslash b{##1}}%
2647 \def\var##1{\realbackslash var {##1}} 2787 \def\key##1{\realbackslash key{##1}}%
2648 \def\emph##1{\realbackslash emph {##1}} 2788 \def\file##1{\realbackslash file{##1}}%
2649 \def\dfn##1{\realbackslash dfn {##1}} 2789 \def\kbd##1{\realbackslash kbd{##1}}%
2790 % These are redefined because @smartitalic wouldn't work inside xdef.
2791 \def\i##1{\realbackslash i{##1}}%
2792 \def\cite##1{\realbackslash cite{##1}}%
2793 \def\var##1{\realbackslash var{##1}}%
2794 \def\emph##1{\realbackslash emph{##1}}%
2795 \def\dfn##1{\realbackslash dfn{##1}}%
2650 } 2796 }
2651 2797
2652 \newcount\absseclevel % used to calculate proper heading level 2798 \newcount\absseclevel % used to calculate proper heading level
2653 \newcount\secbase\secbase=0 % @raise/lowersections modify this count 2799 \newcount\secbase\secbase=0 % @raise/lowersections modify this count
2654 2800
2731 \gdef\thischaptername{#1}% 2877 \gdef\thischaptername{#1}%
2732 % We don't substitute the actual chapter name into \thischapter 2878 % We don't substitute the actual chapter name into \thischapter
2733 % because we don't want its macros evaluated now. 2879 % because we don't want its macros evaluated now.
2734 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% 2880 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
2735 {\chapternofonts% 2881 {\chapternofonts%
2736 \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% 2882 \toks0 = {#1}%
2883 \edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
2737 \escapechar=`\\% 2884 \escapechar=`\\%
2738 \write \contentsfile \temp % 2885 \write \contentsfile \temp %
2739 \donoderef % 2886 \donoderef %
2740 \global\let\section = \numberedsec 2887 \global\let\section = \numberedsec
2741 \global\let\subsection = \numberedsubsec 2888 \global\let\subsection = \numberedsubsec
2750 \chapmacro {#1}{\putwordAppendix{} \appendixletter}% 2897 \chapmacro {#1}{\putwordAppendix{} \appendixletter}%
2751 \gdef\thissection{#1}% 2898 \gdef\thissection{#1}%
2752 \gdef\thischaptername{#1}% 2899 \gdef\thischaptername{#1}%
2753 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% 2900 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
2754 {\chapternofonts% 2901 {\chapternofonts%
2755 \edef\temp{{\realbackslash chapentry 2902 \toks0 = {#1}%
2756 {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% 2903 \edef\temp{{\realbackslash chapentry{\the\toks0}%
2904 {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
2757 \escapechar=`\\% 2905 \escapechar=`\\%
2758 \write \contentsfile \temp % 2906 \write \contentsfile \temp %
2759 \appendixnoderef % 2907 \appendixnoderef %
2760 \global\let\section = \appendixsec 2908 \global\let\section = \appendixsec
2761 \global\let\subsection = \appendixsubsec 2909 \global\let\subsection = \appendixsubsec
2785 \toks0 = {#1}\message{(\the\toks0)}% 2933 \toks0 = {#1}\message{(\the\toks0)}%
2786 % 2934 %
2787 \unnumbchapmacro {#1}% 2935 \unnumbchapmacro {#1}%
2788 \gdef\thischapter{#1}\gdef\thissection{#1}% 2936 \gdef\thischapter{#1}\gdef\thissection{#1}%
2789 {\chapternofonts% 2937 {\chapternofonts%
2790 \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% 2938 \toks0 = {#1}%
2939 \edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
2791 \escapechar=`\\% 2940 \escapechar=`\\%
2792 \write \contentsfile \temp % 2941 \write \contentsfile \temp %
2793 \unnumbnoderef % 2942 \unnumbnoderef %
2794 \global\let\section = \unnumberedsec 2943 \global\let\section = \unnumberedsec
2795 \global\let\subsection = \unnumberedsubsec 2944 \global\let\subsection = \unnumberedsubsec
2800 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz 2949 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
2801 \def\seczzz #1{\seccheck{section}% 2950 \def\seczzz #1{\seccheck{section}%
2802 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 2951 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2803 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% 2952 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
2804 {\chapternofonts% 2953 {\chapternofonts%
2954 \toks0 = {#1}%
2805 \edef\temp{{\realbackslash secentry % 2955 \edef\temp{{\realbackslash secentry %
2806 {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% 2956 {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
2807 \escapechar=`\\% 2957 \escapechar=`\\%
2808 \write \contentsfile \temp % 2958 \write \contentsfile \temp %
2809 \donoderef % 2959 \donoderef %
2810 \penalty 10000 % 2960 \penalty 10000 %
2811 }} 2961 }}
2815 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz 2965 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
2816 \def\appendixsectionzzz #1{\seccheck{appendixsection}% 2966 \def\appendixsectionzzz #1{\seccheck{appendixsection}%
2817 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 2967 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
2818 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% 2968 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
2819 {\chapternofonts% 2969 {\chapternofonts%
2970 \toks0 = {#1}%
2820 \edef\temp{{\realbackslash secentry % 2971 \edef\temp{{\realbackslash secentry %
2821 {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% 2972 {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
2822 \escapechar=`\\% 2973 \escapechar=`\\%
2823 \write \contentsfile \temp % 2974 \write \contentsfile \temp %
2824 \appendixnoderef % 2975 \appendixnoderef %
2825 \penalty 10000 % 2976 \penalty 10000 %
2826 }} 2977 }}
2828 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} 2979 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
2829 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz 2980 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
2830 \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% 2981 \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
2831 \plainsecheading {#1}\gdef\thissection{#1}% 2982 \plainsecheading {#1}\gdef\thissection{#1}%
2832 {\chapternofonts% 2983 {\chapternofonts%
2833 \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}% 2984 \toks0 = {#1}%
2985 \edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
2834 \escapechar=`\\% 2986 \escapechar=`\\%
2835 \write \contentsfile \temp % 2987 \write \contentsfile \temp %
2836 \unnumbnoderef % 2988 \unnumbnoderef %
2837 \penalty 10000 % 2989 \penalty 10000 %
2838 }} 2990 }}
2841 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz 2993 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
2842 \def\numberedsubseczzz #1{\seccheck{subsection}% 2994 \def\numberedsubseczzz #1{\seccheck{subsection}%
2843 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 2995 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
2844 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% 2996 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
2845 {\chapternofonts% 2997 {\chapternofonts%
2998 \toks0 = {#1}%
2846 \edef\temp{{\realbackslash subsecentry % 2999 \edef\temp{{\realbackslash subsecentry %
2847 {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% 3000 {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
2848 \escapechar=`\\% 3001 \escapechar=`\\%
2849 \write \contentsfile \temp % 3002 \write \contentsfile \temp %
2850 \donoderef % 3003 \donoderef %
2851 \penalty 10000 % 3004 \penalty 10000 %
2852 }} 3005 }}
2855 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz 3008 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
2856 \def\appendixsubseczzz #1{\seccheck{appendixsubsec}% 3009 \def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
2857 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 3010 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
2858 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% 3011 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
2859 {\chapternofonts% 3012 {\chapternofonts%
3013 \toks0 = {#1}%
2860 \edef\temp{{\realbackslash subsecentry % 3014 \edef\temp{{\realbackslash subsecentry %
2861 {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% 3015 {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
2862 \escapechar=`\\% 3016 \escapechar=`\\%
2863 \write \contentsfile \temp % 3017 \write \contentsfile \temp %
2864 \appendixnoderef % 3018 \appendixnoderef %
2865 \penalty 10000 % 3019 \penalty 10000 %
2866 }} 3020 }}
2868 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} 3022 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
2869 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz 3023 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
2870 \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% 3024 \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
2871 \plainsubsecheading {#1}\gdef\thissection{#1}% 3025 \plainsubsecheading {#1}\gdef\thissection{#1}%
2872 {\chapternofonts% 3026 {\chapternofonts%
2873 \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% 3027 \toks0 = {#1}%
3028 \edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
2874 \escapechar=`\\% 3029 \escapechar=`\\%
2875 \write \contentsfile \temp % 3030 \write \contentsfile \temp %
2876 \unnumbnoderef % 3031 \unnumbnoderef %
2877 \penalty 10000 % 3032 \penalty 10000 %
2878 }} 3033 }}
2882 \def\numberedsubsubseczzz #1{\seccheck{subsubsection}% 3037 \def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
2883 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3038 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
2884 \subsubsecheading {#1} 3039 \subsubsecheading {#1}
2885 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3040 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
2886 {\chapternofonts% 3041 {\chapternofonts%
2887 \edef\temp{{\realbackslash subsubsecentry % 3042 \toks0 = {#1}%
2888 {#1} 3043 \edef\temp{{\realbackslash subsubsecentry{\the\toks0}
2889 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} 3044 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
2890 {\noexpand\folio}}}% 3045 {\noexpand\folio}}}%
2891 \escapechar=`\\% 3046 \escapechar=`\\%
2892 \write \contentsfile \temp % 3047 \write \contentsfile \temp %
2893 \donoderef % 3048 \donoderef %
2899 \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}% 3054 \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
2900 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 3055 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
2901 \subsubsecheading {#1} 3056 \subsubsecheading {#1}
2902 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 3057 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
2903 {\chapternofonts% 3058 {\chapternofonts%
2904 \edef\temp{{\realbackslash subsubsecentry{#1}% 3059 \toks0 = {#1}%
3060 \edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
2905 {\appendixletter} 3061 {\appendixletter}
2906 {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% 3062 {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
2907 \escapechar=`\\% 3063 \escapechar=`\\%
2908 \write \contentsfile \temp % 3064 \write \contentsfile \temp %
2909 \appendixnoderef % 3065 \appendixnoderef %
2913 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} 3069 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
2914 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz 3070 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
2915 \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% 3071 \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
2916 \plainsubsubsecheading {#1}\gdef\thissection{#1}% 3072 \plainsubsubsecheading {#1}\gdef\thissection{#1}%
2917 {\chapternofonts% 3073 {\chapternofonts%
2918 \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% 3074 \toks0 = {#1}%
3075 \edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
2919 \escapechar=`\\% 3076 \escapechar=`\\%
2920 \write \contentsfile \temp % 3077 \write \contentsfile \temp %
2921 \unnumbnoderef % 3078 \unnumbnoderef %
2922 \penalty 10000 % 3079 \penalty 10000 %
2923 }} 3080 }}
3094 \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} 3251 \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
3095 \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} 3252 \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
3096 3253
3097 3254
3098 % Print any size section title. 3255 % Print any size section title.
3099 % 3256 %
3100 % #1 is the section type (sec/subsec/subsubsec), #2 is the section 3257 % #1 is the section type (sec/subsec/subsubsec), #2 is the section
3101 % number (maybe empty), #3 the text. 3258 % number (maybe empty), #3 the text.
3102 \def\sectionheading#1#2#3{% 3259 \def\sectionheading#1#2#3{%
3103 {% 3260 {%
3104 \expandafter\advance\csname #1headingskip\endcsname by \parskip 3261 \expandafter\advance\csname #1headingskip\endcsname by \parskip
3138 % Don't need to put `Contents' or `Short Contents' in the headline. 3295 % Don't need to put `Contents' or `Short Contents' in the headline.
3139 % It is abundantly clear what they are. 3296 % It is abundantly clear what they are.
3140 \unnumbchapmacro{#1}\def\thischapter{}% 3297 \unnumbchapmacro{#1}\def\thischapter{}%
3141 \begingroup % Set up to handle contents files properly. 3298 \begingroup % Set up to handle contents files properly.
3142 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 3299 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
3143 \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi 3300 % We can't do this, because then an actual ^ in a section
3301 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
3302 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
3144 \raggedbottom % Worry more about breakpoints than the bottom. 3303 \raggedbottom % Worry more about breakpoints than the bottom.
3145 \advance\hsize by -\contentsrightmargin % Don't use the full line length. 3304 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
3146 } 3305 }
3147 3306
3148 3307
3346 \catcode`\<=12 3505 \catcode`\<=12
3347 \catcode`\>=12 3506 \catcode`\>=12
3348 \escapechar=`\\ 3507 \escapechar=`\\
3349 % 3508 %
3350 \let\,=\ptexcomma 3509 \let\,=\ptexcomma
3351 \let\~=\ptextilde
3352 \let\{=\ptexlbrace 3510 \let\{=\ptexlbrace
3353 \let\}=\ptexrbrace 3511 \let\}=\ptexrbrace
3354 \let\.=\ptexdot 3512 \let\.=\ptexdot
3355 \let\*=\ptexstar 3513 \let\*=\ptexstar
3356 \let\dots=\ptexdots 3514 \let\dots=\ptexdots
3357 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}} 3515 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3358 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi} 3516 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3359 \def\@{@}% 3517 \def\@{@}%
3360 \let\bullet=\ptexbullet 3518 \let\bullet=\ptexbullet
3361 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext 3519 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
3362 % 3520 %
3363 \let\Etex=\endgroup} 3521 \let\Etex=\endgroup}
3494 % will be inserted at the beginning of the next paragraph in the 3652 % will be inserted at the beginning of the next paragraph in the
3495 % document, after the environment. 3653 % document, after the environment.
3496 % 3654 %
3497 \def\nonfillfinish{\afterenvbreak\endgroup}% 3655 \def\nonfillfinish{\afterenvbreak\endgroup}%
3498 3656
3499 % This macro is
3500 \def\lisp{\begingroup 3657 \def\lisp{\begingroup
3501 \nonfillstart 3658 \nonfillstart
3502 \let\Elisp = \nonfillfinish 3659 \let\Elisp = \nonfillfinish
3503 \tt 3660 \tt
3661 % Make @kbd do something special, if requested.
3662 \let\kbdfont\kbdexamplefont
3504 \rawbackslash % have \ input char produce \ char from current font 3663 \rawbackslash % have \ input char produce \ char from current font
3505 \gobble 3664 \gobble
3506 } 3665 }
3507 3666
3508 % Define the \E... control sequence only if we are inside the 3667 % Define the \E... control sequence only if we are inside the
3616 % but make & act ordinary (given that it's active). 3775 % but make & act ordinary (given that it's active).
3617 \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} 3776 \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
3618 3777
3619 % Definitions of (, ) and & used in args for functions. 3778 % Definitions of (, ) and & used in args for functions.
3620 % This is the definition of ( outside of all parentheses. 3779 % This is the definition of ( outside of all parentheses.
3621 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % 3780 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
3622 \global\advance\parencount by 1 } 3781 \global\advance\parencount by 1
3782 }
3623 % 3783 %
3624 % This is the definition of ( when already inside a level of parens. 3784 % This is the definition of ( when already inside a level of parens.
3625 \gdef\opnested{\char`\(\global\advance\parencount by 1 } 3785 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
3626 % 3786 %
3627 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. 3787 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
3628 % also in that case restore the outer-level definition of (. 3788 % also in that case restore the outer-level definition of (.
3629 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi 3789 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
3630 \global\advance \parencount by -1 } 3790 \global\advance \parencount by -1 }
3631 % If we encounter &foo, then turn on ()-hacking afterwards 3791 % If we encounter &foo, then turn on ()-hacking afterwards
3632 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ } 3792 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
3633 % 3793 %
3634 \gdef\normalparens{\boldbrax\let&=\ampnr} 3794 \gdef\normalparens{\boldbrax\let&=\ampnr}
3635 } % End of definition inside \activeparens 3795 } % End of definition inside \activeparens
3636 %% These parens (in \boldbrax) actually are a little bolder than the 3796 %% These parens (in \boldbrax) actually are a little bolder than the
3637 %% contained text. This is especially needed for [ and ] 3797 %% contained text. This is especially needed for [ and ]
3638 \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} 3798 \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
3639 \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} 3799 \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
3800 \def\ampnr{\&}
3801 \def\lbrb{{\bf\char`\[}}
3802 \def\rbrb{{\bf\char`\]}}
3640 3803
3641 % First, defname, which formats the header line itself. 3804 % First, defname, which formats the header line itself.
3642 % #1 should be the function name. 3805 % #1 should be the function name.
3643 % #2 should be the type of definition, such as "Function". 3806 % #2 should be the type of definition, such as "Function".
3644 3807
3727 \catcode 61=\active % 3890 \catcode 61=\active %
3728 \obeylines\spacesplit#3} 3891 \obeylines\spacesplit#3}
3729 3892
3730 % This is used for \def{tp,vr}parsebody. It could probably be used for 3893 % This is used for \def{tp,vr}parsebody. It could probably be used for
3731 % some of the others, too, with some judicious conditionals. 3894 % some of the others, too, with some judicious conditionals.
3732 % 3895 %
3733 \def\parsebodycommon#1#2#3{% 3896 \def\parsebodycommon#1#2#3{%
3734 \begingroup\inENV % 3897 \begingroup\inENV %
3735 \medbreak % 3898 \medbreak %
3736 % Define the end token that this defining construct specifies 3899 % Define the end token that this defining construct specifies
3737 % so that it will exit this group. 3900 % so that it will exit this group.
3761 \parsebodycommon{#1}{#2}{#3}% 3924 \parsebodycommon{#1}{#2}{#3}%
3762 \spacesplit{\parsetpheaderline{#3{#4}}}\empty 3925 \spacesplit{\parsetpheaderline{#3{#4}}}\empty
3763 } 3926 }
3764 3927
3765 % Fine, but then we have to eventually remove the \empty *and* the 3928 % Fine, but then we have to eventually remove the \empty *and* the
3766 % braces (if any). That's what this does, putting the result in \tptemp. 3929 % braces (if any). That's what this does.
3767 % 3930 %
3768 \def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}% 3931 \def\removeemptybraces\empty#1\relax{#1}
3769 3932
3770 % After \spacesplit has done its work, this is called -- #1 is the final 3933 % After \spacesplit has done its work, this is called -- #1 is the final
3771 % thing to call, #2 the type name (which starts with \empty), and #3 3934 % thing to call, #2 the type name (which starts with \empty), and #3
3772 % (which might be empty) the arguments. 3935 % (which might be empty) the arguments.
3773 % 3936 %
3774 \def\parsetpheaderline#1#2#3{% 3937 \def\parsetpheaderline#1#2#3{%
3775 \removeemptybraces#2\relax 3938 #1{\removeemptybraces#2\relax}{#3}%
3776 #1{\tptemp}{#3}%
3777 }% 3939 }%
3778 3940
3779 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % 3941 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
3780 \medbreak % 3942 \medbreak %
3781 % Define the end token that this defining construct specifies 3943 % Define the end token that this defining construct specifies
3812 % Expand, preventing hyphenation at `-' chars. 3974 % Expand, preventing hyphenation at `-' chars.
3813 % Note that groups don't affect changes in \hyphenchar. 3975 % Note that groups don't affect changes in \hyphenchar.
3814 \hyphenchar\tensl=0 3976 \hyphenchar\tensl=0
3815 #1% 3977 #1%
3816 \hyphenchar\tensl=45 3978 \hyphenchar\tensl=45
3817 \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi% 3979 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
3818 \interlinepenalty=10000 3980 \interlinepenalty=10000
3819 \advance\rightskip by 0pt plus 1fil 3981 \advance\rightskip by 0pt plus 1fil
3820 \endgraf\penalty 10000\vskip -\parskip\penalty 10000% 3982 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
3821 } 3983 }
3822 3984
3913 \def\deffnx #1 {\errmessage{@deffnx in invalid context}} 4075 \def\deffnx #1 {\errmessage{@deffnx in invalid context}}
3914 \def\defunx #1 {\errmessage{@defunx in invalid context}} 4076 \def\defunx #1 {\errmessage{@defunx in invalid context}}
3915 \def\defmacx #1 {\errmessage{@defmacx in invalid context}} 4077 \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
3916 \def\defspecx #1 {\errmessage{@defspecx in invalid context}} 4078 \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
3917 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} 4079 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
4080 \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
3918 \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} 4081 \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
3919 4082
3920 % @defmethod, and so on 4083 % @defmethod, and so on
3921 4084
3922 % @defop {Funny Method} foo-class frobnicate argument 4085 % @defop {Funny Method} foo-class frobnicate argument
3926 4089
3927 \def\defopheader #1#2#3{% 4090 \def\defopheader #1#2#3{%
3928 \dosubind {fn}{\code{#2}}{on #1}% Make entry in function index 4091 \dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
3929 \begingroup\defname {#2}{\defoptype{} on #1}% 4092 \begingroup\defname {#2}{\defoptype{} on #1}%
3930 \defunargs {#3}\endgroup % 4093 \defunargs {#3}\endgroup %
4094 }
4095
4096 % @deftypemethod foo-class return-type foo-method args
4097 %
4098 \def\deftypemethod{%
4099 \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
4100 %
4101 % #1 is the class name, #2 the data type, #3 the method name, #4 the args.
4102 \def\deftypemethodheader#1#2#3#4{%
4103 \deftypefnheaderx{Method on #1}{#2}#3 #4\relax
3931 } 4104 }
3932 4105
3933 % @defmethod == @defop Method 4106 % @defmethod == @defop Method
3934 4107
3935 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} 4108 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
4005 4178
4006 % @deftypevar int foobar 4179 % @deftypevar int foobar
4007 4180
4008 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} 4181 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
4009 4182
4010 % #1 is the data type. #2 is the name. 4183 % #1 is the data type. #2 is the name, perhaps followed by text that
4184 % is actually part of the data type, which should not be put into the index.
4011 \def\deftypevarheader #1#2{% 4185 \def\deftypevarheader #1#2{%
4012 \doind {vr}{\code{#2}}% Make entry in variables index 4186 \dovarind#2 \relax% Make entry in variables index
4013 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% 4187 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
4014 \interlinepenalty=10000 4188 \interlinepenalty=10000
4015 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 4189 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
4016 \endgroup} 4190 \endgroup}
4191 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
4017 4192
4018 % @deftypevr {Global Flag} int enable 4193 % @deftypevr {Global Flag} int enable
4019 4194
4020 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} 4195 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
4021 4196
4022 \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}% 4197 \def\deftypevrheader #1#2#3{\dovarind#3 \relax%
4023 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} 4198 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
4024 \interlinepenalty=10000 4199 \interlinepenalty=10000
4025 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 4200 \endgraf\penalty 10000\vskip -\parskip\penalty 10000
4026 \endgroup} 4201 \endgroup}
4027 4202
4140 4315
4141 % \dosetq is the interface for calls from other macros 4316 % \dosetq is the interface for calls from other macros
4142 4317
4143 % Use \turnoffactive so that punctuation chars such as underscore 4318 % Use \turnoffactive so that punctuation chars such as underscore
4144 % work in node names. 4319 % work in node names.
4145 \def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat% 4320 \def\dosetq #1#2{{\let\folio=0 \turnoffactive
4146 \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% 4321 \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
4147 \next}} 4322 \next}}
4148 4323
4149 % \internalsetq {foo}{page} expands into 4324 % \internalsetq {foo}{page} expands into
4150 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} 4325 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
4209 \csname X#1\endcsname 4384 \csname X#1\endcsname
4210 \fi 4385 \fi
4211 #2% Output the suffix in any case. 4386 #2% Output the suffix in any case.
4212 } 4387 }
4213 4388
4389 % This is the macro invoked by entries in the aux file.
4390 \def\xrdef #1#2{{%
4391 \catcode`\'=\other
4392 \expandafter\gdef\csname X#1\endcsname{#2}%
4393 }}
4394
4214 % Read the last existing aux file, if any. No error if none exists. 4395 % Read the last existing aux file, if any. No error if none exists.
4215 4396 \def\readauxfile{\begingroup
4216 % This is the macro invoked by entries in the aux file. 4397 \catcode`\^^@=\other
4217 \def\xrdef #1#2{ 4398 \catcode`\^^A=\other
4218 {\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}} 4399 \catcode`\^^B=\other
4219 4400 \catcode`\^^C=\other
4220 \def\readauxfile{% 4401 \catcode`\^^D=\other
4221 \begingroup 4402 \catcode`\^^E=\other
4222 \catcode `\^^@=\other 4403 \catcode`\^^F=\other
4223 \catcode `\=\other 4404 \catcode`\^^G=\other
4224 \catcode `\=\other 4405 \catcode`\^^H=\other
4225 \catcode `\^^C=\other 4406 \catcode`\^^K=\other
4226 \catcode `\^^D=\other 4407 \catcode`\^^L=\other
4227 \catcode `\^^E=\other 4408 \catcode`\^^N=\other
4228 \catcode `\^^F=\other 4409 \catcode`\^^P=\other
4229 \catcode `\^^G=\other 4410 \catcode`\^^Q=\other
4230 \catcode `\^^H=\other 4411 \catcode`\^^R=\other
4231 \catcode `\ =\other 4412 \catcode`\^^S=\other
4232 \catcode `\^^L=\other 4413 \catcode`\^^T=\other
4233 \catcode `\=\other 4414 \catcode`\^^U=\other
4234 \catcode `\=\other 4415 \catcode`\^^V=\other
4235 \catcode `\=\other 4416 \catcode`\^^W=\other
4236 \catcode `\=\other 4417 \catcode`\^^X=\other
4237 \catcode `\=\other 4418 \catcode`\^^Z=\other
4238 \catcode `\=\other 4419 \catcode`\^^[=\other
4239 \catcode `\=\other 4420 \catcode`\^^\=\other
4240 \catcode `\=\other 4421 \catcode`\^^]=\other
4241 \catcode `\=\other 4422 \catcode`\^^^=\other
4242 \catcode `\=\other 4423 \catcode`\^^_=\other
4243 \catcode `\=\other 4424 \catcode`\@=\other
4244 \catcode `\=\other 4425 \catcode`\^=\other
4245 \catcode 26=\other 4426 % It was suggested to define this as 7, which would allow ^^e4 etc.
4246 \catcode `\^^[=\other 4427 % in xref tags, i.e., node names. But since ^^e4 notation isn't
4247 \catcode `\^^\=\other 4428 % supported in the main text, it doesn't seem desirable. Furthermore,
4248 \catcode `\^^]=\other 4429 % that is not enough: for node names that actually contain a ^
4249 \catcode `\^^^=\other 4430 % character, we would end up writing a line like this: 'xrdef {'hat
4250 \catcode `\^^_=\other 4431 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
4251 \catcode `\@=\other 4432 % argument, and \hat is not an expandable control sequence. It could
4252 \catcode `\^=\other 4433 % all be worked out, but why? Either we support ^^ or we don't.
4253 \catcode `\~=\other 4434 %
4254 \catcode `\[=\other 4435 % The other change necessary for this was to define \auxhat:
4255 \catcode `\]=\other 4436 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
4256 \catcode`\"=\other 4437 % and then to call \auxhat in \setq.
4257 \catcode`\_=\other 4438 %
4258 \catcode`\|=\other 4439 \catcode`\~=\other
4259 \catcode`\<=\other 4440 \catcode`\[=\other
4260 \catcode`\>=\other 4441 \catcode`\]=\other
4261 \catcode `\$=\other 4442 \catcode`\"=\other
4262 \catcode `\#=\other 4443 \catcode`\_=\other
4263 \catcode `\&=\other 4444 \catcode`\|=\other
4264 % `\+ does not work, so use 43. 4445 \catcode`\<=\other
4265 \catcode 43=\other 4446 \catcode`\>=\other
4266 % Make the characters 128-255 be printing characters 4447 \catcode`\$=\other
4267 {% 4448 \catcode`\#=\other
4268 \count 1=128 4449 \catcode`\&=\other
4269 \def\loop{% 4450 % `\+ does not work, so use 43.
4270 \catcode\count 1=\other 4451 \catcode43=\other
4271 \advance\count 1 by 1 4452 % Make the characters 128-255 be printing characters
4272 \ifnum \count 1<256 \loop \fi 4453 {%
4454 \count 1=128
4455 \def\loop{%
4456 \catcode\count 1=\other
4457 \advance\count 1 by 1
4458 \ifnum \count 1<256 \loop \fi
4459 }%
4273 }% 4460 }%
4274 }% 4461 % The aux file uses ' as the escape (for now).
4275 % the aux file uses ' as the escape. 4462 % Turn off \ as an escape so we do not lose on
4276 % Turn off \ as an escape so we do not lose on 4463 % entries which were dumped with control sequences in their names.
4277 % entries which were dumped with control sequences in their names. 4464 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
4278 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ 4465 % Reference to such entries still does not work the way one would wish,
4279 % Reference to such entries still does not work the way one would wish, 4466 % but at least they do not bomb out when the aux file is read in.
4280 % but at least they do not bomb out when the aux file is read in. 4467 \catcode`\{=1
4281 \catcode `\{=1 \catcode `\}=2 4468 \catcode`\}=2
4282 \catcode `\%=\other 4469 \catcode`\%=\other
4283 \catcode `\'=0 4470 \catcode`\'=0
4284 \catcode`\^=7 % to make ^^e4 etc usable in xref tags 4471 \catcode`\\=\other
4285 \catcode `\\=\other 4472 %
4286 \openin 1 \jobname.aux 4473 \openin 1 \jobname.aux
4287 \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue 4474 \ifeof 1 \else
4288 \global\warnedobstrue 4475 \closein 1
4289 \fi 4476 \input \jobname.aux
4290 % Open the new aux file. Tex will close it automatically at exit. 4477 \global\havexrefstrue
4291 \openout \auxfile=\jobname.aux 4478 \global\warnedobstrue
4479 \fi
4480 % Open the new aux file. TeX will close it automatically at exit.
4481 \openout\auxfile=\jobname.aux
4292 \endgroup} 4482 \endgroup}
4293 4483
4294 4484
4295 % Footnotes. 4485 % Footnotes.
4296 4486
4301 % pagealignmacro call if that space before the closing brace is 4491 % pagealignmacro call if that space before the closing brace is
4302 % removed. (Generally, numeric constants should always be followed by a 4492 % removed. (Generally, numeric constants should always be followed by a
4303 % space to prevent strange expansion errors.) 4493 % space to prevent strange expansion errors.)
4304 \def\supereject{\par\penalty -20000\footnoteno =0 } 4494 \def\supereject{\par\penalty -20000\footnoteno =0 }
4305 4495
4306 % @footnotestyle is meaningful for info output only.. 4496 % @footnotestyle is meaningful for info output only.
4307 \let\footnotestyle=\comment 4497 \let\footnotestyle=\comment
4308 4498
4309 \let\ptexfootnote=\footnote 4499 \let\ptexfootnote=\footnote
4310 4500
4311 {\catcode `\@=11 4501 {\catcode `\@=11
4327 }% 4517 }%
4328 4518
4329 % Don't bother with the trickery in plain.tex to not require the 4519 % Don't bother with the trickery in plain.tex to not require the
4330 % footnote text as a parameter. Our footnotes don't need to be so general. 4520 % footnote text as a parameter. Our footnotes don't need to be so general.
4331 % 4521 %
4332 \long\gdef\footnotezzz#1{\insert\footins{% 4522 % Oh yes, they do; otherwise, @ifset and anything else that uses
4523 % \parseargline fail inside footnotes because the tokens are fixed when
4524 % the footnote is read. --karl, 16nov96.
4525 %
4526 \long\gdef\footnotezzz{\insert\footins\bgroup
4333 % We want to typeset this text as a normal paragraph, even if the 4527 % We want to typeset this text as a normal paragraph, even if the
4334 % footnote reference occurs in (for example) a display environment. 4528 % footnote reference occurs in (for example) a display environment.
4335 % So reset some parameters. 4529 % So reset some parameters.
4336 \interlinepenalty\interfootnotelinepenalty 4530 \interlinepenalty\interfootnotelinepenalty
4337 \splittopskip\ht\strutbox % top baseline for broken footnotes 4531 \splittopskip\ht\strutbox % top baseline for broken footnotes
4349 % 4543 %
4350 % Don't crash into the line above the footnote text. Since this 4544 % Don't crash into the line above the footnote text. Since this
4351 % expands into a box, it must come within the paragraph, lest it 4545 % expands into a box, it must come within the paragraph, lest it
4352 % provide a place where TeX can split the footnote. 4546 % provide a place where TeX can split the footnote.
4353 \footstrut 4547 \footstrut
4354 #1\strut}% 4548 \futurelet\next\fo@t
4355 } 4549 }
4550 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
4551 \else\let\next\f@t\fi \next}
4552 \def\f@@t{\bgroup\aftergroup\@foot\let\next}
4553 \def\f@t#1{#1\@foot}
4554 \def\@foot{\strut\egroup}
4356 4555
4357 }%end \catcode `\@=11 4556 }%end \catcode `\@=11
4358 4557
4359 % Set the baselineskip to #1, and the lineskip and strut size 4558 % Set the baselineskip to #1, and the lineskip and strut size
4360 % correspondingly. There is no deep meaning behind these magic numbers 4559 % correspondingly. There is no deep meaning behind these magic numbers
4407 % that mark overfull boxes (in case you have decided 4606 % that mark overfull boxes (in case you have decided
4408 % that the text looks ok even though it passes the margin). 4607 % that the text looks ok even though it passes the margin).
4409 % 4608 %
4410 \def\finalout{\overfullrule=0pt} 4609 \def\finalout{\overfullrule=0pt}
4411 4610
4611 % @image. We use the macros from epsf.tex to support this.
4612 % If epsf.tex is not installed and @image is used, we complain.
4613 %
4614 % Check for and read epsf.tex up front. If we read it only at @image
4615 % time, we might be inside a group, and then its definitions would get
4616 % undone and the next image would fail.
4617 \openin 1 = xepsf.tex
4618 \ifeof 1 \else
4619 \closein 1
4620 \def\epsfannounce{\toks0 = }% do not bother showing banner
4621 \input epsf.tex
4622 \fi
4623 %
4624 \newif\ifwarnednoepsf
4625 \newhelp\noepsfhelp{epsf.tex must be installed for images to
4626 work. It is also included in the Texinfo distribution, or you can get
4627 it from ftp://ftp.tug.org/tex/epsf.tex.}
4628 %
4629 % Only complain once about lack of epsf.tex.
4630 \def\image#1{%
4631 \ifx\epsfbox\undefined
4632 \ifwarnednoepsf \else
4633 \errhelp = \noepsfhelp
4634 \errmessage{epsf.tex not found, images will be ignored}%
4635 \global\warnednoepsftrue
4636 \fi
4637 \else
4638 \imagexxx #1,,,\finish
4639 \fi
4640 }
4641 %
4642 % Arguments to @image:
4643 % #1 is (mandatory) image filename; we tack on .eps extension.
4644 % #2 is (optional) width, #3 is (optional) height.
4645 % #4 is just the usual extra ignored arg for parsing this stuff.
4646 \def\imagexxx#1,#2,#3,#4\finish{%
4647 % \epsfbox itself resets \epsf?size at each figure.
4648 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
4649 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
4650 \epsfbox{#1.eps}%
4651 }
4412 4652
4413 % End of control word definitions. 4653 % End of control word definitions.
4654
4414 4655
4415 \message{and turning on texinfo input format.} 4656 \message{and turning on texinfo input format.}
4416 4657
4417 \def\openindices{% 4658 \def\openindices{%
4418 \newindex{cp}% 4659 \newindex{cp}%
4582 \let"=\activedoublequote 4823 \let"=\activedoublequote
4583 \catcode`\~=\active 4824 \catcode`\~=\active
4584 \def~{{\tt \char '176}} 4825 \def~{{\tt \char '176}}
4585 \chardef\hat=`\^ 4826 \chardef\hat=`\^
4586 \catcode`\^=\active 4827 \catcode`\^=\active
4587 \def\auxhat{\def^{'hat}}
4588 \def^{{\tt \hat}} 4828 \def^{{\tt \hat}}
4589 4829
4590 \catcode`\_=\active 4830 \catcode`\_=\active
4591 \def_{\ifusingtt\normalunderscore\_} 4831 \def_{\ifusingtt\normalunderscore\_}
4592 % Subroutine for the previous macro. 4832 % Subroutine for the previous macro.