Smile for the Camera: a new cybercrime short story ebook.

glossaries package FAQ

How do I make my glossaries appear in numbered chapters/sections? 🔗

As from version 1.1, you can use the package option numberedsection. This option takes one of the following values: false (unnumbered), nolabel (glossaries are numbered but not labelled) and autolabel (glossaries are numbered and automatically labelled). As from v4.02 there is also: nameref (glossaries are unnumbered but labelled so they can be reference via \nameref defined by the nameref package, which is automatically loaded by hyperref).

If numbersection=autolabel (or numberedsection=nameref), the labels are taken from the glossary type, so the main (default) glossary is given the label main, the list of acronyms (when using the acronym option) is given the label acronym and additional glossaries are given the same label as used in the first argument to \newglossary. So you can refer to each glossary in the text using \ref. For example:

See chapter~\ref{main} for the main glossary and
chapter~\ref{acronym} for a list of acronyms.
Note that with the package option numbersection=nolabel, you will need to add your own label to the glossary preamble if you want to reference it. For example:
\renewcommand{\glossarypreamble}{\label{glossary}}
\printglossary
However take care if you have multiple glossaries. For example:
\renewcommand{\glossarypreamble}{\label{glossary}}
\printglossary
\renewcommand{\glossarypreamble}{\label{acronyms}}
\printglossary[type=acronym]
Alternatively, upgrade to v4.02 and use numberedsection=nameref instead.

2020-06-27 15:41:56


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

Category: glossaries package
Topic: Glossary Formatting