Next Previous Contents

3. xindy and LaTeX

3.1 What is tex2xindy?

tex2xindy is a filter that parses `.idx' or similar files and converts the \indexentry macros into a form readable by xindy.

The parser of makeindex can be configured to recognize different quoting characters, etc. (see the man-page for makeindex, section input style specifiers for further details). We have tried to extract the parser from makeindex but due to several probems we have finally rewritten the parser using lex. Scanners written with lex are usually fixed to a specific character set used in the regular expressions. Our parser, tex2xindy is therefore not configurable. If one uses a different configuration of the makeindex input style specifiers, one can change the source (tex2xindy.l) to generate a completely new parser. From our personal experience we have rarely used more than two different parsers in practice so we have written tex2xindy in a form that is easily maintainable. The input specifiers are stored symbolically in the source. The definiton section looks like this:

KEYWORD  \\indexentry
ENCAP    \|
LEVEL    !
QUOTE    \"
ROPEN    \(

These definitions are essentially the input style specifiers as can be found in the man-page of makeindex. Changing this section according to your needs and recompiling tex2xindy should be an easy task. Maybe we will include more pre-defined parsers in future releases if necessary.

3.2 What LaTeX-package should I use in conjunction with xindy?

We strongly recommend using the LaTeX2e-package index written by David M. Jones, which is available at CTAN. It supports multiple indexes as well as several shortcuts to easily index terms in a document. Multiple indexes support the generation of several indexes for one document. For instance, one can make an author or command index in addition to a global index.

Another option is to use the xindy.sty from Andreas Schlechte that comes with the xindy distribution. Take a look at the contrib directory that should contain a version.

Next Previous Contents