summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries/glossaries-user-examples/glossaries-user-example008.tex
blob: 3b5e7f6f3e74ff78d0418d61199c84a041101933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% This file is embedded in glossaries-user.pdf
% Example 8 Simple document with standalone entries
% 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}