I'm using the glossaries package to produce multiple glossaries in the same document and have found it convenient to define my own glossary style.

When makeindex is used the glossary is sub-divided into a maximum of 28 logical blocks that are determined by the first character of the sort key set with \newglossaryentry. The sub-divisions are, respectively: symbols, numbers, and A,...,Z. I need to have three separate glossary groups, and for that I prepend the sort key of glossary entries with the following letters:

  • a for a group of numbers and letters
  • g for a group of Greek letters
  • s for a group of subscripts

Here's a MWE (just run (pdf)latex twice on it with --shell-escape):


%% new glossary style
% indicate what to do at the start of each logical group
\item[\glstarget{##1}{##2}] ##3%

%% glossary

%% glossary entries
                       description={lift function}}
                        description={lift coefficient}}
                           description={angle of attack}}
                          description={sideslip angle}}
                        description={free-stream condition}}

\immediate\write18{makeglossaries \jobname}


enter image description here

The way theglossary environment is redefined above is somewhat redundant, but I only wish to provide a working example for now.


Is it possible to remove the title of the first group, and change the titles of the second and third groups to Greek letters, and Subscripts, respectively?

If yes, do I need to call xindy using my own style file or does a change in the way I define the glossary style onecol suffice?

  • I suspect the solution could be in \glsgetgrouptitle and/or \...groupname, but so far I've failed to find a workround. – nnunes Feb 20 '13 at 20:39

You are on the right track, but we can use the existing \glsgetgrouptitle. Note, however, that with this solution all your glossary entries should have an a, g, or s prefix in the sort key. Put

\newcommand*{\Ggroupname}{Greek letters}

into your preamble to obtain special nomenclature

If desired, you may also redefine \glsgroupheading inside the \newglossarystyle declaration as follows (requires the etoolbox package):

\newcommand*{\Ggroupname}{Greek letters}

This way \glsgroupheading does nothing at the start of the first glossary group:

enter image description here

| improve this answer | |
  • I had tried to define the commands \ggroupname, and \sgroupname, but that didn't work. So in my ignorance I assumed \Ggroupname and \Sgroupname wouldn't work either. Can I please buy you a beer? :-) – nnunes Feb 21 '13 at 3:13
  • @NunoNunes I read the source of glossary.sty. And YES! ;-) – mafp Feb 21 '13 at 8:38
  • Gentlemen, I have a problem now. I redefined \Agroupname etc., but now my headings in the ACTUAL glossary are redefined as well. Thus, headings above terms starting with an A are now for example in a section called "Greek Letters"... Any idea how I can fix this? – Ingo Oct 29 '13 at 11:54
  • @Ingo I'm afraid I can't follow. The question and the answer here deal with the case that you only have three groups, each with a single heading. You seem to want to have additional headings for alphanumeric sorting within these three main groups? Maybe you should ask a separate question for that. – mafp Oct 29 '13 at 22:48
  • Here's the deal. I have a list of acronyms, a list of symbols, a list of indices, and an actual glossary (of the style: Term - Description). I use the keys a-g for section in my lists, e.g. aA for classifying it as a Latin letter A. This I do by redefining Agroupname etc. What would happen then, however, is that in the actual glossary at the end of the document, there would not be a heading A anymore, but for example Greek letters. However, by now I have managed to work around this by Just redefining the commands at the end again... – Ingo Oct 30 '13 at 9:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.