# Index ordering when using math symbols

I'm making an index where certain entries start with the math symbols $k$, $\mathcal{C}$, $\ast$-a.... In the first two cases, I want them to appear in the index as if they start with k and c respectively. In the last case I want the index to ignore $\ast$- and treat the word as if it begins with the letter a.

How might I go about doing that?

-
\index{k@$k$} and \index{c@$\mathcal{C}$} –  egreg Aug 22 '12 at 13:28
@egreg: why don't you post this as an answer? –  canaaerus Aug 22 '12 at 13:29

you need to give these entries a sort field. you've actually chosen the easiest approach, sorting them in with the alphabetic entries. egreg has provided good examples for the first two:

\index{k@$k$} and \index{c@$\mathcal{C}$}

my suggestion for the * is

\index{a sterisk@$\ast$

including a space after the a to make sure it sorts at the beginning.

i've been compiling a set of notes on how to prepare a "clean" index, presenting tactics for avoiding all the problems i've seen in my experience as author technical support for the ams; when it's ready for general consumption, it will be posted on the ams web site for general reference, and i'll update this answer with a link.

-
Makeindex knows a section for symbols before the letter A. Therefore I would start the sort key with a symbol, if the symbols should be sorted in the symbol section: \index{$asterisk@$\ast$}, \index{$colon@:}, &hellip; –  Heiko Oberdiek Aug 22 '12 at 13:52
@HeikoOberdiek -- yes, there is such a section, but it's up to the author to decide where s/he wants symbols to go. authors sometimes decide to put symbols in a second, separate, index, rather than having them lumped together in a separate section at the top of the main index. even so, the ordering depends entirely on how the index entries are input. (makeindex just does a raw ascii sort, which is not intuitive in the case of symbols.) if you've ever been faced with two pages of apparently randomly ordered symbol entries, you'll appreciate the problem. –  barbara beeton Aug 22 '12 at 14:32
This worked, thank you! –  Eivind Dahl Aug 22 '12 at 15:04