% This file is embedded in glossaries-extra-manual.pdf
% Example 91 Combining prereset and preunset
% Label: ex:preresetpreunset
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage {glossaries-extra}
\glsdefpostlink {general}{\glsxtrpostlinkAddDescOnFirstUse }
 \newglossaryentry {sample}{name={sample},
 first={sample first use},
 description={an example}} 
\begin{document}
\gls {sample}. Used? \ifglsused {sample}{Yes}{No}. \par {\glsfirst [preunset=local,prereset=global]{sample}. Used? \ifglsused {sample}{Yes}{No}. } \par Used? \ifglsused {sample}{Yes}{No}. \par {\gls [preunset=local,prereset=global]{sample}. Used? \ifglsused {sample}{Yes}{No}. } \par Used? \ifglsused {sample}{Yes}{No}. 
\end{document}
