Debian Codegraph @

texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.tex

raw
1 % This file is embedded in glossaries-extra-manual.pdf
2 % Example 145 Sub-glossary for a given counter value
3 % Label: "ex:minigloss"
4 % arara: pdflatex
5 % arara: bib2gls
6 % arara: pdflatex
7 % arara: pdfcrop
8 \documentclass[12pt]{article}
9 \pagestyle{empty}
10 \begin{filecontents*}{\jobname.bib}
11 @symbol{pi,name={\ensuremath{\pi}},
12 description={ratio of the length of the circumference of a circle to its diameter}}
13 @symbol{root2,name={\ensuremath{\surd2}},
14 description={Pythagoras' constant}}
15 @symbol{zeta3,name={\ensuremath{\zeta(3)}},
16 description={Ap\'ery's constant}}
17 @symbol{zero,name={0},
18 description={nothing or nil}}
19 @symbol{one,name={1},
20 description={single entity, unity}}
21 \end{filecontents*}
22 \usepackage[record,stylemods,style=index]{glossaries-extra}
23 \GlsXtrRecordCounter{section}
24 \GlsXtrLoadResources[src={\jobname},
25 symbol-sort-fallback=description
26 ]
27 \begin{document}
28 \section{Sample}
29 \printunsrtglossaryunit{section}
30 This section discusses \gls{pi}, \gls{root2} and \gls{zeta3}.
31
32 \section{Another Sample}
33 \printunsrtglossaryunit{section}
34 This section discusses \gls{one}, \gls{pi} and \gls{zero}.
35
36 \printunsrtglossaries
37 \end{document}