\documentclass{book}
\usepackage{multind}\ProvidesPackage{multind}
\makeindex{first} \makeindex{second}
\begin{document}
test\index{first}{test}, some text test 2\index{second}{test 2} some text.
\indextext{I want this text above the title of the first index.}
\printindex{first}{First Index}
\printindex{second}{Second Index}
\end{document}
But I got the same text in both indices. So, how to restrict it to the first index only?
\documentclass{book}
\usepackage{multind}
\usepackage{etoolbox}
\newcommand*{\indextext}{text above the title of the first index\par}
\patchcmd{\printindex}{\Large\bf}{\indextext\Large\bf}{}
\makeindex{first} \makeindex{second}
\begin{document}
test\index{first}{test}, some text test 2\index{second}{test 2} some text.
\printindex{first}{First Index}
\renewcommand*{\indextext}{}
\printindex{second}{Second Index}
\end{document}
most modern TeX installation use E-TeX. Which TeX are you using?
Zoran S wrote:But I found another solution.
how did you make it? It would be great if you would post it here. People are usually googling for solutions and may get here with a similar problem. If people would always just find "found it", "fixed it", without the actual solution, they might feel disappointed.
You re correct about old version of MikTex. I had 2.2, today I upgrade it to 2.9. I also did not fix the problem correctly (in my way). I have just putted
printindex{first{First Index\\ \bigskip
\footnotesize{text above the title}}
This works unless I want to insert the title into the toc.
Now, I returned to your solution. It works in your simple example, but does not in my file. After I applied it I received the message:
! Latex Error: Command \indextext already defined
My documentclass is cambridge7A. If I rename \indextext to \indextextA, it compiles regularly, but does not produce the text above the title. In fact, what do I need is the text below the the title of the first index.