Page Layoutlist of abbreviation - sorting

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
zuza
Posts: 4
Joined: Tue Mar 30, 2010 10:52 pm

list of abbreviation - sorting

Post by zuza »

Hello,
I have got a problem with alphabetical order of the list of abbreviation at the end of the document.
I use nomencl package. The problem is, that every entry with a number or a special symbol (+,-..) is before the entries without those symbols.
Eg. it sorts like this: +za, xy2, ab, bc ... I want it like: ab, bc, xy2, +za. Is there any command to use for sorting only letters, not other symbols?
Thank you for the answer.
Zuzana

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

list of abbreviation - sorting

Post by gmedina »

Hi,

you can declare the package option noprefix:

Code: Select all

\usepackage[noprefix]{nomencl}
and then use the optional argument of the \nomenclature command to manualy adjust the sort order. The package documentation contains the details.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
zuza
Posts: 4
Joined: Tue Mar 30, 2010 10:52 pm

Re: list of abbreviation - sorting

Post by zuza »

I have already read it. But I could not have found it in the manual... So a asked here. I am a LaTex begginer, I don't understand it much. What prefix should I use?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

list of abbreviation - sorting

Post by gmedina »

A little example:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage[noprefix]{nomencl}
\makenomenclature

\begin{document}

\nomenclature[x]{+x}{A special symbol.}
\nomenclature{y}{Some letter.}
\nomenclature{z}{The last letter.}
\nomenclature{a}{The first letter.}
\nomenclature{w}{Some other letter.}

\printnomenclature

\end{document}
The use of the optional argument in

Code: Select all

\nomenclature[zz]{+x}{A special symbol.}
instructs MakeIndex to sort "+x" as "zz+x" so it will appear after all the words beginning with "zz" (i.e., after every normal English word); without the optional argument, "+x" will appear as the first item in the nomenclature.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
zuza
Posts: 4
Joined: Tue Mar 30, 2010 10:52 pm

Re: list of abbreviation - sorting

Post by zuza »

Now it works. Thank you for the help!! I have one more question. Do I have to let it go through Makeindex every time I add a new abbreviation? Now I have to do it. Or is it possible to connect(?) it somehow not to do it every time?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

list of abbreviation - sorting

Post by gmedina »

Since MakeIndex is responsible for sorting out the entries, you must use MakeIndex every time that you want your document to reflect any changes involving the \nomenclature commands. If you add a new entry and don't run MakeIndex then this new entry won't apear in the final document.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
zuza
Posts: 4
Joined: Tue Mar 30, 2010 10:52 pm

Re: list of abbreviation - sorting

Post by zuza »

OK. Thank you very much!
Post Reply