I want to create a list of symbols for my work, where the symbols are often provided with an index. Now I do not want to create a new entry for each symbol and index. Is it possible with another parameter in the call \ gls {\label, {#1}} the index (#1) put to the desired location. If I have expressed myself too cryptic, may help the minimal example:
\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{BetragVektor1}{name=\ensuremath{|\overline{u_1}|},description={Länge des Vektors}}
\newglossaryentry{BetragVektor2}{name=\ensuremath{|\overline{u_2}|},description={Länge des Vektors}}
\newglossaryentry{BetragVektor}{name=\ensuremath{|\overline{u_2}|},description={Länge des Vektors}}
\begin{document}
target:\\
The vector $|\overline{u_1}|$ is longer than the vector $|\overline{u_2}|$.
option1:\\
The vector \gls{BetragVektor1} is longer than the vector \gls{BetragVektor2}.
option2(gloosarie-documentation) :\\
\gls{BetragVektor}{1}
This option writes the 1 at the end - not behind u.
\end{document}
Thanks for all the advice and I hope, there is a solution.


1represent? Do you mean that you want a command that automatically does both\gls{BetragVektor}and\index{$|\overline{u_2}|$}? – Nicola Talbot Feb 24 '15 at 11:36\newglossaryentry{c} {name=\ensuremath{\vec{c}},description={speed}}
However I have \gls{c} three times with the indizes 1...3 in my document. The command \gls{c}{_1} writes the _1 at the end of c - but not under the arrow. The same problem is with:
\newglossaryentry{cc} {name=\ensuremath{|c|},description={magnitude of c}}
The command \gls{cc}{_1} writes the 1 at the end (|c|1) and not |c_1|.
Do you know what I mean?
– Franz2304 Feb 24 '15 at 11:59