changeset 4158:48c2c3561c86

update from texinfo
author Karl Berry <karl@freefriends.org>
date Sat, 11 Jan 2003 23:32:24 +0000
parents b7cbe15d6a90
children 1d5d32470321
files config/texinfo.tex
diffstat 1 files changed, 107 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/config/texinfo.tex
+++ b/config/texinfo.tex
@@ -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{2003-01-10.08}
+\def\texinfoversion{2003-01-11.15}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 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
@@ -55,9 +55,10 @@
 % 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 the full Texinfo distribution.
+% 
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent.  You can get the existing language-specific files from the
+% full Texinfo distribution.
 
 \message{Loading texinfo [version \texinfoversion]:}
 
@@ -478,13 +479,14 @@
 @endgroup
 
 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
 \let\, = \c
 \let\dotaccent = \.
 \def\ringaccent#1{{\accent23 #1}}
 \let\tieaccent = \t
 \let\ubaraccent = \b
 \let\udotaccent = \d
+\let\acuteaccent = \'  % workaround aux file using ' as escape
 
 % Other special characters: @questiondown @exclamdown
 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
@@ -2862,12 +2864,27 @@
 \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.)
+% Define \#1 as \realbackslash #1\space, thus effectively preventing its
+% expansion.  This is used only for control words, not control
+% characters, because the \space would be incorrect for control
+% characters, but is needed to separate the control word from whatever
+% follows.
+% 
+% This can be used both for control words that take an argument and
+% those that do not.  If it does take an argument, then it'll be
+% followed by {arg} in the input, which will dutifully get written to
+% the index (or wherever).
+% 
+\def\definedummyword#1{%
+  \expandafter\def\csname #1\endcsname{\realbackslash #1\space}%
+}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
 % 
 \def\indexdummies{%
-  \def\ { }%
+  \def\ {\realbackslash }%
   \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
@@ -2878,92 +2895,92 @@
   \normalturnoffactive
   %
   % Accents.
-  \def\,##1{\realbackslash ,{##1}}%
+  \def\,{\realbackslash ,}%
   \def\"{\realbackslash "}%
   \def\`{\realbackslash `}%
-  \def\'{\realbackslash '}%
+  \def\'{\realbackslash acuteaccent }% workaround aux file using ' as escape
   \def\^{\realbackslash ^}%
   \def\~{\realbackslash ~}%
   \def\={\realbackslash =}%
-  \def\b{\realbackslash b}%
-  \def\c{\realbackslash c}%
-  \def\d{\realbackslash d}%
-  \def\u{\realbackslash u}%
-  \def\v{\realbackslash v}%
-  \def\H{\realbackslash H}%
-  \def\dotaccent##1{\realbackslash dotaccent {##1}}%
-  \def\ringaccent##1{\realbackslash ringaccent {##1}}%
-  \def\tieaccent##1{\realbackslash tieaccent {##1}}%
-  \def\ubaraccent##1{\realbackslash ubaraccent {##1}}%
-  \def\udotaccent##1{\realbackslash udotaccent {##1}}%
-  \def\dotless##1{\realbackslash dotless {##1}}%
+  \definedummyword{u}%
+  \definedummyword{v}%
+  \definedummyword{H}%
+  \definedummyword{dotaccent}%
+  \definedummyword{ringaccent}%
+  \definedummyword{tieaccent}%
+  \definedummyword{ubaraccent}%
+  \definedummyword{udotaccent}%
+  \definedummyword{dotless}%
+  %
   % Other non-English 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}%
+  \definedummyword{AA}%
+  \definedummyword{AE}%
+  \definedummyword{L}%
+  \definedummyword{OE}%
+  \definedummyword{O}%
+  \definedummyword{aa}%
+  \definedummyword{ae}%
+  \definedummyword{l}%
+  \definedummyword{oe}%
+  \definedummyword{o}%
+  \definedummyword{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}%
+  % Although these internal commands shouldn't show up, sometimes they do.
+  \definedummyword{bf}%
+  \definedummyword{gtr}%
+  \definedummyword{hat}%
+  \definedummyword{less}%
+  \definedummyword{sf}%
+  \definedummyword{sl}%
+  \definedummyword{tclose}%
+  \definedummyword{tt}%
   %
-  \def\b##1{\realbackslash b {##1}}%
-  \def\i##1{\realbackslash i {##1}}%
-  \def\r##1{\realbackslash r {##1}}%
-  \def\sc##1{\realbackslash sc {##1}}%
-  \def\t##1{\realbackslash t {##1}}%
+  % Texinfo font commands.
+  \definedummyword{b}%
+  \definedummyword{i}%
+  \definedummyword{r}%
+  \definedummyword{sc}%
+  \definedummyword{t}%
   %
-  \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 }%
+  \definedummyword{TeX}%
+  \definedummyword{acronym}%
+  \definedummyword{cite}%
+  \definedummyword{code}%
+  \definedummyword{command}%
+  \definedummyword{dfn}%
+  \definedummyword{dots}%
+  \definedummyword{emph}%
+  \definedummyword{env}%
+  \definedummyword{file}%
+  \definedummyword{kbd}%
+  \definedummyword{key}%
+  \definedummyword{math}%
+  \definedummyword{option}%
+  \definedummyword{samp}%
+  \definedummyword{strong}%
+  \definedummyword{uref}%
+  \definedummyword{url}%
+  \definedummyword{var}%
+  \definedummyword{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}%
+  \definedummyword{copyright}%
+  \definedummyword{equiv}%
+  \definedummyword{error}%
+  \definedummyword{expansion}%
+  \definedummyword{point}%
+  \definedummyword{print}%
+  \definedummyword{result}%
   %
   % Handle some cases of @value -- where the variable name does not
   % contain - or _, and the value does not contain any
   % (non-fully-expandable) commands.
   \let\value = \expandablevalue
   %
+  % Normal spaces, not active ones.
   \unsepspaces
-  % Turn off macro expansion
+  %
+  % No macro expansion.
   \turnoffmacros
 }
 
@@ -2973,11 +2990,15 @@
 {\obeyspaces
  \gdef\unsepspaces{\obeyspaces\let =\space}}
 
-% \indexnofonts no-ops all font-change commands.
-% This is used when outputting the strings to sort the index by.
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by.  Therefore, it eliminates all control sequences and just writes
+% whatever the best ASCII sort string would be for a given command
+% (usually its argument).
+%
 \def\indexdummytex{TeX}
 \def\indexdummydots{...}
-
+%
 \def\indexnofonts{%
   \def\ { }%
   \def\@{@}%
@@ -2991,9 +3012,6 @@
   \let\^=\asis
   \let\~=\asis
   \let\==\asis
-  \let\b=\asis
-  \let\c=\asis
-  \let\d=\asis
   \let\u=\asis
   \let\v=\asis
   \let\H=\asis
@@ -3003,7 +3021,8 @@
   \let\ubaraccent=\asis
   \let\udotaccent=\asis
   \let\dotless=\asis
-  % Take care of the plain tex special European modified letters.
+  %
+  % Other non-English letters.
   \def\AA{AA}%
   \def\AE{AE}%
   \def\L{L}%
@@ -3015,12 +3034,15 @@
   \def\oe{oe}%
   \def\o{o}%
   \def\ss{ss}%
+  \def\exclamdown{!}%
+  \def\questiondown{?}%
   %
   % 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=\asis
   %
+  % Texinfo font commands.
   \let\b=\asis
   \let\i=\asis
   \let\r=\asis