I am using LyX to write a report. The nomenclature is divided in groups. Within the "Roman Symbols" group the entries which start with math are sorted before all the non-math entries. See the image at the end of the question.

For example, the entry below should be sorted with the "R"s.


Starting with the second to last entry, the sorting works fine. After many correctly sorted entries (not shown in the image), the last two entries (also not shown) are out of place. They should be sorted with the "D"s. They are written below.



I have tried the solution here: Make nomenclature sort math correctly

This did not work for me. It might be because I use nomgroups. I do not know. Any ideas? Thanks.

I have written the preamble and the nomenclature entries for the file below. I am rather new to LaTeX so let me know if you need me to post more information.


% Preview source code

%% LyX 2.1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.


% the following is useful when we have the old nomencl.sty package
 breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=true]
\hypersetup{pdftitle={Title Here},
 pdfauthor={Author Here},
 pdfsubject={Subject Here},
 pdfkeywords={Keywords Here},


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

%For matlab2tex support

%For nomenclature
  \ifstrequal{#1}{R}{Roman Symbols}{%
  \ifstrequal{#1}{G}{Greek Symbols}{%
  \ifstrequal{#1}{X}{Other Symbols}{}}}}}]%



Nomenclature Entries:


%Roman Symbols (Sort as R)

%With math








\nomenclature[R]{$\left\Vert u_{i}\right\Vert $}{Ve}


\nomenclature[R]{$\left\Vert \overline{u}_{i}\right\Vert $}{Ave}




%Without Math



enter image description here

2 Answers 2


Nomenclature package pastes your prefix and entry to form the sorting label. Since $\Delta$ starts with backslash, makeindex sorts the entry \nomenclature[R]{${\Delta}Z_0$}{Lig} as R${\Delta$}, and the entry \nomenclature[R]{$D$}{Letter D} as R$D$. If you want \Delta to be sorted as D, use \nomenclature[R$D$]{${\Delta}Z_0$}{Lig} as well as \nomenclature[R$D$]{$\mathbf{C}$}{DM}, \nomenclature[R$A$]{$\tilde{A}$}{DM} etc.

In general if your math entry does not start with a letter, use R$LETTER$ as prefix.

  • Thanks for the quick and accurate response. It worked perfectly. I would up-vote your answer but I don't have enough reputation yet as I just registered this morning. Commented Apr 9, 2015 at 18:21
  • Well, I wrote the first version of this package long ago, so I try to answer questions about it...
    – Boris
    Commented Apr 9, 2015 at 19:13
  • It works very well for Roman symbols. However for sorting alphabetically Greek symbols, it is not evident. Do you have any recommendations?
    – uknown
    Commented Apr 13, 2020 at 13:01
  • Please see section 2.5 of the manual, where Greek letters are discussed in legth
    – Boris
    Commented Apr 13, 2020 at 19:25

I want to print in nomenclature this expression $\mathrm{ \bar{v}}$. What should I do since the \nomenclature[R]{$\mathrm{ \bar{v}}$}{mean velocity} does not work

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 21, 2022 at 11:47
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review
    – MS-SPO
    Commented Jun 21, 2022 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .