From 577da3562b92b5de69f0f7df057c87c3dcae4752 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 18 Feb 2016 22:37:12 +0000 Subject: splitindex (18feb16) git-svn-id: svn://tug.org/texlive/trunk@39766 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/splitindex/install.txt | 21 +- .../texmf-dist/doc/latex/splitindex/splitidx.pdf | Bin 421100 -> 422877 bytes Master/texmf-dist/doc/man/man1/splitindex.man1.pdf | Bin 4755 -> 19628 bytes .../texmf-dist/scripts/splitindex/splitindex.tlu | 2 +- .../scripts/splitindex/splitindex_main.tlu | 16 +- Master/texmf-dist/source/latex/splitindex/README | 77 ------- .../texmf-dist/source/latex/splitindex/install.txt | 229 --------------------- .../source/latex/splitindex/manifest.txt | 62 ------ .../source/latex/splitindex/splitidx.dtx | 90 +++----- .../source/latex/splitindex/splitidx.ins | 16 +- .../source/latex/splitindex/splitindex.1 | 64 ------ .../source/latex/splitindex/splitindex.c | 2 +- .../source/latex/splitindex/splitindex.java | 2 +- .../source/latex/splitindex/splitindex.pl | 212 ------------------- .../source/latex/splitindex/splitindex.tex | 189 ----------------- .../source/latex/splitindex/splitindex.tlu | 50 ----- .../source/latex/splitindex/splitindex_main.tlu | 187 ----------------- .../tex/generic/splitindex/splitindex.tex | 2 +- .../texmf-dist/tex/latex/splitindex/splitidx.sty | 14 +- 19 files changed, 65 insertions(+), 1170 deletions(-) delete mode 100644 Master/texmf-dist/source/latex/splitindex/README delete mode 100644 Master/texmf-dist/source/latex/splitindex/install.txt delete mode 100644 Master/texmf-dist/source/latex/splitindex/manifest.txt delete mode 100644 Master/texmf-dist/source/latex/splitindex/splitindex.1 delete mode 100755 Master/texmf-dist/source/latex/splitindex/splitindex.pl delete mode 100644 Master/texmf-dist/source/latex/splitindex/splitindex.tex delete mode 100755 Master/texmf-dist/source/latex/splitindex/splitindex.tlu delete mode 100644 Master/texmf-dist/source/latex/splitindex/splitindex_main.tlu diff --git a/Master/texmf-dist/doc/latex/splitindex/install.txt b/Master/texmf-dist/doc/latex/splitindex/install.txt index 9fa69851ce9..109b05f43b8 100644 --- a/Master/texmf-dist/doc/latex/splitindex/install.txt +++ b/Master/texmf-dist/doc/latex/splitindex/install.txt @@ -1,6 +1,6 @@ SplitIndex Installation Guide - 2013-04-04 + 2016-02-18 INTRODUCTION @@ -27,17 +27,20 @@ The SplitIndex TDS-archive has following contents: +- doc/ | +- latex/ | | +- splitindex/ - | | +- install.txt | | +- README + | | +- install.txt + | | +- manifest.txt | | +- splitidx.pdf | +- man/ | +- man1/ | +- splitindex.1 +- tex/ + | +- generic/ + | +- splitindex/ + | +- splitindex.tex | +- latex/ | +- splitindex/ | +- splitidx.sty - | +- splitindex.tex +- scripts/ | +- splitindex/ | +- splitindex.pl @@ -47,18 +50,10 @@ The SplitIndex TDS-archive has following contents: +- latex/ +- splitindex/ +- install.sh - +- install.txt - +- manifest.txt - +- README +- splitidx.dtx +- splitidx.ins - +- splitindex.1 +- splitindex.c +- splitindex.java - +- splitindex.pl - +- splitindex.tlu - +- splitindex_main.tlu - +- splitindex.tex If you don't have such an archive, continue reading at 1st step of ``HOW TO GENERATE THE splitidx PACKAGE''. If you have such an archive - we will use @@ -166,9 +161,7 @@ If you don't like scripts, you may make a real binary from the C source file splitindex.c and install that instead of the script. If your getopt library doesn't support long options, you may define NO_LONGOPT. In this case the code for long options won't be compiled. I recommend to use either the perl or the -TeXLua script. Nevertheless, you may find binaries in the splitindex -repository at -. +TeXLua script. HOW TO GENERATE THE MANUAL diff --git a/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf b/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf index 3795f90871c..2b0ebfaeca8 100644 Binary files a/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf and b/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf differ diff --git a/Master/texmf-dist/doc/man/man1/splitindex.man1.pdf b/Master/texmf-dist/doc/man/man1/splitindex.man1.pdf index d4e7c1c570f..32d5f4481c7 100644 Binary files a/Master/texmf-dist/doc/man/man1/splitindex.man1.pdf and b/Master/texmf-dist/doc/man/man1/splitindex.man1.pdf differ diff --git a/Master/texmf-dist/scripts/splitindex/splitindex.tlu b/Master/texmf-dist/scripts/splitindex/splitindex.tlu index a367634b037..1cd6de7e1f6 100755 --- a/Master/texmf-dist/scripts/splitindex/splitindex.tlu +++ b/Master/texmf-dist/scripts/splitindex/splitindex.tlu @@ -2,7 +2,7 @@ -- splitindex.tlu -- Copyright (c) Markus Kohm, 2013 -- --- $Id: splitindex.tlu,v 1.1 2013-04-04 11:28:17 mjk Exp $ +-- $Id: splitindex.tlu 4 2016-02-18 10:13:32Z mjk $ -- -- This file is part of the SplitIndex bundle. -- diff --git a/Master/texmf-dist/scripts/splitindex/splitindex_main.tlu b/Master/texmf-dist/scripts/splitindex/splitindex_main.tlu index 1fc19b13fb2..de12c50efe4 100644 --- a/Master/texmf-dist/scripts/splitindex/splitindex_main.tlu +++ b/Master/texmf-dist/scripts/splitindex/splitindex_main.tlu @@ -1,8 +1,8 @@ #!/usr/bin/env texlua -- splitindex.tlu --- Copyright (c) Markus Kohm, 2013 +-- Copyright (c) Markus Kohm, 2013-2014 -- --- $Id: splitindex_main.tlu,v 1.2 2013-04-04 13:59:54 mjk Exp $ +-- $Id: splitindex_main.tlu 4 2016-02-18 10:13:32Z mjk $ -- -- This file is part of the SplitIndex bundle. -- @@ -43,7 +43,7 @@ -- as it would have been installed if they generated a Compiled Work -- directly from the Work. -local version_number = string.sub( '$Revision: 1.2 $', 12, -2 ) +local version_number = string.sub( '$Revision: 4 $', 12, -2 ) local action_version = ' r'..version_number..'\n'..[[ Copyright (c) 2013 Markus Kohm. License: lppl 1.3c or later. See . @@ -148,6 +148,16 @@ local ifilename = arg[1] table.remove(arg,1) local bfilename = string.gsub(ifilename,'^(.*)%.idx$','%1') +local f=io.open(ifilename,"rb") +if f~=nil then io.close(f); +elseif ifilename ~= bfilename..'.idx' then + f=io.open(bfilename..'.idx',"rb") + if f~=nil then + io.close(f) + ifilename=bfilename..'.idx' + end +end + local makeindexargs='' while arg[1] do makeindexargs = makeindexargs..' "'..arg[1]..'"' diff --git a/Master/texmf-dist/source/latex/splitindex/README b/Master/texmf-dist/source/latex/splitindex/README deleted file mode 100644 index 2aac0717b62..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/README +++ /dev/null @@ -1,77 +0,0 @@ -Welcome to SplitIndex, the TeX index splitter. SplitIndex creates -multiple index files from one (intermediate) raw index. -See manifest.txt if you want to know the files SplitIndex exists of. - -There are a lot of alternatives in using SplitIndex, because I wanted -solutions for every platform. Not all of the programs are distributed -in binary form. But splitindex.tex will work at every platform. And you -need only TeX (even not LaTeX) to run it. - -Currently I provide binaries for the following platforms: - - - Linux ELF i386, - - OpenBSD 3.0 i386, - - OpenSolaris i386, - - CygWIN Windows 32 Bit i386 - -And four platform independent solutions using one of: - - - Perl, - - Java 1.4.1, - - TeX - - TeXLua - -If you need support, you can write me a mail. Use - - To: splitindex - Subject: SPLITINDEX: - -And replace by a short (at least 60 chars) description -of your problem. - -See file install.txt for a description how to install this -distribution and how to get the manual, which describes how to use -SplitIndex. - -LEGALESE: ---------- - -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. - -Enjoy, Markus. diff --git a/Master/texmf-dist/source/latex/splitindex/install.txt b/Master/texmf-dist/source/latex/splitindex/install.txt deleted file mode 100644 index 9fa69851ce9..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/install.txt +++ /dev/null @@ -1,229 +0,0 @@ - SplitIndex Installation Guide - - 2013-04-04 - - -INTRODUCTION -============ - -If you know how to install LaTeX packages and how to install binary -programs, just do it. If you don't know, read the following. If you -are using a system which provides a bash and gnu tools, you may try -install.sh for installation. See - - ./install.sh --help - -for more information. - -But you may also try the following step by step installation: - -HOW TO INSTALL SplitIndex FROM A TDS-ARCHIVE -============================================ - -Some distributors may use a SplitIndex TDS-archive for distributing -SplitIndex. SplitIndex TDS-archive may be installed very easily. -The SplitIndex TDS-archive has following contents: - - +- doc/ - | +- latex/ - | | +- splitindex/ - | | +- install.txt - | | +- README - | | +- splitidx.pdf - | +- man/ - | +- man1/ - | +- splitindex.1 - +- tex/ - | +- latex/ - | +- splitindex/ - | +- splitidx.sty - | +- splitindex.tex - +- scripts/ - | +- splitindex/ - | +- splitindex.pl - | +- splitindex.tlu - | +- splitindex_main.tlu - +- source/ - +- latex/ - +- splitindex/ - +- install.sh - +- install.txt - +- manifest.txt - +- README - +- splitidx.dtx - +- splitidx.ins - +- splitindex.1 - +- splitindex.c - +- splitindex.java - +- splitindex.pl - +- splitindex.tlu - +- splitindex_main.tlu - +- splitindex.tex - -If you don't have such an archive, continue reading at 1st step of ``HOW TO -GENERATE THE splitidx PACKAGE''. If you have such an archive - we will use -the file name ``splitindex.tds.zip'' in the following - you may continue -with: - -A) Have a look where your LaTeX Distribution searchs for files. - With TeX Live you can ask kpathsea for this, e.g. using a unix - shell: - - kpsexpand \$TEXMFLOCAL - - to use the local texmf tree or: - - kpsexpand \$TEXMFHOME - - to use your private texmf tree. Following uses ``'' to - be a synonym for the texmf tree you want to use. - -B) Extract splitindex.tds.zip at with all the subdirectories of - the splitindex.tds.zip but without generating additional - subdirectories, e.g., using: - - cd - unzip splitindex.tds.zip - - or any other zip extraction programm. - -C) Continue with 5th or 6th step at ``HOW TO INSTALL THE EXECUTABLES''. - -D) Call the program, which is used to update the filename data - base, e.g., texhash or mktexlsr if you are using teTeX/TeX Live. - -E) Read ``HOW TO TEST YOUR INSTALLATION'' at the end of this - documentation. - - -HOW TO GENERATE THE splitidx PACKAGE -==================================== - -You need this only, if you don't have a SplitIndex TDS-archive, but want -to install SplitIndex from a basic SplitIndex distribution. If you have -already done the SplitIndex TDS-archive installation discribed above, you -should skip this section. - -1st) Process splitidx.ins with TeX or LaTeX, e.g. using the following - input at a command shell (e.g. bash or command.com): - - latex splitidx.ins - - Maybe you'll be asked, if you want to overwrite existing files. - Answer this question with yes. - -2nd) Have a look where your LaTeX Distribution searchs for files. - With TeX Live you can ask kpathsea for this, e.g. using a unix - shell: - - kpsexpand \$TEXMFLOCAL - - to use the local texmf tree or: - - kpsexpand \$TEXMFHOME - - to use your private texmf tree. Following uses ``'' to - be a synonym for the texmf tree you want to use. - -3rd) Create folder /tex/latex/splitindex (at Windows: - \tex\latex\splitindex), if it doesn't exist. Copy - splitidx.sty to this folder. - -4th) Create folder /scripts/splitindex (at Windows: - \scripts\latex\splitindex), if it doesn't exist. Copy - splitindex.pl, splitindex.tlu and splitindex_main.tlu to this folder. - -5th) Call the program, which is used to update the filename data - base, e.g. texhash or mktexlsr if you are using teTeX/TeX Live. - - -HOW TO INSTALL THE EXECUTABLE -============================= - -You need only one of the executables splitindex.pl or splitindex.tlu. -I recommend to use splitindex.pl, but if your system doesn't provide perl -but TeXLua, you may use splitindex.tlu instead. - -To install splitindex.pl or splitindex.tlu on Windows: - -5th) Rename a copy of runscript.exe into splitindex.exe and copy it - into the binary folder of your TeX installation. You may simply search - for runscript.exe itself to find the binary folder. - -To install splitindex.pl or splitindex.tlu on Linux, OpenBSD, OS X, -OpenSolaris etc.: - -6th) Copy splitindex.pl or splitindex.tlu to the binary folder of your TeX - installation and rename it into splitindex. You may simply do a - `which pdflatex' to find the binary folder. Make splitindex executable - for everybody using e.g. `chmod a+x splitindex'. - - -HOW TO GET A REAL BINARY -======================== - -If you don't like scripts, you may make a real binary from the C source file -splitindex.c and install that instead of the script. If your getopt library -doesn't support long options, you may define NO_LONGOPT. In this case the code -for long options won't be compiled. I recommend to use either the perl or the -TeXLua script. Nevertheless, you may find binaries in the splitindex -repository at -. - - -HOW TO GENERATE THE MANUAL -========================== - -7th) process splitidx.dtx with LaTeX to generate the user manual of - splitidx and SplitIndex, e.g. using the following input at a - command shell: - - pdflatex splitidx.dtx - pdflatex splitidx.dtx - mkindex splitidx - pdflatex splitidx.dtx - - or (if you do not have the mkindex script): - - pdflatex splitidx.dtx - pdflatex splitidx.dtx - makeindex -s gind.ist splitidx - makeindex -s gglo.ist -o splitidx.gls splitidx.glo - pdflatex splitidx.dtx - - You may print the resulting splitidx.pdf. - -8th) read the manual you produced at 7th step. - - -HOW TO TEST YOUR INSTALLATION -============================= - -Use the following LaTeX source to test the installation. See -splitidx.pdf to learn to know how to do this. - -\documentclass{article} % We use \Class{article} class ... -\usepackage{splitidx} % ... and the \Package{splitidx} package -\makeindex % And we want index generation -\usepackage{hyperref} -% We define 4 indices: -\newindex[General Index]{idx} % Name and shortcut of the 1st index -\newindex[Index of Animals]{ani} % ... 2nd index -\newindex[Index of Fruits]{fru} % ... 3rd index -\newindex[Index of Vegetables]{veg} % ... \dots\ 4th index - -\begin{document} -Apples\sindex[fru]{apple} % an entry to fru index -and oranges\sindex[fru]{orange} % an entry to fru index -are fruits\sindex{fruits}. % an implicite entry to idx index -Tomatos\sindex[veg]{tomato} % an entry to veg index -are vegetables\index{vegetables}. % an implicite entry to idx index -Cats\sindex[ani]{cat} % an entry to ani index -are animals\sindex[idx]{animals}. % an explicite entry to idx index - -\twocolumn[% - \section*{Indices}% - \markboth{Indices}{Indices}% -] -\printsubindex* % print all indices -\end{document} diff --git a/Master/texmf-dist/source/latex/splitindex/manifest.txt b/Master/texmf-dist/source/latex/splitindex/manifest.txt deleted file mode 100644 index 651a683912a..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/manifest.txt +++ /dev/null @@ -1,62 +0,0 @@ -% -% The following files form the SplitIndex Bundle and also every -% SplitIndex Distribution since 2013. -% -% -% CONTENTS OF THE SplitIndex DISTRIBUTION -% ======================================= -% -% Documentation: -% -------------- -% -% manifest.txt -- This file. -% install.txt -- How to install SplitIndex (overview). -% README -- Should be read first. -% splitindex.1 -- The unix manual page of all SplitIndex -% programs. -% splitidx.pdf -- The user manual of SplitIndex and -% splitidx.sty. -% -% -% LaTeX files: -% ------------ -% -% splitidx.dtx -- The source of the splitidx package and of the -% manual. -% splitidx.ins -- The installation script for the splitidx -% package. -% -% -% Program sources: -% ---------------- -% -% splitindex.pl -- The source of the reference implementation of -% the SplitIndex program. -% splitindex.java -- The source of the SUN JAVA 1.4.1 implementation -% of the SplitIndex program. -% splitindex.c -- The source of the C implementation of the -% SplitIndex program. -% splitindex.tex -- The source of the TeX implementation of the -% SplitIndex program. -% splitindex.tlu -- TeXlua wrapper for the TeXlua implementation of -% the SplitIndex program. -% splitindex_main.tlu -% -- TeXlua implementation of the SplitIndex program. -% -% -% Programs (binaries): -% -------------------- -% -% splitindex.pl -- Perl is an interpreter, so this is the source -% and the program itself (but not binary) -% splitindex.tlu -- TeXlua is an interpreter, so this is the source -% and the program itself (but not binary) -% -% Installation programs: -% ---------------------- -% -% install.sh -- See `install.txt' for more information about -% this. -% -% ==================================================================== -% diff --git a/Master/texmf-dist/source/latex/splitindex/splitidx.dtx b/Master/texmf-dist/source/latex/splitindex/splitidx.dtx index f6fb00c1d7a..379abdf63e6 100644 --- a/Master/texmf-dist/source/latex/splitindex/splitidx.dtx +++ b/Master/texmf-dist/source/latex/splitindex/splitidx.dtx @@ -1,10 +1,10 @@ -% \CheckSum{625} +% \CheckSum{626} % \iffalse % ====================================================================== % splitidx.dtx -% Copyright (c) Markus Kohm, 2002-2013 +% Copyright (c) Markus Kohm, 2002-2016 % -% $Id: splitidx.dtx,v 1.9 2013-04-09 03:26:01 mjk Exp $ +% $Id: splitidx.dtx 4 2016-02-18 10:13:32Z mjk $ % % This file is part of the SplitIndex bundle. % @@ -54,7 +54,7 @@ %\ProvidesFile{splitidx.drv}[% %\ProvidesPackage{splitidx}[% % \fi - 2013/04/09 v1.2a multiple indices for LaTeX] + 2016/02/18 v1.2c multiple indices for LaTeX] % \iffalse %<*driver> \documentclass{ltxdoc} @@ -210,9 +210,7 @@ % authors understand C, and some people want fast binaries instead of slow % Java byte code\,---\,even, if the Java program is fast % enough. Nevertheless, there are no longer binaries of generated from this -% source in the main distribution. But you may download some from the -% repository at -% \url{http://sarovar.org/plugins/scmcvs/cvsweb.php/binaries/?cvsroot=splitindex} +% source in the main distribution. % \item[\Program{splitindex.tex}:] This is a \TeX{} version of the % program. Yes, you are right: it is a program written in \TeX{}. It has not % the whole functionality of the other programs (see \autoref{TeX}), but @@ -443,7 +441,7 @@ % \begin{verbatim} % \documentclass{article} % \usepackage{ngerman} -% \usepackage[protected,useindex,makeindex]{makeidx} +% \usepackage[protected,useindex,makeindex]{splitidx} % \newcommand*{\Test}[1]{#1\index{#1}} % \begin{document} % \Test{"Anderung} @@ -501,8 +499,11 @@ % environment, but it doesn't have to be this way. Note, however, that % \cs{printindex} expects the name of the index to be contained in the % \cs{indexname} macro; otherwise, it will fail to typeset the index -% name.\footnote{This would be a failure of the class, not of the -% \Package{splitidx} package. I don't know of any class with this failure.} +% name.\footnote{This would be a failure of the class or used package, not of +% the \Package{splitidx} package. I don't know of any class with this failure, +% but package \Package{tcolorbox}'s library \File{documentation} does use +% \cs{kvtcb@text@index} instead of \cs{indexname}. Since version~1.2c +% \Package{splitidx} therefore also redefines \cs{kvtcb@text@index} locally.} % % \DescribeMacro{\printsubindex}%^^A % The \cs{printsubindex} command is analogous to \cs{printindex}, but it @@ -987,57 +988,6 @@ % \end{quote} % % -% \subsection{Using \Program{splitindex} or \Program{splitindex.exe}} -% \label{C} -% -% The Linux program \Program{splitindex} was compiled using glibc, so it works -% the same as \Program{splitindex.pl} and you may use not only: -% \begin{quote} -% \Prompt{}\verb|splitindex -m /home/me/bin/xindy allabout| -% \end{quote} -% but also: -% \begin{quote} -% \Prompt{}\verb|splitindex allabout -m /home/me/bin/xindy| -% \end{quote} -% -% But the CygWin program \Program{splitindex.exe} was compiled using a -% CygWin library. Because of this, all options must be put before the first -% non-option argument. So you have to use: -% \begin{quote} -% \Prompt{}\verb|splitindex.exe -m /home/me/bin/xindy allabout| -% \end{quote} -% With: -% \begin{quote} -% \Prompt{}\verb|splitindex.exe allabout -m /home/me/bin/xindy| -% \end{quote} -% the argument ``\verb|-m /home/me/bin/xindy|'' will be passed to the default -% index processor \Program{MakeIndex}! -% -% You need the CygWin-DLL \File{cygwin1.dll} to run -% \Program{splitindex.exe}. If you haven't already installed it, you may -% download the DLL from \url{http://cygwin.com/snapshots}. You need -% \Program{bzip2}, which can be found at \url{http://source.redhat.com/bzip2}, -% to decompress it. Alternatively, you may use \url{http://cygwin.com/setup.exe} -% to download and install a minimal CygWin environment. -% -% The Linux-i386-ELF binary \Program{splitindex} was compiled and linked -% using: -% \begin{quote}\raggedright -% \Prompt{}\verb|gcc -O3 -Wall -osplitindex splitindex.c|\\ -% \Prompt{}\verb|strip splitindex|\\ -% \end{quote} -% The \Program{gcc} was: -% \begin{verbatim} -% gcc (GCC) 3.2 -% Copyright (C) 2002 Free Software Foundation, Inc. -% \end{verbatim}\vspace{-\baselineskip} -% The used \Program{glibc} is version 2.1. -% -% If you compile another binary e.g. for BSD, please contact me, so we may put -% the new binary into the distribution or can build another binary -% distribution. -% -% % \subsection{Using \Program{splitindex.tex}} % \label{TeX} % @@ -1321,13 +1271,15 @@ % If \Package{hyperref} was loaded at \cs{begin\{document\}} and % \Package{hyperref}-option \texttt{hyperindex} isn't disabled, and the hook % is not used, define it: +% \changes{v1.2b}{2014/04/08}{\cs{ifHy@hyperindex} test changed} % \begin{macrocode} \AtBeginDocument{% \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ifHy@hyperindex\endcsname\relax \else - \csname ifHy@hyperindex\endcsname - \expandafter\ifx\csname @@wrsindex\endcsname\relax + \expandafter\ifx\csname ifHy@hyperindex\expandafter\endcsname + \csname iftrue\endcsname + \@ifundefined{@@wrsindex}{% \def\@@wrsindex#1#2|#3|#4\\{% \ifx\\#3\\% \@@@wrsindex{#1}{{#2|hyperpage}{\thepage}}% @@ -1344,8 +1296,8 @@ \fi \fi }% - \fi - \csname fi\endcsname + }{}% + \fi \fi } % \end{macrocode} @@ -1445,6 +1397,14 @@ \begingroup \edef\indexshortcut{#1}% \def\indexname{#2}% +% \end{macrocode} +% \changes{v1.2c}{2016/02/18}{workaround for \Package{tcolorbox} library +% \File{documentation}}^^A +% The \Package{tcolorbox} library \File{documentation} uses +% \cs{kvtcb@text@index} instead of \cs{indexname}. So we also redefine this +% command. +% \begin{macrocode} + \def\kvtcb@text@index{#2}% \let\index@preamble\relax \expandafter\let\expandafter\index@preamble \csname index@\indexshortcut @preamble\endcsname diff --git a/Master/texmf-dist/source/latex/splitindex/splitidx.ins b/Master/texmf-dist/source/latex/splitindex/splitidx.ins index 3fae3305f48..c6554a89d72 100644 --- a/Master/texmf-dist/source/latex/splitindex/splitidx.ins +++ b/Master/texmf-dist/source/latex/splitindex/splitidx.ins @@ -1,8 +1,8 @@ %% %% splitidx.ins -%% Copyright (c) Markus Kohm, 2002-2009 +%% Copyright (c) Markus Kohm, 2002-2016 %% -%% $Id: splitidx.ins,v 1.4 2009-03-20 14:55:11 mjk Exp $ +%% $Id: splitidx.ins 4 2016-02-18 10:13:32Z mjk $ %% %% This file is part of the SplitIndex bundle. %% @@ -60,7 +60,7 @@ This is a generated file. -Copyright (c) Markus Kohm, 2002-2009 +Copyright (c) Markus Kohm, 2002-2016 This file was generated from file(s) of the `SplitIndex bundle'. ---------------------------------------------------------------- @@ -109,7 +109,7 @@ Two often ignorred clauses from LPPL 1.3c you should not ignore: \endpreamble \keepsilent -\usedir{tex/latex/misc} +\usedir{tex/latex/splitindex} \generate{\file{splitidx.sty}{\from{splitidx.dtx}{package}}} @@ -118,12 +118,12 @@ Two often ignorred clauses from LPPL 1.3c you should not ignore: \Msg{* To finish the installation you have to move `splitidx.sty'} \Msg{* files into a directory searched by TeX.} \Msg{* Using a TDS compatible TeX distribution, this would be e.g.} -\Msg{* tex/latex/misc of your main or your local or your private} -\Msg{* texmf path. If you don't know these paths, have a look} -\Msg{* at your `texmf.cnf' or try:} +\Msg{* tex/latex/splitindex of your main or your local or your} +\Msg{* private texmf path. If you don't know these paths, have} +\Msg{* a look at your `texmf.cnf' or try:} \Msg{* \space\space kpsexpand \string\$TEXMFMAIN} \Msg{* \space\space kpsexpand \string\$TEXMFLOCAL} -\Msg{* \space\space kpsexpand \string\$HOMETEXMF} +\Msg{* \space\space kpsexpand \string\$TEXMFHOME} \Msg{* You may also use another folder at your TEXINPUTS path.} \Msg{*} \Msg{* To produce the documentation run splitidx.dtx files} diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.1 b/Master/texmf-dist/source/latex/splitindex/splitindex.1 deleted file mode 100644 index ac8988b0cd8..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/splitindex.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH SPLITINDEX "1" "April 2013" "splitindex 0.2a" "User Commands" -.SH NAME -splitindex \- manual page for splitindex 0.2a -.SH SYNOPSIS -.B splitindex.pl -[\fIOPTION\fR] ... \fIINTERMEDIATE-INDEX-FILE \fR[\fIMAKEINDEX-OPTION\fR] ... -.PP -.B splitindex -[\fIOPTION\fR] ... \fIINTERMEDIATE-INDEX-FILE \fR[\fIMAKEINDEX-OPTION\fR] ... -.PP -.B java splitindex -[\fIOPTION\fR] ... \fIINTERMEDIATE-INDEX-FILE \fR[\fIMAKEINDEX-OPTION\fR] ... -.PP -.B tex splitindex -.SH DESCRIPTION -splitindex 0.2a -Copyright (c) 2002 Markus Kohm -.PP -Split a single intermediate index file into multiple raw index files. -.PP -Example: splitindex.pl foo.idx. -.SH OPTIONS -.TP -\fB\-h\fR, \fB\-\-help\fR -show this help and terminate -.TP -\fB\-m\fR, \fB\-\-makeindex\fR PROGNAME -call PROGNAME instead of default `makeindex'. -.TP -\fB\-i\fR, \fB\-\-identify\fR EXPRESSION -use regular EXPRESSION to match entries -(see also option \fB\-\-resultis\fR and \fB\-\-suffixis\fR). -Default is `^(\e\eindexentry)\e[([^]]*)\e](.*)$'. -.TP -\fB\-r\fR, \fB\-\-resultis\fR PATTERN -create line to be written from PATTERN after matching -lines (see also option \fB\-\-identify\fR). -Default is `$1$3'. -.TP -\fB\-s\fR, \fB\-\-suffixis\fR PATTERN -create suffix to be used from PATTERN after matching -lines (see also option \fB\-\-identify\fR). -Default is `-$2'. -.TP -\fB\-v\fR, \fB\-\-verbose\fR -be more verbose -(can be used multiple to increase verbosity) -.TP -\fB\-\-version\fR -show version and terminate -.SH COPYRIGHT -Copyright \(co 2002 Markus Kohm -.SH "SEE ALSO" -The full documentation for -.B splitindex -is maintained as a LaTeX manual. If the -.B texdoc -and -.B splitindex -programs are properly installed at your site, the command -.IP -.B texdoc splitidx -.PP -should give you access to the complete manual. diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.c b/Master/texmf-dist/source/latex/splitindex/splitindex.c index 9bd60496103..515799cba93 100644 --- a/Master/texmf-dist/source/latex/splitindex/splitindex.c +++ b/Master/texmf-dist/source/latex/splitindex/splitindex.c @@ -2,7 +2,7 @@ * splitindex.c * Copyright (c) Markus Kohm, 2002 * - * $Id: splitindex.c,v 1.3 2009-03-20 14:55:11 mjk Exp $ + * $Id: splitindex.c 4 2016-02-18 10:13:32Z mjk $ * * This file is part of the SplitIndex bundle. * diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.java b/Master/texmf-dist/source/latex/splitindex/splitindex.java index b28ae758c2d..c6c6d4bbf13 100644 --- a/Master/texmf-dist/source/latex/splitindex/splitindex.java +++ b/Master/texmf-dist/source/latex/splitindex/splitindex.java @@ -2,7 +2,7 @@ * splitindex.java * Copyright (c) Markus Kohm, 2002-2009 * - * $Id: splitindex.java,v 1.3 2009-03-20 14:55:11 mjk Exp $ + * $Id: splitindex.java 4 2016-02-18 10:13:32Z mjk $ * * This file is part of the SplitIndex bundle. * diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.pl b/Master/texmf-dist/source/latex/splitindex/splitindex.pl deleted file mode 100755 index 70c61720c9b..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/splitindex.pl +++ /dev/null @@ -1,212 +0,0 @@ -#! /usr/bin/perl -w -eval 'exec perl -S $0 ${1+"$@"}' - if 0; #$running_under_some_shell - -# ====================================================================== -# splitindex.pl -# Copyright (c) Markus Kohm, 2002-2009 -# -# $Id: splitindex.pl,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. -# ====================================================================== - -use strict; -use Getopt::Long; - -my $makeindex = "makeindex"; -# my $identify = "^(.*)\\\\UseIndex *\\{([^\\}]*)\\}(.*)\$"; -my $identify = "^(\\\\indexentry)\\[([^]]*)\\](.*)\$"; -my $suffixis = "-\$2"; -my $lineis = "\$1\$3"; -my $verbose = 0; # option verbose with default value -my $result = GetOptions( - 'help' => sub { help() }, - 'makeindex=s' => \$makeindex, - 'identify=s' => \$identify, - 'resultis=s' => \$lineis, - 'suffixis=s' => \$suffixis, - 'verbose|v+' => \$verbose, - 'version' => sub { version(); exit 0; } - ); - -usage("missing raw index file") if ( $#ARGV < 0 ); - -my $indexinput = shift; -my $jobname = ( $indexinput =~ /^(.*)\.idx$/ ) ? $1 : $indexinput; - -my %idxfile; -my %linesatidxfile; - -version() if ($verbose > 0); - -if ( !( open (IDX,"<$indexinput") ) ) { - if ( $indexinput ne "$jobname.idx" ) { - open (IDX,"<$jobname.idx") || - die "Cannot read raw index file $indexinput nor $jobname.idx"; - $indexinput = "$jobname.idx"; - } else { - die "Cannot read raw index file $indexinput"; - } -} - -while () { - my $line; - my $suffix; - if ( /$identify/ ) { - my $eval = "\$line = \"$lineis\n\""; - eval $eval; - $eval = "\$suffix = \"$suffixis\""; - eval $eval; - } else { - $line = $_; - $suffix = ""; - $suffix .= "$1" if ( $suffixis =~ /^(.*)\$/ ); - $suffix .= "idx"; - $suffix .= "$1" if ( $suffixis =~ /\$[123456789](.*)$/ ); - } - while ( $suffix =~ /(^[^,]+)(.*)$/ ) { - $suffix = $2; - writetoidx ($1,$line); - } -} - -closeallind(); - -close(IDX); - -generateallind(@ARGV); - -exit 0; - -sub generateallind { - my $name; - my $file; - - if ( $makeindex ne "" ) { - while (($name,$file) = each %idxfile) { - system( "$makeindex @ARGV $jobname$name.idx" ); - } - } -} - -sub closeallind { - my $name; - my $file; - my $lines; - while (($name,$file) = each %idxfile) { - print "Close $jobname$name.idx\n" - if ( $verbose > 1 ); - close( $file ); - $idxfile{$name}=0; - } - if ( $verbose > 0 ) { - print "\n"; - while (($name,$lines) = each %linesatidxfile) { - print "$jobname$name.idx with $lines lines\n"; - } - } -} - -sub writetoidx { - my $suffix = $_[0]; - my $line = $_[1]; - my $file = $idxfile{$suffix}; - if ( ! $file ) { - open ( $file, ">$jobname$suffix.idx" ) || - die "Cannot write to file $jobname$suffix.idx"; - $idxfile{$suffix} = $file; - $linesatidxfile{$suffix} = 0; - print( "New index file $jobname$suffix.idx\n" ) - if ( $verbose > 1 ); - } - print ($file $line); - $linesatidxfile{$suffix}++; -} - -sub help { - version(); - print "\n"; - usage(); - print - "Split a single raw index file into multiple raw index files.\n". - "Example: splitindex.pl foo.idx.\n". - "\n". - "Options:\n" . - " -h, --help " . - "\tshow this help and terminate\n" . - " -m, --makeindex PROGNAME\n" . - "\t\t\tcall PROGNAME instead of default \`makeindex\'.\n" . - " -i, --identify EXPRESSION\n" . - "\t\t\tuse regular EXPRESSION to match entries\n". - "\t\t\t(see also option --resultis and --suffixis).\n". - "\t\t\tDefault is \'$identify\'.\n". - " -r, --resultis PATTERN\n" . - "\t\t\tcreate line to be written from PATTERN after matching\n". - "\t\t\tlines (see also option --identify).\n". - "\t\t\tDefault is \'$lineis\'.\n". - " -s, --suffixis PATTERN\n" . - "\t\t\tcreate suffix to be used from PATTERN after matching\n". - "\t\t\tlines (see also option --identify).\n". - "\t\t\tDefault is \'$suffixis\'.\n". - " -v, --verbose " . - "\tbe more verbose\n". - "\t\t\t(can be used multiple to increase verbosity)\n" . - " --version " . - "\tshow version and terminate\n"; - exit 0; -} - -sub version { - print "splitindex.pl 0.1\n" . - "Copyright (c) 2002 Markus Kohm \\n"; -} - -sub usage { - my $text = "Usage: splitindex.pl [OPTION]... RAWINDEXFILE [MAKEINDEXOPTION]...\n"; - if ( $#_ >= 0 ) { - print STDERR @_; - print STDERR "\n$text"; - print STDERR "Try \`splitindex.pl --help\' for more information.\n"; - exit 1; - } else { - print $text; - } -} diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.tex b/Master/texmf-dist/source/latex/splitindex/splitindex.tex deleted file mode 100644 index 0d7c4ecce52..00000000000 --- a/Master/texmf-dist/source/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 ^^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: diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex.tlu b/Master/texmf-dist/source/latex/splitindex/splitindex.tlu deleted file mode 100755 index a367634b037..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/splitindex.tlu +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env texlua --- splitindex.tlu --- Copyright (c) Markus Kohm, 2013 --- --- $Id: splitindex.tlu,v 1.1 2013-04-04 11:28:17 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. - -kpse.set_program_name(arg[-1],'splitindex') -require('splitindex.splitindex_main') - --- --- End of file `splitindex.tlu' diff --git a/Master/texmf-dist/source/latex/splitindex/splitindex_main.tlu b/Master/texmf-dist/source/latex/splitindex/splitindex_main.tlu deleted file mode 100644 index 1fc19b13fb2..00000000000 --- a/Master/texmf-dist/source/latex/splitindex/splitindex_main.tlu +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/env texlua --- splitindex.tlu --- Copyright (c) Markus Kohm, 2013 --- --- $Id: splitindex_main.tlu,v 1.2 2013-04-04 13:59:54 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. - -local version_number = string.sub( '$Revision: 1.2 $', 12, -2 ) -local action_version = ' r'..version_number..'\n'..[[ -Copyright (c) 2013 Markus Kohm. -License: lppl 1.3c or later. See . -]] -local action_help = [[ -options: - -h, --help Print this help message. - -i, --identify - Setup the regular expression to match the entries. - -m, --makeindex - Use instead of `makeindex'. - -r, --resultis - Create line to be written from after matching. - -s, --suffixis - Create suffix to be used from after matching. - -v, --verbose Be more verbose. - -V,--version Print the version information. -]] - -local action_opts = { - ['-h'] = 'help', - ['--help'] = 'help', - ['-i'] = 'identify', - ['--identify'] = 'identify', - ['-m'] = 'makeindex', - ['--makeindex'] = 'makeindex', - ['-r'] = 'resultis', - ['--resultis'] = 'resultis', - ['-s'] = 'suffixis', - ['--suffixis'] = 'suffixis', - ['-v'] = 'verbose', - ['--verbose'] = 'verbose', - ['-V'] = 'version', - ['--version'] = 'version', - ['--'] = '--', -} - -local identify = '^(\\indexentry)%[([^]]*)%](.*)$' -local makeindex = 'makeindex' -local resultis = '%1%3' -local suffixis = '-%2' -local verbose = 0 - -while arg[1] do - local action = action_opts[arg[1]] - if action == '--' then - table.remove(arg,1) - break - elseif action == 'help' then - print( arg[0]..action_version ) - print( 'Usage: ' .. arg[0] .. ' -h/--help' ) - print( ' ' .. arg[0] .. ' -V/--version' ) - print( ' ' .. arg[0] .. ' [