LyXnomencl | Creation of a sorted Nomenclature

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
MarkH748
Posts: 4
Joined: Mon Nov 28, 2011 11:24 am

nomencl | Creation of a sorted Nomenclature

Post by MarkH748 »

Hi all.

I'm a new LaTeX user (using LyX) trying to create a nomenclature for the first time. The nomenclature works fine provided I don't want to change the order which the terms appear. However I want to divide the entries up into four different sections, Upper Case, Lower Case, Greek Letters and Abbreviations. I have been following the guide here,

http://wiki.lyx.org/Tips/Nomenclature

and I have changed the "Sort As:" option to U for Upper Case, L for Lower Case, G for Greek letters and A for Abbreviations. I then follow that guide and add the following to the document preamble.

Code: Select all

\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{U}}{\item[\textbf{Upper Case}]}{%
\ifthenelse{\equal{#1}{L}}{\item[\textbf{Lower Case}]}{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Letters}]}{%
\ifthenelse{\equal{#1}{A}}{\item[\textbf{Abbreviations}]}
{}
}% matches Upper Case
}% matches Lower Case
}% matches Greek Letters
}% Abbreviations
However, when I try and generate the document I get errors for pretty much every nomenclature entry. Is there something obvious I am missing out here?

Any help/advice would be greatly appreciated.


Thanks,
Mark
Last edited by localghost on Mon May 21, 2012 10:55 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

salamamma
Posts: 1
Joined: Mon Nov 19, 2012 9:19 pm

nomencl | Creation of a sorted Nomenclature

Post by salamamma »

Hello,

I don't know if you solved this or not, by the way I had this problem too. if you check the link again few line after the code there is written to add (before the code) the ifthen package. I did it and it's working! So this apply to everyone:

Code: Select all

\usepackage{ifthen}
\renewcommand{\nomgroup}[1]{%
  \ifthenelse{\equal{#1}{A}}{\item[\textbf{Roman Symbols}]}{%
    \ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{%
      \ifthenelse{\equal{#1}{C}}{\item[\textbf{Abbreviations}]}{%
        \ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{%
          \ifthenelse{\equal{#1}{Z}}{\item[\textbf{Mathematical Symbols}]}{}
        }% matches mathematical symbols
      }% matches Subscripts
    }% matches Abbreviations
  }% matches Greek Symbols
}% matches Roman Symbols
I'm a newbie, don't sue me if there's something wrong!
Last edited by localghost on Mon Nov 19, 2012 9:41 pm, edited 1 time in total.
Myvi
Posts: 1
Joined: Tue Jan 28, 2014 2:51 pm

Re: nomencl | Creation of a sorted Nomenclature

Post by Myvi »

@salamamma..

It really works great! Thanks! :)
Post Reply