glossaries package FAQ

Why shouldn’t I use commands like \gls in \section, \chapter, \caption etc? 🔗

The user manual cautions against using commands like \gls in the argument of sectioning commands (\chapter, \section, etc) or in \caption. The reason for this warning is that there are multiple issues, some more serious than others, that can occur if you ignore this warning.

So what should you do if you want to use a term in a caption or sectioning command? It’s best to do as the user guide suggests and use one of the expandable commands such as \glsentrytext or \glsentrylong or \glsentryfull. Alternatively, have a look at the extension package glossaries-extra, which provides commands specifically for use in chapter or section headings.

2023-05-02 19:21:36


Permalink: https://www.dickimaw-books.com/faq.php?id=183
Alternative link: https://www.dickimaw-books.com/faq.php?itemlabel=whynoglsinsection

Category: glossaries package
Topic: Referencing Terms