I'm trying to create an index that preserves the font families used in the body of the document. For example, the keyword AlphaClass appears in Typewriter in the body of the document, and the corresponding entries in the index should be
where AlphaClass is in Typewriter and parameters is in Roman.
\index{AlphaClass@texttt{AlphaClass}}
generates the entry for page 20, and
\index{AlphaClass@texttt{AlphaClass}!parameters}
generates the entry for page 25.
BUT the index looks like this:
Code: Select all
AlphaClass, 20
AlphaClass
parameters, 25
Both "AlphaClass"es are in Typewriter, and "parameters" is in Roman, but sorting is not correct. How can I fix this?