I try to make sections in Nomenclature and sort them as I desire in my paper like the one I added in the picture. I have not had any success. I am close to get mad! I searched a lot but I couldn't find any appropriate answer! Any help?
[Tex/LaTex] How to make section in Nomenclature
nomenclature
Related Solutions
My advice is to get rid of nomencl
package and use glossaries
at its full power. I assume that the sense of this question is to have both a list of equations and a glossary in the document, whatever tool is used.
In fact, with glossaries, one can define as many glossaries as he wants: a simple glossary, a list of acronyms, a list of symbols and so on.
Instead of using the nomencl
package, you can define a new glossary (I know the name is misleading, but that's how lists of terms are referred to in the package documentation; you can name your list as you prefer) with the following command:
\newglossary{equations}{equ}{eqn}{List of Equations}
where: equations
is the type of the glossary entry, in order to distinguish it from an ordinary glossary entry; equ
and eqn
are file extensions for auxiliary files; List of Equations
is the title of your list, as it will be printed in the table of contents and in the text.
To define an entry to be added to this list, use the glossaries command:
\newglossaryentry{sml}{type=equations,name={$\nabla B = 0$},description={Second Maxwell's Law}}
Note the value assigned to the key: type=equations
; if you don't specify it, it will be added to the main glossary.
To have the glossaries printed, you have to put \printglossaries
in your document backmatter/frontmatter, and run makeglossaries
from command line on your root .tex
file.
Patch \thenomenclature
to do also \itemindent 1em
:
\documentclass{article}
\usepackage{nomencl}
\usepackage{xpatch}
\patchcmd{\thenomenclature}
{\leftmargin\labelwidth}
{\leftmargin\labelwidth\itemindent 1em }
{}{}
\makenomenclature
\begin{document}
a\nomenclature{ALE}{Arbitrary Lagrangian-Eulerian Method}
b\nomenclature{AOR}{Angle of repose}
\printnomenclature
\end{document}
Since your group labels are typeset with \item
, then you have also to change them so they skip back by the current \itemindent
:
\newcommand{\nomenclheader}[1]{\item[\hspace*{-\itemindent}#1]}
\renewcommand\nomgroup[1]{%
\ifthenelse{\equal{#1}{A}}{%
\nomenclheader{\textbf{Acronyms}}}{% A - Acronyms
\ifthenelse{\equal{#1}{R}}{%
\nomenclheader{\textbf{Roman Symbols}}}{% R - Roman
\ifthenelse{\equal{#1}{G}}{%
\nomenclheader{\textbf{Greek Symbols}}}{% G - Greek
\ifthenelse{\equal{#1}{S}}{%
\nomenclheader{\textbf{Superscripts}}}{{% S - Superscripts
\ifthenelse{\equal{#1}{U}}{%
\nomenclheader{\textbf{Subscripts}}}{{% U - Subscripts
\ifthenelse{\equal{#1}{X}}{%
\nomenclheader{\textbf{Other Symbols}}}% X - Other Symbols
{{}}}}}}}}}}
You'll probably have less problem in maintaining the code above if you say
\usepackage{xstring}
and then
\newcommand{\nomenclheader}[1]{%
\item[\hspace*{-\itemindent}\normalfont\bfseries #1]}
\renewcommand\nomgroup[1]{%
\IfStrEqCase{#1}{%
{A}{\nomenclheader{Acronyms}}% A - Acronyms
{R}{\nomenclheader{Roman Symbols}}% R - Roman
{G}{\nomenclheader{Greek Symbols}}% G - Greek
{S}{\nomenclheader{Superscripts}}% S - Superscripts
{U}{\nomenclheader{Subscripts}}% U - Subscripts
{X}{\nomenclheader{Other Symbols}}% X - Other Symbols
}%
}
Complete example
\documentclass{article}
\usepackage[intoc]{nomencl}
\usepackage{bm}
\usepackage{xstring}
\usepackage{xpatch}
\patchcmd{\thenomenclature}
{\leftmargin\labelwidth}
{\leftmargin\labelwidth\itemindent 1em }
{}{}
\newcommand{\nomenclheader}[1]{%
\item[\hspace*{-\itemindent}\normalfont\bfseries#1]}
\renewcommand\nomgroup[1]{%
\IfStrEqCase{#1}{%
{A}{\nomenclheader{Acronyms}}% A - Acronyms
{R}{\nomenclheader{Roman Symbols}}% R - Roman
{G}{\nomenclheader{Greek Symbols}}% G - Greek
{S}{\nomenclheader{Superscripts}}% S - Superscripts
{U}{\nomenclheader{Subscripts}}% U - Subscripts
{X}{\nomenclheader{Other Symbols}}% X - Other Symbols
}%
}
\begin{document}
Some text for getting output.
\nomenclature[rV]{$V$}{Fluid control volume}
\nomenclature[ruf]{$\bm{u}_f$}{Fluid velocity}
\nomenclature[gepsilonf]{$\epsilon_f$}{Fluid porosity}
\nomenclature[rfb]{$\bm{f}_b$}{Body force per unit volume}
\nomenclature[gepsilonf]{$\epsilon_f$}{Fluid porosity}
\nomenclature[gsigma]{$\bm{\sigma}$}{Cauchy stress tensor}
\printnomenclature
\end{document}
Best Answer
Here is an attempt with
nomencl
package.Here
C
inCp
(\nomenclature[Cp]{$p_{Di}$}{Active power demand at bus $i$}
) puts the entry inConstants
whereVp
would put it inVariables
.You have to compile with
to get things done.