% This file is embedded in glossaries-extra-manual.pdf % Example 92 References in section headings (simplistic approach) % Label: "ex:simpleseccmds" % arara: pdflatex % arara: pdflatex % arara: pdfcrop \documentclass[12pt]{article} \pagestyle{empty} \usepackage[colorlinks]{hyperref} \usepackage{glossaries-extra} \glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} \newglossaryentry{sample}{name={sample},description={an example}} \newglossaryentry{alpha}{name={\ensuremath{\alpha}},description={alpha}} \begin{document} \tableofcontents \section{\texorpdfstring{\Glsentrytext{sample} and \glsentrytext{alpha}}{Sample and alpha}} First use: \gls{sample} and \gls{alpha}. Next use: \gls{sample} and \gls{alpha}. \printunsrtglossary \end{document}