Debian Codegraph @

texmf-dist/doc/latex/glossaries/samples/sampletree.tex

raw
1 % This file is public domain
2 % If you want to use arara, you need the following directives:
3 % arara: pdflatex: { synctex: on }
4 % arara: makeglossaries
5 % arara: pdflatex: { synctex: on }
6 % arara: pdflatex: { synctex: on }
7 %
8 %http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sampletree
9 \documentclass{report}
10
11 \usepackage[colorlinks]{hyperref}
12 \usepackage[style=alttreehypergroup,nolong,nosuper]{glossaries}
13
14 % The alttree type of glossary styles need to know the
15 % widest entry name for each level
16 \glssetwidest{Roman letters} % level 0 widest name
17 \glssetwidest[1]{Sigma} % level 1 widest name
18
19 \setglossarypreamble{This is a contrived example to demonstrate the
20 alttreehypergroup style.}
21
22 \makeglossaries
23
24 \newglossaryentry{greekletter}{name={Greek letters},
25 text={Greek letter},
26 description={\nopostdesc}}
27
28 \newglossaryentry{sigma}{name={Sigma},
29 text={\ensuremath{\Sigma}},
30 first={\ensuremath{\Sigma} (uppercase sigma)},
31 description={Used to indicate summation},
32 parent=greekletter}
33
34 \newglossaryentry{pi}{name={pi},
35 text={\ensuremath{\pi}},
36 first={\ensuremath{\pi} (lowercase pi)},
37 description={Transcendental number},
38 parent=greekletter}
39
40 \newglossaryentry{romanletter}{name={Roman letters},
41 text={Roman letter},
42 description={\nopostdesc}}
43
44 \newglossaryentry{e}{name={e},
45 description={Unique real number such that the derivative of
46 the function $e^x$ is the function itself},
47 parent=romanletter}
48
49 \newglossaryentry{C}{name={C},
50 description={Euler's constant},
51 parent=romanletter}
52
53 \begin{document}
54 This is a sample document illustrating hierarchical glossary
55 entries.
56
57 \chapter{Greek Letters Used in Mathematics}
58
59 Some information about \glspl{greekletter}.
60 The letter \gls{pi} is used to represent the ratio of a circle's
61 circumference to its diameter.
62 The letter \gls{sigma} is used to represent summation.
63
64 \chapter{Roman Letters Used in Mathematics}
65
66 Some information about \glspl{romanletter}.
67 The letter \gls{e} is the unique real number such that
68 the derivative of the function $e^x$ is the function itself.
69 The letter \gls{C} represents Euler's constant.
70
71 \printglossaries
72
73 \end{document}