[Tex/LaTex] MakeIndex fails to sort index keys properly

indexingsorting

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?

Best Answer

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.