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.

My index does not become ordered correctly:

An incorrectly sorted index

As you can see, the keyword "fluid" ends up in the beginning of the index instead of right before "fluid flux", where it should be. What can possibly cause this behavior?

share|improve this question
1  
Could you make a MWE and post it. A good way to do so is to make a copy of your file, and then start stripping it down until it exhibits the behaviour you're describing –  cmhughes Jun 13 '12 at 15:34
add comment

1 Answer 1

up vote 3 down vote accepted

I found out that there are two possible reasons (at least) for this behavior:

  1. An invisible character (like a space) has accedentally been before the first letter of the key, which causes the index key to be sorted differently, or
  2. A value that the index key should be sorted by has specified. This can be useful when the index key contains characters which may not have a well defined sorting order but resembles a character that does. (see Controlling sorting)

In this case, I had accidentally put a space before the index key.

share|improve this answer
1  
If you use the -c command line option for makeindex, leading spaces will be ignored and multiple spaces will be compressed. –  egreg Jun 13 '12 at 16:20
    
@egreg -- thanks! (learn something new every day.) i can think of reasons (that i think are good ones) to want to use explicit multiple/initial/terminal spaces, but if i think some more about the problem, i can probably come up with alternatives, allowing this to be the default. –  barbara beeton Jun 13 '12 at 16:34
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.