% This file is embedded in glossaries-extra-manual.pdf
% Example 103 Category post-link hooks
% Label: "ex:catpostlinkfirstuse"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{glossaries-extra}
\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
\glsdefpostlink{symbol}{\glsxtrpostlinkAddSymbolOnFirstUse}
\glsdefpostlink{number}{\glsxtrpostlinkAddSymbolDescOnFirstUse}
\newglossaryentry{sample}{name={sample},description={an example}}
\newglossaryentry{alpha}{name={alpha},symbol={\ensuremath{\alpha}},
description={a symbol},category={symbol}}
\newglossaryentry{pi}{name={pi},symbol={\ensuremath{\pi}},
description={a constant},category={number}} 
\begin{document}
First use: \gls{sample}, \gls{alpha}, \gls{pi}. 

Next use: \gls{sample}, \gls{alpha}, \gls{pi}. 
\end{document}
