Like bombcar, I am creating a hymnal using LaTeX and lilypond-book, and I have a working template with autogenerated index of songs using the code above in this thread. But now I'm getting greedy, and I'd like to see if I can use the multind package to create multiple indices for song title, tune title, composer name, text author name, even song meter.
I tried minimally altering the above examples by changing:
Code: Select all
\makeatletter
\newcommand{\makesongs}{%
\makeindex
\bgroup
\def\indexsection\numberline##1##2\endindexsection{%
\protected@write\@indexfile{}{\string\indexentry{##2}{##1}}}%
\def\contentsline##1##2##3{\indexsection##2\endindexsection}%
\@input@{\jobname.toc}%
\egroup
}
Code: Select all
\makeatletter
\newcommand{\makesongs}{%
\makeindex{titles}
\bgroup
\def\indexsection\numberline##1##2\endindexsection{%
\protected@write\@indexfile{}{\string\indexentry{##2}{##1}}}%
\def\contentsline##1##2##3{\indexsection##2\endindexsection}%
\@input@{\jobname.toc}%
\egroup
}