# Both sorted and unsorted glossaries with glossaries package?

Using the glossaries package, is it possible to have two glossaries:

1. one unsorted (i.e., in order of appearance/use) such as for an index of notation, and
2. the other sorted alphabetically such as for a glossary of terminology?

If so, how?

Note: I also require that the glossary of notation be subdivided into groups. I know how to do that with just one glossary, but will the usual method interfere if I also have the 2nd kind of glossary?

In case it matters, I'm using the memoir documentclass.

• Since there are two commands, \makeglossaries and \makeindexI'm not sure if you need to try and create two different sorting schemes from \printglossary[type=XXX,style=YYY]. The glossaries package can also put the page numbers your item is used on with your sorted entry. The only other way of sorting a glossary that I am aware of offhand, is through the sort={} field in \newglossaryentry which is somewhat manual, but with a custom style that prints the page numbers, would give you what you describe, even though it's not nice and automatic. – EngBIRD Nov 16 '16 at 1:46

You need to use \makenoidxglossaries and \printnoidxglossary instead of \makeglossaries and \printglossary if you want different sorting rules. The noidx variant uses TeX to sort and collate rather than using makeindex or xindy. It would've helped to have had a minimal working example (MWE) to illustrate the type of entries you have. The following example uses dummy entries provided in the test files example-glossaries-brief.tex and example-glossaries-symbols.tex which should be installed with glossaries.sty:

\documentclass{memoir}

\usepackage[symbols]{glossaries}
\usepackage{glossary-mcols}

\makenoidxglossaries

\begin{document}

\printnoidxglossary[sort=word,style=mcolindexgroup]
\printnoidxglossary[type=symbols,sort=def,style=index]

\end{document}


The main glossary is sorted according to word order:

The symbols glossary is unsorted, although it looks sorted in this example simply because the sample entries were defined in that order. Another option is sort=use which orders the entries according to the first use in the document. There are many different predefined glossary styles to choose from.

Note that the noidx method is very inefficient at sorting alphabetically and is only designed for ASCII. The glossaries-extra extension package allows a mix and match approach so that makeindex/xindy may be used for the alphabetical sorting and \printnoidxglossary can be used for order of definition or order of use. (With sort=def or sort=use, \printnoidxglossary simply iterates through an internal list, which means no actual sorting is performed).

\documentclass{memoir}

\usepackage[symbols]{glossaries-extra}
\usepackage{glossary-mcols}

\makeglossaries[main]


If you use makeglossaries, it will detect that makeindex is only required for the main glossary.