summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ltxindex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-01-15 01:15:09 +0000
committerKarl Berry <karl@freefriends.org>2007-01-15 01:15:09 +0000
commitfa943c88824be38c97f683bccd10b5c12ab7cead (patch)
tree94a0d956e86d497ebf5b202f87b5e8e2355a7cc6 /Master/texmf-dist/tex/latex/ltxindex
parent76deb2cf858fd88a0efbb6ec51711fdffc35fff7 (diff)
ltxindex update
git-svn-id: svn://tug.org/texlive/trunk@3493 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ltxindex')
-rw-r--r--Master/texmf-dist/tex/latex/ltxindex/ltxindex.sty147
1 files changed, 55 insertions, 92 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxindex/ltxindex.sty b/Master/texmf-dist/tex/latex/ltxindex/ltxindex.sty
index 6e42246fa5c..ffe45e93ec8 100644
--- a/Master/texmf-dist/tex/latex/ltxindex/ltxindex.sty
+++ b/Master/texmf-dist/tex/latex/ltxindex/ltxindex.sty
@@ -1,60 +1,42 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% ltxindex.sty, a LaTeX package to typeset indices with GNU's Texindex
-% Copyright (C) 2004 by Jose-Luis Rivera
-%
-% This program is free software; you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation; either version 2, or (at your option)
-% any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program; if not, write to the Free Software
-% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% WARNING!!! This code is fairly experimental. %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-
-
+%%
+%% This is file `ltxindex.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltxindex.dtx (with options: `ltxindex,package')
+%%
+%% ltxindex.sty, a LaTeX package to typeset indices with GNU's Texindex
+%% Copyright (C) 2004 by Richard Stallman, Robert J. Chassell,
+%% Michael Clarkson, \& Luis Rivera.
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2, or (at your option)
+%% any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%%
+%% WARNING!!! This code is fairly experimental.
+%%
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{ltxindex}
- [2004/06/30 v0.1]
-\message{indexing, texindex style}
-
+ [2004/06/30 v0.1b ltxindex: LaTeX indexing, texindex style]
\RequirePackage{multicol}
-
-% Index generation facilities
-
-% Define the texinfo user-accessible indexing commands for backwards
-% compatability.
-
\def\cindex{\cpindex}
\def\pindex{\pgindex}
\def\vindex{\vrindex}
\def\tindex{\tpindex}
\def\kindex{\kyindex}
\def\findex{\fnindex}
-
-
-% \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.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
-
\def\newindex#1{\csname newindex#1\endcsname}
-
-% Yes I know this could be done shorter, but safer??
-
\def\newindexcp{\if@filesw \newwrite\@cpindexfile
\immediate\openout\@cpindexfile=\jobname.cp
\def\cpindex{\@bsphack\begingroup
@@ -84,8 +66,8 @@
\if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
\def\@wrsubindex#1#2#3{\let\thepage\relax
- \xdef\@gtempa{\write#1{\string \entry{#2 #3}{\thepage}{#2}{#3}}}\endgroup%
- \@gtempa
+\xdef\@gtempa{\write#1{\string \entry{#2 #3}{\thepage}{#2}{#3}}}\endgroup%
+\@gtempa
\if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
\def\@index#1{\endgroup\@esphack}
@@ -99,7 +81,7 @@
\def\pgindexbold{\@bsphack\begingroup
\def\protect####1{\string####1\space}\@sanitize
\@wrindexbold\@pgindexfile}
- \typeout{Writing index file \jobname.pg }\fi}
+\typeout{Writing index file \jobname.pg }\fi}
\def\pgindex{\@bsphack\begingroup \@sanitize\@index}
\def\pgindexbold{\@bsphack\begingroup \@sanitize\@index}
@@ -112,7 +94,7 @@
\def\vrindexbold{\@bsphack\begingroup
\def\protect####1{\string####1\space}\@sanitize
\@wrindexbold\@vrindexfile}
- \typeout{Writing variable index file \jobname.vr }\fi}
+\typeout{Writing variable index file \jobname.vr }\fi}
\def\vrindex{\@bsphack\begingroup \@sanitize\@index}
\def\vrindexbold{\@bsphack\begingroup \@sanitize\@index}
@@ -125,16 +107,18 @@
\def\tpindexbold{\@bsphack\begingroup
\def\protect####1{\string####1\space}\@sanitize
\@wrindexbold\@tpindexfile}
- \typeout{Writing datatype index file \jobname.tp }\fi}
+\typeout{Writing datatype index file \jobname.tp }\fi}
\def\tpindex{\@bsphack\begingroup \@sanitize\@index}
\def\tpindexbold{\@bsphack\begingroup \@sanitize\@index}
-\def\newindexky{\if@filesw \newwrite\@kyindexfile
+\def\newindexky{\if@filesw
+ \newwrite\@kyindexfile
\immediate\openout\@kyindexfile=\jobname.ky
\def\kyindex{\@bsphack\begingroup
- \def\protect####1{\string####1\space}\@sanitize
- \@wrindex\@kyindexfile}\typeout{Writing key index file \jobname.ky }\fi}
+ \def\protect####1{\string####1\space}\@sanitize
+ \@wrindex\@kyindexfile}\typeout{Writing key index file \jobname.ky}
+ \fi}
\def\kyindex{\@bsphack\begingroup \@sanitize\@index}
\def\kyindexbold{\@bsphack\begingroup \@sanitize\@index}
@@ -147,60 +131,45 @@
\def\fnindexbold{\@bsphack\begingroup
\def\protect####1{\string####1\space}\@sanitize
\@wrindexbold\@fnindexfile}
- \typeout{Writing function index file \jobname.fn }\fi}
+\typeout{Writing function index file \jobname.fn }\fi}
\def\fnindex{\@bsphack\begingroup \@sanitize\@index}
\def\fnindexbold{\@bsphack\begingroup \@sanitize\@index}
-
-% \synindex{foo}{bar} makes index foo feed into index bar.
\def\synindex#1#2{\expandafter\xdef \csname @#1index\endcsname{%
- \noexpand\csname @#2index\endcsname}%
+\noexpand\csname @#2index\endcsname}%
\expandafter \chardef \csname @#1indexfile\endcsname=\csname @#2indexfile\endcsname}
-
-% \syncodeindex{foo}{bar} similar, but put all entries made for index foo
-% inside bold.
\def\syncodeindex#1#2{%
\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\csname#1boldindex\endcsname{#2}}%
}
-
-% Define the macros used in formatting output of the sorted index material.
-% This is what you call to cause a particular index to get printed.
-% Write
-% \section*{Function Index}
-% \printindex{fn}
-
\newskip\secondaryindent
\secondaryindent=0.5cm
-
-% In case index foo is undefined, or sorted index foo.??s is empty...
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-
+\ifx\putwordIndexNonexistent\undefined
+ \gdef\putwordIndexNonexistent{(Index is nonexistent)}
+\fi
+\ifx\putwordIndexIsEmpty\undefined
+ \gdef\putwordIndexIsEmpty{(Index is empty)}
+\fi
\def\printindex#1{
\def\indexbackslash{\rawbackslashxx}
\tolerance=9500 \advance\baselineskip -1pt
\openin 1 \jobname.#1s
-\ifeof 1
- \putwordIndexNonexistent
- \else
+\ifeof 1
+ \putwordIndexNonexistent
+ \else
\read 1 to \temp
\ifeof 1
\putwordIndexIsEmpty
- \else
+ \else
\begin{multicols}{2}
\input \jobname.#1s
\end{multicols}
\fi
\fi
-\closein 1
+\closein 1
}
-
-% These macros are used by the sorted index file itself.
-% Change them to control the appearance of the index.
-
\def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
\def\pline{\hbox to\hsize}
@@ -220,16 +189,10 @@
\hangindent =1in \hangafter=1
\noindent\hskip\secondaryindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
}}
-
-%%% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-
-% Now we set up the default concept index...
\newindex{cp}
-
-% ...and two useful macros to save typing time
\newcommand{\indexcp}[1]{#1\cpindex{#1}}
\newcommand{\subindexcp}[2]{#1\cpsubindex{#2}{#1}}
-
-% et voil\`a!
\endinput
+%%
+%% End of file `ltxindex.sty'.