I use nomencl with nomgroups and nomunit. The only way I achieved to properly align it is given in the picture. It was produced using the methods of the documentation.
The file.ist is standard, while tex-file looks like this:
\documentclass{scrartcl}
\usepackage{ifthen}
\usepackage[refpage,intoc]{nomencl}
\renewcommand{\nomname}{Abkürzungsverzeichnis}
\makenomenclature
%Pagenumber in nomenclature
\renewcommand{\pagedeclaration}[1]{{\hfill #1}}
\renewcommand{\nompostamble}{}%
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{[\parbox{.08\textwidth}{\centering $#1$}]}}
\newlength{\nomentrywidth}
\setlength{\nomentrywidth}{.76\textwidth}
\renewcommand{\nomgroup}[1]
{%
\ifthenelse{\equal{#1}{X}}
{\vspace{2em}\item[]\hspace*{-\leftmargin}%
\hfill \textbf{Abkürzungen} \hfill \hbox{}}
{%
\ifthenelse{\equal{#1}{A}}
{\vspace{2em}\item[]\hspace*{-\leftmargin}%
\hfill \textbf{Physikalische Größen} \hfill \hbox{}}
{%
\ifthenelse{\equal{#1}{R}}
{\vspace{2em}\item[]\hspace*{-\leftmargin}%
\hfill \textbf{Regelungstechnik} \hfill \hbox{}}
{%
\ifthenelse{\equal{#1}{XX}}
{\vspace{2em}\item[]\hspace*{-\leftmargin}%
\hfill \textbf{Schriftauszeichnungen} \hfill \hbox{}}
}
}
}
}
\begin{document}
\markright{Abkürzungsverzeichnis}
\printnomenclature[1.5cm]
\nomenclature[A]{$Re$}{Reynoldszahl\nomunit{-}}%
\nomenclature[R]{$\rho_L$}{Dichte der Luft\nomunit{\frac{kg}{m^3}}}%
\nomenclature[X]{$\eta_L$}{Dynamische Viskosität der Luft\nomunit{\frac{kg}{m \cdot s}}}%
\nomenclature[X]{$\eta_L$}{asdf\nomunit{\frac{kg}{m \cdot s}}}%
\end{document}
%% EOF
Unfortunately the page number is before the unit. (Note the [refpage,intoc]
, which may be removed.)
Can someone give a complete solution either the normal way or with a longtable and explain how I can manipulate the column ordering.
Best Answer
You have to "back up":
The
\nomentryend
bit will have zero width. Adjust the 3em spacing to suit.