texindy - create sorted and tagged index from raw LaTeX index


texindy [-V?h] [-qv] [-iglr] [-d magic] [-o outfile.ind] [-t log] \ [-L lang] [-C codepage] [-M module] [idx0 idx1 ...]

3. 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)


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 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.

texindy is an approach to merge support for the 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/.


--version\fR / \fB-V 4 output version numbers of all relevant components and exit.

--help\fR / -h / \fB-? 4 output usage message with options explanation.

--quiet\fR / \fB-q 4 Don't output progress messages. Output only error messages.

--verbose\fR / \fB-v 4 Output verbose progress messages.

--debug\fR magic / -d \fImagic 4 Output debug messages, this option may be specified multiple times. magic determines what is output: .Sp magic remark ------------------------------------------------------------ script internal progress messages of driver scripts keep_tmpfiles don\*(Aqt discard temporary files markup output markup trace, as explained in xindy manual level=n log level, n is 0 (default), 1, 2, or 3

--out-file\fR outfile.ind / -o \fIoutfile.ind 4 Output index to file 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 ind. If the raw index is read from standard input, this option is mandatory.

--log-file\fR log.ilg / -t \fIlog.ilg 4 Output log messages to file log.ilg. 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.

--language\fR lang / -L \fIlang 4 The index is sorted according to the rules of language lang. These rules are encoded in a xindy module created by make-rules. .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.

--codepage\fR enc / B <-C> \fIenc 4 The raw input is in input encoding enc. This information is used to select the correct xindy sort module and also the inputenc 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.

--module\fR module / -M \fImodule 4 Load the xindy module 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 \f(CW\*(C`XINDY_SEARCHPATH\*(C'\fR.

--input-markup\fR input / -I \fIinput 4 Specifies the input markup of the raw index. Supported values for input 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 inputenc 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 inputenc encoding is not used then, and \f(CW\*(C`utf8\*(C'\fR is enforced to be the codepage for sorting.


The following languages are supported:

7. 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, \f(CW\*(C`a\*:\*(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 DIN order, the second as Duden order.

\f(CW\*(C`*-iso\*(C'\fR language names assume that the raw index entries are in ISO 8859-9 encoding.

\f(CW\*(C`gypsy\*(C'\fR is a northern Russian dialect.

8. Cyrillic scripts

belarusian mongolian serbian bulgarian russian ukrainian macedonian

9. Other scripts

greek klingon

10. Available Codepages

This is not yet written. You can look them up in your xindy distribution, in the modules/lang/language/ directory (where language is your language). They are named variant-codepage-lang.xdy, where variant- 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.)

< Describe available codepages for each language > < Describe relevance of codepages (as internal representation) for LaTeX inputenc >


There is a set of 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 texindy option. Others may be specified as \f(CW\*(C`--module\*(C'\fR argument to achieve a specific effect.

xindy Module Category Description

12. Sorting

word-order Default A space comes before any letter in the alphabet: \`\`index style\*(Aq\*(Aq is listed before \`\`indexing\*(Aq\*(Aq. Turn it off with option -l. letter-order Add-on Spaces are ignored: \`\`index style\*(Aq\*(Aq is sorted after \`\`indexing\*(Aq\*(Aq. 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\*(Aq\*(Aq is sorted as \`\`adhoc\*(Aq\*(Aq. 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\*(Aq\*(Aq appears before \`\`V128\*(Aq\*(Aq.

13. Page Numbers

page-ranges Default Appearances on more than two consecutive pages are listed as a range: \`\`1--4\*(Aq\*(Aq. Turn it off with option -r. ff-ranges Add-on Uses implicit \`\`ff\*(Aq\*(Aq 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.

14. 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\*(Aqs german and ngerman options.


xindy does not claim to be completely compatible with MakeIndex, that would prevent some of its enhancements. That said, we strive to deliver as much compatibility as possible. The most important incompatibilities are

4 For raw index entries in LaTeX syntax, \f(CW\*(C`\index{aaa|bbb}\*(C'\fR is interpreted differently. For MakeIndex \f(CW\*(C`bbb\*(C'\fR is markup that is output as a LaTeX tag for this page number. For xindy, this is a location attribute, an abstract identifier that will be later associated with markup that should be output for that attribute. .Sp For straight-forward usage, when \f(CW\*(C`bbb\*(C'\fR is \f(CW\*(C`textbf\*(C'\fR or similar, we supply location attribute definitions that mimic MakeIndex's behaviour. .Sp For more complex usage, when \f(CW\*(C`bbb\*(C'\fR is not an identifier, no such compatibility definitions exist and may also not been created with current xindy. In particular, this means that by default the LaTeX package \f(CW\*(C`hyperref\*(C'\fR will create raw index files that cannot be processed with xindy. This is not a bug, this is the unfortunate result of an intented incompatibility. It is currently not possible to get both hyperref's index links and use xindy. .Sp A similar situation is reported to exist for the \f(CW\*(C`memoir\*(C'\fR LaTeX class. .Sp Programmers who know Common Lisp and Lex and want to work on a remedy should please contact the author.

4 The MakeIndex compatibility definitions support only the default raw index syntax and markup definition. It is not possible to configure raw index parsing or use a MakeIndex style file to describe output markup.


TEXINDY_AUTO_MODULE 4 This is the name of the xindy module that loads all auto-loaded modules. The default is \f(CW\*(C`texindy\*(C'\fR.


Joachim Schrod


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.