# How to transmit german umlauts to an index created by splitidx?

I'm currently trying to transmit German umlauts in index entries (e.g., \sindex[p]{Böll, Heinrich}) to the index created by splitidx. Right now, to sort the entries the right way, the umlauts are redefined by \def Ä{"A} etc. (see below).

But now - which commands to tell TeXnicCenter to print the umlauts correctly after sorting them? At the moment entries appear as Boll, Heinrich and not as Böll, Heinrich. Are anyone able to support a motivated, but still incompetent LaTeX user?

\documentclass{scrbook}
%...

\usepackage[ngerman]{betababel}
\usepackage[ansinew]{inputenc}

\shorthandon{"}

\AtBeginDocument{%
\def Ä{"A}%
\def Ö{"O}%
\def Ü{"U}%
\def ä{"a}%
\def ö{"o}%
\def ü{"u}%
\def ß{"s}%
\def \~n{"n}%
}
\shorthandoff{"}

\usepackage[makeindex,split,idxcommands]{splitidx}
\newindex[Personenverzeichnis]{p}
\newindex[Sachregister]{s}

\frontmatter
%...
\mainmatter

Der Schriftsteller Heinrich Böll\sindex[p]{Böll, Heinrich} gilt zu unrecht als der \ldots

\appendix
\printindex*
\end{document}

-
You can indent your code by 4 spaces to format it. Or use the code icon. –  Sigur Apr 14 '13 at 18:24
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. –  Claudio Fiandrino Apr 14 '13 at 18:34
This is not in issue of both splitindex and TeXnicCenter, but of makeindex! Although: Which version of TeXnicCenter do you use? –  Speravir Apr 14 '13 at 20:12
There is no need for such an redefinition. –  Marco Daniel Apr 14 '13 at 20:15

I cannot see it with the utf8 encoding:

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

\usepackage[makeindex]{splitidx}
\newindex[Personenverzeichnis]{p}
\newindex[Sachregister]{s}

\begin{document}
Der\sindex[p]{Äro, Willi} Schriftsteller Heinrich Böll\sindex[p]{Böll, Heinrich}
gilt\sindex[p]{Boa, Heinz} zu unrecht als der \ldots
\sindex[p]{Boll, Willi}\sindex[s]{Æro, Heinrich}\sindex[s]{Aro, Will}\sindex[s]{Äro, Ernst}
\appendix

\printsubindex*

\end{document}


I run

pdflatex <file>
splitindex <file>
pdflatex  <file>

-
Thanks! It doesn't seem to work with polyglossia under xelatex, though. Any advice? –  Timm Apr 29 at 16:47

Perhaps not exactly the answer, but it would solve your issue. You can use the built-in ability of makeindex to have a sorting entry and a display entry, in that form:

\sindex[p]{boll heinrich@Böll, Heinrich}


where boll heinrich will be used for sorting, and Böll, Heinrich for printing. This way, you can add formating too if you want :

\sindex[p]{boll heinrich@\textsc{Böll, Heinrich}}


for instance. And I think you would'nt need to redefine the Umlauts anymore.

-