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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
\documentclass{article}
\usepackage{amsmath}
\usepackage[colorlinks]{hyperref}
\usepackage[record=nameref,% use bib2gls with nameref information (requires bib2gls v1.8+)
equations,% switch to equation counter in numbered equations
floats,% switch to corresponding counter when in a float
counter=section,% use section as the default record counter
stylemods,% load glossaries-extra-stylemods.sty
style=index]{glossaries-extra}
\GlsXtrLoadResources[
% entries defined in example-glossaries-brief.bib and
% example-glossaries-symbols:
src={example-glossaries-brief,example-glossaries-symbols},
sort={en-GB},% sort according to en-GB locale
%selection=all,% select all entries provided in the .bib file
loc-suffix% add default suffix (full stop) for location list
]
\begin{document}
\Gls[counter=page]{dolor}.
\section{Sample Section}
\gls{dolor}, \gls{amet}.
See \url{https://ctan.org/pkg/bib2gls} for converting
\texttt{.bib} to \texttt{.glstex} files.
\section{Another Section}
\glspl{lorem}, \gls{amet}.
`Lorem' unused or undefined? \GlsXtrIfUnusedOrUndefined{lorem}{yes}{no}.
\begin{figure}[hb]
\centering
X
\caption{Sample Figure \glsfmttext{lorem}}
\end{figure}
\gls{lorem} again.
\section{Yet Another Section}
\Gls{lorem}, \gls{amet}, \gls{alpha}.
\begin{equation}
\glssymbol{alpha} = 2\glssymbol[counter=page]{beta}
\end{equation}
\gls{beta}.
\begin{align}
\glssymbol{alpha} &= 2\glssymbol{beta}\\
\glssymbol{gamma} &= \glssymbol{beta}[^2] = \frac{1}{4}\glssymbol{alpha}[^2]
\end{align}
\newpage
\Gls{lorem} and \gls[counter=page]{dolor}.
\section{Section about \glsfmttext{lorem}}
\Gls{lorem}.
\printunsrtglossary
\end{document}
|