update from master

This commit is contained in:
Jim Meyering 2002-11-07 00:29:24 +00:00
parent bd89283b97
commit 98f748e64c

View File

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2002-10-01.17}
\def\texinfoversion{2002-10-31.17}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
@ -68,6 +68,13 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
\message{Basics,}
\chardef\other=12
% We never want plain's outer \+ definition in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
% Save some parts of plain tex whose names we will redefine.
\let\ptexb=\b
\let\ptexbullet=\bullet
@ -78,19 +85,16 @@
\let\ptexend=\end
\let\ptexequiv=\equiv
\let\ptexexclam=\!
\let\ptexgtr=>
\let\ptexhat=^
\let\ptexi=\i
\let\ptexlbrace=\{
\let\ptexless=<
\let\ptexplus=+
\let\ptexrbrace=\}
\let\ptexstar=\*
\let\ptext=\t
% We never want plain's outer \+ definition in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
\message{Basics,}
\chardef\other=12
% If this character appears in an error message or help string, it
% starts a new line in the output.
\newlinechar = `^^J
@ -141,36 +145,48 @@
%
\def\gobble#1{}
% True if #1 is the empty string, i.e., called like `\ifempty{}'.
%
\def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}%
\def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}%
% Hyphenation fixes.
\hyphenation{ap-pen-dix}
\hyphenation{mini-buf-fer mini-buf-fers}
\hyphenation{eshell}
\hyphenation{white-space}
% Margin to add to right of even pages, to left of odd pages.
\newdimen \bindingoffset
\newdimen \normaloffset
\newdimen\bindingoffset
\newdimen\normaloffset
\newdimen\pagewidth \newdimen\pageheight
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal.
% since that produces some useless output on the terminal. We also make
% some effort to order the tracing commands to reduce output in the log
% file; cf. trace.sty in LaTeX.
%
\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
\ifx\eTeXversion\undefined
\def\loggingall{\tracingcommands2 \tracingstats2
\tracingpages1 \tracingoutput1 \tracinglostchars1
\tracingmacros2 \tracingparagraphs1 \tracingrestores1
\showboxbreadth\maxdimen\showboxdepth\maxdimen
\def\loggingall{%
\tracingstats2
\tracingpages1
\tracinglostchars2 % 2 gives us more in etex
\tracingparagraphs1
\tracingoutput1
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
\ifx\eTeXversion\undefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
\tracingnesting2
\tracingassigns1
\fi
\tracingcommands3 % 3 gives us more in etex
\errorcontextlines\maxdimen
}%
\else
\def\loggingall{\tracingcommands3 \tracingstats2
\tracingpages1 \tracingoutput1 \tracinglostchars1
\tracingmacros2 \tracingparagraphs1 \tracingrestores1
\tracingscantokens1 \tracingassigns1 \tracingifs1
\tracinggroups1 \tracingnesting2
\showboxbreadth\maxdimen\showboxdepth\maxdimen
}%
\fi
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
@ -435,17 +451,6 @@
}
% Single-spacing is done by various environments (specifically, in
% \nonfillstart and \quotations).
\newskip\singlespaceskip \singlespaceskip = 12.5pt
\def\singlespace{%
% Why was this kern here? It messes up equalizing space above and below
% environments. --karl, 6may93
%{\advance \baselineskip by -\singlespaceskip
%\kern \baselineskip}%
\setleading\singlespaceskip
}
%% Simple single-character @ commands
% @@ prints an @
@ -840,11 +845,6 @@ where each line of input produces a line of output.}
% 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.
%
\let\implicitmath = $%$ font-lock fix
%
% One complication: _ usually means subscripts, but it could also mean
@ -870,9 +870,27 @@ where each line of input produces a line of output.}
\tex
\mathcode`\_="8000 \mathunderscore
\let\\ = \mathbackslash
\mathactive
\implicitmath\finishmath}
\def\finishmath#1{#1\implicitmath\Etex}
% Some active characters (such as <) are spaced differently in math.
% We have to reset their definitions in case the @math was an
% argument to a command which set the catcodes (such as @item or @section).
%
{
\catcode`^ = \active
\catcode`< = \active
\catcode`> = \active
\catcode`+ = \active
\gdef\mathactive{%
\let^ = \ptexhat
\let< = \ptexless
\let> = \ptexgtr
\let+ = \ptexplus
}
}
% @bullet and @minus need the same treatment as @math, just above.
\def\bullet{\implicitmath\ptexbullet\implicitmath}
\def\minus{\implicitmath-\implicitmath}
@ -1229,6 +1247,7 @@ where each line of input produces a line of output.}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
\def\authortt{\sectt}
% Chapter (and unnumbered) fonts (17.28pt).
\setfont\chaprm\rmbshape{12}{\magstep2}
@ -1343,6 +1362,7 @@ where each line of input produces a line of output.}
\setfont\shortcontrm\rmshape{12}{1000}
\setfont\shortcontbf\bxshape{12}{1000}
\setfont\shortcontsl\slshape{12}{1000}
\setfont\shortconttt\ttshape{12}{1000}
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
@ -1350,8 +1370,8 @@ where each line of input produces a line of output.}
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
% unless the following character is such as not to need one.
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\var=\smartslanted
@ -1590,7 +1610,8 @@ where each line of input produces a line of output.}
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
%
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
\let\tt=\authortt}%
%
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
@ -1871,10 +1892,18 @@ where each line of input produces a line of output.}
% \parskip glue -- logically it's part of the @item we just started.
\nobreak \vskip-\parskip
%
% Stop a page break at the \parskip glue coming up. Unfortunately
% Stop a page break at the \parskip glue coming up. (Unfortunately
% we can't prevent a possible page break at the following
% \baselineskip glue.
\nobreak
% \baselineskip glue.) However, if what follows is an environment
% such as @example, there will be no \parskip glue; then
% the negative vskip we just would cause the example and the item to
% crash together. So we use this bizarre value of 10001 as a signal
% to \aboveenvbreak to insert \parskip glue after all.
% (Possibly there are other commands that could be followed by
% @example which need the same treatment, but not section titles; or
% maybe section titles are the only special case and they should be
% penalty 10001...)
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
\else
@ -3548,13 +3577,18 @@ width0pt\relax} \fi
\global\let\subsubsection = \numberedsubsubsec
}
% we use \chapno to avoid indenting back
\def\appendixbox#1{%
\setbox0 = \hbox{\putwordAppendix{} \the\chapno}%
\hbox to \wd0{#1\hss}}
\outer\def\appendix{\parsearg\appendixyyy}
\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
\def\appendixzzz #1{%
\secno=0 \subsecno=0 \subsubsecno=0
\global\advance \appendixno by 1
\message{\putwordAppendix\space \appendixletter}%
\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
\chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}%
\gdef\thissection{#1}%
\gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
@ -3917,7 +3951,16 @@ width0pt\relax} \fi
\hangindent = \wd0 % zero if no section number
\unhbox0 #3}%
}%
\ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
% Add extra space after the heading -- either a line space or a
% paragraph space, whichever is more. (Some people like to set
% \parskip to large values for some reason.)
\nobreak
\ifdim\parskip>\normalbaselineskip
\kern\parskip
\else
\kern\normalbaselineskip
\fi
\nobreak
}
@ -4006,7 +4049,8 @@ width0pt\relax} \fi
\let\unnumbchapentry = \shortunnumberedentry
% We want a true roman here for the page numbers.
\secfonts
\let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
\let\rm=\shortcontrm \let\bf=\shortcontbf
\let\sl=\shortcontsl \let\tt=\shortconttt
\rm
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
@ -4048,7 +4092,8 @@ width0pt\relax} \fi
}
% Appendices, in the main contents.
\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
\def\appendixentry#1#2#3{%
\dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}}
%
% Appendices, in the short toc.
\let\shortappendixentry = \shortchapentry
@ -4249,15 +4294,18 @@ width0pt\relax} \fi
% Make spacing and below environment symmetrical. We use \parskip here
% to help in doing that, since in @example-like environments \parskip
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip
% start of the next paragraph will insert \parskip.
%
\def\aboveenvbreak{{%
\ifnum\lastpenalty < 10000
% =10000 instead of <10000 because of a special case in \itemzzz, q.v.
\ifnum \lastpenalty=10000 \else
\advance\envskipamount by \parskip
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
\penalty-50
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty>10000 \else \penalty-50 \fi
\vskip\envskipamount
\fi
\fi
@ -4336,7 +4384,6 @@ width0pt\relax} \fi
\inENV % This group ends at the end of the body
\hfuzz = 12pt % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\singlespace
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
@ -4451,7 +4498,6 @@ width0pt\relax} \fi
\def\quotation{%
\begingroup\inENV %This group ends at the end of the @quotation body
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\singlespace
\parindent=0pt
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling. So to avoid extra space below the environment...
@ -4681,15 +4727,17 @@ width0pt\relax} \fi
\newskip\defbodyindent \defbodyindent=.4in
\newskip\defargsindent \defargsindent=50pt
\newskip\deftypemargin \deftypemargin=12pt
\newskip\deflastargmargin \deflastargmargin=18pt
\newcount\parencount
% define \functionparens, which makes ( and ) and & do special things.
% \functionparens affects the group it is contained in.
% We want ()&[] to print specially on the defun line.
%
\def\activeparens{%
\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
\catcode`\[=\active \catcode`\]=\active}
\catcode`\(=\active \catcode`\)=\active
\catcode`\&=\active
\catcode`\[=\active \catcode`\]=\active
}
% Make control sequences which act like normal parenthesis chars.
\let\lparen = ( \let\rparen = )
@ -4740,32 +4788,47 @@ width0pt\relax} \fi
\global\let& = \ampnr
}
% First, defname, which formats the header line itself.
% #1 should be the function name.
% #2 should be the type of definition, such as "Function".
\def\defname #1#2{%
% Get the values of \leftskip and \rightskip as they were
% outside the @def...
\dimen2=\leftskip
\advance\dimen2 by -\defbodyindent
\noindent
\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
\parshape 2 0in \dimen0 \defargsindent \dimen1
% Now output arg 2 ("Function" or some such)
% ending at \deftypemargin from the right margin,
% but stuck inside a box of width 0 so it does not interfere with linebreaking
{% Adjust \hsize to exclude the ambient margins,
% so that \rightline will obey them.
\advance \hsize by -\dimen2
\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%
% Make all lines underfull and no complaints:
\tolerance=10000 \hbadness=10000
\advance\leftskip by -\defbodyindent
\exdentamount=\defbodyindent
{\df #1}\enskip % Generate function name
% \defname, which formats the name of the @def (not the args).
% #1 is the function name.
% #2 is the type of definition, such as "Function".
%
\def\defname#1#2{%
% How we'll output the type name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\ifempty{#2}%
\def\defnametype{}%
\else
\def\defnametype{[\rm #2]}%
\fi
%
% Get the values of \leftskip and \rightskip as they were outside the @def...
\dimen2=\leftskip
\advance\dimen2 by -\defbodyindent
%
% Figure out values for the paragraph shape.
\setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}%
\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
\dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations
\parshape 2 0in \dimen0 \defargsindent \dimen1
%
% Output arg 2 ("Function" or some such) but stuck inside a box of
% width 0 so it does not interfere with linebreaking.
\noindent
%
{% Adjust \hsize to exclude the ambient margins,
% so that \rightline will obey them.
\advance \hsize by -\dimen2
\dimen3 = 0pt % was -1.25pc
\rlap{\rightline{\defnametype\kern\dimen3}}%
}%
%
% Allow all lines to be underfull without complaint:
\tolerance=10000 \hbadness=10000
\advance\leftskip by -\defbodyindent
\exdentamount=\defbodyindent
{\df #1}\enskip % output function name
% \defunargs will be called next to output the arguments, if any.
}
% Common pieces to start any @def...
@ -4779,7 +4842,7 @@ width0pt\relax} \fi
% which is there to keep the function description together with its
% header. But if there's nothing but headers, we want to allow a
% break after all.
\ifnum\lastpenalty = 10000 \penalty0 \fi
\ifnum\lastpenalty=10000 \penalty0 \fi
\medbreak
%
% Define the \E... end token that this defining construct specifies
@ -4791,24 +4854,38 @@ width0pt\relax} \fi
\exdentamount=\defbodyindent
}
% Common part of the \...x definitions.
%
\def\defxbodycommon{%
% As with \parsebodycommon above, allow line break if we have multiple
% x headers in a row. It's not a great place, though.
\ifnum\lastpenalty=10000 \penalty1000 \fi
%
\begingroup\obeylines
}
% Process body of @defun, @deffn, @defmac, etc.
%
\def\defparsebody#1#2#3{%
\parsebodycommon{#1}{#2}{#3}%
\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
\def#2{\defxbodycommon \activeparens \spacesplit#3}%
\catcode61=\active % 61 is `='
\begingroup\obeylines\activeparens
\spacesplit#3%
}
% #1, #2, #3 are the common arguments (see \defparsebody).
% #1, #2, #3 are the common arguments (see \parsebodycommon above).
% #4, delimited by the space, is the class name.
%
\def\defmethparsebody#1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
\def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}%
\begingroup\obeylines\activeparens
\spacesplit{#3{#4}}%
% The \empty here prevents misinterpretation of a construct such as
% @deffn {whatever} {Enharmonic comma}
% See comments at \deftpparsebody, although in our case we don't have
% to remove the \empty afterwards, since it is empty.
\spacesplit{#3{#4}}\empty
}
% Used for @deftypemethod and @deftypeivar.
@ -4818,7 +4895,7 @@ width0pt\relax} \fi
%
\def\deftypemethparsebody#1#2#3#4 #5 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
\def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}%
\begingroup\obeylines\activeparens
\spacesplit{#3{#4}{#5}}%
}
@ -4832,9 +4909,8 @@ width0pt\relax} \fi
%
\def\deftypeopparsebody#1#2#3#4#5 #6 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 ##3 {%
\def#4{##1}%
\begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
\def#2##1 ##2 ##3 {\def#4{##1}%
\defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}%
\begingroup\obeylines\activeparens
\spacesplit{#3{#5}{#6}}%
}
@ -4843,7 +4919,7 @@ width0pt\relax} \fi
\def\defopparsebody #1#2#3#4#5 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 {\def#4{##1}%
\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
\defxbodycommon \activeparens \spacesplit{#3{##2}}}%
\begingroup\obeylines\activeparens
\spacesplit{#3{#5}}%
}
@ -4854,7 +4930,7 @@ width0pt\relax} \fi
%
\def\defvarparsebody #1#2#3{%
\parsebodycommon{#1}{#2}{#3}%
\def#2{\begingroup\obeylines\spacesplit#3}%
\def#2{\defxbodycommon \spacesplit#3}%
\catcode61=\active %
\begingroup\obeylines
\spacesplit#3%
@ -4864,14 +4940,14 @@ width0pt\relax} \fi
\def\defopvarparsebody #1#2#3#4#5 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 {\def#4{##1}%
\begingroup\obeylines\spacesplit{#3{##2}}}%
\defxbodycommon \spacesplit{#3{##2}}}%
\begingroup\obeylines
\spacesplit{#3{#5}}%
}
\def\defvrparsebody#1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
\def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}%
\begingroup\obeylines
\spacesplit{#3{#4}}%
}
@ -4887,7 +4963,7 @@ width0pt\relax} \fi
%
\def\deftpparsebody #1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
\def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}%
\begingroup\obeylines
\spacesplit{\parsetpheaderline{#3{#4}}}\empty
}
@ -4905,18 +4981,22 @@ width0pt\relax} \fi
#1{\removeemptybraces#2\relax}{#3}%
}%
% Split up #2 at the first space token.
% Split up #2 (the rest of the input line) at the first space token.
% call #1 with two arguments:
% the first is all of #2 before the space token,
% the second is all of #2 after that space token.
% If #2 contains no space token, all of it is passed as the first arg
% and the second is passed as empty.
%
{\obeylines
\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
\ifx\relax #3%
#1{#2}{}\else #1{#2}{#3#4}\fi}}
{\obeylines %
\gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}%
\long\gdef\spacesplitx#1#2 #3#4\spacesplitx{%
\ifx\relax #3%
#1{#2}{}%
\else %
#1{#2}{#3#4}%
\fi}%
}
% Define @defun.
@ -6144,7 +6224,6 @@ should work if nowhere else does.}
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = .5cm
\smallenvironments
}}
@ -6172,7 +6251,6 @@ should work if nowhere else does.}
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = 5mm
}}
@ -6192,7 +6270,6 @@ should work if nowhere else does.}
\tolerance = 800
\hfuzz = 1.2pt
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
%