-% evil hack to enable command expansion in \index
-% \makeatletter
-% \def\makeindex{%
-% \newwrite\@indexfile
-% \immediate\openout\@indexfile=\jobname.idx
-% \def\index{\@bsphack\begingroup
-% \@sanitize
-% \@wrindex} \typeout
-% {Writing custom index file \jobname.idx}%
-% \let\makeindex\@empty
-% }
-% \def\@wrindex#1{%
-% \edef\@wrindex@params{#1}%
-% \protected@write\@indexfile{}%
-% {\string\indexentry{\@wrindex@params}{\thepage}}%
-% \endgroup\@esphack}
-% \def\T1{\@empty} % someone needs this... don't know why
-% \let\@origindex\index
-% \renewcommand{\index}[1]{\expandafter\@origindex{#1}}
-% \def\index#1{\expandafter\@datrueindex{#1}\typeout{new index used}}
-% \makeatother