MakeIndex, Nomenclature, Glossaries and Acronymsnomencl | Wrong Sort Order for italic Entries

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
lemonicetea
Posts: 17
Joined: Sat Oct 10, 2009 9:28 pm

nomencl | Wrong Sort Order for italic Entries

Post by lemonicetea »

Hi, all.

I am using nomencl package. However, the italic nomenclature entry appears on the top of the list rather than in alphabetical order. How can I put it back to the alphabetical queue? Following are the code:

Code: Select all

Code, edit and compile here:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage[round]{natbib}
\usepackage{booktabs}
\usepackage{nomencl}
\begin{document}
\nomenclature{A/E}{Attaching and Effacing}%
\nomenclature{CCP}{complement control protein}
\nomenclature{Dr}{Cromer-Related Blood Group Antigen}
\nomenclature{\textit{E. coli}}{\textit{Escherichia coli}}
\nomenclature{IPTG}{Isopropyl-$\beta$-D-thiogalactoside}
\printnomenclature[3cm]
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In the example, it seems that the E. coli is the top one on the list rather than in the queue. Does anybody know why?

Thanks a lot.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

nomencl | Wrong Sort Order for italic Entries

Post by localghost »

Thanks for the example, although it is not minimal. The following idea is based on the principle of the sorting algorithm used by MakeIndex. So you can read more in its manual. The presented code is untested.

Perhaps it works if you use that for the declaration of the concerned nomenclature entry.

Code: Select all

\nomenclature{E. coli@\textit{E. coli}}{\textit{Escherichia coli}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is only an assumption so there is no guarantee for success.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
lemonicetea
Posts: 17
Joined: Sat Oct 10, 2009 9:28 pm

Re: nomencl | Wrong Sort Order for italic Entries

Post by lemonicetea »

Thank you very much! But it does not work. The entry "E. coli" just disappears from the list. Should I use some other package as well?
meono
Posts: 4
Joined: Fri Jan 11, 2013 2:19 pm

nomencl | Wrong Sort Order for italic Entries

Post by meono »

Hi,

I am new to LaTeX, and I am using it to write my thesis. I got stuck with the same problem and haven't found a solution for it. localghost's suggestion didn't work for me either. I was wondering if anyone has other suggestions.


Cheers,
meono
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

nomencl | Wrong Sort Order for italic Entries

Post by Stefan Kottwitz »

Hi meono,

welcome to the board!

Perhaps attach a Infominimal working example, which shows the problem in your concrete case. Even if the problem above is similar, source and cause can be different.

Stefan
LaTeX.org admin
meono
Posts: 4
Joined: Fri Jan 11, 2013 2:19 pm

nomencl | Wrong Sort Order for italic Entries

Post by meono »

Hi Stefan,

Thanks for the reply.

I tried making it as short as possible. I noticed that the "writelatex" on the forum webpage doesn't show the "list of abbreviations page. But after a round of makeindex, makenomenclature, i can reproduce the problem on my TeXShop:

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,11pt,fleqn]{book}
\usepackage{booktabs}
\usepackage{nomencl}
\usepackage{makeidx}
\makeindex
\usepackage[numbers,square,comma,sort&compress]{natbib}
\begin{document}
\frontmatter
\makenomenclature
\renewcommand{\nomname}{List of abbreviations}
\markboth{\nomname}{\nomname}
\printnomenclature[2in]
\mainmatter
Some of the abbreviations that I need to use are ATP\nomenclature{ATP}{Adenosine triphosphate}, EMPP\nomenclature{EMPP}{Embden-Meyerhof-Parnas pathway} and \textit{pfk}\nomenclature{\textit{pfk}}{gene encoding phosphofructokinase}.
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In my original document there are many abbreviations and they all go alphabetically in nomenclature - except the pfk, which I have to write in italic.

Any suggestions will be appreciated.

meono
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

nomencl | Wrong Sort Order for italic Entries

Post by cgnieder »

I suspect writeLaTeX cannot figure out (yet?) that it had to run makeindex here...

Anyway, \nomenclature has an optional argument that allows you to specify how an entry should be sorted. I'd also not use \textit directly but rather would define a macro that reflects the nature of what is italicized. Here' an even more minimal example:

Code: Select all

Code, edit and compile here:
% arara: pdflatex
% arara: nomencl
% arara: pdflatex
\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of abbreviations}
\newcommand\bio[1]{\textit{#1}}
\begin{document}
\printnomenclature
Some of the abbreviations that I need to use are ATP\nomenclature{ATP}{Adenosine
triphosphate}, EMPP\nomenclature{EMPP}{Embden-Meyerhof-Parnas pathway} and
\bio{pfk}\nomenclature[pfk]{\bio{pfk}}{gene encoding phosphofructokinase}.
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Regards
site moderator & package author
meono
Posts: 4
Joined: Fri Jan 11, 2013 2:19 pm

nomencl | Wrong Sort Order for italic Entries

Post by meono »

Thanks for the suggestion cgnieder, but that puts the italic abbr. to the end regardless of the first letter (at least in my case):

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of abbreviations}
\newcommand\bio[1]{\textit{#1}}
\begin{document}
\printnomenclature
Some of the abbreviations that I need to use are ATP\nomenclature{ATP}{Adenosine
triphosphate}, EMPP\nomenclature{EMPP}{Embden-Meyerhof-Parnas pathway} and
\bio{pfk}\nomenclature[pfk]{\bio{pfk}}{gene encoding phosphofructokinase}.
Lets add this one as well: zzz\nomenclature{zzz}{sleepy...}.
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Is it any different for you?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

nomencl | Wrong Sort Order for italic Entries

Post by cgnieder »

I don't understand: shouldn't it be at the end (ATP, EMPP, pfk)?. If not just replace the optional argument [pfk] with something that specifies where you want it to be sorted in.

Regards
site moderator & package author
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

nomencl | Wrong Sort Order for italic Entries

Post by localghost »

Clemens' idea only works for me if I specify the noprefix package option. A proposal based on the original example.

Code: Select all

Code, edit and compile here:
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[noprefix]{nomencl}
\makenomenclature
\begin{document}
\nomenclature{A/E}{Attaching and Effacing}%
\nomenclature{CCP}{complement control protein}
\nomenclature{Dr}{Cromer-Related Blood Group Antigen}
\nomenclature[e]{\textit{E. Coli}}{\textit{Escherichia coli}}
\nomenclature{IPTG}{Isopropyl-$\beta$-D-thiogalactoside}
\printnomenclature[3cm]
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The output is attached.
Attachments
nomencl-sort-italic.png
nomencl-sort-italic.png (17.65 KiB) Viewed 13779 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply