# Commas separating page numbers in glossary

I am currently working on a glossary and have the following problem. I am using the same symbol, in the MWE "D", for different notions on different pages and would like it to be displayed one underneath the other in the glossary. This I could achieve by just inserting new line. However, I would also like this to be the case for the page numbers, which are currently a bit askew and also separated by a comma. I would appreciate any kind of help.

Consider the following MWE:

\documentclass[a4paper,12pt]{scrartcl}
\usepackage[sort=use, nopostdot, toc]{glossaries}
\usepackage{glossary-longragged}

\newglossary[slg]{symbols}{sym}{sbl}{Notationsverzeichnis}

\makenoidxglossaries

\newglossarystyle{EigenerStil}{
\renewenvironment{theglossary}
{\renewcommand{\arraystretch}{1.5}
{\end{longtable}}
\renewcommand{\glspostdescription}[2]{0}
\renewcommand*{\glossentry}[2]{
\glstarget{##1}{\glossentryname{##1}}
& \glossentrydesc{##1}
& ##2
\tabularnewline
}
\renewcommand*{\subglossentry}[3]{
\glossentry{##2}{##3}
}
\renewcommand*{\glsgroupskip}{}
}

\newglossaryentry{D}{type=symbols,
name={\ensuremath{D}},
description={Description $1$  \newline
Description $2$}
}

\begin{document}

First we define \gls{D} as 1.
\newpage
On a later page, \gls{D} means something different.
\printnoidxglossary[type=symbols, sort=use, style=EigenerStil]

\end{document}

• if you have two meanings, define two glossary entries, e.g. D1 and D2 instead of trying to use some hack to get the right output. And remove the latex3 tag, this is not related to latex3. – Ulrike Fischer Apr 26 at 13:12
• Unfortunately, this is not an option for me, because the notation is fixed. An example for this would be the symbol denoting the Cartesian and vector product, which I cannot just denote by $\times_1$ and $\times_2$.... – rhodelta Apr 26 at 14:04
• I didn't meant the output in the document, but the glossary key. \newglossaryentry{D1} and \newglossaryentry{D2}. – Ulrike Fischer Apr 26 at 14:33
• I tried that too, but then I had the problem of ordering. My glossary is sorted by usage, but I would like to have these two descriptions appear directly after one another, even though there are different glossary entries added between them. I tried the parent=D command, but it didn't work out. – rhodelta Apr 26 at 15:32
• Well an automatically generated glossaries doesn't work well if you want to implement (conflicting) exceptions. – Ulrike Fischer Apr 26 at 15:53