Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
\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
add comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
1  
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@:}, … –  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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.