5

I use makeindex for 25 years and I know it isn't perfect. Since xindy is now available also for MiKTeX, I would be happy to switch to this more modern and flexible index processor. Now, I'm looking for a way to make legacy documents work with xindy.

For makeindex, I use a simple style file german.ist which changes actual, quote and level to operate with umlauts in babel:

actual '='
quote  '!'
level  '>'

I need to keep these changes also for xindy since I have a plethora of documents and macros which rely on these settings.

Here is a MWE of a working document with makeindex:

% compiled with pdflatex
\begin{filecontents*}{german.ist}
actual '='
quote  '!'
level  '>'
\end{filecontents*}

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}

\usepackage[makeindex]{imakeidx}
\makeindex[options=-s german.ist -g]

\begin{document}
Test
\index{a}\index{b}\index{"a}\index{"u}
\index{Bart}
\index{B"uro}
\index{Brause>gr"un}
\index{Bach}
\index{Ma"s}
\index{Burg=\textbf{Burg}}
\index{Buch|textbf}
\index{B"arte}
\index{B"ose}
\index{Brause>gelb}
\index{Blind}
\index{Brause}
\index{B"acker}
\printindex
\end{document}

This gives: enter image description here

Now, I tried to adapt this example for xindy:

% compiled with pdflatex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}

\usepackage[texindy]{imakeidx}
\makeindex[options=-L german-duden -C latin1]

\begin{document}
Test
\index{a}\index{b}\index{"a}\index{"u}
\index{Bart}
\index{B"uro}
\index{Brause>gr"un}
\index{Bach}
\index{Ma"s}
\index{Burg=\textbf{Burg}}
\index{Buch|textbf}
\index{B"arte}
\index{B"ose}
\index{Brause>gelb}
\index{Blind}
\index{Brause}
\index{B"acker}
\printindex
\end{document}

Here, a counterpart of german.ist is missing. I get the following:

enter image description here

Could somebody help me to get the correct xindy configuration for this example?

  • 3
    Imho it is not possible (without recompiling xindy) to change the actual and quote character. Sadly xindy isn't perfect either. There are open problems regarding utf8, hyperref and the input. So probably you will have to preprocess the index argument before xindy sees it. E.g. xindy needs \index{B""uro} so you could do something equivalent to \appto\@sanitize{\shorthandon{"}\def"{\string"\string"}} – Ulrike Fischer Jul 27 '15 at 08:31
  • 1
    @UlrikeFischer That is a pity. I had my fears about that, because I did not find anything before I asked the question. Currently, I also preprocess the index for makeindex to use 'real' umlauts and I hoped to get rid of that. Maybe, I better stay with makeindex for a while. – Thomas F. Sturm Jul 27 '15 at 08:51
  • http://xindy.sourceforge.net/doc/faq-1.html, section 1.3. Our idx files are at first parsed by the program tex2xindy, that cannot be configured with different input specifiers. They say that you can modify the tex2xindy.l file and (easily?) compile it again. I don't know how to do that... – Francesco Endrici Sep 05 '15 at 09:10

0 Answers0