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:

\usepackage[sort=use, nopostdot, toc]{glossaries}



  \begin{longtable}{@{}p{0.15\textwidth}@{}p{0.7\textwidth}@{\quad \,}>{\raggedright\,}p{0.0\textwidth}@{}}}%
    & \glossentrydesc{##1}
    & ##2 

                      description={Description $1$  \newline
                      Description $2$}


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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.