(\dosetq): Use \normalturnoffactive instead of just \turnoffactive,

so \'s in node names are handled properly.
(\tie): Move definition to more rational position in the file.
(\@, \{, etc.): Use decimal numbers in all cases, to avoid use of '.
Paranoia only.
(\+): Turn off once and for all at the beginning, and define as
\tabalign in @tex.
This commit is contained in:
Karl Berry 1998-04-05 21:19:01 +00:00
parent 9d31f1e1f1
commit 20b68e968a

View File

@ -26,9 +26,11 @@
% Please try the latest version of texinfo.tex before submitting bug % Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from: % reports; you can get the latest version from:
% /home/gd/gnu/doc/texinfo.tex on the GNU machines. % /home/gd/gnu/doc/texinfo.tex on the GNU machines.
% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
% (and all GNU mirrors)
% ftp://tug.org/tex/texinfo.tex % ftp://tug.org/tex/texinfo.tex
% ftp://ctan.org/macros/texinfo/texinfo.tex % ftp://ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger info@ctan.org for a list). % (and all CTAN mirrors, finger ctan@tug.org for a list).
% %
% Send bug reports to bug-texinfo@gnu.org. % Send bug reports to bug-texinfo@gnu.org.
% Please include a precise test case in each bug report, % Please include a precise test case in each bug report,
@ -37,6 +39,18 @@
% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You % Texinfo macros (with @macro) are *not* supported by texinfo.tex. You
% have to run makeinfo -E to expand macros first; the texi2dvi script % have to run makeinfo -E to expand macros first; the texi2dvi script
% does this. % does this.
%
% To process a Texinfo manual with TeX, it's most reliable to use the
% texi2dvi shell script that comes with the distribution. For simple
% manuals, you can get away with:
% tex foo.texi
% texindex foo.??
% tex foo.texi
% tex foo.texi
% dvips foo.dvi -o # or whatever, to process the dvi file.
% The extra runs of TeX 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.
% Make it possible to create a .fmt file just by loading this file: % Make it possible to create a .fmt file just by loading this file:
@ -72,17 +86,9 @@
\let\ptexstar=\* \let\ptexstar=\*
\let\ptext=\t \let\ptext=\t
% Be sure we're in horizontal mode when doing a tie, since we make space % We never want plain's outer \+ definition in Texinfo.
% equivalent to this in @example-like environments. Otherwise, a space % For @tex, we can use \tabalign.
% at the beginning of a line will start with \penalty -- and \let\+ = \relax
% since \penalty is valid in vertical mode, we'd end up putting the
% penalty on the vertical list instead of in the new paragraph.
{\catcode`@ = 11
% Avoid using \@M directly, because that causes trouble
% if the definition is written into an index file.
\global\let\tiepenalty = \@M
\gdef\tie{\leavevmode\penalty\tiepenalty\ }
}
\message{Basics,} \message{Basics,}
@ -395,7 +401,7 @@
% @@ prints an @ % @@ prints an @
% Kludge this until the fonts are right (grr). % Kludge this until the fonts are right (grr).
\def\@{{\tt \char '100}} \def\@{{\tt\char64}}
% This is turned off because it was never documented % This is turned off because it was never documented
% and you can use @w{...} around a quote to suppress ligatures. % and you can use @w{...} around a quote to suppress ligatures.
@ -405,8 +411,8 @@
%\def\'{{'}} %\def\'{{'}}
% Used to generate quoted braces. % Used to generate quoted braces.
\def\mylbrace {{\tt \char '173}} \def\mylbrace {{\tt\char123}}
\def\myrbrace {{\tt \char '175}} \def\myrbrace {{\tt\char125}}
\let\{=\mylbrace \let\{=\mylbrace
\let\}=\myrbrace \let\}=\myrbrace
\begingroup \begingroup
@ -443,6 +449,18 @@
\fi\fi \fi\fi
} }
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
% since \penalty is valid in vertical mode, we'd end up putting the
% penalty on the vertical list instead of in the new paragraph.
{\catcode`@ = 11
% Avoid using \@M directly, because that causes trouble
% if the definition is written into an index file.
\global\let\tiepenalty = \@M
\gdef\tie{\leavevmode\penalty\tiepenalty\ }
}
% @: forces normal size whitespace following. % @: forces normal size whitespace following.
\def\:{\spacefactor=1000 } \def\:{\spacefactor=1000 }
@ -1723,18 +1741,6 @@ July\or August\or September\or October\or November\or December\fi
\message{tables,} \message{tables,}
% @tabs -- simple alignment
% These don't work. For one thing, \+ is defined as outer.
% So these macros cannot even be defined.
%\def\tabs{\parsearg\tabszzz}
%\def\tabszzz #1{\settabs\+#1\cr}
%\def\tabline{\parsearg\tablinezzz}
%\def\tablinezzz #1{\+#1\cr}
%\def\&{&}
% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
% default indentation of table text % default indentation of table text
@ -3578,6 +3584,7 @@ width0pt\relax} \fi
\let\!=\ptexexclam \let\!=\ptexexclam
\let\i=\ptexi \let\i=\ptexi
\let\{=\ptexlbrace \let\{=\ptexlbrace
\let\+=\tabalign
\let\}=\ptexrbrace \let\}=\ptexrbrace
\let\*=\ptexstar \let\*=\ptexstar
\let\t=\ptext \let\t=\ptext
@ -4295,18 +4302,17 @@ width0pt\relax} \fi
\message{cross reference,} \message{cross reference,}
% Define cross-reference macros \newwrite\auxfile
\newwrite \auxfile
\newif\ifhavexrefs % True if xref values are known. \newif\ifhavexrefs % True if xref values are known.
\newif\ifwarnedxrefs % True if we warned once that they aren't known. \newif\ifwarnedxrefs % True if we warned once that they aren't known.
% @inforef is simple. % @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**} \def\inforef #1{\inforefzzz #1,,,,**}
\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}} node \samp{\ignorespaces#1{}}}
% \setref{foo} defines a cross-reference point named foo. % @setref{foo} defines a cross-reference point named foo.
\def\setref#1{% \def\setref#1{%
\dosetq{#1-title}{Ytitle}% \dosetq{#1-title}{Ytitle}%
@ -4374,7 +4380,7 @@ width0pt\relax} \fi
% into the usual \leavevmode...\vrule stuff for purposes of % into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the % printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg. % printing, back off for the \refx-pg.
{\turnoffactive \refx{#1-snt}{}}% {\normalturnoffactive \refx{#1-snt}{}}%
\space [\printednodename],\space \space [\printednodename],\space
\turnoffactive \putwordpage\tie\refx{#1-pg}{}% \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi \fi
@ -4382,11 +4388,15 @@ width0pt\relax} \fi
% \dosetq is the interface for calls from other macros % \dosetq is the interface for calls from other macros
% Use \turnoffactive so that punctuation chars such as underscore % Use \normalturnoffactive so that punctuation chars such as underscore
% work in node names. % and backslash work in node names. (\turnoffactive doesn't do \.)
\def\dosetq #1#2{{\let\folio=0 \turnoffactive \def\dosetq#1#2{%
\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% {\let\folio=0
\next}} \normalturnoffactive
\edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
\next
}%
}
% \internalsetq {foo}{page} expands into % \internalsetq {foo}{page} expands into
% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
@ -4517,8 +4527,7 @@ width0pt\relax} \fi
\catcode`\$=\other \catcode`\$=\other
\catcode`\#=\other \catcode`\#=\other
\catcode`\&=\other \catcode`\&=\other
% `\+ does not work, so use 43. \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
\catcode43=\other
% Make the characters 128-255 be printing characters % Make the characters 128-255 be printing characters
{% {%
\count 1=128 \count 1=128
@ -4889,10 +4898,10 @@ width0pt\relax} \fi
% use math or other variants that look better in normal text. % use math or other variants that look better in normal text.
\catcode`\"=\active \catcode`\"=\active
\def\activedoublequote{{\tt \char '042}} \def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote \let"=\activedoublequote
\catcode`\~=\active \catcode`\~=\active
\def~{{\tt \char '176}} \def~{{\tt\char126}}
\chardef\hat=`\^ \chardef\hat=`\^
\catcode`\^=\active \catcode`\^=\active
\def^{{\tt \hat}} \def^{{\tt \hat}}
@ -4903,7 +4912,7 @@ width0pt\relax} \fi
\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
\catcode`\|=\active \catcode`\|=\active
\def|{{\tt \char '174}} \def|{{\tt\char124}}
\chardef \less=`\< \chardef \less=`\<
\catcode`\<=\active \catcode`\<=\active
\def<{{\tt \less}} \def<{{\tt \less}}
@ -4990,8 +4999,8 @@ width0pt\relax} \fi
@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
@catcode`+=@active @catcode`@_=@active} @catcode`+=@active @catcode`@_=@active}
%% These look ok in all fonts, so just make them not special. The @rm below % These look ok in all fonts, so just make them not special. The @rm below
%% makes sure that the current font starts out as the newly loaded cmr10 % makes sure that the current font starts out as the newly loaded cmr10
@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
@textfonts @textfonts