13

In the glossaries package, how can I make the glossary print the entries by order of appearance?

Some context: I'm using the glossaries package to generate a symbol index, and I'm interested to see whether the order in which I introduce the notation makes sense.

21

I suspect the package option sort=use will do what you're after, i.e. write \usepackage[sort=use]{glossaries}. From the manual:

sort

This is a ⟨key⟩=⟨value⟩ option where the option can only have one of the following values:

  • standard: entries are sorted according to the value of the sort key used in \newglossaryentry (if present) or the name key (if sort key is missing);
  • def: entries are sorted in the order in which they were defined (the sort key in \newglossaryentry is ignored);
  • use: entries are sorted according to the order in which they are used in the document (the sort key in \newglossaryentry is ignored).

The default is sort=standard.

  • 1
    Thanks! I was using version 2, which didn't support this option yet. I upgraded to version 3 and it works as expected. – Ohad Kammar Oct 15 '11 at 20:13

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.