It's on my task list for a while now, and this post made me ask a follow up question which is, in my mind, a missing part when setting such a list.
As an example, think of the standard notation of an n-dim space; I would use the following code to typeset it: \mathbb{R}^n. Then, in order to make things quicker, I would define a macro \newcommand*{\Rn}{\mathbb{R}^n}. So far so good. Now, I want to have a list of symbols as well. In short, the question is: what is the best practice to generate a list of symbols for complicated symbols?
Let me consider the nomencl package, but I think the question is valid when one is using other alternatives as well. Currently, I have a file where I define all the macros I am using in my document, similar to the one I gave as an example above. Then, in order to generate a list's entry I would add
\nomenclature{$\mathbb{R}^n$}{$n$-dimensonal real space}
where I use my macro \Rn for the first time. Is this the right/best way to go? One big drawback here is that when I would like to change the notation in the future, I will have to do it in two different places. Is there a smarter way to go? Somehow unify the two tasks of generating a list's entry and a macro which will be used in order to typeset the symbol later?
\section[Definition of $\Rn$]{definition of $\mathbb{R}^n$}over come this failure? – May 14 '12 at 09:24\Rnthe next time the document is compiled would be in the table of contents! Putting\mathbb{R}^nin the optional argument and\Rnin the mandatory one might solve the issue. – egreg May 14 '12 at 09:27\Rnappears is in a section's title, then it should be produced by\section[Definition of $\mathbb{R}^n$]{Definition of $\Rn$}? – Dror May 14 '12 at 09:38\section[Definition of $\mathbb{R}^n$]{definition of $\Rn$}(This is what I meant) solves it. I wonder whether there is any other fix for this problem besides optional argument? It will be nice of you if you incorporate all these remedies in to your answer. (already upvoted +1). – May 14 '12 at 09:59\newcommand*{\dotprod}[2]{\left<#1,#2 \right>}- how can it be added to the list "automatically"? – Dror May 14 '12 at 13:58\dotprod{a}{b}with those values? – egreg May 16 '12 at 14:58\dotprod{foo}{bar}, such that in the nomenclature it will appear as\dotprod{\cdot}{\cdot}. However, I guess this can only be done manually... As far as I understand, your solution is mainly useful for non-operators' definitions. – Dror May 16 '12 at 19:46