summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/splitindex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-03-05 16:52:20 +0000
committerKarl Berry <karl@freefriends.org>2009-03-05 16:52:20 +0000
commit36f6715604625a3e362534859befd7f94e2f4414 (patch)
treea6e5540dfdc072b17d86ae5667f8d8ceae901522 /Master/texmf-dist/doc/latex/splitindex
parent58ad5c5ba60b9db988e2cb1c9301fcd77fcbc0c8 (diff)
rm splitindex, requires compilation
git-svn-id: svn://tug.org/texlive/trunk@12317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/splitindex')
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/README37
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/install.sh178
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/install.txt131
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/manifest.txt63
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitidx.pdfbin253639 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex-Linux-i386bin9924 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex-OpenBSD-i386bin16384 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex.164
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex.classbin9303 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex.exebin18944 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex.java415
-rw-r--r--Master/texmf-dist/doc/latex/splitindex/splitindex.pl186
12 files changed, 0 insertions, 1074 deletions
diff --git a/Master/texmf-dist/doc/latex/splitindex/README b/Master/texmf-dist/doc/latex/splitindex/README
deleted file mode 100644
index a722029a27d..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/README
+++ /dev/null
@@ -1,37 +0,0 @@
-Welcome to SplitIndex, the TeX index splitter. SplitIndex creates
-multiple index files from one 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 at 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 support binaries for the following platforms:
-
- Linux ELF i386, OpenBSD 3.0 i386, CygWIN Windows 32 Bit i386
-
-If you need support, you can write me a mail. Use
-
- To: splitindex <komascript(at)gmx.info>
- Subject: SPLITINDEX: <YourProblem>
-
-And replace <YourProblem> 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 package is freely distributable software; you can
- redistribute it and/or modify it under the conditions of the
- LaTeX Project Public License, either version 1.2 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.
-
-
-Enjoy, Markus.
diff --git a/Master/texmf-dist/doc/latex/splitindex/install.sh b/Master/texmf-dist/doc/latex/splitindex/install.sh
deleted file mode 100644
index c27b4796ca2..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/install.sh
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/bin/sh
-
-while [ $# -gt 0 ]; do
- case $1 in
- --prefix)
- if [ $# -lt 2 ]; then
- echo "$0: argument expected after --prefix" >&2
- exit 1
- else
- prefix=$2
- shift 2
- fi
- ;;
- --prefix=*)
- prefix=${1#--prefix=}
- shift 1
- ;;
- --bindir)
- if [ $# -lt 2 ]; then
- echo "$0: argument expected after --bindir" >&2
- exit 1
- else
- bindir=$2
- shift 2
- fi
- ;;
- --bindir=*)
- bindir=${1#--bindir=}
- shift 1
- ;;
- --mandir)
- if [ $# -lt 2 ]; then
- echo "$0: argument expected after --mandir" >&2
- exit 1
- else
- mandir=$2
- shift 2
- fi
- ;;
- --mandir=*)
- mandir=${1#--mandir=}
- shift 1
- ;;
- --texmf)
- if [ $# -lt 2 ]; then
- echo "$0: argument expected after --texmf" >&2
- exit 1
- else
- texmf=$2
- shift 2
- fi
- ;;
- --texmf=*)
- texmf=${1#--texmf=}
- shift 1
- ;;
- --version|-v)
- echo "install.sh v0.1"
- echo "Copyright (c) Markus Kohm 2002"
- exit 0
- ;;
- --help|-h)
- echo "Usage: install.sh [OPTIONS]"
- echo
- echo "Installs SplitIndex for all unix like environments."
- echo
- echo "OPTIONS:"
- echo "--prefix=<DIR> install binaries at <DIR>/bin and manuals at <DIR>/man"
- echo " (default: /usr/local)"
- echo "--bindir=<DIR> install binaries at <DIR>"
- echo "--mandir=<DIR> install manuals at <DIR>"
- echo "--texmf=<DIR> install packages and TeX programs at <DIR>/tex/latex/misc,"
- echo " documentation (dvi and pdf) at <DIR>/doc/latex/splitidx and"
- echo " sources at <DIR>/source/latex/splitidx"
- echo " (default: \$TEXMFLOCAL if you are root and \$HOMETEXMF if"
- echo " you are not root)"
- exit 0
- ;;
- --dist)
- mkdir splitidx
- cp -a splitindex splitindex-Linux-i386
- cp -a splitindex.tex splitindex.pl splitindex.c splitindex.java \
- splitindex.class splitindex.exe splitidx.dtx splitidx.ins \
- splitindex-Linux-i386 splitindex-OpenBSD-i386 \
- splitindex.1 install.txt manifest.txt install.sh \
- README splitidx
- tar jcvf splitidx-`date -I`.tar.bz2 splitidx
- cd splitidx
- ./install.sh --prefix ../chroot --texmf ../chroot/texmf
- cd ..
- rm -r splitidx
- find chroot | sed 's/chroot\//+-/g;s/[a-z0-9]*\//-/g'
- exit 0
- ;;
- *)
- echo "unkown option \`$1'" >&2
- echo "Try \`./install.sh --help' for more information." >&2
- exit 1;
- ;;
- esac
-done
-
-case `uname -s -m` in
- OpenBSD*i?86*)
- cp -pf splitindex-OpenBSD-i386 splitindex
- splitindex=splitindex
- ;;
- Linux*i?86*)
- cp -pf splitindex-Linux-i386 splitindex
- splitindex=splitindex
- ;;
- CYGWIN*i?86*)
- splitindex=splitindex.exe
- ;;
- *)
- if ! ./splitindex -V; then
- echo 'Os '`uname -s -m`' not supported!'
- echo 'Trying to compile the source:'
- gcc -O3 -Wall -o splitindex splitindex.c || \
- gcc -O3 -Wall -DNO_LONGOPT -o splitindex splitindex.c || \
- echo 'You have to compile splitindex.c by your own!'
- fi
- if ./splitindex -V; then
- splitindex=splitindex
- fi
- ;;
-esac
-
-if [ -z "$prefix" ]; then
- prefix=/usr/local
-fi
-if [ -z "$bindir" ]; then
- bindir=$prefix/bin
-fi
-if [ -z "$mandir" ]; then
- mandir=$prefix/man
-fi
-if [ -z "$texmf" ]; then
- if [ "r$USER" = "rroot" ]; then
- texmf=`kpsexpand '$TEXMFLOCAL'`
- else
- texmf=`kpsexpand '$HOMETEXMF'`
- fi
- if [ -z "$texmf" ]; then
- echo "kpsexpand '$TEXMFLOCAL' or kpsexpand '$HOMETEXMF' failed!" >&2
- echo "You have to use option --texmf=<DIR>." >&2
- echo "This error is fatal!" >&2
- exit 1
- fi
-fi
-
-latex splitidx.ins
-
-latex splitidx.dtx
-latex splitidx.dtx
-mkindex splitidx
-latex splitidx.dtx
-
-pdflatex splitidx.dtx
-pdflatex splitidx.dtx
-mkindex splitidx
-pdflatex splitidx.dtx
-
-install -v -m 755 -d $bindir
-install -v -m 755 -d $mandir/man1
-install -v -m 755 -d $texmf/tex/latex/misc
-install -v -m 755 -d $texmf/source/latex/splitidx
-install -v -m 755 -d $texmf/doc/latex/splitidx
-install -v -m 755 $splitindex splitindex.pl $bindir
-install -v -m 644 splitindex.class $bindir
-install -v -m 644 splitindex.1 $mandir/man1
-install -v -m 644 splitindex.tex splitidx.sty $texmf/tex/latex/misc
-install -v -m 644 splitidx.dvi splitidx.pdf $texmf/doc/latex/splitidx
-
-install -v README splitindex.c splitindex.java splitindex.exe \
- splitindex-Linux-i386 splitindex-OpenBSD-i386 \
- splitidx.dtx manifest.txt install.txt install.sh \
- $texmf/source/latex/splitidx
diff --git a/Master/texmf-dist/doc/latex/splitindex/install.txt b/Master/texmf-dist/doc/latex/splitindex/install.txt
deleted file mode 100644
index b3277c4d803..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/install.txt
+++ /dev/null
@@ -1,131 +0,0 @@
- SplitIndex Installation Guide
-
- 2003/01/15
-
-
-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 Linux-i386 or OpenBSD-i386 or another Unix like environment
-with installed Gnu fileutils and installed Gnu-C-Compiler, you may try
-install.sh for installation. See
-
- ./install.sh --help
-
-for more information. If you don't have GCC, Linux-i386 or
-OpenBSD-i386 you may also use install.sh, but you have to compile
-and link splitindex.c before. See the splitidx manual for this.
-
-But you may also try the following step by step installation:
-
-
-HOW TO GENERATE THE splitidx PACKAGE
-====================================
-
-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 teTeX you can ask kpathsea for this, e.g. using a unix
-shell:
-
- kpsexpand \$TEXMFLOCAL
-
-to use the local texmf tree or:
-
- kpsexpand \$HOMETEXMF
-
-to use your private texmf tree. Following uses "TEXMF" to be a synonym
-for the texmf tree you want to use.
-
-3rd) create folder TEXMF/tex/latex/misc (at Windows:
-TEXMF\tex\latex\misc), if it doesn't exist. Copy splitidx.sty to this
-folder.
-
-4th) 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 BINARIES
-===========================
-
-5th) Rename the suitable binary (e.g. splitindex-Linux-i386, if you're
-using Linux-i386) to splitindex or compile splitindex.c to generate
-a binary named splitindex.
-
-6th) copy splitindex.java to the binary search path of SUN JAVA
-1.4.1.
-
-7th) copy splitindex.pl and splitindex or splitindex.exe somewhere to
-your binary search path (ask environment variable PATH).
-
-8th) copy the manual page splitindex.1 to your manual seach path.
-
-9th) copy splitindex.tex to the same location you've copied
-splitidx.sty to and do 4th step again.
-
-
-HOW TO GENERATE THE MANUAL
-==========================
-
-10th) process splitidx.dtx with LaTeX to generate the user manual of
-splitidx and SplitIndex, e.g. using the following input at a command
-shell:
-
- latex splitidx.dtx
- latex splitidx.dtx
- mkindex splitidx
- latex splitidx.dtx
-
-or (if you do not have the mkindex script):
-
- latex splitidx.dtx
- latex splitidx.dtx
- makeindex -s gind.ist splitidx
- makeindex -s gglo.ist -o splitidx.gls splitidx.glo
- latex splitidx.dtx
-
-You may print the resulting splitidx.dvi. If you prefere PDF files,
-use pdflatex instead of latex.
-
-11th) read the manual you produced at 10th step.
-
-
-HOW TO TEST YOUR INSTALLATION
-=============================
-
-Use the following LaTeX source to test the installation. See
-splitidx.dvi or splitidx.pdf to see 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/doc/latex/splitindex/manifest.txt b/Master/texmf-dist/doc/latex/splitindex/manifest.txt
deleted file mode 100644
index 89dc68ddd16..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/manifest.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-%
-% The following files form the SplitIndex Dsitribution 2002/01/05
-%
-%
-% CONTENTS OF THE SplitIndex DISTRIBUTION
-% =======================================
-%
-% Documentation:
-% --------------
-%
-% manifest.txt -- This file.
-% install.txt -- How to install SplitIndex (overview).
-% splitindex.1 -- The unix manual page of all SplitIndex
-% programs.
-%
-%
-% 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.
-%
-%
-% Programs (binaries):
-% --------------------
-%
-% splitindex.pl -- Perl is an interpreter, so this is the source
-% and the program itself (but not binary)
-% splitindex.class -- The SUN JAVA 1.4.1 bitcode of the SplitIndex
-% program.
-% splitindex-Linux-i386
-% -- The Linux-i386-ELF binary of the SplitIndex
-% program.
-% splitindex-OpenBSD-i386
-% -- The OpenBSD-i386 binary of the SplitIndex
-% program.
-% splitindex.exe -- The CygWin-i386 (Win32) binary the SplitIndex
-% program.
-%
-%
-% Installation programs:
-% ----------------------
-%
-% install.sh -- See `install.txt' for more information about
-% this.
-%
-% ====================================================================
-%
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf b/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf
deleted file mode 100644
index 92a248ef686..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitidx.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex-Linux-i386 b/Master/texmf-dist/doc/latex/splitindex/splitindex-Linux-i386
deleted file mode 100644
index 42566f25083..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex-Linux-i386
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex-OpenBSD-i386 b/Master/texmf-dist/doc/latex/splitindex/splitindex-OpenBSD-i386
deleted file mode 100644
index 17e865dd061..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex-OpenBSD-i386
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex.1 b/Master/texmf-dist/doc/latex/splitindex/splitindex.1
deleted file mode 100644
index 98188409f60..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex.1
+++ /dev/null
@@ -1,64 +0,0 @@
-.TH SPLITINDEX "1" "November 2002" "splitindex 0.2a" "User Commands"
-.SH NAME
-splitindex \- manual page for splitindex 0.2a
-.SH SYNOPSIS
-.B splitindex.pl
-[\fIOPTION\fR]... \fIRAWINDEXFILE \fR[\fIMAKEINDEXOPTION\fR]...
-.PP
-.B splitindex
-[\fIOPTION\fR]... \fIRAWINDEXFILE \fR[\fIMAKEINDEXOPTION\fR]...
-.PP
-.B java splitindex
-[\fIOPTION\fR]... \fIRAWINDEXFILE \fR[\fIMAKEINDEXOPTION\fR]...
-.PP
-.B tex splitindex
-.SH DESCRIPTION
-splitindex 0.2a
-Copyright (c) 2002 Markus Kohm <kohm@gmx.de>
-.PP
-Split a single raw 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 <kohm@gmx.de>
-.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/doc/latex/splitindex/splitindex.class b/Master/texmf-dist/doc/latex/splitindex/splitindex.class
deleted file mode 100644
index 288ad25d588..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex.class
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex.exe b/Master/texmf-dist/doc/latex/splitindex/splitindex.exe
deleted file mode 100644
index 08aa74d1291..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex.exe
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex.java b/Master/texmf-dist/doc/latex/splitindex/splitindex.java
deleted file mode 100644
index 9b52f9f7fdf..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * splitindex.java
- * Copyright (c) Markus Kohm, 2002
- *
- * $Id: splitindex.java,v 1.2 2003/01/05 15:05:46 mjk Exp $
- *
- * This file is part of the SplitIndex package
- *
- * This file can be redistributed and/or modified under the conditions
- * of the LaTeX Project Public License, either version 1.2 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.
- *
- * You are not allowed to redistribute this file without all the
- * other files of the SplitIndex package
- */
-
-/*
- I know, I should never write an application in a single static class
- like I do here. But I wanted the program at earch language to be one
- file.
-*/
-
-import java.util.*;
-import java.util.regex.*;
-import java.io.*;
-
-public final class splitindex {
- private static ArrayList MakeIndexArgs = new ArrayList();
-// private static String Identify = "^(.*)\\\\UseIndex *\\{([^\\}]*)\\}(.*)$";
- private static String Identify = "^(\\\\indexentry)\\[([^\\]]*)\\](.*)$";
- private static String ResultIs = "$1$3";
- private static String SuffixIs = "-$2";
- private static int Verbose = 0;
- private static String IDX = null;
- private static String Jobname = null;
- private static HashMap IDXwriters = new HashMap();
-
- private static void ShowHelp() {
- String nl = System.getProperty( "line.separator" );
- ShowVersion();
- System.out.println();
- ShowUsage();
- System.out.println(
- "Split a single raw index file into multiple raw index files." +nl+
- "Example: java splitindex foo.idx." +nl+
- nl+
- "Options:" +nl+
- " -h, --help " +
- "\tshow this help and terminate" +nl+
- " -m, --makeindex PROGNAME" +nl+
- "\t\t\tcall PROGNAME instead of default `makeindex'." +nl+
- " -i, --identify EXPRESSION" +nl+
- "\t\t\tuse regular EXPRESSION to match entries" +nl+
- "\t\t\t(see also option --resultis and --suffixis)." +nl+
- "\t\t\tDefault is \'" + Identify + "\'." +nl+
- " -r, --resultis PATTERN" +nl+
- "\t\t\tcreate line to be written from PATTERN after matching" +nl+
- "\t\t\tlines (see also option --identify)." +nl+
- "\t\t\tDefault is \'" + ResultIs + "\'." +nl+
- " -s, --suffixis PATTERN" +nl+
- "\t\t\tcreate suffix to be used from PATTERN after matching" +nl+
- "\t\t\tlines (see also option --identify)." +nl+
- "\t\t\tDefault is \'" + SuffixIs +"\'." +nl+
- " -v, --verbose " +
- "\tbe more verbose" +nl+
- "\t\t\t(can be used multiple to increase verbosity)" +nl+
- " --version " +
- "\tshow version and terminate"
- );
- System.exit( 0 );
- }
-
- private static void ShowVersion() {
- System.out.println( "splitindex.pl 0.1" );
- System.out.println( "Copyright (c) 2002 Markus Kohm <kohm@gmx.de>" );
- }
-
- private static void ShowUsage( PrintStream out ) {
- out.println( "Usage: java splitindex [OPTION]... RAWINDEXFILE [MAKEINDEXOPTION]..." );
- }
-
- private static void ShowUsage() {
- ShowUsage( System.out );
- }
-
- private static void UsageError( String msg ) {
- System.err.println( msg );
- System.err.println( "Try `java splitindex --help' for more information." );
- System.exit( 1 );
- }
-
- private static void ScanArguments(String[] args) {
- String MakeIndex = "makeindex";
- for (int i = 0; i < args.length; i++) {
- if ( args[i].charAt(0) == '-' ) {
- // Option
- if ( args[i].charAt(1) == '-' ) {
- // Long Option
- if ( args[i].substring(2).equals( "help" ) ) {
- ShowHelp();
- System.exit(0);
- } else if ( args[i].substring(2).equals( "version" ) ) {
- ShowVersion();
- System.exit(0);
- } else if ( args[i].substring(2).equals( "verbose" ) ) {
- Verbose++;
- } else if ( args[i].substring(2).equals( "makeindex" ) ) {
- if ( ++i >= args.length ) {
- UsageError( "Option makeindex requires an argument" );
- }
- MakeIndex = args[i];
- } else if ( ( args[i].length() >= 11 ) &&
- ( args[i].substring(2,11).equals( "makeindex=" ) ) ) {
- MakeIndex = args[i].substring(12);
- } else if ( args[i].substring(2).equals( "identify" ) ) {
- if ( ++i >= args.length ) {
- UsageError( "Option identify requires an argument" );
- }
- Identify = args[i];
- } else if ( ( args[i].length() >= 10 ) &&
- ( args[i].substring(2,10).equals( "identify=" ) ) ) {
- Identify = args[i].substring(11);
- } else if ( args[i].substring(2).equals( "resultis" ) ) {
- if ( ++i >= args.length ) {
- UsageError( "Option resultis requires an argument" );
- }
- ResultIs = args[i];
- } else if ( ( args[i].length() >= 10 ) &&
- ( args[i].substring(2,10).equals( "resultis=" ) ) ) {
- ResultIs = args[i].substring(11);
- } else if ( args[i].substring(2).equals( "suffixis" ) ) {
- if ( ++i >= args.length ) {
- UsageError( "Option suffixis requires an argument" );
- }
- SuffixIs = args[i];
- } else if ( ( args[i].length() >= 10 ) &&
- ( args[i].substring(2,10).equals( "suffixis=" ) ) ) {
- SuffixIs = args[i].substring(11);
- } else if ( args[i].equals( "--" ) ) {
- while ( ++i < args.length ) {
- MakeIndexArgs.add( args[i] );
- }
- } else {
- UsageError( "Unknown option " + args[i].substring(2) );
- }
- } else {
- // Short Option
- for ( int n = 1; n < args[i].length(); ) {
- switch( args[i].charAt(n++) ) {
- case 'h':
- ShowHelp();
- System.exit(0);
- case 'm':
- if ( n >= args[i].length() ) {
- if ( ++i >= args.length ) {
- UsageError( "Option makeindex requires an argument" );
- } else {
- MakeIndex = args[i];
- n = args[i].length();
- }
- } else {
- MakeIndex = args[i].substring( n );
- n = args[i].length();
- }
- break;
- case 'i':
- if ( n >= args[i].length() ) {
- if ( ++i >= args.length ) {
- UsageError( "Option identify requires an argument" );
- } else {
- Identify = args[i];
- n = args[i].length();
- }
- } else {
- Identify = args[i].substring( n );
- n = args[i].length();
- }
- break;
- case 'r':
- if ( n >= args[i].length() ) {
- if ( ++i >= args.length ) {
- UsageError( "Option resultis requires an argument" );
- } else {
- ResultIs = args[i];
- n = args[i].length();
- }
- } else {
- ResultIs = args[i].substring( n );
- n = args[i].length();
- }
- break;
- case 's':
- if ( n >= args[i].length() ) {
- if ( ++i >= args.length ) {
- UsageError( "Option suffixis requires an argument" );
- } else {
- SuffixIs = args[i];
- n = args[i].length();
- }
- } else {
- SuffixIs = args[i].substring( n );
- n = args[i].length();
- }
- break;
- case 'v':
- Verbose++;
- break;
- }
- }
- }
- } else {
- MakeIndexArgs.add( args[i] );
- }
- }
-
- // Args --> IDX + Stringarray
- if ( MakeIndexArgs.isEmpty() ) {
- UsageError( "missing raw index file" );
- } else {
- IDX = (String)MakeIndexArgs.get(0);
- MakeIndexArgs.remove(0);
- MakeIndexArgs.add( 0, MakeIndex );
- }
-
- if ( IDX.endsWith( ".idx" ) ) {
- Jobname = IDX.substring( 0, IDX.length() - 4 );
- } else {
- Jobname = IDX;
- }
- }
-
- public static void main(String[] args) {
- ScanArguments(args);
-
- if ( Verbose > 0 ) {
- ShowVersion();
- System.out.println();
- if ( Verbose > 9 ) {
- System.out.println( "Identify: \"" + Identify + "\"" );
- System.out.println( "ResultIs: \"" + ResultIs + "\"" );
- System.out.println( "SuffixIs: \"" + SuffixIs + "\"" );
- System.out.println( "IDX: \"" + IDX + "\"" );
- System.out.println( "Jobname: \"" + Jobname + "\"" );
- System.out.print( "MakeIndex:" );
- for ( int i = 0; i < MakeIndexArgs.size(); i++ )
- System.out.print( " \"" + (String)MakeIndexArgs.get(i) + "\"" );
- System.out.println();
- }
- }
-
- ProcessIDXFile();
- }
-
- private static void ProcessIDXFile() {
- File fIDX = new File( IDX );
- LineNumberReader rIDX = null;
- boolean error = false;
- if ( !fIDX.canRead() ) {
- if ( IDX.equals( Jobname ) ) {
- IDX = IDX.concat( ".idx" );
- fIDX = new File( IDX );
- if ( !fIDX.canRead() ) {
- System.err.println( "Can read neither file " + Jobname +
- " nor file " + IDX );
- System.exit( 1 );
- }
- } else {
- System.err.println( "Can't read file " + Jobname );
- System.exit( 1 );
- }
- }
-
- try {
- FileReader reader = new FileReader( fIDX );
- rIDX = new LineNumberReader( reader );
- } catch ( FileNotFoundException ex ) {
- System.err.println( ex.getMessage() );
- System.exit( 1 );
- }
-
- try {
- Pattern search = Pattern.compile( Identify );
- while ( rIDX.ready() ) {
- String line = rIDX.readLine();
- Matcher match = search.matcher( line );
- String suffix, result;
-
- try {
- if ( match.find() ) {
- suffix = match.replaceFirst( SuffixIs );
- result = match.replaceFirst( ResultIs );
- } else {
- result = line;
- suffix = SuffixIs.replaceFirst( "\\$\\d", "idx" );
- }
- WriteToIndex( Jobname + suffix + ".idx", result );
- } catch ( Exception ex ) {
- System.err.println( ex.getMessage() );
- error = true;
- break;
- }
- }
-
- if ( ! CloseAllIndex() )
- error = true;
- else if ( ! CallAllMakeIndex() )
- error = true;
- } catch ( IOException ex ) {
- System.err.println( ex.getMessage() );
- }
-
- try {
- rIDX.close();
- } catch ( IOException ex ) {
- System.err.println( ex.getMessage() );
- System.exit( 1 );
- }
-
- if ( error )
- System.exit( 1 );
-
- }
-
- static void WriteToIndex( String Name, String line )
- throws FileNotFoundException, SecurityException {
- PrintWriter fOut;
- if ( ( fOut = (PrintWriter)IDXwriters.get( Name ) ) == null ) {
- if ( Verbose > 1 ) {
- System.out.println( "New index file " + Name );
- }
- fOut = new PrintWriter( new FileOutputStream( Name ) );
- IDXwriters.put( Name, fOut );
- }
- fOut.println( line );
- }
-
- static boolean CloseAllIndex() {
- Iterator all = IDXwriters.entrySet().iterator();
- boolean retVal = true;
- while ( all.hasNext() ) {
- Map.Entry entry = (Map.Entry)all.next();
- PrintWriter writer = (PrintWriter)entry.getValue();
- if ( Verbose > 1 ) {
- System.out.println( "Close " + entry.getKey() );
- }
- writer.close();
- if ( writer.checkError() ) {
- System.err.println( "Error writing " + entry.getKey() );
- retVal = false;
- }
- }
- return retVal;
- }
-
- static boolean CallAllMakeIndex() {
- Iterator all = IDXwriters.entrySet().iterator();
- boolean retVal = true;
- ArrayList processes = new ArrayList();
- while ( all.hasNext() ) {
- Map.Entry entry = (Map.Entry)all.next();
- String name = (String)entry.getKey();
- try {
- MakeIndexArgs.add(name);
- String Args[] = new String[MakeIndexArgs.size()];
- Args = (String[])MakeIndexArgs.toArray( Args );
- MakeIndexArgs.remove(MakeIndexArgs.size()-1);
- if ( Verbose > 1 ) {
- System.out.print( "MakeIndex:" );
- for ( int i = 0; i < Args.length; i++ )
- System.out.print( " \"" + Args[i] + "\"" );
- System.out.println();
- }
- processes.add(Runtime.getRuntime().exec( Args ));
- } catch ( Exception ex ) {
- System.err.println( ex.getMessage() );
- retVal = false;
- }
- }
-
- for ( int i = 0; i < processes.size(); i++ ) {
- Process p = (Process)processes.get( i );
- InputStream out = p.getInputStream();
- byte[] buffer = new byte[1024];
- for ( boolean oncemore = true; oncemore; ) {
- oncemore = false;
- try {
- while ( out.available() > 0 ) {
- out.read( buffer );
- System.out.print( new String(buffer) );
- }
- for ( out = p.getErrorStream();
- out.available() > 0; ) {
- out.read( buffer );
- System.err.print( new String( buffer ) );
- }
- } catch ( Exception ex ) {
- System.err.println( ex.getMessage() );
- retVal = false;
- }
- try {
- if ( p.exitValue() != 0 )
- retVal = false;
- } catch ( IllegalThreadStateException ex ) {
- oncemore = true;
- }
- }
- }
-
- return retVal;
- }
-}
diff --git a/Master/texmf-dist/doc/latex/splitindex/splitindex.pl b/Master/texmf-dist/doc/latex/splitindex/splitindex.pl
deleted file mode 100644
index 378fb25e68c..00000000000
--- a/Master/texmf-dist/doc/latex/splitindex/splitindex.pl
+++ /dev/null
@@ -1,186 +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
-#
-# $Id: splitindex.pl,v 1.5 2002/11/05 10:54:27 mjk Exp $
-#
-# This file is part of the SplitIndex package
-#
-# This file can be redistributed and/or modified under the conditions
-# of the LaTeX Project Public License, either version 1.2 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.
-#
-# You are not allowed to redistribute this file without all the
-# other files of the SplitIndex package
-# ======================================================================
-
-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 (<IDX>) {
- 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 \<kohm\@gmx.de\>\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;
- }
-}