comparison man/texinfo.tex @ 290:c9fe270a4101 r21-0b43

Import from CVS: tag r21-0b43
author cvs
date Mon, 13 Aug 2007 10:36:47 +0200
parents bfd6434d15b3
children 74fd4e045ea6
comparison
equal deleted inserted replaced
289:6e6992ccc4b6 290:c9fe270a4101
1 %% TeX macros to handle Texinfo files. 1 % texinfo.tex -- TeX macros to handle Texinfo files.
2 %% $Id: texinfo.tex,v 1.4 1997/08/10 04:40:34 steve Exp $ 2 % $Id: texinfo.tex,v 1.5 1998/06/13 04:28:12 steve Exp $
3 3 %
4 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 4 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
5 % 94, 95, 96, 97 Free Software Foundation, Inc. 5 % Free Software Foundation, Inc.
6 6 %
7 %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
8 %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
9 %published by the Free Software Foundation; either version 2, or (at 9 % published by the Free Software Foundation; either version 2, or (at
10 %your option) any later version. 10 % your option) any later version.
11 11 %
12 %This texinfo.tex file is distributed in the hope that it will be 12 % This texinfo.tex file is distributed in the hope that it will be
13 %useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 %of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %General Public License for more details. 15 % General Public License for more details.
16 16 %
17 %You should have received a copy of the GNU General Public License 17 % You should have received a copy of the GNU General Public License
18 %along with this texinfo.tex file; see the file COPYING. If not, write 18 % along with this texinfo.tex file; see the file COPYING. If not, write
19 %to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 %Boston, MA 02111-1307, USA. 20 % Boston, MA 02111-1307, USA.
21 21 %
22 22 % In other words, you are welcome to use, share and improve this program.
23 %In other words, you are welcome to use, share and improve this program. 23 % You are forbidden to forbid anyone else to use, share and improve
24 %You are forbidden to forbid anyone else to use, share and improve 24 % what you give them. Help stamp out software-hoarding!
25 %what you give them. Help stamp out software-hoarding! 25 %
26 26 % Please try the latest version of texinfo.tex before submitting bug
27 27 % reports; you can get the latest version from:
28 % Send bug reports to bug-texinfo@prep.ai.mit.edu. 28 % ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex
29 % Please include a *precise* test case in each bug report. 29 % /home/gd/gnu/doc/texinfo.tex on the GNU machines.
30 %
31 % Send bug reports to bug-texinfo@gnu.org.
32 % Please include a precise test case in each bug report,
33 % including a complete document with which we can reproduce the problem.
34 %
35 % Texinfo macros (with @macro) are *not* supported by texinfo.tex. You
36 % have to run makeinfo -E to expand macros first; the texi2dvi script
37 % does this.
30 38
31 39
32 % Make it possible to create a .fmt file just by loading this file: 40 % Make it possible to create a .fmt file just by loading this file:
33 % if the underlying format is not loaded, start by loading it now. 41 % if the underlying format is not loaded, start by loading it now.
34 % Added by gildea November 1993. 42 % Added by gildea November 1993.
35 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 43 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
36 44
37 % This automatically updates the version number based on RCS. 45 % This automatically updates the version number based on RCS.
38 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} 46 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
39 \deftexinfoversion$Revision: 1.4 $ 47 \deftexinfoversion$Revision: 1.5 $
40 \message{Loading texinfo package [Version \texinfoversion]:} 48 \message{Loading texinfo package [Version \texinfoversion]:}
41 49
42 % If in a .fmt file, print the version number 50 % If in a .fmt file, print the version number
43 % and turn on active characters that we couldn't do earlier because 51 % and turn on active characters that we couldn't do earlier because
44 % they might have appeared in the input file name. 52 % they might have appeared in the input file name.
52 \let\ptexc=\c 60 \let\ptexc=\c
53 \let\ptexcomma=\, 61 \let\ptexcomma=\,
54 \let\ptexdot=\. 62 \let\ptexdot=\.
55 \let\ptexdots=\dots 63 \let\ptexdots=\dots
56 \let\ptexend=\end 64 \let\ptexend=\end
57 \let\ptexequiv = \equiv 65 \let\ptexequiv=\equiv
66 \let\ptexexclam=\!
58 \let\ptexi=\i 67 \let\ptexi=\i
59 \let\ptexlbrace=\{ 68 \let\ptexlbrace=\{
60 \let\ptexrbrace=\} 69 \let\ptexrbrace=\}
61 \let\ptexstar=\* 70 \let\ptexstar=\*
62 \let\ptext=\t 71 \let\ptext=\t
439 \def\*{\hfil\break\hbox{}\ignorespaces} 448 \def\*{\hfil\break\hbox{}\ignorespaces}
440 449
441 % @. is an end-of-sentence period. 450 % @. is an end-of-sentence period.
442 \def\.{.\spacefactor=3000 } 451 \def\.{.\spacefactor=3000 }
443 452
444 % @enddots{} is an end-of-sentence ellipsis.
445 \gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}
446
447 % @! is an end-of-sentence bang. 453 % @! is an end-of-sentence bang.
448 \gdef\!{!\spacefactor=3000 } 454 \def\!{!\spacefactor=3000 }
449 455
450 % @? is an end-of-sentence query. 456 % @? is an end-of-sentence query.
451 \gdef\?{?\spacefactor=3000 } 457 \def\?{?\spacefactor=3000 }
452 458
453 % @w prevents a word break. Without the \leavevmode, @w at the 459 % @w prevents a word break. Without the \leavevmode, @w at the
454 % beginning of a paragraph, when TeX is still in vertical mode, would 460 % beginning of a paragraph, when TeX is still in vertical mode, would
455 % produce a whole line of output instead of starting the paragraph. 461 % produce a whole line of output instead of starting the paragraph.
456 \def\w#1{\leavevmode\hbox{#1}} 462 \def\w#1{\leavevmode\hbox{#1}}
571 577
572 % @br forces paragraph break 578 % @br forces paragraph break
573 579
574 \let\br = \par 580 \let\br = \par
575 581
576 % @dots{} output some dots 582 % @dots{} output an ellipsis using the current font.
577 583 % We do .5em per period so that it has the same spacing in a typewriter
578 \def\dots{$\ldots$} 584 % font as three actual period characters.
585 %
586 \def\dots{\hbox to 1.5em{%
587 \hskip 0pt plus 0.25fil minus 0.25fil
588 .\hss.\hss.%
589 \hskip 0pt plus 0.5fil minus 0.5fil
590 }}
591
592 % @enddots{} is an end-of-sentence ellipsis.
593 %
594 \def\enddots{%
595 \hbox to 2em{%
596 \hskip 0pt plus 0.25fil minus 0.25fil
597 .\hss.\hss.\hss.%
598 \hskip 0pt plus 0.5fil minus 0.5fil
599 }%
600 \spacefactor=3000
601 }
602
579 603
580 % @page forces the start of a new page 604 % @page forces the start of a new page
581 605
582 \def\page{\par\vfill\supereject} 606 \def\page{\par\vfill\supereject}
583 607
1234 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl 1258 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
1235 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc 1259 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
1236 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy 1260 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
1237 \let\tenttsl=\titlettsl 1261 \let\tenttsl=\titlettsl
1238 \resetmathfonts \setleading{25pt}} 1262 \resetmathfonts \setleading{25pt}}
1239 \def\titlefont#1{{\titlefonts #1}} 1263 \def\titlefont#1{{\titlefonts\rm #1}}
1240 \def\chapfonts{% 1264 \def\chapfonts{%
1241 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 1265 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
1242 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc 1266 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
1243 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl 1267 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
1244 \resetmathfonts \setleading{19pt}} 1268 \resetmathfonts \setleading{19pt}}
1261 1285
1262 % Set up the default fonts, so we can use them for creating boxes. 1286 % Set up the default fonts, so we can use them for creating boxes.
1263 % 1287 %
1264 \textfonts 1288 \textfonts
1265 1289
1290 % Define these so they can be easily changed for other fonts.
1291 \def\angleleft{$\langle$}
1292 \def\angleright{$\rangle$}
1293
1266 % Count depth in font-changes, for error checks 1294 % Count depth in font-changes, for error checks
1267 \newcount\fontdepth \fontdepth=0 1295 \newcount\fontdepth \fontdepth=0
1268 1296
1269 % Fonts for short table of contents. 1297 % Fonts for short table of contents.
1270 \setfont\shortcontrm\rmshape{12}{1000} 1298 \setfont\shortcontrm\rmshape{12}{1000}
1298 \def\t#1{% 1326 \def\t#1{%
1299 {\tt \rawbackslash \frenchspacing #1}% 1327 {\tt \rawbackslash \frenchspacing #1}%
1300 \null 1328 \null
1301 } 1329 }
1302 \let\ttfont=\t 1330 \let\ttfont=\t
1303 \def\samp #1{`\tclose{#1}'\null} 1331 \def\samp#1{`\tclose{#1}'\null}
1304 \setfont\smallrm\rmshape{8}{1000} 1332 \setfont\smallrm\rmshape{8}{1000}
1305 \font\smallsy=cmsy9 1333 \font\smallsy=cmsy9
1306 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% 1334 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
1307 \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% 1335 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
1308 \vbox{\hrule\kern-0.4pt 1336 \vbox{\hrule\kern-0.4pt
1309 \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% 1337 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
1310 \kern-0.4pt\hrule}% 1338 \kern-0.4pt\hrule}%
1311 \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} 1339 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
1312 % The old definition, with no lozenge: 1340 % The old definition, with no lozenge:
1313 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} 1341 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
1314 \def\ctrl #1{{\tt \rawbackslash \hat}#1} 1342 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
1315 1343
1316 \let\file=\samp 1344 \let\file=\samp
1419 \fi 1447 \fi
1420 } 1448 }
1421 1449
1422 % rms does not like the angle brackets --karl, 17may97. 1450 % rms does not like the angle brackets --karl, 17may97.
1423 % So now @email is just like @uref. 1451 % So now @email is just like @uref.
1424 %\def\email#1{$\langle${\tt #1}$\rangle$} 1452 %\def\email#1{\angleleft{\tt #1}\angleright}
1425 \let\email=\uref 1453 \let\email=\uref
1426 1454
1427 % Check if we are currently using a typewriter font. Since all the 1455 % Check if we are currently using a typewriter font. Since all the
1428 % Computer Modern typewriter fonts have zero interword stretch (and 1456 % Computer Modern typewriter fonts have zero interword stretch (and
1429 % shrink), and it is reasonable to expect all typewriter fonts to have 1457 % shrink), and it is reasonable to expect all typewriter fonts to have
2041 % @multitableparindent is paragraph indent in table. 2069 % @multitableparindent is paragraph indent in table.
2042 % @multitablecolmargin is horizontal space to be left between columns. 2070 % @multitablecolmargin is horizontal space to be left between columns.
2043 % @multitablelinespace is space to leave between table items, baseline 2071 % @multitablelinespace is space to leave between table items, baseline
2044 % to baseline. 2072 % to baseline.
2045 % 0pt means it depends on current normal line spacing. 2073 % 0pt means it depends on current normal line spacing.
2046 2074 %
2047 %%%%
2048 % Dimensions
2049
2050 \newskip\multitableparskip 2075 \newskip\multitableparskip
2051 \newskip\multitableparindent 2076 \newskip\multitableparindent
2052 \newdimen\multitablecolspace 2077 \newdimen\multitablecolspace
2053 \newskip\multitablelinespace 2078 \newskip\multitablelinespace
2054 \multitableparskip=0pt 2079 \multitableparskip=0pt
2055 \multitableparindent=6pt 2080 \multitableparindent=6pt
2056 \multitablecolspace=12pt 2081 \multitablecolspace=12pt
2057 \multitablelinespace=0pt 2082 \multitablelinespace=0pt
2058 2083
2059 %%%%
2060 % Macros used to set up halign preamble: 2084 % Macros used to set up halign preamble:
2085 %
2061 \let\endsetuptable\relax 2086 \let\endsetuptable\relax
2062 \def\xendsetuptable{\endsetuptable} 2087 \def\xendsetuptable{\endsetuptable}
2063 \let\columnfractions\relax 2088 \let\columnfractions\relax
2064 \def\xcolumnfractions{\columnfractions} 2089 \def\xcolumnfractions{\columnfractions}
2065 \newif\ifsetpercent 2090 \newif\ifsetpercent
2066 2091
2067 %% 2/1/96, to allow fractions to be given with more than one digit. 2092 % 2/1/96, to allow fractions to be given with more than one digit.
2068 \def\pickupwholefraction#1 {\global\advance\colcount by1 % 2093 \def\pickupwholefraction#1 {\global\advance\colcount by1 %
2069 \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% 2094 \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
2070 \setuptable} 2095 \setuptable}
2071 2096
2072 \newcount\colcount 2097 \newcount\colcount
2088 \fi% 2113 \fi%
2089 \fi% 2114 \fi%
2090 \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% 2115 \ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
2091 \fi\go} 2116 \fi\go}
2092 2117
2093 %%%%
2094 % multitable syntax 2118 % multitable syntax
2095 \def\tab{&\hskip1sp\relax} % 2/2/96 2119 \def\tab{&\hskip1sp\relax} % 2/2/96
2096 % tiny skip here makes sure this column space is 2120 % tiny skip here makes sure this column space is
2097 % maintained, even if it is never used. 2121 % maintained, even if it is never used.
2098 2122
2099
2100 %%%%
2101 % @multitable ... @end multitable definitions: 2123 % @multitable ... @end multitable definitions:
2102 2124
2103 \def\multitable{\parsearg\dotable} 2125 \def\multitable{\parsearg\dotable}
2104
2105 \def\dotable#1{\bgroup 2126 \def\dotable#1{\bgroup
2106 \let\item\cr 2127 \vskip\parskip
2107 \tolerance=9500 2128 \let\item\crcr
2108 \hbadness=9500 2129 \tolerance=9500
2109 \setmultitablespacing 2130 \hbadness=9500
2110 \parskip=\multitableparskip 2131 \setmultitablespacing
2111 \parindent=\multitableparindent 2132 \parskip=\multitableparskip
2112 \overfullrule=0pt 2133 \parindent=\multitableparindent
2113 \global\colcount=0\relax% 2134 \overfullrule=0pt
2114 \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% 2135 \global\colcount=0
2115 % To parse everything between @multitable and @item : 2136 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
2116 \setuptable#1 \endsetuptable 2137 %
2117 % Need to reset this to 0 after \setuptable. 2138 % To parse everything between @multitable and @item:
2118 \global\colcount=0\relax% 2139 \setuptable#1 \endsetuptable
2119 % 2140 %
2120 % This preamble sets up a generic column definition, which will 2141 % \everycr will reset column counter, \colcount, at the end of
2121 % be used as many times as user calls for columns. 2142 % each line. Every column entry will cause \colcount to advance by one.
2122 % \vtop will set a single line and will also let text wrap and 2143 % The table preamble
2123 % continue for many paragraphs if desired. 2144 % looks at the current \colcount to find the correct column width.
2124 \halign\bgroup&\global\advance\colcount by 1\relax% 2145 \everycr{\noalign{%
2125 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname 2146 %
2126 % In order to keep entries from bumping into each other 2147 % \filbreak%% keeps underfull box messages off when table breaks over pages.
2127 % we will add a \leftskip of \multitablecolspace to all columns after 2148 % Maybe so, but it also creates really weird page breaks when the table
2128 % the first one. 2149 % breaks over pages. Wouldn't \vfil be better? Wait until the problem
2129 % If a template has been used, we will add \multitablecolspace 2150 % manifests itself, so it can be fixed for real --karl.
2130 % to the width of each template entry. 2151 \global\colcount=0\relax}}%
2131 % If user has set preamble in terms of percent of \hsize 2152 %
2132 % we will use that dimension as the width of the column, and 2153 % This preamble sets up a generic column definition, which will
2133 % the \leftskip will keep entries from bumping into each other. 2154 % be used as many times as user calls for columns.
2134 % Table will start at left margin and final column will justify at 2155 % \vtop will set a single line and will also let text wrap and
2135 % right margin. 2156 % continue for many paragraphs if desired.
2136 \ifnum\colcount=1 2157 \halign\bgroup&\global\advance\colcount by 1\relax
2137 \else 2158 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
2138 \ifsetpercent 2159 %
2160 % In order to keep entries from bumping into each other
2161 % we will add a \leftskip of \multitablecolspace to all columns after
2162 % the first one.
2163 %
2164 % If a template has been used, we will add \multitablecolspace
2165 % to the width of each template entry.
2166 %
2167 % If the user has set preamble in terms of percent of \hsize we will
2168 % use that dimension as the width of the column, and the \leftskip
2169 % will keep entries from bumping into each other. Table will start at
2170 % left margin and final column will justify at right margin.
2171 %
2172 % Make sure we don't inherit \rightskip from the outer environment.
2173 \rightskip=0pt
2174 \ifnum\colcount=1
2175 % The first column will be indented with the surrounding text.
2176 \advance\hsize by\leftskip
2139 \else 2177 \else
2140 % If user has <not> set preamble in terms of percent of \hsize 2178 \ifsetpercent \else
2141 % we will advance \hsize by \multitablecolspace 2179 % If user has not set preamble in terms of percent of \hsize
2142 \advance\hsize by \multitablecolspace 2180 % we will advance \hsize by \multitablecolspace.
2181 \advance\hsize by \multitablecolspace
2182 \fi
2183 % In either case we will make \leftskip=\multitablecolspace:
2184 \leftskip=\multitablecolspace
2143 \fi 2185 \fi
2144 % In either case we will make \leftskip=\multitablecolspace: 2186 % Ignoring space at the beginning and end avoids an occasional spurious
2145 \leftskip=\multitablecolspace 2187 % blank line, when TeX decides to break the line at the space before the
2146 \fi 2188 % box from the multistrut, so the strut ends up on a line by itself.
2147 % Ignoring space at the beginning and end avoids an occasional spurious 2189 % For example:
2148 % blank line, when TeX decides to break the line at the space before the 2190 % @multitable @columnfractions .11 .89
2149 % box from the multistrut, so the strut ends up on a line by itself. 2191 % @item @code{#}
2150 % For example: 2192 % @tab Legal holiday which is valid in major parts of the whole country.
2151 % @multitable @columnfractions .11 .89 2193 % Is automatically provided with highlighting sequences respectively marking
2152 % @item @code{#} 2194 % characters.
2153 % @tab Legal holiday which is valid in major parts of the whole country. 2195 \noindent\ignorespaces##\unskip\multistrut}\cr
2154 % Is automatically provided with highlighting sequences respectively marking
2155 % characters.
2156 \noindent\ignorespaces##\unskip\multistrut}\cr
2157 % \everycr will reset column counter, \colcount, at the end of
2158 % each line. Every column entry will cause \colcount to advance by one.
2159 % The table preamble
2160 % looks at the current \colcount to find the correct column width.
2161 \global\everycr{\noalign{%
2162 % \filbreak%% keeps underfull box messages off when table breaks over pages.
2163 % Maybe so, but it also creates really weird page breaks when the table
2164 % breaks over pages Wouldn't \vfil be better? Wait until the problem
2165 % manifests itself, so it can be fixed for real --karl.
2166 \global\colcount=0\relax}}
2167 } 2196 }
2168 2197
2169 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. 2198 \def\setmultitablespacing{% test to see if user has set \multitablelinespace.
2170 % If so, do nothing. If not, give it an appropriate dimension based on 2199 % If so, do nothing. If not, give it an appropriate dimension based on
2171 % current baselineskip. 2200 % current baselineskip.
2508 \indexfonts \rm 2537 \indexfonts \rm
2509 \tolerance = 9500 2538 \tolerance = 9500
2510 \indexbreaks 2539 \indexbreaks
2511 % 2540 %
2512 % See if the index file exists and is nonempty. 2541 % See if the index file exists and is nonempty.
2542 % Change catcode of @ here so that if the index file contains
2543 % \initial {@}
2544 % as its first line, TeX doesn't complain about mismatched braces
2545 % (because it thinks @} is a control sequence).
2546 \catcode`\@ = 11
2513 \openin 1 \jobname.#1s 2547 \openin 1 \jobname.#1s
2514 \ifeof 1 2548 \ifeof 1
2515 % \enddoublecolumns gets confused if there is no text in the index, 2549 % \enddoublecolumns gets confused if there is no text in the index,
2516 % and it loses the chapter title and the aux file entries for the 2550 % and it loses the chapter title and the aux file entries for the
2517 % index. The easiest way to prevent this problem is to make sure 2551 % index. The easiest way to prevent this problem is to make sure
2529 % Index files are almost Texinfo source, but we use \ as the escape 2563 % Index files are almost Texinfo source, but we use \ as the escape
2530 % character. It would be better to use @, but that's too big a change 2564 % character. It would be better to use @, but that's too big a change
2531 % to make right now. 2565 % to make right now.
2532 \def\indexbackslash{\rawbackslashxx}% 2566 \def\indexbackslash{\rawbackslashxx}%
2533 \catcode`\\ = 0 2567 \catcode`\\ = 0
2534 \catcode`\@ = 11
2535 \escapechar = `\\ 2568 \escapechar = `\\
2536 \begindoublecolumns 2569 \begindoublecolumns
2537 \input \jobname.#1s 2570 \input \jobname.#1s
2538 \enddoublecolumns 2571 \enddoublecolumns
2539 \fi 2572 \fi
3425 3458
3426 % Final typesetting of a toc entry; we use the same \entry macro as for 3459 % Final typesetting of a toc entry; we use the same \entry macro as for
3427 % the index entries, but we want to suppress hyphenation here. (We 3460 % the index entries, but we want to suppress hyphenation here. (We
3428 % can't do that in the \entry macro, since index entries might consist 3461 % can't do that in the \entry macro, since index entries might consist
3429 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) 3462 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
3430 %
3431 % \turnoffactive is for the sake of @" used for umlauts.
3432 \def\tocentry#1#2{\begingroup 3463 \def\tocentry#1#2{\begingroup
3433 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks 3464 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
3434 \entry{\turnoffactive #1}{\turnoffactive #2}% 3465 % Do not use \turnoffactive in these arguments. Since the toc is
3466 % typeset in cmr, so characters such as _ would come out wrong; we
3467 % have to do the usual translation tricks.
3468 \entry{#1}{#2}%
3435 \endgroup} 3469 \endgroup}
3436 3470
3437 % Space between chapter (or whatever) number and the title. 3471 % Space between chapter (or whatever) number and the title.
3438 \def\labelspace{\hskip1em \relax} 3472 \def\labelspace{\hskip1em \relax}
3439 3473
3495 % @tex ... @end tex escapes into raw Tex temporarily. 3529 % @tex ... @end tex escapes into raw Tex temporarily.
3496 % One exception: @ is still an escape character, so that @end tex works. 3530 % One exception: @ is still an escape character, so that @end tex works.
3497 % But \@ or @@ will get a plain tex @ character. 3531 % But \@ or @@ will get a plain tex @ character.
3498 3532
3499 \def\tex{\begingroup 3533 \def\tex{\begingroup
3500 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 3534 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
3501 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 3535 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
3502 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie 3536 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
3503 \catcode `\%=14 3537 \catcode `\%=14
3504 \catcode 43=12 % plus 3538 \catcode 43=12 % plus
3505 \catcode`\"=12 3539 \catcode`\"=12
3506 \catcode`\==12 3540 \catcode`\==12
3507 \catcode`\|=12 3541 \catcode`\|=12
3508 \catcode`\<=12 3542 \catcode`\<=12
3509 \catcode`\>=12 3543 \catcode`\>=12
3510 \escapechar=`\\ 3544 \escapechar=`\\
3511 % 3545 %
3512 \let\,=\ptexcomma 3546 \let\b=\ptexb
3513 \let\{=\ptexlbrace 3547 \let\bullet=\ptexbullet
3514 \let\}=\ptexrbrace 3548 \let\c=\ptexc
3515 \let\.=\ptexdot 3549 \let\,=\ptexcomma
3516 \let\*=\ptexstar 3550 \let\.=\ptexdot
3517 \let\dots=\ptexdots 3551 \let\dots=\ptexdots
3518 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% 3552 \let\equiv=\ptexequiv
3519 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% 3553 \let\!=\ptexexclam
3520 \def\@{@}% 3554 \let\i=\ptexi
3521 \let\bullet=\ptexbullet 3555 \let\{=\ptexlbrace
3522 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext 3556 \let\}=\ptexrbrace
3523 % 3557 \let\*=\ptexstar
3558 \let\t=\ptext
3559 %
3560 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
3561 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
3562 \def\@{@}%
3524 \let\Etex=\endgroup} 3563 \let\Etex=\endgroup}
3525 3564
3526 % Define @lisp ... @endlisp. 3565 % Define @lisp ... @endlisp.
3527 % @lisp does a \begingroup so it can rebind things, 3566 % @lisp does a \begingroup so it can rebind things,
3528 % including the definition of @endlisp (which normally is erroneous). 3567 % including the definition of @endlisp (which normally is erroneous).
4371 % If its value is nonempty, SUFFIX is output afterward. 4410 % If its value is nonempty, SUFFIX is output afterward.
4372 4411
4373 \def\refx#1#2{% 4412 \def\refx#1#2{%
4374 \expandafter\ifx\csname X#1\endcsname\relax 4413 \expandafter\ifx\csname X#1\endcsname\relax
4375 % If not defined, say something at least. 4414 % If not defined, say something at least.
4376 $\langle$un\-de\-fined$\rangle$% 4415 \angleleft un\-de\-fined\angleright
4377 \ifhavexrefs 4416 \ifhavexrefs
4378 \message{\linenumber Undefined cross reference `#1'.}% 4417 \message{\linenumber Undefined cross reference `#1'.}%
4379 \else 4418 \else
4380 \ifwarnedxrefs\else 4419 \ifwarnedxrefs\else
4381 \global\warnedxrefstrue 4420 \global\warnedxrefstrue
4388 \fi 4427 \fi
4389 #2% Output the suffix in any case. 4428 #2% Output the suffix in any case.
4390 } 4429 }
4391 4430
4392 % This is the macro invoked by entries in the aux file. 4431 % This is the macro invoked by entries in the aux file.
4393 \def\xrdef #1#2{{% 4432 %
4394 \catcode`\'=\other 4433 \def\xrdef#1{\begingroup
4395 \expandafter\gdef\csname X#1\endcsname{#2}% 4434 % Reenable \ as an escape while reading the second argument.
4396 }} 4435 \catcode`\\ = 0
4436 \afterassignment\endgroup
4437 \expandafter\gdef\csname X#1\endcsname
4438 }
4397 4439
4398 % Read the last existing aux file, if any. No error if none exists. 4440 % Read the last existing aux file, if any. No error if none exists.
4399 \def\readauxfile{\begingroup 4441 \def\readauxfile{\begingroup
4400 \catcode`\^^@=\other 4442 \catcode`\^^@=\other
4401 \catcode`\^^A=\other 4443 \catcode`\^^A=\other
4615 % If epsf.tex is not installed and @image is used, we complain. 4657 % If epsf.tex is not installed and @image is used, we complain.
4616 % 4658 %
4617 % Check for and read epsf.tex up front. If we read it only at @image 4659 % Check for and read epsf.tex up front. If we read it only at @image
4618 % time, we might be inside a group, and then its definitions would get 4660 % time, we might be inside a group, and then its definitions would get
4619 % undone and the next image would fail. 4661 % undone and the next image would fail.
4620 \openin 1 = xepsf.tex 4662 \openin 1 = epsf.tex
4621 \ifeof 1 \else 4663 \ifeof 1 \else
4622 \closein 1 4664 \closein 1
4623 \def\epsfannounce{\toks0 = }% do not bother showing banner 4665 \def\epsfannounce{\toks0 = }% do not bother showing banner
4624 \input epsf.tex 4666 \input epsf.tex
4625 \fi 4667 \fi