Latest news 2021-06-05: New blog post: Dickimaw Books Site Account.

glossaries package FAQ

How do I change the way entries are sorted? 🔗

There are three package options that change the sort order: sort=standard (default alphabetical sort), sort=def (sort in order of definition) and sort=use (sort in order of use). As from version 4.0, you can also redefine \glsprestandardsort to hook into the standard sort mechanism to modify its behaviour. See the section Sorting Options in the user manual for further details.

Alternatively, if you want to override the sort for an individual entry, then you can use the entry’s sort key to sort it according to a different term. If it’s for the entire alphabet, then you will need to use xindy (instead of makeindex) and use an appropriate xindy language module. I’m sorry, I can’t give any assistance with writing or adapting xindy modules or styles. If you want help, try the xindy mailing list on the Xindy Web Site.

Version 4.04 introduced a new way of generating glossaries that doesn’t use external indexing applications (via \makenoidxglossaries and \printnoidxglossary / \printnoidxglossaries). Although this is a slower method that can’t sort extended-Latin or non-Latin alphabets, it does allow you to use independent sorting methods for each glossary. For example, you might want to sort the main glossary alphabetically, but sort the list of notations in order of use or definition. In general, it’s best to avoid this method if possible.

The glossaries-extra package provides a hybrid of the above methods by adding an optional argument to \makeglossaries so you can use makeindex/xindy for the alphabetical sorting and the \printnoidxglossary approach for order of definition/use. However, for a more flexible approach, consider switching to a combination of glossaries-extra and bib2gls. See, for example, Gallery: Sorting.

2020-07-01 14:31:58

Alternative link:

Category: glossaries package
Topic: Sorting and Collating Entries