Is it possible to get makeindex to sort A>B>a instead of A>a>B? I'm using nomencl.sty both with and without prefixes; I've also tried setting the prefix to '+' or '=' instead of 'a' to no avail.
I can get symbols to sort ahead of all other characters, but I can't get capital letters grouped ahead of small ones.
What it looks like now:
\Gamma
\Pi
\pi
A
a
B
b
...
What I'd like:
\Gamma
\Pi
\pi
A
B
...
a
b
...
Any suggestions?
MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ Case sensitive sorts with makeindex
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Case sensitive sorts with makeindex
Could be difficult in the best case. You may try Xindy as an alternative. For Windows it is only included in the TeX Live distribution at the moment. I don't know if the upcoming version 2.8 of MiKTeX will come with it.
Best regards
Thorsten
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Case sensitive sorts with makeindex
I figured out how to get it to work with minimal effort:
Declare symbols via
Declare upper case letters via
Declare lower case letters via
This way, the first letter of each is *, +, or - (which are sorted in that order due to their ASCII codes).
For those that use VIM, the following commands are handy for updating the upper and lower case letters:
You'll have to do the symbols manually, since those don't typically have a sorting argument (e.g., [c]). I used optional arguments like [*H], [*Y], etc. to ensure that \Psi ([*Y]) gets sorted after \Theta ([*H]).
Working example:
which produces the order
\Gamma
\Omega
\Psi
A_A
A_a
B_a
a_a
This seems to solve the problem adequately.
Declare symbols via
Code: Select all
\nomenclature[*C]{$\Gamma$}{blah}
Code: Select all
\nomenclature[+C]{$C$}{blah}
Code: Select all
\nomenclature[-c]{$c$}{blah}
For those that use VIM, the following commands are handy for updating the upper and lower case letters:
Code: Select all
%s/\(nomenclature\[\)\([A-Z]\)/\1+\2/
%s/\(nomenclature\[\)\([a-z]\)/\1-\2/
Working example:
Code: Select all
\nomenclature[-aa]{$a_a$}{asntoehu}%
\nomenclature[*C]{$\Gamma$}{asnteohu}%
\nomenclature[*H]{$\Omega$}{asnteohu}%
\nomenclature[+Aa]{$A_a$}{asontehu}%
\nomenclature[+AA]{$A_A$}{santoehu}%
\nomenclature[+Ba]{$B_a$}{asntoehu}%
\nomenclature[*Y]{$\Psi$}{asnteohu}%
\Gamma
\Omega
\Psi
A_A
A_a
B_a
a_a
This seems to solve the problem adequately.