# Why do you need (to use) texindy (to call xindy) when you want to use xindy?

If I replace the word texindy with xindy in the following answer the code compiles and produces same output (at least using TeXShop). texindy is there for a reason, and at least one expert uses it instead of using xindy directly. (See the comments after the answer.)

What can go wrong (in what situations) if I use xindy directly without using texindy to call it?

-

Here's an excerpt from the xindy man page (boldface and italics in the original (formatted) source):

xindy is the formatter-independent 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. ...

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 xindy that turns on many LaTeX conventions by default.

I interpret this as indicating that whereas xindy is (largely) formatter-independent, texindy is better suited for use with LaTeX documents since it knows about LaTeX's formatting-related and other conventions.

Of course, for sufficiently simple LaTeX documents and indexation requirements, the output of the two commands may well be indistinguishable. Not knowing how complicated your LaTeX document is, it's not possible to answer your question as to what "might go wrong" if you used xindy instead of texindy. For more information on the xindy and texindy commands, see the respective man pages -- which can be brought up, say, via texdoc xindy and texdoc texindy.

-
Thanks. It would be nice to see at least one counterexample. –  Sony Jan 2 '12 at 19:05
The last version of imakeidx has a realxindy option; unfortunately we decided at the beginning to make xindy as a synonym for texindy, which was a bad decision. :( –  egreg May 8 '13 at 15:52
I think xindy cannot read idx files, it's input format is based on lisp. AFAIK, texindy calls tex2xindy which convert LaTeX index format to format xindy understands and then it call xindy with some supporting modules –  michal.h21 May 8 '13 at 15:56