% This file is embedded in glossaries-user.pdf 
% Example 8 Simple document with standalone entries
% Label: "ex:standalone"
% arara: pdflatex
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[colorlinks]{hyperref}
\usepackage[sort=none,
 nostyles% <- no glossary styles are required
 ]{glossaries-extra} 

\newglossaryentry{set}{name={set},
 description={a collection of any kind of objects},
 symbol={\ensuremath{\mathcal{S}}}
} 

\newglossaryentry{function}{name={function},
 description={a rule that assigns every element in the 
 domain \gls{set} to an element in the range \gls{set}},
 symbol={\ensuremath{f(x)}} }
\newcommand*{\termdef}[1]{% 
 \section{\Glsxtrglossentry{#1} \glsentrysymbol{#1}}% 
 \begin{quote}\em\Glsentrydesc{#1}.\end{quote}% 
} 
\begin{document}
\tableofcontents 

\section{Introduction}
Sample document about \glspl{function} and \glspl{set}. 

\termdef{set} 

More detailed information about \glspl{set} with examples. 

\termdef{function} 

More detailed information about \glspl{function} with examples. 
\end{document}