% This file is embedded in glossaries-extra-manual.pdf
% Example 90 Illustrating the prereset option
% Label: "ex:prereset"
% 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}
Text field: \glstext{sample}. 

First use: \gls{sample}. Next use: \gls{sample}. 

Force reset: \gls[prereset]{sample}. Used? \ifglsused{sample}{Yes}{No}. 

Force reset: \glstext[prereset]{sample}. Used? \ifglsused{sample}{Yes}{No}. 
\end{document}
