0

This example will print the groups: Physics Constants, Number Sets, Other Symbols.

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{amssymb}

\usepackage{nomencl}
\makenomenclature

%% This will add the subgroups
%----------------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{Physics Constants}{%
  \ifstrequal{#1}{B}{Number Sets}{%
  \ifstrequal{#1}{C}{Other Symbols}{}}}%
]}
%----------------------------------------------

%% This will add the units
%----------------------------------------------
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------

\title{Nomenclatures Example}
\author{ShareLaTeX Team}
\date{\today}

\begin{document}
\maketitle

This is an example to show how the \textbf{Nomenclature} package works:

\clearpage
\mbox{}

\nomenclature[A, 02]{$c$}{Speed of light in a vacuum inertial system 
  \nomunit{$299,792,458\, m/s$}}
\nomenclature[A, 03]{$h$}{Plank Constant
  \nomunit{$6.62607 \times 10^{-34}\, Js$}}
\nomenclature[A, 01]{$g$}{Gravitational Constant 
  \nomunit{$6.67384 \times 10^{-11}\, N \cdot m^2/kg^2$}}
\nomenclature[B, 03]{$\mathbb{R}$}{Real Numbers}
\nomenclature[B, 02]{$\mathbb{C}$}{Complex Numbers}
\nomenclature[B, 01]{$\mathbb{H}$}{Quaternions}
\nomenclature[C]{$V$}{Constant Volume}
\nomenclature[C]{$\rho$}{Friction Index}

\printnomenclature

\end{document}

But how change the order to: Number Sets, Physics Constants, Other Symbols?

1

You only have to modify the redefinition of \nomgroup to become

\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{B}{Physics Constants}{%
  \ifstrequal{#1}{A}{Number Sets}{%
  \ifstrequal{#1}{C}{Other Symbols}{}}}%
]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.