summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/splitindex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-18 23:01:09 +0000
committerKarl Berry <karl@freefriends.org>2006-07-18 23:01:09 +0000
commit89128513e8c72c5c04c3284a7758fc333a761aec (patch)
treec64b7c4039d3f195ca5dd7adcb579209eab3bcd4 /Master/texmf-dist/tex/latex/splitindex
parentfc2c7ab430ef4b878fd3455118daa831e76db681 (diff)
splitindex update (8mar06)
git-svn-id: svn://tug.org/texlive/trunk@1879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/splitindex')
-rw-r--r--Master/texmf-dist/tex/latex/splitindex/splitidx.sty48
1 files changed, 39 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/splitindex/splitidx.sty b/Master/texmf-dist/tex/latex/splitindex/splitidx.sty
index 4ea875ca961..8e12153f9e1 100644
--- a/Master/texmf-dist/tex/latex/splitindex/splitidx.sty
+++ b/Master/texmf-dist/tex/latex/splitindex/splitidx.sty
@@ -14,12 +14,15 @@
%% ----------------------------------------------------------------
%%
%% It may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License, either version 1.2 of this
+%% the LaTeX Project Public License, either version 1.3a of this
%% license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
+%% and version 1.3a or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has status 'maintained'.
+%% Maintainer is Markus Kohm <komascript@gmx.info>.
%%
%% This file may only be distributed together with a copy of the
%% `SplitIndex bundle'. You may however distribute the `SpitIndex
@@ -29,14 +32,25 @@
%% given in the file `manifest.txt'.
%%
\ProvidesPackage{splitidx}[%
- 2003/01/05 v0.2a multiple indices for LaTeX]
+ 2006/03/07 v0.9 multiple indices for LaTeX]
\DeclareOption{makeindex}{\AtEndOfPackage{\makeindex}}
+\DeclareOption{useindex}{%
+ \def\@se@nd@xc@d@{\let\index\sindex}%
+ \AtEndOfPackage{\@se@nd@xc@d@}%
+}
+\let\@se@nd@xc@d@\relax
\DeclareOption{allatone}{%
+ \ifx\@se@nd@xc@d@\relax\else
+ \PackageInfo{splitidx}{option `allatone' overwrites option `useindex'}%
+ \let\@se@nd@xc@d@\relax
+ \fi
\AtEndOfPackage{%
\renewcommand*{\sindex}[1][]{\index}%
\g@addto@macro\makeindex{\renewcommand*{\sindex}[1][]{\index}}%
}%
}
+\newif\if@verbindex\@verbindexfalse
+\DeclareOption{protected}{\@verbindextrue}
\newif\if@newidxcmd\@newidxcmdfalse
\DeclareOption{idxcommands}{\@newidxcmdtrue}
\newif\if@splitidx\@splitidxfalse
@@ -55,19 +69,24 @@
\@wrsindex
}%
\typeout{Using splitted index at \jobname.idx}%
+ \@se@nd@xc@d@
}
\newcommand*{\@wrsindex}[2][]{%
\ifx\relax#1\relax
\if@splitidx
\@wrsindex[idx]{#2}%
\else
- \@wrindex{#2}%
+ \def\@tempa{#2}%
+ \if@verbindex\@onelevel@sanitize\@tempa\fi
+ \@wrindex{\@tempa}%
\fi
\else
+ \def\@tempa{#2}%
+ \csname index@#1@hook\endcsname
\expandafter\ifx\csname @@wrsindex\endcsname\relax
- \@@@wrsindex{#1}{{#2}{\thepage}}%
+ \@@@wrsindex{#1}{{\@tempa}{\thepage}}%
\else
- \@@wrsindex{#1}#2||\\%
+ \@@wrsindex{#1}\@tempa||\\%
\fi
\endgroup
\@esphack
@@ -180,6 +199,13 @@
}
\newcommand*{\newindex}[2][\relax]{%
\@ifundefined{index@#2@name}{%
+ \if@verbindex
+ \expandafter\gdef\csname index@#2@hook\endcsname{%
+ \@onelevel@sanitize\@tempa
+ }%
+ \else
+ \expandafter\gdef\csname index@#2@hook\endcsname{}%
+ \fi
\ifx\@indices\@empty
\xdef\@indices{#2}%
\else
@@ -191,14 +217,15 @@
\expandafter\xdef\csname index@#2@name\endcsname{#1}%
\fi
\if@newidxcmd
- \expandafter\newcommand\expandafter*\csname #2\endcsname{%
+ \expandafter\newcommand\expandafter*\csname #2\endcsname{}%
+ \expandafter\gdef\csname #2\endcsname{%
\sindex[#2]%
}%
\fi
\if@splitidx
\def\@tempa{#2}\def\@tempb{idx}%
\ifx\@tempa\@tempb
- \let\@indexfile@idx=\@indexfile
+ \global\let\@indexfile@idx=\@indexfile
\else
\expandafter\newwrite\csname @indexfile@#2\endcsname
\expandafter\immediate\expandafter\openout
@@ -219,6 +246,9 @@
\if@splitidx
\@onlypreamble\newindex
\fi
+\newcommand*{\newprotectedindex}[2][\relax]{%
+ \begingroup\@verbindextrue\newindex[{#1}]{#2}\endgroup
+}
\newcommand*{\@indices}{}
\gdef\@indices{}
\newcommand{\extendtheindex}[4]{%