summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries-extra/samples/sample-altmodifier.tex
blob: 201c55c26f5d3eebe0275922cccf10ec2df9baf9 (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
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdflatex
\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}

\makeglossaries

% Don't use with indexonlyfirst setting!

\GlsXtrSetDefaultGlsOpts{noindex}
\GlsXtrSetAltModifier{>}{noindex=false}

\newglossaryentry{sample}{name={sample},description={an example}}

\begin{document}
This is a sample document.
The \gls{sample} entry is used on this page but isn't indexed.

\newpage
The \gls>{sample} entry is used on this page and is indexed.

\newpage
The \gls{sample} entry is used on this page but isn't indexed.

\newpage
\printglossaries

\end{document}