[OS X TeX] Ordering index entries

Luis Sequeira lfsequeira at gmail.com
Thu Apr 9 21:23:55 CEST 2015


The makeidx package allows you to decide how a given index entry is sorted. 
This is done with a syntax like 

 \index{how at what}

(in that the key entered into the index is “what” but it appears in the alphabetical order corresponding to “how”)

The default order is alphabetical, so I think you meant “numerical”, but here is a way you can easily sort numerically:

\index{Base (of a numeral)!base 04 at base 4}
 \index{Base (of a numeral)!base 06 at base 6}
 \index{Base (of a numeral)!base 10 at base 10}
 \index{Base (of a numeral)!base 60 at base 60}

This will show:

Base (of a numeral)
	base 4, …
        base 6, …
 	base 10, …
	base 60, …

as you require, by using “base 04” “base 06” “base 10” and “base 60” to do the ordering.

Luis Sequeira


> Hi, everyone.
> 
> I'm sorry to ask here, but my Web search was not fruitful.
> 
> I have the following index entries in my document:
> 
>  \index{Base (of a numeral)!base 4}
>  \index{Base (of a numeral)!base 6}
>  \index{Base (of a numeral)!base 10}
>  \index{Base (of a numeral)!base 60}
> 
> but in the Index it appears as
> 
>  Base (of a numeral)
>       base 10, 18
>       base 4, 8
>       base 6, 5
>       base 60, 16, 18
> 
> I use  makeindex.  How can I get "base 10" to appear in between "base 6" and "base 60" so that it is listed "alphabetically"?
> 
> Thanks in advance.
> 
> ---John.
> (I receive the digest)



More information about the macostex-archives mailing list