2

In the following MWE, an entry from glossaries is included in a section title so it gets included in the page heading created by the book class:

\documentclass{book}
\usepackage{glossaries}

\begin{document}
\newglossaryentry{asd}{name={ASD}, description={asd sda das}}

\section{A + S + D: \gls{asd}}

\end{document}

This causes the following error on the first pdflatex run (even before running makeglossaries):

! Package glossaries Error: Glossary entry `ASD' has not been defined.

See the glossaries package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.9 \end{document}

What am I doing wrong? Should I just avoid using glossaries entries in chapter and section titles?

0 Answers0