Debian Codegraph @

texmf-dist/doc/latex/glossaries-extra/samples/sample-restricteddocdefs.tex

raw
1 % arara: pdflatex
2 % arara: makeglossaries
3 % arara: pdflatex
4 \documentclass{article}
5
6 \usepackage[docdef=restricted,
7 undefaction=warn
8 ]{glossaries-extra}
9
10 \makeglossaries
11
12 \begin{document}
13
14 \newglossaryentry{sample}{name={sample},description={an example}}
15
16 \gls{sample}.
17
18 \printglossaries
19
20 Too late to define an entry with the \texttt{docdef=restricted}
21 setting. (Definitions must come before \verb|\printglossary|.)
22
23 \newglossaryentry{sample2}{name={sample2},description={another
24 example}}
25
26 New entry just defined: \gls{sample2}.
27 This will cause an error (or warning with \texttt{undefaction=warn})
28 in \verb|\printglossaries|.
29 This missing entry will be marked with two question marks ??
30 in the glossary.
31
32
33 \end{document}