This commit is contained in:
Ulrich Drepper 2002-03-05 19:54:55 +00:00
parent 59cf5bc6d3
commit 7a44753905

View File

@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2001-05-24.09}
\def\texinfoversion{2002-03-01.06}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
% 2000, 01 Free Software Foundation, Inc.
% 2000, 01, 02 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@ -30,14 +30,17 @@
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% ftp://ftp.gnu.org/gnu/texinfo.tex
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/tex/texinfo.tex
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/texinfo/texinfo.tex
% ftp://tug.org/tex/texinfo.tex
% (and all CTAN mirrors, see http://www.ctan.org),
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
%
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
% Texinfo has a small home page at http://texinfo.org/.
%
% Texinfo has a small home page at http://texinfo.org/ and also
% http://www.gnu.org/software/texinfo.
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
@ -51,12 +54,12 @@
% tex foo.texi
% tex foo.texi
% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
% The extra runs of TeX get the cross-reference information correct.
% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
% It is possible to adapt texinfo.tex for other languages. You can get
% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
% the existing language-specific files from the full Texinfo distribution.
\message{Loading texinfo [version \texinfoversion]:}
@ -441,7 +444,7 @@
% environments. --karl, 6may93
%{\advance \baselineskip by -\singlespaceskip
%\kern \baselineskip}%
\setleading \singlespaceskip
\setleading\singlespaceskip
}
%% Simple single-character @ commands
@ -833,18 +836,32 @@ where each line of input produces a line of output.}
%
\def\asis#1{#1}
% @math means output in math mode.
% We don't use $'s directly in the definition of \math because control
% sequences like \math are expanded when the toc file is written. Then,
% we read the toc file back, the $'s will be normal characters (as they
% should be, according to the definition of Texinfo). So we must use a
% control sequence to switch into and out of math mode.
% @math outputs its argument in math mode.
% We don't use $'s directly in the definition of \math because we need
% to set catcodes according to plain TeX first, to allow for subscripts,
% superscripts, special math chars, etc.
%
% @math does not do math typesetting in section titles, index
% entries, and other such contexts where the catcodes are set before
% @math gets a chance to work. This could perhaps be fixed, but for now
% at least we can have real math in the main text, where it's needed most.
%
% This isn't quite enough for @math to work properly in indices, but it
% seems unlikely it will ever be needed there.
%
\let\implicitmath = $%$ font-lock fix
%
\let\implicitmath = $
\def\math#1{\implicitmath #1\implicitmath}
% One complication: _ usually means subscripts, but it could also mean
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
% _ within @math be active (mathcode "8000), and distinguish by seeing
% if the current family is \slfam, which is what @var uses.
%
{\catcode95 = \active % 95 = _
\gdef\mathunderscore{%
\catcode95=\active
\def_{\ifnum\fam=\slfam\_\else\sb\fi}%
}}
%
\def\math{\tex\mathcode`\_="8000\mathunderscore \implicitmath\finishmath}
\def\finishmath#1{#1\implicitmath\Etex}
% @bullet and @minus need the same treatment as @math, just above.
\def\bullet{\implicitmath\ptexbullet\implicitmath}
@ -927,10 +944,12 @@ where each line of input produces a line of output.}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
% without \immediate, pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\pdfimage
\immediate\pdfimage
\else
\pdfximage
\immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
@ -942,8 +961,8 @@ where each line of input produces a line of output.}
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{\pdfdest name{#1} xyz}
\def\pdfmkpgn#1{#1@}
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
\def\pdfmkpgn#1{#1}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
@ -955,7 +974,7 @@ where each line of input produces a line of output.}
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
\def\pdfmakeoutlines{{%
\openin 1 \jobname.toc
\ifeof 1\else\bgroup
\ifeof 1\else\begingroup
\closein 1
\indexnofonts
\def\tt{}
@ -965,6 +984,7 @@ where each line of input produces a line of output.}
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
\def\chapentry ##1##2##3{}
\let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{}
\def\secentry ##1##2##3##4{\advancenumber{chap##2}}
\def\unnumbsecentry ##1##2{}
@ -975,6 +995,7 @@ where each line of input produces a line of output.}
\input \jobname.toc
\def\chapentry ##1##2##3{%
\pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
\let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\secentry ##1##2##3##4{%
@ -990,7 +1011,7 @@ where each line of input produces a line of output.}
\def\unnumbsubsubsecentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\input \jobname.toc
\egroup\fi
\endgroup\fi
}}
\def\makelinks #1,{%
\def\params{#1}\def\E{END}%
@ -1068,9 +1089,8 @@ where each line of input produces a line of output.}
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
\startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\linkcolor #1\endlink}
\def\mkpgn#1{#1@}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\fi % \ifx\pdfoutput
@ -1087,9 +1107,26 @@ where each line of input produces a line of output.}
% We don't need math for this one.
\def\ttsl{\tenttsl}
% Use Computer Modern fonts at \magstephalf (11pt).
\newcount\mainmagstep
\mainmagstep=\magstephalf
% Default leading.
\newdimen\textleading \textleading = 13.2pt
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
%
\def\lineskipfactor{.08333}
\def\strutheightpercent{.70833}
\def\strutdepthpercent {.29167}
%
\def\setleading#1{%
\normalbaselineskip = #1\relax
\normallineskip = \lineskipfactor\normalbaselineskip
\normalbaselines
\setbox\strutbox =\hbox{%
\vrule width0pt height\strutheightpercent\baselineskip
depth \strutdepthpercent \baselineskip
}%
}
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
@ -1119,13 +1156,16 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
\newcount\mainmagstep
\ifx\bigger\relax
\let\mainmagstep=\magstep1
\setfont\textrm\rmshape{12}{1000}
\setfont\texttt\ttshape{12}{1000}
% not really supported.
\let\mainmagstep=\magstep1
\setfont\textrm\rmshape{12}{1000}
\setfont\texttt\ttshape{12}{1000}
\else
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\mainmagstep=\magstephalf
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
@ -1205,20 +1245,6 @@ where each line of input produces a line of output.}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
% \setfont\ssecsl\slshape{10}{\magstep1}
% \setfont\ssectt\ttshape{10}{\magstep1}
% \setfont\ssecsf\sfshape{10}{\magstep1}
%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
%\setfont\ssectt\ttshape{10}{1315}
%\setfont\ssecsf\sfshape{10}{1315}
%\let\ssecbf=\ssecrm
% Subsection fonts (13.15pt).
\setfont\ssecrm\rmbshape{12}{\magstephalf}
\setfont\ssecit\itbshape{10}{1315}
@ -1235,17 +1261,16 @@ where each line of input produces a line of output.}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts, we
% don't bother to reset \scriptfont and \scriptscriptfont (which would
% also require loading a lot more fonts).
% texinfo doesn't allow for producing subscripts and superscripts except
% in the main text, we don't bother to reset \scriptfont and
% \scriptscriptfont (which would also require loading a lot more fonts).
%
\def\resetmathfonts{%
\textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
\textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
\textfont\ttfam = \tentt \textfont\sffam = \tensf
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
\textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
\textfont\ttfam=\tentt \textfont\sffam=\tensf
}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
@ -1256,7 +1281,7 @@ where each line of input produces a line of output.}
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
\resetmathfonts}
\resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
@ -1595,6 +1620,10 @@ where each line of input produces a line of output.}
\oldpage
\endgroup
%
% Need this before the \...aftertitlepage checks so that if they are
% in effect the toc pages will come out with page numbers.
\HEADINGSon
%
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
@ -1610,8 +1639,6 @@ where each line of input produces a line of output.}
\fi
%
\ifpdf \pdfmakepagedesttrue \fi
%
\HEADINGSon
}
\def\finishtitlepage{%
@ -2373,13 +2400,15 @@ width0pt\relax} \fi
%
\def\ignore{\doignore{ignore}}
% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
% Also ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu,
% @documentdescription, and @direntry text.
%
\def\ifinfo{\doignore{ifinfo}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifnottex{\doignore{ifnottex}}
\def\html{\doignore{html}}
\def\menu{\doignore{menu}}
\def\documentdescription{\doignore{documentdescription}}
\def\direntry{\doignore{direntry}}
% @dircategory CATEGORY -- specify a category of the dir file
@ -2730,9 +2759,23 @@ width0pt\relax} \fi
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
% Take care of texinfo commands likely to appear in an index entry.
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
%
\def\indexdummies{%
\def\ { }%
\def\@{@}% change to @@ when we switch to @ as escape char in aux files.
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
\def\_{{\realbackslash _}}%
\normalturnoffactive
%
% Take care of the plain tex accent commands.
\def\,##1{\realbackslash ,{##1}}%
\def\"{\realbackslash "}%
\def\`{\realbackslash `}%
\def\'{\realbackslash '}%
@ -2745,69 +2788,66 @@ width0pt\relax} \fi
\def\u{\realbackslash u}%
\def\v{\realbackslash v}%
\def\H{\realbackslash H}%
% Take care of the plain tex special European modified letters.
\def\oe{\realbackslash oe}%
\def\ae{\realbackslash ae}%
\def\aa{\realbackslash aa}%
\def\OE{\realbackslash OE}%
\def\AE{\realbackslash AE}%
\def\AA{\realbackslash AA}%
\def\o{\realbackslash o}%
\def\O{\realbackslash O}%
\def\l{\realbackslash l}%
\def\L{\realbackslash L}%
\def\ss{\realbackslash ss}%
% Take care of texinfo commands likely to appear in an index entry.
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
\def\@{@}% will be @@ when we switch to @ as escape char.
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
\def\_{{\realbackslash _}}%
\def\w{\realbackslash w }%
\def\bf{\realbackslash bf }%
%\def\rm{\realbackslash rm }%
\def\sl{\realbackslash sl }%
\def\sf{\realbackslash sf}%
\def\tt{\realbackslash tt}%
\def\gtr{\realbackslash gtr}%
\def\less{\realbackslash less}%
\def\hat{\realbackslash hat}%
\def\TeX{\realbackslash TeX}%
\def\dots{\realbackslash dots }%
\def\result{\realbackslash result}%
\def\equiv{\realbackslash equiv}%
\def\expansion{\realbackslash expansion}%
\def\print{\realbackslash print}%
\def\error{\realbackslash error}%
\def\point{\realbackslash point}%
\def\copyright{\realbackslash copyright}%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\code##1{\realbackslash code {##1}}%
\def\uref##1{\realbackslash uref {##1}}%
\def\url##1{\realbackslash url {##1}}%
\def\env##1{\realbackslash env {##1}}%
\def\command##1{\realbackslash command {##1}}%
\def\option##1{\realbackslash option {##1}}%
\def\dotless##1{\realbackslash dotless {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
\def\,##1{\realbackslash ,{##1}}%
% Take care of the plain tex special European modified letters.
\def\AA{\realbackslash AA}%
\def\AE{\realbackslash AE}%
\def\L{\realbackslash L}%
\def\OE{\realbackslash OE}%
\def\O{\realbackslash O}%
\def\aa{\realbackslash aa}%
\def\ae{\realbackslash ae}%
\def\l{\realbackslash l}%
\def\oe{\realbackslash oe}%
\def\o{\realbackslash o}%
\def\ss{\realbackslash ss}%
%
% Although these internals commands shouldn't show up, sometimes they do.
\def\bf{\realbackslash bf }%
\def\gtr{\realbackslash gtr}%
\def\hat{\realbackslash hat}%
\def\less{\realbackslash less}%
%\def\rm{\realbackslash rm }%
\def\sf{\realbackslash sf}%
\def\sl{\realbackslash sl }%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\tt{\realbackslash tt}%
%
\def\b##1{\realbackslash b {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\sc##1{\realbackslash sc {##1}}%
\def\t##1{\realbackslash t {##1}}%
\def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}%
\def\sc##1{\realbackslash sc {##1}}%
\def\cite##1{\realbackslash cite {##1}}%
\def\key##1{\realbackslash key {##1}}%
\def\file##1{\realbackslash file {##1}}%
\def\var##1{\realbackslash var {##1}}%
\def\kbd##1{\realbackslash kbd {##1}}%
\def\dfn##1{\realbackslash dfn {##1}}%
\def\emph##1{\realbackslash emph {##1}}%
%
\def\TeX{\realbackslash TeX}%
\def\acronym##1{\realbackslash acronym {##1}}%
\def\cite##1{\realbackslash cite {##1}}%
\def\code##1{\realbackslash code {##1}}%
\def\command##1{\realbackslash command {##1}}%
\def\dfn##1{\realbackslash dfn {##1}}%
\def\dots{\realbackslash dots }%
\def\emph##1{\realbackslash emph {##1}}%
\def\env##1{\realbackslash env {##1}}%
\def\file##1{\realbackslash file {##1}}%
\def\kbd##1{\realbackslash kbd {##1}}%
\def\key##1{\realbackslash key {##1}}%
\def\math##1{\realbackslash math {##1}}%
\def\option##1{\realbackslash option {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
\def\strong##1{\realbackslash strong {##1}}%
\def\uref##1{\realbackslash uref {##1}}%
\def\url##1{\realbackslash url {##1}}%
\def\var##1{\realbackslash var {##1}}%
\def\w{\realbackslash w }%
%
% These math commands don't seem likely to be used in index entries.
\def\copyright{\realbackslash copyright}%
\def\equiv{\realbackslash equiv}%
\def\error{\realbackslash error}%
\def\expansion{\realbackslash expansion}%
\def\point{\realbackslash point}%
\def\print{\realbackslash print}%
\def\result{\realbackslash result}%
%
% Handle some cases of @value -- where the variable name does not
% contain - or _, and the value does not contain any
@ -2832,7 +2872,10 @@ width0pt\relax} \fi
\def\indexdummydots{...}
\def\indexnofonts{%
% Just ignore accents.
\def\@{@}%
% how to handle braces?
\def\_{\normalunderscore}%
%
\let\,=\indexdummyfont
\let\"=\indexdummyfont
\let\`=\indexdummyfont
@ -2848,45 +2891,49 @@ width0pt\relax} \fi
\let\H=\indexdummyfont
\let\dotless=\indexdummyfont
% Take care of the plain tex special European modified letters.
\def\oe{oe}%
\def\ae{ae}%
\def\aa{aa}%
\def\OE{OE}%
\def\AE{AE}%
\def\AA{AA}%
\def\o{o}%
\def\O{O}%
\def\l{l}%
\def\AE{AE}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
\def\aa{aa}%
\def\ae{ae}%
\def\l{l}%
\def\oe{oe}%
\def\o{o}%
\def\ss{ss}%
\let\w=\indexdummyfont
\let\t=\indexdummyfont
\let\r=\indexdummyfont
\let\i=\indexdummyfont
\let\b=\indexdummyfont
\let\emph=\indexdummyfont
\let\strong=\indexdummyfont
\let\cite=\indexdummyfont
\let\sc=\indexdummyfont
%Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |...
%
% Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |, etc.
% Likewise with the other plain tex font commands.
%\let\tt=\indexdummyfont
\let\tclose=\indexdummyfont
\let\code=\indexdummyfont
\let\url=\indexdummyfont
\let\uref=\indexdummyfont
\let\env=\indexdummyfont
%
\let\b=\indexdummyfont
\let\i=\indexdummyfont
\let\r=\indexdummyfont
\let\sc=\indexdummyfont
\let\t=\indexdummyfont
%
\let\TeX=\indexdummytex
\let\acronym=\indexdummyfont
\let\cite=\indexdummyfont
\let\code=\indexdummyfont
\let\command=\indexdummyfont
\let\option=\indexdummyfont
\let\dfn=\indexdummyfont
\let\dots=\indexdummydots
\let\emph=\indexdummyfont
\let\env=\indexdummyfont
\let\file=\indexdummyfont
\let\samp=\indexdummyfont
\let\kbd=\indexdummyfont
\let\key=\indexdummyfont
\let\math=\indexdummyfont
\let\option=\indexdummyfont
\let\samp=\indexdummyfont
\let\strong=\indexdummyfont
\let\uref=\indexdummyfont
\let\url=\indexdummyfont
\let\var=\indexdummyfont
\let\TeX=\indexdummytex
\let\dots=\indexdummydots
\def\@{@}%
\let\w=\indexdummyfont
}
% To define \realbackslash, we must make \ not be an escape.
@ -3488,8 +3535,8 @@ width0pt\relax} \fi
\gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
{\putwordAppendix{} \appendixletter}}}%
\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%
{\appendixletter}}}%
\temp
\appendixnoderef
\global\let\section = \appendixsec
@ -3922,6 +3969,7 @@ width0pt\relax} \fi
\startcontents{\putwordShortTOC}%
%
\let\chapentry = \shortchapentry
\let\appendixentry = \shortappendixentry
\let\unnumbchapentry = \shortunnumberedentry
% We want a true roman here for the page numbers.
\secfonts
@ -3957,16 +4005,23 @@ width0pt\relax} \fi
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
% Chapter-level things, for both the long and short contents.
% Chapters, in the main contents.
\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
% See comments in \dochapentry re vbox and related settings
%
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3{%
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
}
% Appendices, in the main contents.
\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
%
% Appendices, in the short toc.
\let\shortappendixentry = \shortchapentry
% Typeset the label for a chapter or appendix for the short contents.
% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
@ -3974,23 +4029,16 @@ width0pt\relax} \fi
\newdimen\shortappendixwidth
%
\def\shortchaplabel#1{%
% Compute width of word "Appendix", may change with language.
\setbox0 = \hbox{\shortcontrm \putwordAppendix}%
\shortappendixwidth = \wd0
%
% We typeset #1 in a box of constant width, regardless of the text of
% #1, so the chapter titles will come out aligned.
\setbox0 = \hbox{#1}%
\dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
%
% This space should be plenty, since a single number is .5em, and the
% This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
\advance\dimen0 by 1.1em
\hbox to \dimen0{#1\hfil}%
\dimen0 = 1em
\hbox to \dimen0{#1\hss}%
}
% Unnumbered chapters.
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
@ -4046,7 +4094,7 @@ width0pt\relax} \fi
\def\tocentry#1#2{\begingroup
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
% Do not use \turnoffactive in these arguments. Since the toc is
% typeset in cmr, so characters such as _ would come out wrong; we
% typeset in cmr, characters such as _ would come out wrong; we
% have to do the usual translation tricks.
\entry{#1}{#2}%
\endgroup}
@ -4875,7 +4923,7 @@ width0pt\relax} \fi
% #1 is the data type, #2 the name, #3 the args.
\def\deftypefunheaderx #1#2 #3\relax{%
\doind {fn}{\code{#2}}% Make entry in function index
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
\deftypefunargs {#3}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@ -4884,9 +4932,9 @@ width0pt\relax} \fi
\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
% \defheaderxcond#1\relax$$$
% \defheaderxcond#1\relax$.$
% puts #1 in @code, followed by a space, but does nothing if #1 is null.
\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
% #1 is the classification. #2 is the data type. #3 is the name and args.
\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
@ -4896,7 +4944,7 @@ width0pt\relax} \fi
\begingroup
\normalparens % notably, turn off `&' magic, which prevents
% at least some C++ text from working
\defname {\defheaderxcond#2\relax$$$#3}{#1}%
\defname {\defheaderxcond#2\relax$.$#3}{#1}%
\deftypefunargs {#4}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@ -4942,7 +4990,7 @@ width0pt\relax} \fi
\def\deftypeopheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}
\defname{\defheaderxcond#2\relax$.$#3}
{\deftypeopcategory\ \putwordon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
@ -4957,7 +5005,7 @@ width0pt\relax} \fi
\def\deftypemethodheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
\defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
}
@ -4971,7 +5019,7 @@ width0pt\relax} \fi
\def\deftypeivarheader#1#2#3{%
\dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}
\defname{\defheaderxcond#2\relax$.$#3}
{\putwordInstanceVariableof\ \code{#1}}%
\defvarargs{#3}%
\endgroup
@ -5054,7 +5102,7 @@ width0pt\relax} \fi
% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
\dovarind#2 \relax% Make entry in variables index
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@ -5065,7 +5113,7 @@ width0pt\relax} \fi
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@ -5506,13 +5554,15 @@ width0pt\relax} \fi
\ifpdf
\leavevmode
\getfilename{#4}%
\ifnum\filenamelength>0
\startlink attr{/Border [0 0 0]}%
goto file{\the\filename.pdf} name{#1@}%
\else
\startlink attr{/Border [0 0 0]}%
goto name{#1@}%
\fi
{\normalturnoffactive
\ifnum\filenamelength>0
\startlink attr{/Border [0 0 0]}%
goto file{\the\filename.pdf} name{#1}%
\else
\startlink attr{/Border [0 0 0]}%
goto name{#1}%
\fi
}%
\linkcolor
\fi
%
@ -5774,8 +5824,15 @@ width0pt\relax} \fi
%
\smallfonts \rm
%
% Hang the footnote text off the number.
\hang
% Because we use hanging indentation in footnotes, a @noindent appears
% to exdent this text, so make it be a no-op. makeinfo does not use
% hanging indentation so @noindent can still be needed within footnote
% text after an @example or the like (not that this is good style).
\let\noindent = \relax
%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
@ -5792,24 +5849,6 @@ width0pt\relax} \fi
}%end \catcode `\@=11
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
%
\def\lineskipfactor{.08333}
\def\strutheightpercent{.70833}
\def\strutdepthpercent {.29167}
%
\def\setleading#1{%
\normalbaselineskip = #1\relax
\normallineskip = \lineskipfactor\normalbaselineskip
\normalbaselines
\setbox\strutbox =\hbox{%
\vrule width0pt height\strutheightpercent\baselineskip
depth \strutdepthpercent \baselineskip
}%
}
% @| inserts a changebar to the left of the current line. It should
% surround any changed text. This approach does *not* work if the
% change spans more than two lines of output. To handle that, we would
@ -5874,41 +5913,44 @@ width0pt\relax} \fi
\global\warnednoepsftrue
\fi
\else
\imagexxx #1,,,\finish
\imagexxx #1,,,,,\finish
\fi
}
%
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
% #4 is just the usual extra ignored arg for parsing this stuff.
\def\imagexxx#1,#2,#3,#4\finish{%
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing this stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup\hss
\fi
%
% Output the image.
\ifpdf
\centerline{\dopdfimage{#1}{#2}{#3}}%
\dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\centerline{\epsfbox{#1.eps}}%
\bigbreak
\else
% In the middle of a paragraph, no extra space.
\epsfbox{#1.eps}%
\fi
\endgroup
\epsfbox{#1.eps}%
\fi
}
%
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
\endgroup}
\message{localization,}
@ -5977,8 +6019,9 @@ should work if nowhere else does.}
}
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
% set \parskip and call \setleading for \baselineskip.
% 4) hoffset; 5) binding offset; 6) topskip. We also call
% \setleading{\textleading}, so the caller should define \textleading.
% The caller should also set \parskip.
%
\def\internalpagesizes#1#2#3#4#5#6{%
\voffset = #3\relax
@ -5999,6 +6042,8 @@ should work if nowhere else does.}
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
\setleading{\textleading}
%
\parindent = \defaultparindent
\setemergencystretch
}
@ -6015,7 +6060,7 @@ should work if nowhere else does.}
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
\setleading{13.2pt}%
\textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
\internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
@ -6024,7 +6069,7 @@ should work if nowhere else does.}
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
\setleading{12pt}%
\textleading = 12pt
%
\internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
%
@ -6039,8 +6084,8 @@ should work if nowhere else does.}
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\setleading{12pt}%
\parskip = 3pt plus 2pt minus 1pt
\textleading = 12pt
%
\internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
%
@ -6052,8 +6097,8 @@ should work if nowhere else does.}
% From romildo@urano.iceb.ufop.br, 2 July 2000.
% He also recommends making @example and @lisp be small.
\def\afivepaper{{\globaldefs = 1
\setleading{12.5pt}%
\parskip = 2pt plus 1pt minus 0.1pt
\textleading = 12.5pt
%
\internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
%
@ -6071,11 +6116,13 @@ should work if nowhere else does.}
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
\def\afourlatex{{\globaldefs = 1
\setleading{13.6pt}%
\textleading = 13.6pt
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
%
% Must explicitly reset to 0 because we call \afourpaper, apparently,
% although this does not entirely make sense.
\globaldefs = 0
}}
@ -6083,8 +6130,6 @@ should work if nowhere else does.}
\def\afourwide{%
\afourpaper
\internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
%
\globaldefs = 0
}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
@ -6098,7 +6143,7 @@ should work if nowhere else does.}
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
\setleading{13.2pt}%
\setleading{\textleading}%
%
\internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
}}
@ -6128,7 +6173,7 @@ should work if nowhere else does.}
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
\def\normaldollar{$}
\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in ttfont
% where it can probably just be output, and another way in other fonts,
@ -6177,7 +6222,7 @@ should work if nowhere else does.}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
\def${\ifusingit{{\sl\$}}\normaldollar}
\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
%\catcode 27=\active
%\def^^[{$\diamondsuit$}
@ -6222,7 +6267,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar}
@let$=@normaldollar}%$ font-lock fix
@def@normalturnoffactive{@let"=@normaldoublequote
@let\=@normalbackslash
@ -6233,7 +6278,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar}
@let$=@normaldollar}%$ font-lock fix
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.