diff options
author | Vladimir Volovich <vvv@vsu.ru> | 2008-03-18 00:00:20 +0000 |
---|---|---|
committer | Vladimir Volovich <vvv@vsu.ru> | 2008-03-18 00:00:20 +0000 |
commit | abdd2d2892b5ee0071ef7bf1a387251d74e78055 (patch) | |
tree | dc561d5309e02baceac6cc2a7ad9980c7a3a0adf /Build/source/utils/xindy/user-commands | |
parent | 1f50183588e388206c13d505102dbd9525871429 (diff) |
*original* xindy-2.3 sources downloaded from
http://surfnet.dl.sourceforge.net/sourceforge/xindy/xindy-2.3.tar.gz
except the directory "rte/clisp-2.43/", which contained
original clisp-2.43 sources (nearly 48 MB), is removed.
git-svn-id: svn://tug.org/texlive/trunk@7003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/xindy/user-commands')
-rw-r--r-- | Build/source/utils/xindy/user-commands/Makefile.am | 38 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/Makefile.in | 386 | ||||
-rwxr-xr-x | Build/source/utils/xindy/user-commands/texindy | 521 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/texindy.1 | 406 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/xindy.1 | 380 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/xindy.in | 777 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/xindy.v2.1 | 90 | ||||
-rw-r--r-- | Build/source/utils/xindy/user-commands/xindy.v2.in | 302 |
8 files changed, 2900 insertions, 0 deletions
diff --git a/Build/source/utils/xindy/user-commands/Makefile.am b/Build/source/utils/xindy/user-commands/Makefile.am new file mode 100644 index 00000000000..6623f2802a1 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/Makefile.am @@ -0,0 +1,38 @@ +## Use `autoreconf' in top-level directory to recreate all +## autoconf/automake files. +## Or, call `automake Makefile' to create only Makefile.in. + +## Copyright (C) 2004-2005 by Gour. +## Copyright (C) 2008 by Joachim Schrod. +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation; either version 2 of the +## License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program in the file COPYING; if not, write to the +## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +## Boston, MA 02110-1301 USA. + +bin_SCRIPTS = xindy xindy.v2 + +xindy: xindy.in + sed -e 's:@libdir\@:$(libdir):' xindy.in >xindy + +xindy.v2: xindy.v2.in + sed -e 's:@XINDY_PERL\@:/usr/bin/perl:' xindy.v2.in >xindy.v2 + +dist_bin_SCRIPTS = texindy + +man_MANS = texindy.1 xindy.1 xindy.v2.1 + +EXTRA_DIST = $(man_MANS) + +CLEANFILES = xindy xindy.v2 + diff --git a/Build/source/utils/xindy/user-commands/Makefile.in b/Build/source/utils/xindy/user-commands/Makefile.in new file mode 100644 index 00000000000..296737ba60d --- /dev/null +++ b/Build/source/utils/xindy/user-commands/Makefile.in @@ -0,0 +1,386 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = user-commands +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_prog_latex.m4 \ + $(top_srcdir)/m4/ac_prog_pdflatex.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) $(dist_bin_SCRIPTS) +SOURCES = +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ +BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ +BUILDRULES_FALSE = @BUILDRULES_FALSE@ +BUILDRULES_TRUE = @BUILDRULES_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLISP_DIR = @CLISP_DIR@ +CLISP_PATH = @CLISP_PATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXT_CLISP_FALSE = @EXT_CLISP_FALSE@ +EXT_CLISP_TRUE = @EXT_CLISP_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +YACC = @YACC@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +latex = @latex@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdflatex = @pdflatex@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +bin_SCRIPTS = xindy xindy.v2 +dist_bin_SCRIPTS = texindy +man_MANS = texindy.1 xindy.1 xindy.v2.1 +EXTRA_DIST = $(man_MANS) +CLEANFILES = xindy xindy.v2 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign user-commands/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign user-commands/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-dist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done +uninstall-info-am: +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-exec-am: install-binSCRIPTS install-dist_binSCRIPTS + +install-info: install-info-am + +install-man: install-man1 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ + uninstall-info-am uninstall-man + +uninstall-man: uninstall-man1 + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic dvi dvi-am html html-am info info-am install \ + install-am install-binSCRIPTS install-data install-data-am \ + install-dist_binSCRIPTS install-exec install-exec-am \ + install-info install-info-am install-man install-man1 \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ + uninstall-info-am uninstall-man uninstall-man1 + + +xindy: xindy.in + sed -e 's:@libdir\@:$(libdir):' xindy.in >xindy + +xindy.v2: xindy.v2.in + sed -e 's:@XINDY_PERL\@:/usr/bin/perl:' xindy.v2.in >xindy.v2 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/utils/xindy/user-commands/texindy b/Build/source/utils/xindy/user-commands/texindy new file mode 100755 index 00000000000..9c09633c2b6 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/texindy @@ -0,0 +1,521 @@ +#!/usr/bin/perl +# $Id: texindy,v 1.5 2006/07/30 10:30:42 jschrod Exp $ +#------------------------------------------------------------ +# (history at end) + +=head1 NAME + +texindy - create sorted and tagged index from raw LaTeX index + +=head1 SYNOPSIS + + texindy [-V?h] [-qv] [-iglr] [-d magic] [-o outfile.ind] [-t log] \ + [-L lang] [-C codepage] [-M module] [idx0 idx1 ...] + +=head2 GNU-Style Long Options for Short Options: + + -V / --version + -? / -h / --help + -q / --quiet + -v / --verbose + -i / --stdin + -g / --german + -l / --letter-ordering + -r / --no-ranges + -d / --debug (multiple times) + -o / --out-file + -t / --log-file + -L / --language + -C / --codepage + -M / --module (multiple times) + -I / --input-markup (supported: latex, omega) + + +=head1 DESCRIPTION + +B<texindy> is the LaTeX-specific command of xindy, the flexible +indexing system. It takes a raw index as input, and produces a merged, +sorted and tagged index. Merging, sorting, and tagging is controlled +by xindy modules, with a convenient set already preloaded. + +Files with the raw index are passed as arguments. If no arguments are +passed, the raw index will be read from standard input. + +A good introductionary description of B<texindy> appears in the +indexing chapter of the LaTeX Companion (2nd ed.) + +If you want to produce an index for LaTeX documents with special index +markup, the command xindy(1) is probably more of interest for you. + +B<texindy> is an approach to merge support for the I<make-rules> +framework, own xindy modules (e.g., for special LaTeX commands in the +index), and a reasonable level of MakeIndex compatibility. There are +other older approaches, eventually they will get a description on the +xindy Web Site, http://www.xindy.org/. + + +=head1 OPTIONS + +=over + +=item C<--version> / B<-V> + +output version numbers of all relevant components and exit. + +=item C<--help> / B<-h> / B<-?> + +output usage message with options explanation. + +=item C<--quiet> / B<-q> + +Don't output progress messages. Output only error messages. + +=item C<--version> / B<-v> + +Output verbose progress messages. + +=item C<--debug> I<magic> / B<-d> I<magic> + +Output debug messages, this option may be specified multiple times. +I<magic> determines what is output: + + magic remark + ------------------------------------------------------------ + script internal progress messages of driver scripts + keep_tmpfiles don't discard temporary files + markup output markup trace, as explained in xindy manual + level=n log level, n is 0 (default), 1, 2, or 3 + +=item C<--out-file> F<outfile.ind> / B<-o> F<outfile.ind> + +Output index to file F<outfile.ind>. If this option is not passed, the +name of the output file is the base name of the first argument and the +file extension F<ind>. If the raw index is read from standard input, +this option is mandatory. + +=item C<--log-file> F<log.ilg> / B<-t> F<log.ilg> + +Output log messages to file F<log.ilg>. These log messages are +independent from the progress messages that you can influence with +C<--debug> or C<--verbose>. + +=item C<--language> I<lang> / B<-L> I<lang> + +The index is sorted according to the rules of language I<lang>. These +rules are encoded in a xindy module created by I<make-rules>. + +If no input encoding is specified via C<--codepage>, a xindy module +for that language is searched with a latin, a cp, an iso, or ascii +encoding, in that order. + +=item C<--codepage> I<enc> / B <-C> I<enc> + +The raw input is in input encoding I<enc>. This information is used to +select the correct xindy sort module and also the I<inputenc> target +encoding for C<latex> input markup. + +When C<omega> input markup is used, C<utf8> is always used as the sort +codepage and no inputenc module is loaded. Then this option is +ignored. + +=item C<--module> I<module> / B<-M> I<module> + +Load the xindy module F<module.xdy>. This option may be specified +multiple times. The modules are searched in the xindy search path that +can be changed with the environment variable C<XINDY_SEARCHPATH>. + +=item C<--input-markup> I<input> / B<-I> I<input> + +Specifies the input markup of the raw index. Supported values for +I<input> are C<latex> and C<omega>. + +C<latex> input markup is the one that is emitted by default from the +LaTeX kernel, or by the C<index> macro package of David Jones. +^^-notation of single byte characters is supported. Usage of LaTeX's +I<inputenc> package is assumed as well. + +C<omega> input markup is like C<latex> input markup, but with Omega's +^^-notation as encoding for non-ASCII characters. LaTeX I<inputenc> +encoding is not used then, and C<utf8> is enforced to be the codepage +for sorting. + +=back + + +=head1 SUPPORTED LANGUAGES / CODEPAGES + +The following languages are supported: + +=head2 Latin scripts + + albanian gypsy portuguese + croatian hausa romanian + czech hungarian russian-iso + danish icelandic slovak-small + english italian slovak-large + esperanto kurdish-bedirxan slovenian + estonian kurdish-turkish spanish-modern + finnish latin spanish-traditional + french latvian swedish + general lithuanian turkish + german-din lower-sorbian upper-sorbian + german-duden norwegian vietnamese + greek-iso polish + +German recognizes two different sorting schemes to handle umlauts: +normally, C<ä> is sorted like C<ae>, but in phone books or +dictionaries, it is sorted like C<a>. The first scheme is known as +I<DIN order>, the second as I<Duden order>. + +C<*-iso> language names assume that the raw index entries are in ISO +8859-9 encoding. + +C<gypsy> is a northern Russian dialect. + +=head2 Cyrillic scripts + + belarusian mongolian serbian + bulgarian russian ukrainian + macedonian + +=head2 Other scripts + + greek klingon + +=head2 Available Codepages + +This is not yet written. You can look them up in your xindy +distribution, in the F<modules/lang/language/> directory (where +I<language> is your language). They are named +F<variant-codepage-lang.xdy>, where F<variant-> is most often empty +(for german, it's C<din5007> and C<duden>; for spanish, it's C<modern> +and C<traditional>, etc.) + + < Describe available codepages for each language > + + < Describe relevance of codepages (as internal representation) for + LaTeX inputenc > + + +=head1 TEXINDY STANDARD MODULES + +There is a set of B<texindy> standard modules that help to process +LaTeX index files. Some of them are automatically loaded. Some of them +are loaded by default, this can be turned off with a B<texindy> +option. Others may be specified as C<--module> argument to achieve a +specific effect. + + xindy Module Category Description + +=head2 Sorting + + word-order Default A space comes before any letter in the + alphabet: ``index style'' is listed before + ``indexing''. Turn it off with option -l. + letter-order Add-on Spaces are ignored: ``index style'' + is sorted after ``indexing''. + keep-blanks Add-on Leading and trailing white space (blanks + and tabs) are not ignored; intermediate + white space is not changed. + ignore-hyphen Add-on Hyphens are ignored: + ``ad-hoc'' is sorted as ``adhoc''. + ignore-punctuation Add-on All kinds of punctuation characters are + ignored: hyphens, periods, commas, slashes, + parentheses, and so on. + numeric-sort Auto Numbers are sorted numerically, not like + characters: ``V64'' appears before ``V128''. + +=head2 Page Numbers + + page-ranges Default Appearances on more than two consecutive + pages are listed as a range: ``1--4''. + Turn it off with option -r. + ff-ranges Add-on Uses implicit ``ff'' notation for ranges + of three pages, and explicit ranges + thereafter: 2f, 2ff, 2--6. + ff-ranges-only Add-on Uses only implicit ranges: 2f, 2ff. + book-order Add-on Sorts page numbers with common book numbering + scheme correctly -- Roman numerals first, then + Arabic numbers, then others: i, 1, A. + +=head2 Markup and Layout + + tex Auto Handles basic TeX conventions. + latex-loc-fmts Auto Provides LaTeX formatting commands + for page number encapsulation. + latex Auto Handles LaTeX conventions, both in raw + index entries and output markup; implies + tex. + makeindex Auto Emulates the default MakeIndex input syntax + and quoting behavior. + latin-lettergroups Auto Layout contains a single Latin letter + above each group of words starting with the + same letter. + german-sty Add-on Handles umlaut markup of babel's german + and ngerman options. + + + +=head1 ENVIRONMENT + +=over + +=item C<TEXINDY_AUTO_MODULE> + +This is the name of the xindy module that loads all auto-loaded +modules. The default is C<texindy>. + +=back + + +=head1 AUTHOR + +Joachim Schrod + + +=head1 LEGALESE + +B<texindy> is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + + +=for Emacs +#' + +=cut + + +use strict; + +BEGIN { + use vars qw($Revision $VERSION); + q$Revision: 1.5 $ =~ /: (\d+)\.(\d+)/ ; # q wg. Emacs indent! + my ($major, $minor) = ($1, $2); + $VERSION = "$major." . ($minor<10 ? '0' : '') . $minor; +} + + +# Some common variables. +# Determine environment. Where is our library directory, and our modules? + +use File::Basename; +our ($cmd_dir, $cmd); +BEGIN { + $cmd_dir = dirname($0); + $cmd = basename($0); +} + + +# Used modules. + +use Getopt::Long qw(:config bundling); + + +# Check arguments, store them in proper variables. + +sub usage () +{ + print STDERR <<_EOT_ + +usage: $cmd [-V?h] [-qv] [-iglr] [-d magic] [-o outfile.ind] [-t log] \\ + [-L lang] [-C codepage] [-M module] [-I input] [idx0 idx1 ...] + +GNU-STYLE LONG OPTIONS FOR SHORT OPTIONS: + + -V / --version + -? / -h / --help + -q / --quiet + -v / --verbose + -i / --stdin + -g / --german + -l / --letter-ordering + -r / --no-ranges + -d / --debug (multiple times) + (supported: script, keep_tmpfiles, markup, level=n) + -o / --out-file + -t / --log-file + -L / --language + -C / --codepage + -M / --module (multiple times) + -I / --input-markup (supported: latex, omega) + +_EOT_ + ; + exit 1; +} + +our ($output_version, $quiet, $verbose, $stdin, @debug, + $outfile, $logfile, $language, $codepage, @modules, $input_markup); +$language = 'general'; +$codepage = 'latin'; +$input_markup = 'latex'; + +our $xindy; +if ( -f "$cmd_dir/xindy" && -x _ ) { + $xindy = "$cmd_dir/xindy"; +} elsif ( -f "$cmd_dir/xindy.pl" && -x _ ) { + $xindy = "$cmd_dir/xindy.pl"; +} else { + die "$cmd: cannot locate xindy\n"; +} + +parse_options(); +output_version() if $output_version; # will not return +usage() if ( ! $stdin && @ARGV == 0 ); # brain damaged, but like makeindex + + +# Reconstruct xindy options, and eventually switch to it. + +unshift (@ARGV, '-q') if $quiet; +unshift (@ARGV, '-v') if $verbose; +unshift (@ARGV, map { ('-d', $_) } @debug) if @debug; +unshift (@ARGV, '-o', $outfile) if $outfile; +unshift (@ARGV, '-t', $logfile) if $logfile; +unshift (@ARGV, '-L', $language); +unshift (@ARGV, '-C', $codepage) if $codepage; +unshift (@ARGV, '-M', "tex/inputenc/$codepage") if $codepage; +unshift (@ARGV, map { ('-M', $_) } ($ENV{TEXINDY_AUTO_MODULE} || 'texindy', + @modules)); +unshift (@ARGV, '-I', $input_markup); + +print "Calling xindy as: $cmd_dir/xindy @ARGV\n" if (grep /^script$/, @debug); + +exec $xindy, @ARGV; +die "$cmd: could not execute xindy: $!\n"; + + +# ------------------------------------------------------------ + + +sub parse_options() { + + my ($german, $letter_ordering, $no_ranges); + GetOptions( + 'version|V' => \$output_version, + 'help|h|?' => \&usage, + 'quiet|q' => \$quiet, + 'verbose|v' => \$verbose, + 'stdin|i' => \$stdin, + 'german|g' => \$german, + 'letter-ordering|l' => \$letter_ordering, + 'no-ranges|r' => \$no_ranges, + 'debug|d=s' => \@debug, + 'out-file|o=s' => \$outfile, + 'log-file|t=s' => \$logfile, + 'language|L=s' => \$language, + 'codepage|C=s' => \$codepage, + 'module|M=s' => \@modules, + 'input-markup|I=s' => \$input_markup, + ) + or usage(); + + if ( $german ) { + unshift (@modules, 'german-sty'); + if ( $language eq 'general' ) { + $language = 'german-din'; + } elsif ( $language !~ /^german/ ) { + print STDERR "You cannot specify -g and -L at the same time.\n"; + #print STDERR "NOTE: -g is obsolete anyhow.\n"; + exit (1); + } + } + unshift (@modules, ($letter_ordering ? 'letter-order' : 'word-order')); + unshift (@modules, 'page-ranges') unless $no_ranges; + + # Check that the input markup is known. omega markup implies + # codepage utf8 for sorting, but no inputenc. We set the codepage + # to undef to prevent loading of the inputenc module. Setting it + # to utf8 for the sort encoding is done by the xindy script. + if ( $input_markup ne 'latex' && $input_markup ne 'omega' ) { + print STDERR "Unsupported input markup $input_markup.\n\n"; + usage(); + } + if ( $input_markup eq 'omega' ) { + $codepage = undef; + } + +} + + +sub output_version () { + output_xindy_release(); + print "$cmd script version: $VERSION\n"; + my @xindy_cmd = ($xindy, '--internal-version'); + push (@xindy_cmd, qw(-d script --foobar)) if grep(/^script$/, @debug); + exec @xindy_cmd; +} + + +sub output_xindy_release () { + my $version = 'unknown'; + my $version_file; + if ( -f "$cmd_dir/../VERSION" ) { + $version_file = "$cmd_dir/../VERSION"; + } else { + # Where is the library directory? + my $lib_dir; + if ( $ENV{XINDY_LIBDIR} ) { + $lib_dir = $ENV{XINDY_LIBDIR}; + } elsif ( '@libdir@' ne '@libdir' . '@' ) { # GNU configure at work? + if ( -d '@libdir@/xindy' ) { # /usr style + $lib_dir = '@libdir@/xindy'; + } else { + $lib_dir = '@libdir@'; # /opt style + } + } elsif ( -f "$cmd_dir/../lib/xindy.run" ) { # /opt style + $lib_dir = "$cmd_dir/../lib"; + } elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr style + $lib_dir = "$cmd_dir/../lib/xindy"; + } else { + die "Cannot locate xindy library directory"; + } + if ( -f "$lib_dir/VERSION" ) { + $version_file = "$lib_dir/VERSION"; + } + } + + if ( $version_file ) { + if ( open(VERSION, "<$version_file") ) { + while ( $version = <VERSION> ) { + chomp ($version); + $version =~ s/\#.*// ; + $version =~ s/^\s+// ; + $version =~ s/\s+$// ; + last if $version; + } + close (VERSION); + } + } + print "xindy release: $version\n"; +} + + + +#====================================================================== +# +# $Log: texindy,v $ +# Revision 1.5 2006/07/30 10:30:42 jschrod +# Check if an exec() error happened and output an error message. +# (Ticket 1230801) +# +# Revision 1.4 2006/07/19 00:29:56 jschrod +# Support for omega input markup. +# +# Revision 1.3 2004/11/01 22:48:51 jschrod +# Locate xindy script. +# Terminate on option error. +# Fix up version output. +# +# Revision 1.2 2004/05/26 21:30:11 jschrod +# Added POD documentation. +# +# Revision 1.1 2004/05/24 19:47:13 jschrod +# Introduce new driver script, as part of the "Companion Release". +# diff --git a/Build/source/utils/xindy/user-commands/texindy.1 b/Build/source/utils/xindy/user-commands/texindy.1 new file mode 100644 index 00000000000..938f1e574d4 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/texindy.1 @@ -0,0 +1,406 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "TEXINDY 1" +.TH TEXINDY 1 "2006-07-30" "Version 1.5" "xindy" +.SH "NAME" +texindy \- create sorted and tagged index from raw LaTeX index +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 2 +\& texindy [-V?h] [-qv] [-iglr] [-d magic] [-o outfile.ind] [-t log] \e +\& [-L lang] [-C codepage] [-M module] [idx0 idx1 ...] +.Ve +.Sh "GNU-Style Long Options for Short Options:" +.IX Subsection "GNU-Style Long Options for Short Options:" +.Vb 15 +\& -V / --version +\& -? / -h / --help +\& -q / --quiet +\& -v / --verbose +\& -i / --stdin +\& -g / --german +\& -l / --letter-ordering +\& -r / --no-ranges +\& -d / --debug (multiple times) +\& -o / --out-file +\& -t / --log-file +\& -L / --language +\& -C / --codepage +\& -M / --module (multiple times) +\& -I / --input-markup (supported: latex, omega) +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBtexindy\fR is the LaTeX-specific command of xindy, the flexible +indexing system. It takes a raw index as input, and produces a merged, +sorted and tagged index. Merging, sorting, and tagging is controlled +by xindy modules, with a convenient set already preloaded. +.PP +Files with the raw index are passed as arguments. If no arguments are +passed, the raw index will be read from standard input. +.PP +A good introductionary description of \fBtexindy\fR appears in the +indexing chapter of the LaTeX Companion (2nd ed.) +.PP +If you want to produce an index for LaTeX documents with special index +markup, the command \fIxindy\fR\|(1) is probably more of interest for you. +.PP +\&\fBtexindy\fR is an approach to merge support for the \fImake-rules\fR +framework, own xindy modules (e.g., for special LaTeX commands in the +index), and a reasonable level of MakeIndex compatibility. There are +other older approaches, eventually they will get a description on the +xindy Web Site, http://www.xindy.org/. +.SH "OPTIONS" +.IX Header "OPTIONS" +.ie n .IP """\-\-version""\fR / \fB\-V" 4 +.el .IP "\f(CW\-\-version\fR / \fB\-V\fR" 4 +.IX Item "--version / -V" +output version numbers of all relevant components and exit. +.ie n .IP """\-\-help""\fR / \fB\-h\fR / \fB\-?" 4 +.el .IP "\f(CW\-\-help\fR / \fB\-h\fR / \fB\-?\fR" 4 +.IX Item "--help / -h / -?" +output usage message with options explanation. +.ie n .IP """\-\-quiet""\fR / \fB\-q" 4 +.el .IP "\f(CW\-\-quiet\fR / \fB\-q\fR" 4 +.IX Item "--quiet / -q" +Don't output progress messages. Output only error messages. +.ie n .IP """\-\-version""\fR / \fB\-v" 4 +.el .IP "\f(CW\-\-version\fR / \fB\-v\fR" 4 +.IX Item "--version / -v" +Output verbose progress messages. +.ie n .IP """\-\-debug""\fR \fImagic\fR / \fB\-d\fR \fImagic" 4 +.el .IP "\f(CW\-\-debug\fR \fImagic\fR / \fB\-d\fR \fImagic\fR" 4 +.IX Item "--debug magic / -d magic" +Output debug messages, this option may be specified multiple times. +\&\fImagic\fR determines what is output: +.Sp +.Vb 6 +\& magic remark +\& ------------------------------------------------------------ +\& script internal progress messages of driver scripts +\& keep_tmpfiles don't discard temporary files +\& markup output markup trace, as explained in xindy manual +\& level=n log level, n is 0 (default), 1, 2, or 3 +.Ve +.ie n .IP """\-\-out\-file""\fR \fIoutfile.ind\fR / \fB\-o\fR \fIoutfile.ind" 4 +.el .IP "\f(CW\-\-out\-file\fR \fIoutfile.ind\fR / \fB\-o\fR \fIoutfile.ind\fR" 4 +.IX Item "--out-file outfile.ind / -o outfile.ind" +Output index to file \fIoutfile.ind\fR. If this option is not passed, the +name of the output file is the base name of the first argument and the +file extension \fIind\fR. If the raw index is read from standard input, +this option is mandatory. +.ie n .IP """\-\-log\-file""\fR \fIlog.ilg\fR / \fB\-t\fR \fIlog.ilg" 4 +.el .IP "\f(CW\-\-log\-file\fR \fIlog.ilg\fR / \fB\-t\fR \fIlog.ilg\fR" 4 +.IX Item "--log-file log.ilg / -t log.ilg" +Output log messages to file \fIlog.ilg\fR. These log messages are +independent from the progress messages that you can influence with +\&\f(CW\*(C`\-\-debug\*(C'\fR or \f(CW\*(C`\-\-verbose\*(C'\fR. +.ie n .IP """\-\-language""\fR \fIlang\fR / \fB\-L\fR \fIlang" 4 +.el .IP "\f(CW\-\-language\fR \fIlang\fR / \fB\-L\fR \fIlang\fR" 4 +.IX Item "--language lang / -L lang" +The index is sorted according to the rules of language \fIlang\fR. These +rules are encoded in a xindy module created by \fImake-rules\fR. +.Sp +If no input encoding is specified via \f(CW\*(C`\-\-codepage\*(C'\fR, a xindy module +for that language is searched with a latin, a cp, an iso, or ascii +encoding, in that order. +.ie n .IP """\-\-codepage""\fR \fIenc\fR / B <\-C> \fIenc" 4 +.el .IP "\f(CW\-\-codepage\fR \fIenc\fR / B <\-C> \fIenc\fR" 4 +.IX Item "--codepage enc / B <-C> enc" +The raw input is in input encoding \fIenc\fR. This information is used to +select the correct xindy sort module and also the \fIinputenc\fR target +encoding for \f(CW\*(C`latex\*(C'\fR input markup. +.Sp +When \f(CW\*(C`omega\*(C'\fR input markup is used, \f(CW\*(C`utf8\*(C'\fR is always used as the sort +codepage and no inputenc module is loaded. Then this option is +ignored. +.ie n .IP """\-\-module""\fR \fImodule\fR / \fB\-M\fR \fImodule" 4 +.el .IP "\f(CW\-\-module\fR \fImodule\fR / \fB\-M\fR \fImodule\fR" 4 +.IX Item "--module module / -M module" +Load the xindy module \fImodule.xdy\fR. This option may be specified +multiple times. The modules are searched in the xindy search path that +can be changed with the environment variable \f(CW\*(C`XINDY_SEARCHPATH\*(C'\fR. +.ie n .IP """\-\-input\-markup""\fR \fIinput\fR / \fB\-I\fR \fIinput" 4 +.el .IP "\f(CW\-\-input\-markup\fR \fIinput\fR / \fB\-I\fR \fIinput\fR" 4 +.IX Item "--input-markup input / -I input" +Specifies the input markup of the raw index. Supported values for +\&\fIinput\fR are \f(CW\*(C`latex\*(C'\fR and \f(CW\*(C`omega\*(C'\fR. +.Sp +\&\f(CW\*(C`latex\*(C'\fR input markup is the one that is emitted by default from the +LaTeX kernel, or by the \f(CW\*(C`index\*(C'\fR macro package of David Jones. +^^\-notation of single byte characters is supported. Usage of LaTeX's +\&\fIinputenc\fR package is assumed as well. +.Sp +\&\f(CW\*(C`omega\*(C'\fR input markup is like \f(CW\*(C`latex\*(C'\fR input markup, but with Omega's +^^\-notation as encoding for non-ASCII characters. LaTeX \fIinputenc\fR +encoding is not used then, and \f(CW\*(C`utf8\*(C'\fR is enforced to be the codepage +for sorting. +.SH "SUPPORTED LANGUAGES / CODEPAGES" +.IX Header "SUPPORTED LANGUAGES / CODEPAGES" +The following languages are supported: +.Sh "Latin scripts" +.IX Subsection "Latin scripts" +.Vb 13 +\& albanian gypsy portuguese +\& croatian hausa romanian +\& czech hungarian russian-iso +\& danish icelandic slovak-small +\& english italian slovak-large +\& esperanto kurdish-bedirxan slovenian +\& estonian kurdish-turkish spanish-modern +\& finnish latin spanish-traditional +\& french latvian swedish +\& general lithuanian turkish +\& german-din lower-sorbian upper-sorbian +\& german-duden norwegian vietnamese +\& greek-iso polish +.Ve +.PP +German recognizes two different sorting schemes to handle umlauts: +normally, \f(CW\*(C`ä\*(C'\fR is sorted like \f(CW\*(C`ae\*(C'\fR, but in phone books or +dictionaries, it is sorted like \f(CW\*(C`a\*(C'\fR. The first scheme is known as +\&\fI\s-1DIN\s0 order\fR, the second as \fIDuden order\fR. +.PP +\&\f(CW\*(C`*\-iso\*(C'\fR language names assume that the raw index entries are in \s-1ISO\s0 +8859\-9 encoding. +.PP +\&\f(CW\*(C`gypsy\*(C'\fR is a northern Russian dialect. +.Sh "Cyrillic scripts" +.IX Subsection "Cyrillic scripts" +.Vb 3 +\& belarusian mongolian serbian +\& bulgarian russian ukrainian +\& macedonian +.Ve +.Sh "Other scripts" +.IX Subsection "Other scripts" +.Vb 1 +\& greek klingon +.Ve +.Sh "Available Codepages" +.IX Subsection "Available Codepages" +This is not yet written. You can look them up in your xindy +distribution, in the \fImodules/lang/language/\fR directory (where +\&\fIlanguage\fR is your language). They are named +\&\fIvariant\-codepage\-lang.xdy\fR, where \fIvariant\-\fR is most often empty +(for german, it's \f(CW\*(C`din5007\*(C'\fR and \f(CW\*(C`duden\*(C'\fR; for spanish, it's \f(CW\*(C`modern\*(C'\fR +and \f(CW\*(C`traditional\*(C'\fR, etc.) +.PP +.Vb 1 +\& < Describe available codepages for each language > +.Ve +.PP +.Vb 2 +\& < Describe relevance of codepages (as internal representation) for +\& LaTeX inputenc > +.Ve +.SH "TEXINDY STANDARD MODULES" +.IX Header "TEXINDY STANDARD MODULES" +There is a set of \fBtexindy\fR standard modules that help to process +LaTeX index files. Some of them are automatically loaded. Some of them +are loaded by default, this can be turned off with a \fBtexindy\fR +option. Others may be specified as \f(CW\*(C`\-\-module\*(C'\fR argument to achieve a +specific effect. +.PP +.Vb 1 +\& xindy Module Category Description +.Ve +.Sh "Sorting" +.IX Subsection "Sorting" +.Vb 15 +\& word-order Default A space comes before any letter in the +\& alphabet: ``index style'' is listed before +\& ``indexing''. Turn it off with option -l. +\& letter-order Add-on Spaces are ignored: ``index style'' +\& is sorted after ``indexing''. +\& keep-blanks Add-on Leading and trailing white space (blanks +\& and tabs) are not ignored; intermediate +\& white space is not changed. +\& ignore-hyphen Add-on Hyphens are ignored: +\& ``ad-hoc'' is sorted as ``adhoc''. +\& ignore-punctuation Add-on All kinds of punctuation characters are +\& ignored: hyphens, periods, commas, slashes, +\& parentheses, and so on. +\& numeric-sort Auto Numbers are sorted numerically, not like +\& characters: ``V64'' appears before ``V128''. +.Ve +.Sh "Page Numbers" +.IX Subsection "Page Numbers" +.Vb 10 +\& page-ranges Default Appearances on more than two consecutive +\& pages are listed as a range: ``1--4''. +\& Turn it off with option -r. +\& ff-ranges Add-on Uses implicit ``ff'' notation for ranges +\& of three pages, and explicit ranges +\& thereafter: 2f, 2ff, 2--6. +\& ff-ranges-only Add-on Uses only implicit ranges: 2f, 2ff. +\& book-order Add-on Sorts page numbers with common book numbering +\& scheme correctly -- Roman numerals first, then +\& Arabic numbers, then others: i, 1, A. +.Ve +.Sh "Markup and Layout" +.IX Subsection "Markup and Layout" +.Vb 13 +\& tex Auto Handles basic TeX conventions. +\& latex-loc-fmts Auto Provides LaTeX formatting commands +\& for page number encapsulation. +\& latex Auto Handles LaTeX conventions, both in raw +\& index entries and output markup; implies +\& tex. +\& makeindex Auto Emulates the default MakeIndex input syntax +\& and quoting behavior. +\& latin-lettergroups Auto Layout contains a single Latin letter +\& above each group of words starting with the +\& same letter. +\& german-sty Add-on Handles umlaut markup of babel's german +\& and ngerman options. +.Ve +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +.ie n .IP """TEXINDY_AUTO_MODULE""" 4 +.el .IP "\f(CWTEXINDY_AUTO_MODULE\fR" 4 +.IX Item "TEXINDY_AUTO_MODULE" +This is the name of the xindy module that loads all auto-loaded +modules. The default is \f(CW\*(C`texindy\*(C'\fR. +.SH "AUTHOR" +.IX Header "AUTHOR" +Joachim Schrod +.SH "LEGALESE" +.IX Header "LEGALESE" +\&\fBtexindy\fR is free software; you can redistribute it and/or modify it +under the terms of the \s-1GNU\s0 General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. +.PP +This program is distributed in the hope that it will be useful, +but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of +\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the +\&\s-1GNU\s0 General Public License for more details. diff --git a/Build/source/utils/xindy/user-commands/xindy.1 b/Build/source/utils/xindy/user-commands/xindy.1 new file mode 100644 index 00000000000..066146513a5 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/xindy.1 @@ -0,0 +1,380 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "XINDY 1" +.TH XINDY 1 "2006-07-30" "Version 1.8" "xindy" +.SH "NAME" +xindy \- create sorted and tagged index from raw index +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 4 +\& xindy [-V?h] [-qv] [-d magic] [-o outfile.ind] [-t log] \e +\& [-L lang] [-C codepage] [-M module] [-I input] \e +\& [--interactive] [--mem-file=xindy.mem] \e +\& [idx0 idx1 ...] +.Ve +.Sh "GNU-Style Long Options for Short Options:" +.IX Subsection "GNU-Style Long Options for Short Options:" +.Vb 11 +\& -V / --version +\& -? / -h / --help +\& -q / --quiet +\& -v / --verbose +\& -d / --debug (multiple times) +\& -o / --out-file +\& -t / --log-file +\& -L / --language +\& -C / --codepage +\& -M / --module (multiple times) +\& -I / --input-markup (supported: latex, omega, xindy) +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBxindy\fR is the formatter-indepedent command of xindy, the flexible +indexing system. It takes a raw index as input, and produces a merged, +sorted and tagged index. Merging, sorting, and tagging is controlled +by xindy style files. +.PP +Files with the raw index are passed as arguments. If no arguments are +passed, the raw index will be read from standard input. +.PP +\&\fBxindy\fR is completely described in its manual that you will find on +its Web Site, http://www.xindy.org/. A good introductionary +description appears in the indexing chapter of the LaTeX Companion (2nd ed.) +.PP +If you want to produce an index for LaTeX documents, the command +\&\fItexindy\fR\|(1) is probably more of interest for you. It is a wrapper for +\&\fBxindy\fR that turns on many LaTeX conventions by default. +.SH "OPTIONS" +.IX Header "OPTIONS" +.ie n .IP """\-\-version""\fR / \fB\-V" 4 +.el .IP "\f(CW\-\-version\fR / \fB\-V\fR" 4 +.IX Item "--version / -V" +output version numbers of all relevant components and exit. +.ie n .IP """\-\-help""\fR / \fB\-h\fR / \fB\-?" 4 +.el .IP "\f(CW\-\-help\fR / \fB\-h\fR / \fB\-?\fR" 4 +.IX Item "--help / -h / -?" +output usage message with options explanation. +.ie n .IP """\-\-quiet""\fR / \fB\-q" 4 +.el .IP "\f(CW\-\-quiet\fR / \fB\-q\fR" 4 +.IX Item "--quiet / -q" +Don't output progress messages. Output only error messages. +.ie n .IP """\-\-version""\fR / \fB\-v" 4 +.el .IP "\f(CW\-\-version\fR / \fB\-v\fR" 4 +.IX Item "--version / -v" +Output verbose progress messages. +.ie n .IP """\-\-debug""\fR \fImagic\fR / \fB\-d\fR \fImagic" 4 +.el .IP "\f(CW\-\-debug\fR \fImagic\fR / \fB\-d\fR \fImagic\fR" 4 +.IX Item "--debug magic / -d magic" +Output debug messages, this option may be specified multiple times. +\&\fImagic\fR determines what is output: +.Sp +.Vb 6 +\& magic remark +\& ------------------------------------------------------------ +\& script internal progress messages of driver scripts +\& keep_tmpfiles don't discard temporary files +\& markup output markup trace, as explained in xindy manual +\& level=n log level, n is 0 (default), 1, 2, or 3 +.Ve +.ie n .IP """\-\-out\-file""\fR \fIoutfile.ind\fR / \fB\-o\fR \fIoutfile.ind" 4 +.el .IP "\f(CW\-\-out\-file\fR \fIoutfile.ind\fR / \fB\-o\fR \fIoutfile.ind\fR" 4 +.IX Item "--out-file outfile.ind / -o outfile.ind" +Output index to file \fIoutfile.ind\fR. If this option is not passed, the +name of the output file is the base name of the first argument and the +file extension \fIind\fR. If the raw index is read from standard input, +this option is mandatory. +.ie n .IP """\-\-log\-file""\fR \fIlog.ilg\fR / \fB\-t\fR \fIlog.ilg" 4 +.el .IP "\f(CW\-\-log\-file\fR \fIlog.ilg\fR / \fB\-t\fR \fIlog.ilg\fR" 4 +.IX Item "--log-file log.ilg / -t log.ilg" +Output log messages to file \fIlog.ilg\fR. These log messages are +independent from the progress messages that you can influence with +\&\f(CW\*(C`\-\-debug\*(C'\fR or \f(CW\*(C`\-\-verbose\*(C'\fR. +.ie n .IP """\-\-language""\fR \fIlang\fR / \fB\-L\fR \fIlang" 4 +.el .IP "\f(CW\-\-language\fR \fIlang\fR / \fB\-L\fR \fIlang\fR" 4 +.IX Item "--language lang / -L lang" +The index is sorted according to the rules of language \fIlang\fR. These +rules are encoded in a xindy module created by \fImake-rules\fR. +.Sp +If no input encoding is specified via \f(CW\*(C`\-\-codepage\*(C'\fR, a xindy module +for that language is searched with a latin, a cp, an iso, or ascii +encoding, in that order. +.ie n .IP """\-\-codepage""\fR \fIenc\fR / \fB\-C\fR \fIenc" 4 +.el .IP "\f(CW\-\-codepage\fR \fIenc\fR / \fB\-C\fR \fIenc\fR" 4 +.IX Item "--codepage enc / -C enc" +The raw input is in input encoding \fIenc\fR. This information is used to +select the correct xindy sort module and also the \fIinputenc\fR target +encoding for \f(CW\*(C`latex\*(C'\fR input markup. +.Sp +When \f(CW\*(C`omega\*(C'\fR input markup is used, \f(CW\*(C`utf8\*(C'\fR is always used as +codepage, this option is then ignored. +.ie n .IP """\-\-module""\fR \fImodule\fR / \fB\-M\fR \fImodule" 4 +.el .IP "\f(CW\-\-module\fR \fImodule\fR / \fB\-M\fR \fImodule\fR" 4 +.IX Item "--module module / -M module" +Load the xindy module \fImodule.xdy\fR. This option may be specified +multiple times. The modules are searched in the xindy search path that +can be changed with the environment variable \f(CW\*(C`XINDY_SEARCHPATH\*(C'\fR. +.ie n .IP """\-\-input\-markup""\fR \fIinput\fR / \fB\-I\fR \fIinput" 4 +.el .IP "\f(CW\-\-input\-markup\fR \fIinput\fR / \fB\-I\fR \fIinput\fR" 4 +.IX Item "--input-markup input / -I input" +Specifies the input markup of the raw index. Supported values for +\&\fIinput\fR are \f(CW\*(C`latex\*(C'\fR, \f(CW\*(C`omega\*(C'\fR, and \f(CW\*(C`xindy\*(C'\fR. +.Sp +\&\f(CW\*(C`latex\*(C'\fR input markup is the one that is emitted by default from the +LaTeX kernel, or by the \f(CW\*(C`index\*(C'\fR macro package of David Jones. +^^\-notation of single byte characters is supported. Usage of LaTeX's +\&\fIinputenc\fR package is assumed as well. +.Sp +\&\f(CW\*(C`omega\*(C'\fR input markup is like \f(CW\*(C`latex\*(C'\fR input markup, but with Omega's +^^\-notation as encoding for non-ASCII characters. LaTeX \fIinputenc\fR +encoding is not used then, and \f(CW\*(C`utf8\*(C'\fR is enforced to be the codepage. +.Sp +\&\f(CW\*(C`xindy\*(C'\fR input markup is specified in the xindy manual. +.ie n .IP """\-\-interactive""" 4 +.el .IP "\f(CW\-\-interactive\fR" 4 +.IX Item "--interactive" +Start xindy in interactive mode. You will be in a xindy read-eval-loop +where xindy language expressions are read and evaluated interactively. +.ie n .IP """\-\-mem\-file""\fR \fIxindy.mem" 4 +.el .IP "\f(CW\-\-mem\-file\fR \fIxindy.mem\fR" 4 +.IX Item "--mem-file xindy.mem" +This option is only usable for developers or in very rare situations. +The compiled xindy kernel is stored in a so-called \fImemory file\fR, +canonically named \fIxindy.mem\fR, and located in the xindy library +directory. This option allows to use another xindy kernel. +.SH "SUPPORTED LANGUAGES / CODEPAGES" +.IX Header "SUPPORTED LANGUAGES / CODEPAGES" +The following languages are supported: +.Sh "Latin scripts" +.IX Subsection "Latin scripts" +.Vb 13 +\& albanian gypsy portuguese +\& croatian hausa romanian +\& czech hungarian russian-iso +\& danish icelandic slovak-small +\& english italian slovak-large +\& esperanto kurdish-bedirxan slovenian +\& estonian kurdish-turkish spanish-modern +\& finnish latin spanish-traditional +\& french latvian swedish +\& general lithuanian turkish +\& german-din lower-sorbian upper-sorbian +\& german-duden norwegian vietnamese +\& greek-iso polish +.Ve +.PP +German recognizes two different sorting schemes to handle umlauts: +normally, \f(CW\*(C`ä\*(C'\fR is sorted like \f(CW\*(C`ae\*(C'\fR, but in phone books or +dictionaries, it is sorted like \f(CW\*(C`a\*(C'\fR. The first scheme is known as +\&\fI\s-1DIN\s0 order\fR, the second as \fIDuden order\fR. +.PP +\&\f(CW\*(C`*\-iso\*(C'\fR language names assume that the raw index entries are in \s-1ISO\s0 +8859\-9 encoding. +.PP +\&\f(CW\*(C`gypsy\*(C'\fR is a northern Russian dialect. +.Sh "Cyrillic scripts" +.IX Subsection "Cyrillic scripts" +.Vb 3 +\& belarusian mongolian serbian +\& bulgarian russian ukrainian +\& macedonian +.Ve +.Sh "Other scripts" +.IX Subsection "Other scripts" +.Vb 1 +\& greek klingon +.Ve +.Sh "Available Codepages" +.IX Subsection "Available Codepages" +This is not yet written. You can look them up in your xindy +distribution, in the \fImodules/lang/language/\fR directory (where +\&\fIlanguage\fR is your language). They are named +\&\fIvariant\-codepage\-lang.xdy\fR, where \fIvariant\-\fR is most often empty +(for german, it's \f(CW\*(C`din5007\*(C'\fR and \f(CW\*(C`duden\*(C'\fR; for spanish, it's \f(CW\*(C`modern\*(C'\fR +and \f(CW\*(C`traditional\*(C'\fR, etc.) +.PP +.Vb 1 +\& < Describe available codepages for each language > +.Ve +.PP +.Vb 2 +\& < Describe relevance of codepages (as internal representation) for +\& LaTeX inputenc > +.Ve +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +.ie n .IP """XINDY_SEARCHPATH""" 4 +.el .IP "\f(CWXINDY_SEARCHPATH\fR" 4 +.IX Item "XINDY_SEARCHPATH" +A list of directories where the xindy modules are searched in. No +subtree searching is done (as in TDS-conformant TeX). +.Sp +If this environment variable is not set, the default is used: +\&\f(CW\*(C`.:\*(C'\fR\fImodules_dir\fR\f(CW\*(C`:\*(C'\fR\fImodules_dir\fR\f(CW\*(C`/base\*(C'\fR. \fImodules_dir\fR is +determined at run time, relative to the \fBxindy\fR command location: +Either it's \fI../modules\fR, that's the case for \fIopt\fR\-installations. +Or it's \fI../lib/xindy/modules\fR, that's the case for +\&\fIusr\fR\-installations. +.ie n .IP """XINDY_LIBDIR""" 4 +.el .IP "\f(CWXINDY_LIBDIR\fR" 4 +.IX Item "XINDY_LIBDIR" +Library directory where \fIxindy.run\fR and \fIxindy.mem\fR are located. +.Sp +The modules directory may be a subdirectory, too. +.SH "KNOWN BUGS" +.IX Header "KNOWN BUGS" +Option \fB\-q\fR also prevents output of error messages. Error messages +should be output on stderr, progress messages on stdout. +.PP +There should be a way to output the final index to stdout. This would +imply \fB\-q\fR, of course. +.PP +Codepage \f(CW\*(C`utf8\*(C'\fR should be supported for all languages, and should be +used as internal codepage for LaTeX inputenc re\-encoding. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fItexindy\fR\|(1), +\&\fItex2xindy\fR\|(1) +.SH "AUTHOR" +.IX Header "AUTHOR" +Joachim Schrod +.SH "LEGALESE" +.IX Header "LEGALESE" +Copyright (c) 2004\-2006 by Joachim Schrod. +.PP +\&\fBxindy\fR is free software; you can redistribute it and/or modify it +under the terms of the \s-1GNU\s0 General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. +.PP +This program is distributed in the hope that it will be useful, +but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of +\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the +\&\s-1GNU\s0 General Public License for more details. diff --git a/Build/source/utils/xindy/user-commands/xindy.in b/Build/source/utils/xindy/user-commands/xindy.in new file mode 100644 index 00000000000..ce770275cd0 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/xindy.in @@ -0,0 +1,777 @@ +#!/usr/bin/perl +# $Id: xindy.pl,v 1.8 2006/07/30 10:30:42 jschrod Exp $ +#------------------------------------------------------------ +# (history at end) + +=head1 NAME + +xindy - create sorted and tagged index from raw index + +=head1 SYNOPSIS + + xindy [-V?h] [-qv] [-d magic] [-o outfile.ind] [-t log] \ + [-L lang] [-C codepage] [-M module] [-I input] \ + [--interactive] [--mem-file=xindy.mem] \ + [idx0 idx1 ...] + +=head2 GNU-Style Long Options for Short Options: + + -V / --version + -? / -h / --help + -q / --quiet + -v / --verbose + -d / --debug (multiple times) + -o / --out-file + -t / --log-file + -L / --language + -C / --codepage + -M / --module (multiple times) + -I / --input-markup (supported: latex, omega, xindy) + + +=head1 DESCRIPTION + +B<xindy> is the formatter-indepedent command of xindy, the flexible +indexing system. It takes a raw index as input, and produces a merged, +sorted and tagged index. Merging, sorting, and tagging is controlled +by xindy style files. + +Files with the raw index are passed as arguments. If no arguments are +passed, the raw index will be read from standard input. + +B<xindy> is completely described in its manual that you will find on +its Web Site, http://www.xindy.org/. A good introductionary +description appears in the indexing chapter of the LaTeX Companion (2nd ed.) + +If you want to produce an index for LaTeX documents, the command +texindy(1) is probably more of interest for you. It is a wrapper for +B<xindy> that turns on many LaTeX conventions by default. + + +=head1 OPTIONS + +=over + +=item C<--version> / B<-V> + +output version numbers of all relevant components and exit. + +=item C<--help> / B<-h> / B<-?> + +output usage message with options explanation. + +=item C<--quiet> / B<-q> + +Don't output progress messages. Output only error messages. + +=item C<--version> / B<-v> + +Output verbose progress messages. + +=item C<--debug> I<magic> / B<-d> I<magic> + +Output debug messages, this option may be specified multiple times. +I<magic> determines what is output: + + magic remark + ------------------------------------------------------------ + script internal progress messages of driver scripts + keep_tmpfiles don't discard temporary files + markup output markup trace, as explained in xindy manual + level=n log level, n is 0 (default), 1, 2, or 3 + +=item C<--out-file> F<outfile.ind> / B<-o> F<outfile.ind> + +Output index to file F<outfile.ind>. If this option is not passed, the +name of the output file is the base name of the first argument and the +file extension F<ind>. If the raw index is read from standard input, +this option is mandatory. + +=item C<--log-file> F<log.ilg> / B<-t> F<log.ilg> + +Output log messages to file F<log.ilg>. These log messages are +independent from the progress messages that you can influence with +C<--debug> or C<--verbose>. + +=item C<--language> I<lang> / B<-L> I<lang> + +The index is sorted according to the rules of language I<lang>. These +rules are encoded in a xindy module created by I<make-rules>. + +If no input encoding is specified via C<--codepage>, a xindy module +for that language is searched with a latin, a cp, an iso, or ascii +encoding, in that order. + +=item C<--codepage> I<enc> / B<-C> I<enc> + +The raw input is in input encoding I<enc>. This information is used to +select the correct xindy sort module and also the I<inputenc> target +encoding for C<latex> input markup. + +When C<omega> input markup is used, C<utf8> is always used as +codepage, this option is then ignored. + +=item C<--module> I<module> / B<-M> I<module> + +Load the xindy module F<module.xdy>. This option may be specified +multiple times. The modules are searched in the xindy search path that +can be changed with the environment variable C<XINDY_SEARCHPATH>. + +=item C<--input-markup> I<input> / B<-I> I<input> + +Specifies the input markup of the raw index. Supported values for +I<input> are C<latex>, C<omega>, and C<xindy>. + +C<latex> input markup is the one that is emitted by default from the +LaTeX kernel, or by the C<index> macro package of David Jones. +^^-notation of single byte characters is supported. Usage of LaTeX's +I<inputenc> package is assumed as well. + +C<omega> input markup is like C<latex> input markup, but with Omega's +^^-notation as encoding for non-ASCII characters. LaTeX I<inputenc> +encoding is not used then, and C<utf8> is enforced to be the codepage. + +C<xindy> input markup is specified in the xindy manual. + +=item C<--interactive> + +Start xindy in interactive mode. You will be in a xindy read-eval-loop +where xindy language expressions are read and evaluated interactively. + +=item C<--mem-file> I<xindy.mem> + +This option is only usable for developers or in very rare situations. +The compiled xindy kernel is stored in a so-called I<memory file>, +canonically named F<xindy.mem>, and located in the xindy library +directory. This option allows to use another xindy kernel. + +=back + + +=head1 SUPPORTED LANGUAGES / CODEPAGES + +The following languages are supported: + +=head2 Latin scripts + + albanian gypsy portuguese + croatian hausa romanian + czech hungarian russian-iso + danish icelandic slovak-small + english italian slovak-large + esperanto kurdish-bedirxan slovenian + estonian kurdish-turkish spanish-modern + finnish latin spanish-traditional + french latvian swedish + general lithuanian turkish + german-din lower-sorbian upper-sorbian + german-duden norwegian vietnamese + greek-iso polish + +German recognizes two different sorting schemes to handle umlauts: +normally, C<ä> is sorted like C<ae>, but in phone books or +dictionaries, it is sorted like C<a>. The first scheme is known as +I<DIN order>, the second as I<Duden order>. + +C<*-iso> language names assume that the raw index entries are in ISO +8859-9 encoding. + +C<gypsy> is a northern Russian dialect. + +=head2 Cyrillic scripts + + belarusian mongolian serbian + bulgarian russian ukrainian + macedonian + +=head2 Other scripts + + greek klingon + +=head2 Available Codepages + +This is not yet written. You can look them up in your xindy +distribution, in the F<modules/lang/language/> directory (where +I<language> is your language). They are named +F<variant-codepage-lang.xdy>, where F<variant-> is most often empty +(for german, it's C<din5007> and C<duden>; for spanish, it's C<modern> +and C<traditional>, etc.) + + < Describe available codepages for each language > + + < Describe relevance of codepages (as internal representation) for + LaTeX inputenc > + + + +=head1 ENVIRONMENT + +=over + +=item C<XINDY_SEARCHPATH> + +A list of directories where the xindy modules are searched in. No +subtree searching is done (as in TDS-conformant TeX). + +If this environment variable is not set, the default is used: +C<.:>I<modules_dir>C<:>I<modules_dir>C</base>. I<modules_dir> is +determined at run time, relative to the B<xindy> command location: +Either it's F<../modules>, that's the case for F<opt>-installations. +Or it's F<../lib/xindy/modules>, that's the case for +F<usr>-installations. + +=item C<XINDY_LIBDIR> + +Library directory where F<xindy.run> and F<xindy.mem> are located. + +The modules directory may be a subdirectory, too. + +=back + + +=head1 KNOWN BUGS + +Option B<-q> also prevents output of error messages. Error messages +should be output on stderr, progress messages on stdout. + +There should be a way to output the final index to stdout. This would +imply B<-q>, of course. + +Codepage C<utf8> should be supported for all languages, and should be +used as internal codepage for LaTeX inputenc re-encoding. + + +=head1 SEE ALSO + +texindy(1), +tex2xindy(1) + + +=head1 AUTHOR + +Joachim Schrod + + +=head1 LEGALESE + +Copyright (c) 2004-2006 by Joachim Schrod. + +B<xindy> is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +=for Emacs +#' + +=cut + + +use strict; + +BEGIN { + use vars qw($Revision $VERSION); + q$Revision: 1.8 $ =~ /: (\d+)\.(\d+)/ ; # q wg. Emacs indent! + my ($major, $minor) = ($1, $2); + $VERSION = "$major." . ($minor<10 ? '0' : '') . $minor; +} + + +# Some common variables. +# Determine environment. Where is our library directory, and our modules? + +use File::Basename; +our ($cmd_dir, $cmd, $lib_dir, $modules_dir); +BEGIN { + $cmd_dir = dirname($0); + $cmd = basename($0); + + # library directory + if ( $ENV{XINDY_LIBDIR} ) { + $lib_dir = $ENV{XINDY_LIBDIR}; + } elsif ( '@libdir@' ne '@libdir' . '@' ) { # GNU configure at work? + if ( -d '@libdir@/xindy' ) { # /usr style + $lib_dir = '@libdir@/xindy'; + } else { + $lib_dir = '@libdir@'; # /opt style + } + } elsif ( -f "$cmd_dir/../lib/xindy.run" ) { # /opt style + $lib_dir = "$cmd_dir/../lib"; + } elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr style + $lib_dir = "$cmd_dir/../lib/xindy"; + } else { + die "$cmd: Cannot locate xindy library directory"; + } + + # modules directory + if ( -d "$cmd_dir/../modules" ) { # /opt style + $modules_dir = "$cmd_dir/../modules"; + } elsif ( -d "$lib_dir/modules" ) { # /usr style + $modules_dir = "$lib_dir/modules"; + } else { + die "$cmd: Cannot locate xindy modules directory"; + } +} + + +# Used modules. + +use Getopt::Long qw(:config bundling); +use File::Temp qw(tempfile tmpnam); +use File::Spec; + + +# Check arguments, store them in proper variables. +# +# Do also something for backward compatibility: Check if this is an +# old-style call. If it is, we have two arguments at the end, and the +# second-to-last has the extension ".xdy". Then, call the old driver +# script with the original arguments... + +sub usage () +{ + print STDERR <<_EOT_ + +usage: $cmd [-V?h] [-qv] [-d magic] [-o outfile.ind] [-t log] \\ + [-L lang] [-C codepage] [-M module] [-I input] \\ + [--interactive] [--mem-file xindy.mem] \\ + [idx0 idx1 ...] + +GNU-STYLE LONG OPTIONS FOR SHORT OPTIONS: + + -V / --version + -? / -h / --help + -q / --quiet + -v / --verbose + -d / --debug (multiple times) + (supported: script, keep_tmpfiles, markup, level=n) + -o / --out-file + -t / --log-file + -L / --language + -C / --codepage + -M / --module (multiple times) + -I / --input-markup (supported: latex, omega, xindy) + +_EOT_ + ; + exit 1; +} + +our ($quiet, $verbose, %debug, + $outfile, $logfile, $language, @codepages, @modules, $input_markup, + $interactive, $mem_file); +$input_markup = 'latex'; +$mem_file = "$lib_dir/xindy.mem"; + +my @orig_argv = @ARGV; +parse_options(); + +if ( @ARGV == 2 ) { + if ( $ARGV[0] =~ /\.xdy$/ ) { + exec "$cmd_dir/xindy.v2", @orig_argv; + } +} + + +# This script creates temporary files. Whenever a file is created, its +# name is added to @temp_files. In an END handler, the temporary files +# are deleted. Signal handlers are set up to get proper program +# termination on user-induced signals. During program calls with +# system, SIGINT and + +our @temp_files = (); +handle_signals(); +END { + unlink (@temp_files) if ( @temp_files && ! $debug{keep_tmpfiles} ); +} + + +# Raw index handling: xindy is not able (yet?) to handle arguments +# Perl-style, so we do it instead. We gather the raw index in a +# temporary file. We also process it by the filter program it if +# wanted. Signal handlers will discard temporary files if necessary. + +our $raw_index = File::Spec->devnull; +unless ( $interactive ) { + $raw_index = create_raw_index(); # processes @ARGV + my $filter_cmd = ''; + if ( $input_markup eq 'latex' ) { + $filter_cmd = "$cmd_dir/tex2xindy"; + } elsif ( $input_markup eq 'omega' ) { + $filter_cmd = "$cmd_dir/tex2xindy -o"; + } + $raw_index = filter_index ($filter_cmd, $raw_index) + if $filter_cmd; +} + + +# Execution: Obey environment variables, create xindy start +# expression, and eventually call it. + +my $xindy_expression = xindy_expression(); # accesses global option vars +my $exit_code = call_xindy ($mem_file, $xindy_expression); + + +# Finished: exit, clean up in END handler. + +exit ($exit_code); + + +# ------------------------------------------------------------ + + +sub parse_options() { + + my (@debug); + GetOptions( + 'version|V' => sub { output_version(0); }, + 'internal-version' => sub { output_version(1); }, + 'help|h|?' => \&usage, + 'quiet|q' => \$quiet, + 'verbose|v' => \$verbose, + 'debug|d=s' => \@debug, + 'out-file|o=s' => \$outfile, + 'log-file|t=s' => \$logfile, + 'language|L=s' => \$language, + 'codepage|C=s' => \@codepages, + 'module|M=s' => \@modules, + 'input-markup|I=s' => \$input_markup, + 'interactive' => \$interactive, + 'mem-file=s' => \$mem_file, + ) + or usage(); + + # Debug option values are easier to test in a hash. Clean up trace + # level options, too. + %debug = map { $_ => 1 } @debug; + my @trace_level = grep /^level=/, @debug; + if ( @trace_level > 1 ) { + print STDERR "You can only specify one trace level.\n\n"; + exit (1); + } + delete $debug{$trace_level[0]}; + $trace_level[0] =~ s/^level=// ; + $debug{trace_level} = $trace_level[0]; + + # Check for unsupported debug option values. + my %debug_check = %debug; + foreach my $magic ( qw(script keep_tmpfiles markup trace_level) ) { + delete $debug_check{$magic}; + } + if ( %debug_check ) { + my @magic = keys(%debug_check); + print STDERR "Unsupported argument for --debug: @magic\n"; + usage(); + } + + # Script debugging implies running it verbose and not quiet. + if ( $debug{script} ) { + $verbose = 1; + $quiet = 0; + } + + # Default for the output file: first argument, with extension replaced + # by ".ind". + unless ( $outfile || $interactive ) { + if ( @ARGV == 0 ) { + print STDERR +"You need to specify --out-file if the raw index is read from standard input.\n\n"; + usage(); + } + my ($name, $path, $suffix) = fileparse ($ARGV[0], '\.[^\.]+'); + $outfile = "$path$name.ind"; + } + + # FIXME: xindy wants a log file. Really? + $logfile = File::Spec->devnull unless $logfile; + + # Modules fixup: If they have no .xdy suffix, they get one. + @modules = map { /\.xdy$/ ? $_ : "$_.xdy" } @modules; + + # Check that the input markup is known. + # omega markup implies codepage utf8. + if ( $input_markup && + $input_markup ne 'latex' && $input_markup ne 'omega' && + $input_markup ne 'xindy' ) { + print STDERR "Unsupported input markup $input_markup.\n\n"; + usage(); + } + if ( $input_markup eq 'omega' ) { + @codepages = qw(utf8); + } + +} + + + +# +# SIGNAL HANDLING +# +# FIXME: This is not good enough. We also need to kill subprocesses, +# i.e., filter or xindy, if they are running. + +# Our signal handler function just exits. Temporary files are deleted +# by the END section above. Actually, the exit code looses the +# information about the received signal, that's not good but shouldn't +# hurt either... + +sub signal_exit() { + exit (2); +} + +sub handle_signals () { + $SIG{'HUP'} = \&signal_exit; # 1 + $SIG{'INT'} = \&signal_exit; # 2 + $SIG{'QUIT'} = \&signal_exit; # 3 + $SIG{'TERM'} = \&signal_exit; # 15 +} + + + +# +# CREATION OF RAW XINDY INDEX +# + +# Handle input files Perl-style. Returns file name that contains +# concatenated input file contents. + +sub create_raw_index () { + my ($output, $outfile) = tempfile(); + push (@temp_files, $outfile); + while ( <> ) { + print $output $_; + } + close ($output); + print "concatenated xindy input file: $outfile\n" if $debug{script}; + return $outfile; +} + + +# Run a filter over raw index. Returns file name with filtered raw +# index, supposed to be in xindy input format. +# +# We assume the file names to be safe from shell meta characters since +# they were computed by File::Temp. + +sub filter_index ( $$ ) { + my ($filter, $input) = @_; + my $output = tmpnam(); + push (@temp_files, $output); + print "Running filter: $filter <$input >$output\n" if $verbose; + system "$filter <$input >$output"; + print "filtered xindy input file: $output\n" if $debug{script}; + return $output; +} + + + +# +# XINDY EXECUTION +# + +# Construct final xindy expression, from options. + +sub xindy_expression () { + my ($logging, $tracing, $trace_level); + + # Determine language module of make-rules framework. Part of the + # complexity below is from compatibility with the TLC2 + # description. We need to support the language names listed there, + # even though they are not current. In addition, the codepage + # option was introduced later and we need to guess it. This + # guesswork will often be wrong, sadly. + # + # FIXME: I didn't see all languages. What's on with gypsy and + # hausa? + if ( $language ) { + my $ld = "$modules_dir/lang"; + my $variant; + # If there is no language directory, this might be a variant. + # Language names and variants are separated by hyphens. The + # variant name "din" is an abbreviation for "din5007". The + # variant name "iso" is ignored, that is actually a codepage + # name. + # + # FIXME: Or is "iso" the variant "translit"?! + if ( ! -d "$ld/$language" ) { + $language =~ /^([^-]*)-(.*)/ ; # language name ends with 1st hyphen + if ( $2 && -d "$ld/$1" ) { # $2 is not set if the regex didn't match + $language = $1; + $variant = "$2-" unless ( $2 eq 'iso' ); + $variant =~ s/din/din5007/ ; + } + } + # Let's guess the codepage. We take any that starts with + # "latin", "cp", "iso8859", or "ascii". + @codepages = qw(latin cp iso8859 ascii) unless @codepages; + my @styles; + foreach my $cp ( @codepages ) { + @styles = glob("$ld/$language/$variant$cp*-lang.xdy"); + last if @styles; + } + unless ( @styles ) { + print STDERR "Cannot locate xindy module for language $language"; + print STDERR " in codepage $codepages[0]" if ( @codepages == 1 ); + print STDERR ".\n"; + exit (1); + } + # Extract language module name: It's the relative part after + # the module directory. Put it at the front of the list of + # needed modules. It's important that the language module is + # loaded first, it defines the sort rulesets, and subsequent + # modules shall be able to add sort rules. + unshift (@modules, substr($styles[0], length("$modules_dir/"))); + print "Found language module $styles[0]\n" if $debug{script}; + } + + # If there is more than one xindy module, construct a style file. + # This is bad, of course; xindy should handle a list of style + # files itself. + my $style_file = $modules[0]; # will be undef if @modules is not set + if ( @modules > 1 ) { + my $sf; + ($sf, $style_file) = tempfile(); + push (@temp_files, $style_file); + foreach my $module ( @modules ) { + print $sf "(require \"$module\")\n"; + } + close ($sf); + } + + $style_file = quotify($style_file); + $outfile = quotify($outfile); + $logging = ':logfile ' . quotify($logfile) if $logfile; + $tracing = ':markup-trace :on' if $debug{markup}; + $trace_level = ":trace-level $debug{trace_level}" if $debug{trace_level}; + + my $exp = <<_EOT_ +(progn + (searchpath ".:$modules_dir:$modules_dir/base") + (xindy:startup + :idxstyle $style_file + :rawindex "$raw_index" + :output $outfile + $logging + $tracing + $trace_level) + (exit)) +_EOT_ + ; + + return $exp; +} + + +# Actual xindy call. Returns exit code. + +sub call_xindy ( $$ ) { + my ($mem_file, $xindy_exp) = @_; + + my @command = ("$lib_dir/xindy.run", '-q', + '-B', $lib_dir, '-M', $mem_file, '-E', 'iso-8859-1'); + if ( $interactive ) { + print "Proposed xindy expression:\n\n$xindy_exp\n" unless $quiet; + } else { + push (@command, '-x', $xindy_exp); + } + + if ( $debug{script} ) { + print "modules directory: $modules_dir.\n"; + print "command: @command\n"; + } + + if ( $quiet && ! $interactive ) { + open (STDOUT, '>', File::Spec->devnull); + } + system @command; + if ( $? == -1 ) { + print STDERR "$cmd: Could not execute xindy kernel: $!\n"; + } elsif ( $? & 127 ) { + return 4; + } else { + return $? >> 8; + } +} + +sub output_version ( ;$ ) { # optional arg: internal-version flag + my $internal = shift; + output_xindy_release() unless $internal; + print "$cmd script version: $VERSION\n"; + my $exit_code = call_xindy($mem_file, '(xindy:startup :show-version t)'); + exit ($exit_code); +} + + +sub output_xindy_release () { + my $version = 'unknown'; + my $version_file; + if ( -f "$cmd_dir/../VERSION" ) { + $version_file = "$cmd_dir/../VERSION"; + } elsif ( -f "$lib_dir/VERSION" ) { + $version_file = "$lib_dir/VERSION"; + } + if ( $version_file ) { + if ( open(VERSION, "<$version_file") ) { + while ( $version = <VERSION> ) { + chomp ($version); + $version =~ s/\#.*// ; + $version =~ s/^\s+// ; + $version =~ s/\s+$// ; + last if $version; + } + close (VERSION); + } + } + print "xindy release: $version\n"; +} + + +# Helper function: Make a proper quoted Lisp string. + +sub quotify ( $ ) { + my $s = shift; + $s =~ s:[\\\"]:\\&1:g ; # quote double-quote and backslash + return "\"$s\""; +} + + + +#====================================================================== +# +# $Log: xindy.pl,v $ +# Revision 1.8 2006/07/30 10:30:42 jschrod +# Check if an exec() error happened and output an error message. +# (Ticket 1230801) +# +# Revision 1.7 2006/07/19 00:29:56 jschrod +# Support for omega input markup. +# +# Revision 1.6 2005/05/02 19:16:26 jschrod +# Support new RTE 2.2, built with CLISP 2.33.2, that needs -E option +# to specify the default charset. +# xindy also has proper version output in Lisp now, no need for +# workarounds in script any more. +# +# Revision 1.5 2004/11/01 22:48:51 jschrod +# Locate xindy script. +# Terminate on option error. +# Fix up version output. +# +# Revision 1.4 2004/08/05 14:10:54 jschrod +# Language variant names may have hyphens now. Language names must +# not have hyphens -- the first hyphen of the -L option argument +# separates language and variant name. +# Revision 1.3 was completely off -- I committed a copy of texindy. +# I really don't know what happened there. +# +# Revision 1.2 2004/05/26 21:30:11 jschrod +# Added POD documentation. +# +# Revision 1.1 2004/05/24 19:47:13 jschrod +# Introduce new driver script, as part of the "Companion Release". +# diff --git a/Build/source/utils/xindy/user-commands/xindy.v2.1 b/Build/source/utils/xindy/user-commands/xindy.v2.1 new file mode 100644 index 00000000000..0afda89a76e --- /dev/null +++ b/Build/source/utils/xindy/user-commands/xindy.v2.1 @@ -0,0 +1,90 @@ +.\" Copyright (c) 1996,1997 Roger Kehr +.\" See section COPYING for conditions for redistribution +.TH xindy 1L "February 1997" "Roger Kehr" "" +.de BP +.sp +.ti \-.2i +\(** +.. + +.SH NAME +xindy \- a fle\fBx\fPible \fBind\fPexing s\fBy\fPstem + +.SH SYNOPSIS +.hy 0 +.na +.TP +.B xindy +.RB "[\|" \-t "\|]" +.RB "[\|" \-l\ \fIlogfile\fP "\|]" +.RB "[\|" \-o\ \fIoutfile\fP "\|]" +.RB "[\|" \-f\ \fIfilterprog\fP "\|]" +.RB "[\|" \-L\ \fIn\fP "\|]" +.RB "[\|" \-v "\|]" +.I indexstyle rawindex + +.SH DESCRIPTION +.B xindy +is a general purpose index processor. + +.SH OPTIONS +.TP +.B "\-o \fIoutfile" +Writes the tagged index to the specified file. If omitted, the name of +the \fIrawindex\fP is used with its extension changed to \fB.ind\fP. + +.TP +.B "\-l \fIlogfile" +Writes logging information into the specified file. + +.TP +.B "\-f \fInfilterprog" +Run \fIfilterprog\fP on \fIrawindex\fP before reading. The program +must act as a filter reading from stdin and writing to stdout. + +.TP +.B "\-L \fIn" +Sets the logging level to \fIn\fI with \fIn\fI one of {1,2,3} + +.TP +.B "\-t" +Activates the \fBmarkup-trace\fP function. Writes symbolic +markup-tags to the final index which can be used to trace the markup +process. + +.TP +.B \-v +Display the version number. + +.TP +.B \-help +Show a summary of the command-line options. + +.SH "SEE ALSO" +tex2xindy(1L), +makeindex(1L), +makeindex4(1L) + +For detailed information about the format of the \fIindexstyle\fP and +the \fIrawindex\fP refer to the documentation that comes with \fBxindy\fP. + +.SH "AUTHOR" +Roger Kehr, Institut fuer Theoretische Informatik, TH-Darmstadt + +.SH COPYING +Copyright (c) 1996,1997 Roger Kehr. +.PP +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. +.PP +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. diff --git a/Build/source/utils/xindy/user-commands/xindy.v2.in b/Build/source/utils/xindy/user-commands/xindy.v2.in new file mode 100644 index 00000000000..987e37c5640 --- /dev/null +++ b/Build/source/utils/xindy/user-commands/xindy.v2.in @@ -0,0 +1,302 @@ +#!@XINDY_PERL@ +# $Id: xindy.in,v 1.14 2005/05/02 19:16:27 jschrod Exp $ +#------------------------------------------------------------ +# +# This is the old perl-frontend to the xindy indexing system. +# +# It is kept for compatibility reasons and is named xindy.v2 in +# production. Most probably, you will not want to use it any more. +# +# This code is not supported. Don't report bugs, switch to the current +# xindy script. +# + +($progname = $0) =~ s#.*/##; + +$Date = `date`; + +require "getopts.pl"; + +# $debug = 1; + +$numArgs = $#ARGV; # save number of command line arguments + +# parse for command-line options +&Getopts( "dtvnio:l:f:L:" ); + +$debug = $opt_d; + +# some debug-output +print STDERR "progname: $progname\n" if $debug; +print STDERR "\@ARGV: @ARGV\n" if $debug; +print STDERR "\$#ARGV: $#ARGV\n" if $debug; + +# +# Synopsis +# + +sub usage { + print STDERR "\n$progname\t[-t] [-v] [-o output] [-l logfile] [-f filtprg] [-L n] +\tindexstyle raw-index\n"; + print STDERR <<EOMSG; + +options: + + -t Enters tracing-mode for markup-tags. + -v Displays the current version of xindy. + -o Specifies the output-file for the tagged index. If omitted, the + name of the raw-index is taken, with its extension + substituted by \`.ind'. + -f filt Preprocess raw-index with \`filtprg' before reading. + -l file Logfile into which xindy writes useful information. + -L n Enter logging level \`n' = {1,2,3}. + +EOMSG + exit(2); +} + + +# +# These functions check for the correct installation of the base +# system. +# + +sub check_bin { + print "runfile = $runfile\n" if $debug; + if ( ! -e $runfile ) { + print "Can't find \`$runfile' !\n"; + exit(3); + } + if ( ! -x $runfile ) { + print "File \`$runfile' not executable !\n"; + exit(4); + } +} + +sub check_mem { + print "memfile = $memfile\n" if $debug; + if ( ! -e $memfile ) { + print "Can't find \`$memfile' !"; + exit(5); + } +} + +# +# This function takes a string and quotes the `"' and '\' characters +# with a leading backslash. +# +sub quote_string { + local($str) = @_; + $str =~ s#\\#\\\\#g; + $str =~ s#"#\\\"#g; + return $str; +} + +sub remove_suffix { + local($str) = @_; + $str =~ s#\.[^\.]*$##; + return $str; +} + +# +# The generic signal handler that removes temporary files if +# necessary. +# + +sub sig_catch { + unlink $tmpfile; + exit(9); +} + +sub sig_setup { + $SIG{"HUP"} = "sig_catch"; # 1 + $SIG{"INT"} = "sig_catch"; # 2 + $SIG{"QUIT"} = "sig_catch"; # 3 + $SIG{"TERM"} = "sig_catch"; # 15 + $SigHandlerSet = 1; +} + +# +# here we go... +# + +$numArgs = $#ARGV; # number of Commandline-Arguments + +if ( $numArgs eq 1 || $opt_v || $opt_i ) { # two arguments or -v,-i specified + $Idxsty = $ARGV[0]; + $Rawidx = $ARGV[1]; +} else { + &usage; +} + +print "Idxsty = $Idxsty\n" if $debug; +print "Rawidx = $Rawidx\n" if $debug; + +# Define the default xindy library directory. It should be in a +# sibling lib tree, maybe in a xindy subdirectory. Or the user may +# set XINDY_LIBDIR explicitely. + +$0 =~ m:^(.*)/[^/]*$: ; +$cmd_dir = $1 || '.'; + +# library directory +if ( $ENV{XINDY_LIBDIR} ) { + $LibDir = $ENV{XINDY_LIBDIR}; + print "XINDY_LIBDIR (from Environment) = $LibDir\n" if $debug; +} elsif ( -f "$cmd_dir/../lib/xindy.run" ) { # /opt style + $LibDir = "$cmd_dir/../lib"; +} elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr or /usr/local style + $LibDir = "$cmd_dir/../lib/xindy"; +} else { + die "Cannot locate xindy library directory"; +} +$XINDY_LIBDIR=$LibDir; +print "XINDY_LIBDIR = $XINDY_LIBDIR\n" if $debug; + +# modules directory +if ( -d "$cmd_dir/../modules" ) { # /opt style + $modules_dir = "$cmd_dir/../modules"; +} elsif ( -d "$LibDir/modules" ) { # /usr or /usr/local style + $modules_dir = "$LibDir/modules"; +} else { + die "Cannot locate xindy modules directory"; +} + +$memfile="$XINDY_LIBDIR/xindy.mem"; +$runfile="$XINDY_LIBDIR/xindy.run"; + +# Set initial searchpath +$SEARCHPATH="(searchpath \".:$modules_dir\")"; + +# Add/replace (depends on the specification) the search path according +# to the environment variable +if ( $XINDY_SEARCHPATH ne "" ) { + $SEARCHPATH="$SEARCHPATH (searchpath \"$XINDY_SEARCHPATH\")"; +} +print "SEARCHPATH = $SEARCHPATH\n" if $debug; + +if ($opt_v) { $version = ":show-version t"; } +if ($opt_t) { $tracing = ":markup-trace t"; } +if ($opt_n) { $try = 1; } +if ($opt_c) { $compile = "on"; } +if ($opt_i) { $interactive = "on"; } +if ($opt_m) { $memfile = $opt_m; } +if ($opt_o) { $output = $opt_o; } +if ($opt_f) { $filtprg = $opt_f; } +if ($opt_l) { $logfile = $opt_l; } +if ($opt_L) { $level = $opt_L; } + +# Now check if everything is present. + +if ( ! $try ) { + &check_bin; + &check_mem; +} + +$xindy_run = "$runfile -B $XINDY_LIBDIR -q -M $memfile -E iso-8859-1"; +print "xindy_run = $xindy_run\n" if $debug; + +# Run xindy interactive if this was specified via -i. +if ( $interactive ) { + print "$xindy_run\n" if $debug; + exec "$xindy_run"; +} + +# If specified via -v start xindy for showing the version-message. +if ( $version ) { + print "$xindy_run -x \"(progn (xindy:startup $version) (exit))\"" if $debug; + exec "$xindy_run -x \"(progn (xindy:startup $version) (exit))\""; +} + +# Quote the filenames, such that LISP can read it. +$Idxsty = "e_string($Idxsty); +$Rawidx = "e_string($Rawidx); + +# If no output-file was specified +if ( ! $output ) { + # remove the suffix, if one exists + $output = &remove_suffix($Rawidx); + # append suffix ".ind" + $output = "e_string("$output.ind"); +} + +# Run the intermediate filter if specified via -f. +if ( $filtprg ) { + # create tmpfile + $tmpfile = "/tmp/xindy.$$"; + &sig_setup; # setup signal handler for cleanup + print "Running filter: $filtprg < $Rawidx > $tmpfile\n"; + system "$filtprg < $Rawidx > $tmpfile"; + print "Finished running filter.\n\n"; + $Rawidx = "e_string($tmpfile); +} + +# Prepare logfile option. +if ( $logfile ) { + $logfile = ":logfile \"" . "e_string($logfile) . "\""; +} + +# Prepare trace-level. +if ( $level ) { + $logging = ":trace-level $level"; +} + +# This is the complete LISP-SEXP needed to start the system. +$xindy_cmd = "-x '(progn + $SEARCHPATH + (xindy:startup :idxstyle \"$Idxsty\" + :rawindex \"$Rawidx\" + :output \"$output\" + $logfile $version $tracing $logging) + (exit))'"; + + +# Run program and do final cleanup + +if ( $try ) { + print "$xindy_run $xindy_cmd"; +} else { + if ( $SigHandlerSet ) { + system "$xindy_run $xindy_cmd"; + unlink $tmpfile; + } else { + exec "$xindy_run $xindy_cmd"; + } +} + + +#---------------------------------------------------------------------- +# +# $Log: xindy.in,v $ +# Revision 1.14 2005/05/02 19:16:27 jschrod +# Support new RTE 2.2, built with CLISP 2.33.2, that needs -E option +# to specify the default charset. +# xindy also has proper version output in Lisp now, no need for +# workarounds in script any more. +# +# Revision 1.13 2004/05/24 19:52:02 jschrod +# Pass -B option to CLISP. +# Change might be from Thomas Henlich <henlich@mmers1.mw.tu-dresden.de>, +# made at 1999-12-22. +# +# Revision 1.12 2004/05/24 19:47:13 jschrod +# Introduce new driver script, as part of the "Companion Release". +# +# Revision 1.11 1999/09/23 07:22:39 kehr +# Fixed an exit code problem reported by Peter Meszaros +# <pmeszaros@effice.hu>. +# +# Revision 1.10 1998/03/12 10:58:21 kehr +# Fixed bug with -f option. +# +# Revision 1.9 1997/04/03 13:23:51 kehr +# Many bugs fixed during testing. +# +# Revision 1.8 1997/04/03 09:38:54 kehr +# First check-in of the rewritten xindy script. The former shell-script +# has now been replaced by a perl-script. +# + +# Local Variables: +# mode: perl +# End: |