% This file is embedded in glossaries-extra-manual.pdf 
% Example 93 References in section headings using \glsfmttext
% Label: "ex:glsfmttext"
% 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{\Glsfmttext{sample} and \glsfmttext{alpha}} 

First use: \gls{sample} and \gls{alpha}. 

Next use: \gls{sample} and \gls{alpha}. 

\printunsrtglossary 
\end{document}
