According to Xindy revisited: Multi-lingual index creation for the UTF-8 age (TUGboat), “if one has a raw index file that was produced by [XeTeX], one can use xindy; it will ‘just work’.”
Unfortunately I can't get it to “just work”. How can I use Xindy together with XeLaTeX or LuaLaTeX?
An example LaTeX file:
\documentclass{article}
\makeindex
\begin{document}
start
\index{a}\index{b}\index{ä}\index{ü}
end
\end{document}
The LaTeX Companion (2ed) then tells me to run
texindy -L german-duden test.idx
However when I do this all umlauts are sorted under O.
Best Answer
Based on Ulrike's answer, here is one way to invoke
xindy
to get it to sort.idx
files created by Xe/LuaLaTeX. The trick is to usexindy
directly (instead oftexindy
) and pass the-C utf8
flag.Minimal Example
Compilation
In
(pdf)latex
you can use UTF-8 encoding and xindy in the following way:And then simply run
texindy -L ⟨language⟩ ⟨filename⟩.idx
.In LuaTeX you can also use the
luainputenc
package to use legacy encodings.Again, run
texindy -L ⟨language⟩ ⟨filename⟩.idx
.Here the result for both examples: