MakeIndex, Nomenclature, Glossaries and Acronymsglossaries: group more symbols with the same description

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
sousek
Posts: 1
Joined: Wed Sep 08, 2010 11:13 am

glossaries: group more symbols with the same description

Post by sousek »

Hi all,

I use the glossaries package to make my Symbollist. It works pretty well, but I would like to put symbols with the same description together in the symbollist.
For example I define two entries u,v like this:

Code: Select all

\newglossaryentry{u}{symbol=$m/s$,name={\ensuremath{u}},sort=symbolu,type=symbolslist,description={Velocity},parent=romanletter}
\newglossaryentry{v}{symbol=$m/s$,name={\ensuremath{v}},sort=symbolv,type=symbolslist,description={Velocity},parent=romanletter}
then I reference both in the text with \gls(u) and \gls(v) and get two entries in the Symbollist:

u....m/s....Velocity
v....m/s....Velocity

but I would like them written together:

u,v....m/s....Velocity

Is there any possibility, how to achieve it?

Thanks,
Jan.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries: group more symbols with the same description

Post by nlct »

I think the easiest way to do it would be to combine the entries. For example:

Code: Select all

\newglossaryentry{uv}{symbol=$m/s$,
name={\ensuremath{u}, \ensuremath{v}},
user1={\ensuremath{u}},
user2={\ensuremath{v}},
sort=symboluv,
type=symbolslist,
description={Velocity},
parent=romanletter
}
You could then define some convenience commands to display the different symbols:

Code: Select all

\newcommand{\glsu}{\glsuseri{uv}}
\newcommand{\glsv}{\glsuserii{uv}}
You can then use \glsu and \glsv where you previously had \gls{u} and \gls{v}. The only alternative I can think of is to write a script that will post-process the glossary file to collate the entries.

Regards
Nicola Talbot
Post Reply