We're using the index
package in order to get several indexes (name index, subject index, language index), and we're basically happy with it. There's only one obstinate problem: index
does not propagate footnote numbers as desired, unlike makeidx
(which doesn't support multiple indexes though):
\documentclass{scrbook}
\usepackage{index}
\usepackage{hyperref}
\def\fn#1#2{%
\hyperpage{#2}n#1%
}%
\newcommand{\is}[1]{\if@noftnote%
\index{#1}%
\else%
\index{#1|fn{\thefootnote}}%
\fi%
}
\makeindex
\begin{document}
\footnote{First footnote.}
\footnote{Second footnote.\is{inside second footnote}}
\footnote{Third footnote.}
\printindex
\end{document}
This outputs inside second footnote, 1n3
instead of inside second footnote, 1n2
. Hence, \thefootnote
seems to be expanded at the very end, and not immediately in the footnote.
Any suggestions how to do it right with index
?