summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-28 01:20:12 +0000
committerKarl Berry <karl@freefriends.org>2015-08-28 01:20:12 +0000
commite9e6224e922cd445f0c082a1edde00b8ae37fca6 (patch)
tree4495df037efb3dc3952e43e41062a5cf595dfdd9 /Build
parentf33fa0b907bbc217ddc2bd5bb5a47db771ea1fc5 (diff)
/home/texlive/karl/Master/tlpkg/bin/tl-update-auto
git-svn-id: svn://tug.org/texlive/trunk@38226 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/build-aux/texinfo.tex146
1 files changed, 78 insertions, 68 deletions
diff --git a/Build/source/build-aux/texinfo.tex b/Build/source/build-aux/texinfo.tex
index df3f636bf81..d955b8a527b 100644
--- a/Build/source/build-aux/texinfo.tex
+++ b/Build/source/build-aux/texinfo.tex
@@ -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{2015-08-24.13}
+\def\texinfoversion{2015-08-25.18}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -346,10 +346,10 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
- % {\code {{\tt \backslashcurfont }acronym}
+ % {\code {{\backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -1053,8 +1053,8 @@ where each line of input produces a line of output.}
\newif\iflinks \linkstrue % by default we want the aux files.
\let\novalidate = \linksfalse
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
+% @setfilename is done at the beginning of every texinfo file. So open
+% here some of the files we need to have open while reading the input.
% This makes it possible to make a .fmt file for texinfo.
\def\setfilename{%
\iflinks
@@ -1062,7 +1062,6 @@ where each line of input produces a line of output.}
% Open the new aux file. TeX will close it automatically at exit.
\immediate\openout\auxfile=\jobname.aux
\fi % \openindices needs to do some work in any case.
- \openindices
\let\setfilename=\comment % Ignore extra @setfilename cmds.
%
% If texinfo.cnf is present on the system, read it.
@@ -1074,17 +1073,6 @@ where each line of input produces a line of output.}
\comment % Ignore the actual filename.
}
-% Called from \setfilename.
-%
-\def\openindices{%
- \newindex{cp}%
- \newcodeindex{fn}%
- \newcodeindex{vr}%
- \newcodeindex{tp}%
- \newcodeindex{ky}%
- \newcodeindex{pg}%
-}
-
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
@@ -4371,19 +4359,16 @@ end
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
+% \newindex {foo} defines an index named IX.
+% It automatically defines \IXindex such that
+% \IXindex ...rest of line... puts an entry in the index IX.
+% It also defines \IXindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is IX.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
@@ -4397,14 +4382,19 @@ end
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
+% The default indices:
+\newindex{cp}% concepts,
+\newcodeindex{fn}% functions,
+\newcodeindex{vr}% variables,
+\newcodeindex{tp}% types,
+\newcodeindex{ky}% keys
+\newcodeindex{pg}% and programs.
+
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
@@ -4433,24 +4423,19 @@ end
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
-% Define \doindex, the driver for all \fooindex macros.
+% Define \doindex, the driver for all index macros.
% Argument #1 is generated by the calling \fooindex macro,
-% and it is "foo", the name of the index.
-
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
+% and it the two-letter name of the index.
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
+\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
+\def\doindexxxx #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
+\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
-% Take care of Texinfo commands that can appear in an index entry.
+% Used when writing an index entry out to an index file, to prevent
+% expansion 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.
%
@@ -4679,6 +4664,9 @@ end
% For testing: output @{ and @} in index sort strings as \{ and \}.
\newif\ifusebracesinindexes
+\let\indexlbrace\relax
+\let\indexrbrace\relax
+
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
@@ -4704,16 +4692,10 @@ end
\def\_{\normalunderscore}%
\def\-{}% @- shouldn't affect sorting
%
- % Unfortunately, texindex is not prepared to handle braces in the
- % content at all. So for index sorting, we map @{ and @} to strings
- % starting with |, since that ASCII character is between ASCII { and }.
- \ifusebracesinindexes
- \def\lbracechar{\lbracecmd}%
- \def\rbracechar{\rbracecmd}%
- \else
- \def\lbracechar{|a}%
- \def\rbracechar{|b}%
- \fi
+ % Unfortunately, texindex < 6.0 is not prepared to handle braces in the
+ % content at all, so these won't be sorted in ASCII order.
+ \def\lbracechar{{\indexlbrace}}%
+ \def\rbracechar{{\indexrbrace}}%
\let\{=\lbracechar
\let\}=\rbracechar
%
@@ -4795,14 +4777,17 @@ end
{\catcode`\`=\active
\gdef\indexlquoteignore{\let`=\empty}}
-\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
-% Workhorse for all \fooindexes.
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+% TODO: Two-level index? Operation index?
+
+% Workhorse for all indexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
@@ -4810,6 +4795,7 @@ end
\def\dosubind#1#2#3{%
\iflinks
{%
+ \requireopenindexfile{#1}%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
@@ -4825,6 +4811,29 @@ end
\fi
}
+% Check if an index file has been opened, and if not, open it.
+\def\requireopenindexfile#1{%
+\ifnum\csname #1indfile\endcsname=0
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\fi}
+
+% Output \ as {\indexbackslash}, because \ is an escape character in
+% the index files.
+\let\indexbackslash=\relax
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@useindexbackslash{@def\{{@indexbackslash}}}
+}
+
+% Definition for writing index entry text.
+\def\sortas#1{\eatspaces}%
+
+% Definition for writing index entry sort key. @sortas{} must occur at
+% the beginning of the index entry, like
+% @cindex @sortas{september} \september
+\def\indexwritesortas#1#2\endofindexentry{#1}
+
+
% Write the entry in \toks0 to the index file:
%
\def\dosubindwrite{%
@@ -4835,14 +4844,15 @@ end
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
- % so it will be output as is; and it will print as backslash.
- %
- % Process the index entry with all font commands turned off, to
- % get the string to sort by.
+ \useindexbackslash % \indexbackslash isn't defined now so it will be output
+ % as is; and it will print as backslash.
+ % Get the string to sort by, by processing the index entry with all
+ % font commands turned off.
{\indexnofonts
- \edef\temp{\the\toks0}% need full expansion
- \xdef\indexsorttmp{\temp}%
+ \def\endofindexentry{}%
+ \let\sortas=\indexwritesortas
+ \edef\temp{\the\toks0 \noexpand\endofindexentry}%
+ \xdef\indexsortkey{\temp}%
}%
%
% Set up the complete index entry, with both the sort key and
@@ -4852,7 +4862,7 @@ end
% sorted result.
\edef\temp{%
\write\writeto{%
- \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
@@ -5000,7 +5010,9 @@ end
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
- \def\indexbackslash{\backslashcurfont}%
+ \def\indexbackslash{\ttbackslash}%
+ \let\indexlbrace\{ % Likewise, set these sequences for braces
+ \let\indexrbrace\} % used in the sort key.
\catcode`\\ = 0
\escapechar = `\\
\begindoublecolumns
@@ -5014,9 +5026,6 @@ end
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
-{\catcode`\@=0 \catcode`\\=13
-@gdef@usemathbackslash{@def@\{@math{@backslash}}}}
-
\let\normalhyphen=-
{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
@@ -5025,7 +5034,8 @@ end
% Some changes for non-alphabetic characters. Using the glyphs from the
% math fonts looks more consistent than the typewriter font used elsewhere
% for these characters.
- \usemathbackslash
+ \def\indexbackslash{\math{\backslash}}%
+ \let\\=\indexbackslash
%
% Can't get bold backslash so don't use bold forward slash
\catcode`\/=13