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.

The following example builds one nomenclatura (the list of some importa symbols).

The problem I met is the following one : if one symbol is used in two contexts, this symbol appears two times (see the letter a in my example).

Is it possible to change this so as to obtain for example the letter a appears only one time in the nomenclatura following by list of the different uses of this letter ?

\documentclass{article}
    \usepackage{nomencl}
    \makenomenclature

\begin{document}

\section*{Main equations}

\begin{equation}
    a=\frac{N}{A}
\end{equation}%

\nomenclature{$a$}{The number of angels per unit area}%
\nomenclature{$N$}{The number of angels per needle point}%
\nomenclature{$A$}{The area of the needle point}%

The equation $\sigma = m a$%

\nomenclature{$\sigma$}{The total mass of angels per unit area}%
\nomenclature{$m$}{The mass of one angel} follows easily.

Let's try with another $a$... %
\nomenclature{$a$}{The area of the needle point}%

\printnomenclature

\end{document}

The solution given just after by Werner does the job but there is still one problem from my point of view.

Instead of...

a    The number of angels per unit area
     The area of the needle point

it would be better to have something like...

a    - The number of angels per unit area
     - The area of the needle point

Is it possible to do that ?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

In the following example I played around with the sort order of nomencl by using the <prefix> command:

\nomencl[<prefix>]{<symbol>}{<description>}

However, it required to transform all the nomenclatures to the same type (string in this case). That is, using the prefix for each item (in text/non-math) so that they are sorted in the same group.

\documentclass{article}
\usepackage{nomencl}% http://ctan.org/pkg/nomencl
\makenomenclature

\begin{document}

\section*{Main equations}

\begin{equation}
    a=\frac{N}{A}
\end{equation}%

\nomenclature[a]{$a$}{The number of angels per unit area}%
\nomenclature[N]{$N$}{The number of angels per needle point}%
\nomenclature[A]{$A$}{The area of the needle point}%

The equation $\sigma = m a$%

\nomenclature[s]{$\sigma$}{The total mass of angels per unit area}%
\nomenclature[m]{$m$}{The mass of one angel} follows easily.

Let's try with another $a$... %
\nomenclature[a1]{}{The area of the needle point}%
\nomenclature[a2]{}{The distance to the moon}%
\nomenclature[a3]{}{The number of needles in a haystack}%
\nomenclature[a4]{}{The value of $pi$}%
\printnomenclature

\end{document}

Nomenclature with prefix-sorted list

In the above example, all items under the a nomenclature that should be printed without a, has been given a prefix a? where ? is a numeric to force some sort order.

Text-only nomenclatures can be used in the traditional form without the prefix <prefix>, like (say) \nomenclature{C}{This is a C, see.}; included in the above MWE. You'll notice that the \sigma entry has been sorted based on the text prefix s. This can be changed if needed.

Since there is no connection between the items in the List of Nomenclatures and the grouped sorting has been manually altered (via specifying a1, a2, ... for items using the same symbol as a), there is no way to easily accommodate the following request automatically:

Nomenclature with a manual indication of similarly marked items

Manually, however, it is no problem. Just add the respective dashed (-- or en-dash) before each item. This should not be a major drawback, since the nomenclature items are formatted and inserted manually in the document anyway:

\documentclass{article}
\usepackage{nomencl}% http://ctan.org/pkg/nomencl
\makenomenclature

\begin{document}

\section*{Main equations}

\begin{equation}
    a=\frac{N}{A}
\end{equation}%

\nomenclature[a]{$a$}{--\ The number of angels per unit area}%
\nomenclature[N]{$N$}{The number of angels per needle point}%
\nomenclature[A]{$A$}{The area of the needle point}%

The equation $\sigma = m a$%

\nomenclature[s]{$\sigma$}{The total mass of angels per unit area}%
\nomenclature[m]{$m$}{The mass of one angel} follows easily.

Let's try with another $a$... %
\nomenclature[a1]{}{--\ The area of the needle point}%
\nomenclature[a2]{}{--\ The distance to the moon}%
\nomenclature[a3]{}{--\ The number of needles in a haystack}%
\nomenclature[a4]{}{--\ The value of $pi$}%

\printnomenclature

\end{document}
share|improve this answer
    
Thanks for this explanation. Is there a way to have display some symbol before each item of the list ? –  projetmbc Oct 9 '11 at 9:51
    
@projetmbc: I thought you were interested in removing the symbol before each item in the duplicated symbol. Do you want some symbol printed before each item in the list? Please provide more detail; perhaps even by editing your original question to include this information. –  Werner Oct 9 '11 at 15:06
    
I've edited my first message so as to point what I'm looking for. –  projetmbc Oct 9 '11 at 18:53
    
@projetmbc: See my revised answer. Hope this helps. –  Werner Oct 9 '11 at 21:07
    
Thanks for this. –  projetmbc Oct 10 '11 at 18:06
add comment

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.