% This file is embedded in glossaries-extra-manual.pdf 
% Example 94 Reference with hyperlink in section headings
% Label: "ex:glslinkinsechead"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}


\pagestyle{headings}
\glssetcategoryattribute{general}{headuc}{true}
\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}


\newglossaryentry{sample}{name={sample},description={an example}}
\renewcommand{\glsxtrtitleopts}{} 
\begin{document}
\section{\Glsfmttext{sample}}
First use: \gls{sample}. Next use: \gls{sample}. 

\printunsrtglossary 
\end{document}