Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use the package usnomencl to create nomenclatures e.g.

\setlength{\UnitLabelWdth}{0.4\textwidth}

\begin{Nomencl}[2em]
\item[$\zeta$] damping ratio
\item[$\theta$] \UnitLine{angular displacement}{rad}
\end{Nomencl}

Looking at the line:

\item[$\theta$] \UnitLine{angular displacement}{rad}

one can see that 3 columns are formed, the first one being the unit name, the second one mentioning what the unit stands for and the last column giving the unit symbol.

I would like to add an extra column at the end with the heading "Pages where defined or first used". And then I will manually add the corresponding page numbers.

Is there a way to accomplish this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The usnomencl is a very simple nomenclature package that I have added to the University of Stellenbosch thesis (usthesis) bundle. It uses a list (description type) environment to set the nomenclature and would be difficult to add additional columns.

I would recommed a tabular type environment if you want more columns or a tabbing environment. Below is a proof of concept for a tabbing environment:

\documentclass{article}
\usepackage{sistyle} % or siunitx
\newcommand\bSI[1]{{\small[\SI{}{#1}]}}

\makeatletter
\newlength\unitwdth
\newlength\numwdth
\settowidth\unitwdth{\quad\bSI{m^3.kg^{-1}.s^{-2}}~}
\settowidth\numwdth{\quad 99}
\newlength\tdima
\newcommand\SIdescr[3]{%
    \setlength\tdima{\linewidth}%
    \addtolength\tdima{\@totalleftmargin}%
    \addtolength\tdima{-\dimen\@curtab}%
    \addtolength\tdima{-\unitwdth}%
    \addtolength\tdima{-\numwdth}%
    \parbox[t]{\tdima}{%
        #1
        \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{\tiny.}\mkern \@dotsep mu$}%
        \hfill
        \ifhmode\strut\fi
        \makebox[0pt][l]{%
            \makebox[\unitwdth][l]{\quad\bSI{#2}}%
            \makebox[\numwdth][l]{\quad #3}}}}
\makeatother

\begin{document}
\begin{tabbing}
    \parbox[t]{\linewidth}{\small      \hfill Pages\par              % Added
                                       \hfill where\par              % Added
                                 Symbol\hfill defined\par            % Added
                          \rule[.5\baselineskip]{\linewidth}{.5pt}}\\% Added

    \hspace*{1em}\=\hspace*{2em}\=\kill
    \>$x$ \> \SIdescr{coordinate in $x$ direction and a
             lot of other information to make it wrap}{m}{10}\\[1ex]
    \>$y$ \> \SIdescr{coordinate in $y$ direction}{m}{11}\\[1ex]

\end{tabbing}
\end{document}

enter image description here

share|improve this answer
    
Thank you very much indeed. Your nomenclature package is very convenient to use. With your code, I was trying to add a header as indicated in my post. But it seems that I cannot leave some fields empty and just write something in the last column so that the first line would have just an entry in the last column. Is there a way to fix this. Thanks again. 1vote up in the meantime. –  yCalleecharan Jul 19 '11 at 5:39
    
Your code is working fine and this is what I need. But maybe I didn't make one thing clear in my post. In addition to what you have done so far, I would appreciate if you would show me how to add a header just in the last column with the words pages where defined or first used wrapping it quite tightly on 2 or 3 lines. Then a reader will understand that the numbers on the right refer to page numbers. Thanks. –  yCalleecharan Jul 19 '11 at 6:15
    
@yCalleecharan: I have added a \parbox as a dirty solution to make a header. –  Danie Els Jul 19 '11 at 9:09
    
Thanks a lot. You have indeed been very helpful. –  yCalleecharan Jul 20 '11 at 4:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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