I'd like to add a symbol table to my math book. Since there is no meaningful/helpful way to order the index entries lexicographically, I'd like to order them chronologically, i.e. an index entry x will precede an index entry y if the first occurrence of x in the book precedes y's first occurrence. Is it possible to automate this kind of indexing using the MakeIndex program/makeidx package, or some other program/package?

P.S. To be more precise, I don't mean the absolute first occurrence of a symbol in the book; only those occurrences that I explicitly indicate should be considered.

  • 3
    Package glossaries is able to achieve this, as far as I can remember
    – user31729
    May 11, 2017 at 10:16

1 Answer 1


That is pretty much the default behaviour of the glossaries package. alpha_a and alpha_b got the same sort key so they are then sorted by first use. beta comes after them regardless of where it is used.



\newglossaryentry{alpha_a} {
description={your discription},

\newglossaryentry{alpha_b} {
description={your discription},

\newglossaryentry{beta} {
description={your discription},

    \gls{beta} \gls{alpha_b} \gls{alpha_a}

enter image description here

You would then probably want to look into a style that includes the units of the symbols if you are using it for math. Here would be a good starting point to look into this: Custom glossary style: Make glossary as wide as \textwidth

  • Thanks. What do you mean by 'the units of the symbols'?
    – Evan Aad
    May 12, 2017 at 5:01
  • Since you are using it for math I just figured that you might want to define a glossary style that looks something like this: "E ... in kg/(m*s^2) ... Young's modulus ... Page 1" so it also contains the unit and not only the symbol.
    – Georg
    May 12, 2017 at 6:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .