Debian Codegraph @

texmf-dist/doc/latex/glossaries/glossaries-user-examples/glossaries-user-example008.tex

raw
1 % This file is embedded in glossaries-user.pdf
2 % Example 8 Simple document with standalone entries
3 % Label: "ex:standalone"
4 % arara: pdflatex
5 % arara: pdflatex
6 % arara: pdfcrop
7 \documentclass[12pt]{article}
8 \pagestyle{empty}
9 \usepackage[colorlinks]{hyperref}
10 \usepackage[sort=none,
11 nostyles% <- no glossary styles are required
12 ]{glossaries-extra}
13
14 \newglossaryentry{set}{name={set},
15 description={a collection of any kind of objects},
16 symbol={\ensuremath{\mathcal{S}}}
17 }
18
19 \newglossaryentry{function}{name={function},
20 description={a rule that assigns every element in the
21 domain \gls{set} to an element in the range \gls{set}},
22 symbol={\ensuremath{f(x)}} }
23 \newcommand*{\termdef}[1]{%
24 \section{\Glsxtrglossentry{#1} \glsentrysymbol{#1}}%
25 \begin{quote}\em\Glsentrydesc{#1}.\end{quote}%
26 }
27 \begin{document}
28 \tableofcontents
29
30 \section{Introduction}
31 Sample document about \glspl{function} and \glspl{set}.
32
33 \termdef{set}
34
35 More detailed information about \glspl{set} with examples.
36
37 \termdef{function}
38
39 More detailed information about \glspl{function} with examples.
40 \end{document}