summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.tex
blob: ad31c065ee029a4ead5788343707b78897649227 (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
% This file is embedded in glossaries-extra-manual.pdf
% Example 144 Sub-glossary for a given counter value
% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{filecontents*}{\jobname.bib}
@symbol{pi,name={\ensuremath{\pi}},
description={ratio of the length of the circumference of a circle to its diameter}}
@symbol{root2,name={\ensuremath{\surd2}},
description={Pythagoras' constant}}
@symbol{zeta3,name={\ensuremath{\zeta(3)}},
description={Ap\'ery's constant}}
@symbol{zero,name={0},
description={nothing or nil}}
@symbol{one,name={1},
description={single entity, unity}} 
\end{filecontents*}
\usepackage[record,stylemods,style=index]{glossaries-extra}
 \GlsXtrRecordCounter{section}
 \GlsXtrLoadResources[src={\jobname},
 symbol-sort-fallback=description
] 
\begin{document}
\section{Sample}
\printunsrtglossaryunit{section}
This section discusses \gls{pi}, \gls{root2} and \gls{zeta3}. 

\section{Another Sample}
\printunsrtglossaryunit{section}
This section discusses \gls{one}, \gls{pi} and \gls{zero}. 

\printunsrtglossaries 
\end{document}