In a use-case more complex then the MWE I want to generate the symbol key of a glossary entry based on other keys (e.g. name & description). In the use-case the symbol a will be a math expression compossed of other custom keys b & c which are math expressions and need to be combined e.g. a:= b^c.
My approach in the MWE does work out for a first level entry, but fails for the second level entries. Please see the MWE output table column "Remarks" below for what I expect. I observed that the generated Symbol is allways that of the last defined child newglossaryentryin the script.
I would appreciate some help and suggestions for improvement.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage[nomain,nonumberlist]{glossaries}
\newglossary[sog]{symbol}{soi}{soo}{Symbols}
\newglossarystyle{groupedsymbols}{%
\renewenvironment{theglossary}%
{\begin{longtable}{llp{\glsdescwidth}}}%
{\bottomrule % booktabs
\end{longtable}}%
\renewcommand*{\glossaryheader}{%
\toprule % booktabs
\bfseries Category & %
\bfseries Symbol & %
\bfseries Remark %
\\\endhead
\midrule % booktabs
}%
\renewcommand*{\glsgroupheading}[1]{}%
%
\renewcommand*{\glossentry}[2]{%
%\glsentryitem{##1} %
\bfseries \glsentrydesc{##1} & & %
\\
}%
\renewcommand*{\subglossentry}[3]{%
& \glsentrysymbol{##2} & \glsentrydesc{##2} %
\\
}%
\renewcommand*{\glsgroupskip}{\relax}
}
\makeglossaries
\newglossaryentry{group}{%
type=symbol,
name={testgroup},
description={Categ. 1}
}
\newglossaryentry{groupentrytwo}{%
type=symbol,
parent=group,
name={yabc},
description={Symbol WRONG ! should be: yabc},
symbol={\glsentryname{\glslabel}}
}
\newglossaryentry{groupentryone}{%
type=symbol,
parent=group,
name={zabc},
description={Symbol is zabc correctly},
symbol={\glsentryname{\glslabel}}
}
\begin{document}
\glsaddall[types={symbol}]
\printglossary[type=symbol,style=groupedsymbols]
\end{document}


\renewcommand*{\subglossentry}[3]{% & \glsentrytext{##2} & \glsentrydesc{##2} % \\ }%it will work – Mar 29 '16 at 13:13