GeneralPersonalized Nomenclature

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
offroad
Posts: 17
Joined: Mon Feb 18, 2013 5:06 am

Personalized Nomenclature

Post by offroad »

Hi all,

I've been trying to build a personalized nomenclature with subgroups (Greek letters, Roman letters, acronyms, superscripts, subscripts etc) but I can't it get to work along with the personalized style I just added.

I uploaded a minimal working example so you can have a quick look at it. To make this file work, I use the following commands:

Code: Select all

pdflatex work
makeindex work.nlo -s nomencl.ist -o work.nls
pdflatex work
pdflatex work
start work.pdf
I've also uploaded a .bat file to make things simpler. Just type 'work' and it processes all commands above if you are on Windows.

Very much appreciated

Offroad
Attachments
work.tex
(560 Bytes) Downloaded 668 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Personalized Nomenclature

Post by cgnieder »

When I run your example I get exactly what I expect and it's unclear to me what you want differently... as an aside I have a few comments on your code:

Code: Select all

\documentclass[12pt,a4paper]{report}
\usepackage[prefix]{nomencl}
\newcommand{\nomunit}[1]{\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
\makenomenclature
\usepackage{makeidx}% <= not needed here
\makeindex% <= not needed here
\begin{document}
This is a minimal working example.\\ % <= don't use \\ if you want to end a
% paragraph! Leave an empty line instead
\printnomenclature
And this is the equation that changed the world's history:
\begin{center}% <= not needed here. equations are already centered
\begin{equation} \label{relat}
	E=mc^2
\end{equation}
\end{center}
\nomenclature{$E$}{Energy\nomunit{J}}
\nomenclature{$m$}{Mass\nomunit{kg}}
\nomenclature{$c$}{Speed of light\nomunit{m/s}}
\end{document}
If I change the example according to my comments and run the file:

Code: Select all

% arara: pdflatex
% arara: nomencl
% arara: pdflatex
\documentclass[12pt,a4paper]{report}
\usepackage[prefix]{nomencl}
\newcommand{\nomunit}[1]{\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
\makenomenclature

\begin{document}
This is a minimal working example.

\printnomenclature

And this is the equation that changed the world's history:
\begin{equation} \label{relat}
	E=mc^2
\end{equation}

\nomenclature{$E$}{Energy\nomunit{J}}
\nomenclature{$m$}{Mass\nomunit{kg}}
\nomenclature{$c$}{Speed of light\nomunit{m/s}}
\end{document}
this is what I get:
nomencl.png
nomencl.png (13.55 KiB) Viewed 16750 times
What exactly do you want different?

Personally I prefer glossaries for this as it is highly customizable, allows for multiple glossaries and ...

Regards
site moderator & package author
offroad
Posts: 17
Joined: Mon Feb 18, 2013 5:06 am

Personalized Nomenclature

Post by offroad »

I would very much like the nomenclature divided into groups (Greek letters, Roman, Acronyms etc). I read the documentation but couldn't get it to work.

This is what the doc says:
If you have distinct groups among the identifiers in your nomenclature (e.g. Greek letters for physical constants, Roman letters for variables), you can use the optional argument of \nomenclature together with the \nomgroup macro to get two groups with separate headings in the nomenclature. Use something like the following throughout your text

Code: Select all

\nomenclature[ga ]{$\alpha$}{Constant}
\nomenclature[rx ]{$x$}{Variable}
where \g" and \r" indicate Greek and Roman letters, respectively. Then you include the ifthen package and redene \nomgroup e. g. like this.

Code: Select all

\RequirePackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{R}}{\item[\textbf{Variables}]}{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{Constants}]}{}}}
Not only that, I've also tried to rename the entries, from Greek letters to 'Letras gregas' as my thesis has to be written in Portuguese, not English, which is default.

Very much appreciated.
offroad
Posts: 17
Joined: Mon Feb 18, 2013 5:06 am

Re: Personalized Nomenclature

Post by offroad »

I like the Glossaries package. I'll read the documentation. Thank you!
Post Reply