# How to make nomenclature entries indent?

The nomenclature entries is left align without indent by default:

 \printnomenclature[2.5 cm]


See e.g.

I want to make these symbols indent from left margin for 1 ex or 1 em. But I have just lost in the package manual nomenclature.

So how can I redefine the indent value?

nomgroup is redefined as:

\usepackage[intoc]{nomencl}
\makenomenclature
\renewcommand\nomgroup[1]{%
\ifthenelse{\equal{#1}{A}}{%
\item[\textbf{Acronyms}] }{% A - Acronyms
\ifthenelse{\equal{#1}{R}}{%
\item[\textbf{Roman Symbols}]}{% R - Roman
\ifthenelse{\equal{#1}{G}}{%
\item[\textbf{Greek Symbols }]}{% G - Greek
\ifthenelse{\equal{#1}{S}}{%
\item[\textbf{Superscripts  }]}{{% S - Superscripts
\ifthenelse{\equal{#1}{U}}{%
\item[\textbf{Subscripts }]}{{% U - Subscripts
\ifthenelse{\equal{#1}{X}}{%
\item[\textbf{Other Symbols }]}% X - Other Symbols
{{}}}}}}}}}}


Examples of nomenclature input:

\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}

-
 Maybe \renewcommand{\nomlabel}[1]{\hspace{1em}#1}? Seems to be a bit of a hack, though... – cgnieder Jan 19 at 17:17 @cgnieder It did work. but the group name Acronyms is also indent. As I have redefined the \nomgroup, how do I only make the symbols indent? – KOF Jan 19 at 17:24

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}}{%
\ifthenelse{\equal{#1}{R}}{%
\ifthenelse{\equal{#1}{G}}{%
\ifthenelse{\equal{#1}{S}}{%
\ifthenelse{\equal{#1}{U}}{%
\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}{%
{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 }
{}{}

\item[\hspace*{-\itemindent}\normalfont\bfseries#1]}
\renewcommand\nomgroup[1]{%
\IfStrEqCase{#1}{%
{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}


-
 The command \renewcommand{\nomlabel}[1]{\hspace{1em}#1} does work. But What I want to do is to keep Symbol group-name, e.g. Acronyms shown in the above figure not indent. – KOF Jan 19 at 17:59 @KOF Please, make a new question with a complete compilable example that shows the problem. Note that this question has nothing like a complete compilable example. – egreg Jan 19 at 18:34