diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-05 23:29:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-05 23:29:43 +0000 |
commit | 10e6cd9ce34c0ec20d007ebe6ce8fca9783b7309 (patch) | |
tree | b5978aff26fa2650ca7cf9040bfb7c6c408ddd9b /Master/texmf-dist/tex/latex/splitindex | |
parent | 26b44194fa3622fa961f40a0d62fb3cacaa5cbc9 (diff) |
splitindex (5apr13)
git-svn-id: svn://tug.org/texlive/trunk@29688 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/splitindex')
-rw-r--r-- | Master/texmf-dist/tex/latex/splitindex/splitidx.sty | 15 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/splitindex/splitindex.tex | 189 |
2 files changed, 14 insertions, 190 deletions
diff --git a/Master/texmf-dist/tex/latex/splitindex/splitidx.sty b/Master/texmf-dist/tex/latex/splitindex/splitidx.sty index 53c585e9655..708931bec52 100644 --- a/Master/texmf-dist/tex/latex/splitindex/splitidx.sty +++ b/Master/texmf-dist/tex/latex/splitindex/splitidx.sty @@ -55,7 +55,8 @@ %% directly from the Work. %% \ProvidesPackage{splitidx}[% - 2009/02/28 v1.1a multiple indices for LaTeX] + 2013/04/04 v1.2 multiple indices for LaTeX] +\subsection{Merging Indices} \DeclareOption{makeindex}{\AtEndOfPackage{\makeindex}} \DeclareOption{useindex}{% \def\@se@nd@xc@d@{\let\index\sindex}% @@ -63,6 +64,8 @@ } \let\@se@nd@xc@d@\relax \DeclareOption{allatone}{% + \PackageWarning{splitidx}{Option `allatone' deprecated!\MessageBreak + You should replace it by `allintoone'}% \ifx\@se@nd@xc@d@\relax\else \PackageInfo{splitidx}{option `allatone' overwrites option `useindex'}% \let\@se@nd@xc@d@\relax @@ -72,6 +75,16 @@ \g@addto@macro\makeindex{\renewcommand*{\sindex}[1][]{\index}}% }% } +\DeclareOption{allintoone}{% + \ifx\@se@nd@xc@d@\relax\else + \PackageInfo{splitidx}{option `allintoone' 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 diff --git a/Master/texmf-dist/tex/latex/splitindex/splitindex.tex b/Master/texmf-dist/tex/latex/splitindex/splitindex.tex deleted file mode 100644 index 0d7c4ecce52..00000000000 --- a/Master/texmf-dist/tex/latex/splitindex/splitindex.tex +++ /dev/null @@ -1,189 +0,0 @@ -% ====================================================================== -% splitindex.tex -% Copyright (c) Markus Kohm, 2002-2009 -% -% $Id: splitindex.tex,v 1.3 2009-03-20 14:55:11 mjk Exp $ -% -% This file is part of the SplitIndex bundle. -% -% This work may be distributed and/or modified under the conditions of -% the LaTeX Project Public License, version 1.3c of the license. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3c or later is part of all distributions of LaTeX -% version 2005/12/01 or later and of this work. -% -% This work has the LPPL maintenance status "author-maintained". -% -% The Current Maintainer and author of this work is Markus Kohm. -% -% The list of all files belongig to the SplitIndex bundle is given in -% in the file `manifest.txt'. Files generated by means of unpacking the -% distribution (using, for example, the docstrip program) or by means -% of compiling them from a source file, for example, from splitindex.c -% or splitindex.java may be distributed at the distributor's discretion. -% However if they are distributed then a copy of the SplitIndex bundle -% must be distributed together with them. -% -% The list of derived (unpacked or compiled) files belongig to the -% distribution and covered by LPPL is defined by the unpacking scripts -% (with extension .ins) and the installation script (with name -% install.sh) which are part of the distribution. -% -% Two often ignorred clauses from LPPL 1.3c you should not ignore: -% ---------------------------------------------------------------- -% 2. You may distribute a complete, unmodified copy of the Work as you -% received it. Distribution of only part of the Work is considered -% modification of the Work, and no right to distribute such a Derived -% Work may be assumed under the terms of this clause. -% 3. You may distribute a Compiled Work that has been generated from a -% complete, unmodified copy of the Work as distributed under Clause 2 -% above, as long as that Compiled Work is distributed in such a way that -% the recipients may install the Compiled Work on their system exactly -% as it would have been installed if they generated a Compiled Work -% directly from the Work. -% ====================================================================== - -% Set newlinechar -\newlinechar`\^^J - -% Tell program information -\message{splitindex.tex 0.1^^J% - Copyright (c) 2002 Markus Kohm <kohm@gmx.de>^^J^^J} - -% Change \catcode of At to be a letter -\catcode`\@11\relax - -% New end processing command (one of these should do the job) -\def\endprocessing{% - \csname @@end\endcsname - \csname end\endcsname - \csname endinput\endcsname -} - -% Check out, if we are using LaTeX or plainTeX: -\let\@earlyend\relax -\def\@tempa{LaTeX2e} -\expandafter\ifx\csname fmtname\endcsname\@tempa -\else - \def\@tempa{plain} - \expandafter\ifx\csname fmtname\endcsname\@tempa - \def\newwrite{\alloc@7\write\chardef\sixt@@n}% not longer \outer - \chardef\@inputcheck=0\relax - \else - \message{Unkown format \csname fmtname\endcsname^^J - You have to use plainTeX or LaTeX2e to run - splitindex.tex!^^J} - \let\@earlyend\endprocessing - \fi -\fi -\@earlyend - -% Is \idx defined to the name of the raw index file? -\expandafter\ifx\csname idx\endcsname\relax -% no it isn't - \message{Enter the name of the idx file to be processed: }% - \advance\endlinechar\@M - \read\m@ne to\idx - \advance\endlinechar-\@M -\fi - -% Sorry to late for log file -\def\setjobname#1.idx#2\\{\def\jobname{#1}} -\expandafter\setjobname\idx.idx\\ - -\let\@earlyend\relax -\openin\@inputcheck\idx % -\ifeof\@inputcheck - \ifx\jobname\idx - \openin\@inputcheck\jobname.idx % - \ifeof\@inputcheck - \message{Error: Neither file `\idx' nor file `\jobname.idx' found!^^J}% - \let\@earlyend\endprocessing - \else - \xdef\idx{\jobname.idx}% - \fi - \else - \message{Error: File `\idx' not found!^^J}% - \let\@earlyend\endprocessing - \fi -\fi -\@earlyend - -\message{Read from file: \idx^^J% - Write to files: \jobname-*.idx^^J} - -% We are ready to do the processing - -% First we have to do the tricky splitting of the input line. -% We do not allow lines which don't start with \indexentry. -% We do not support other index file definitions but with an -% optional argument of \indexentry. -% We need some catcode changes to read and split the line. So -% we do this part of the processing at a group. -\newtoks\verbatim@line -\begingroup -\catcode`\^^M\active - -\begingroup -\catcode`\|=0 -\catcode`\\=12 -|gdef|splitidxline\indexentry#1{% - |if #1[% - |expandafter|@splitidxline% - |else% - |expandafter |@splitidxline |expandafter i|expandafter d% - |expandafter x|expandafter ]|expandafter#1% - |fi% -} -|endgroup - -\gdef\@splitidxline#1]#2^^M{% - \idxwrite{#1}{\string\indexentry#2}% -} - -\gdef\processidxline{%\message{\the\verbatim@line}% - \expandafter\splitidxline\verbatim@line^^M -} -\endgroup - -% Now, we can do the main job: writing to the index files -\def\idxwrite#1#2{% - \expandafter\ifx\csname write@#1\endcsname\relax - % We need a new file - \message{New index file: \jobname-#1.idx^^J}% - \expandafter\newwrite\csname write@#1\endcsname - \immediate\openout\csname write@#1\endcsname \jobname-#1.idx % - % FixMe: Don't close by end TeX run but use \closeout - \fi - \immediate\write\csname write@#1\endcsname{#2}% -} - -% Read the file verbatim and process the lines -\newif\ifnoteof -\newtoks\par@tok\par@tok{\par} -\def\@makeother#1{\catcode`#112\relax} -\def\processidxfile{ - \immediate\openin\@inputcheck \idx % - \noteoftrue - \loop - \ifeof\@inputcheck \noteoffalse\fi - \ifnoteof - \begingroup - \let\do\@makeother\dospecials - \immediate\read\@inputcheck to \verbatim@line - \if\par@tok\verbatim@line\else - \processidxline - \fi - \endgroup - \repeat -} - -\processidxfile - -% Trick to end processing in TeX and LaTeX -\endprocessing -%%% Local Variables: -%%% mode: tex -%%% TeX-master: t -%%% End: |