| 1 |
% arara: pdflatex |
| 2 |
% arara: pdflatex |
| 3 |
% arara: makeglossaries |
| 4 |
% arara: pdflatex |
| 5 |
\documentclass{article} |
| 6 |
|
| 7 |
\usepackage[colorlinks]{hyperref} |
| 8 |
\usepackage{glossaries-extra} |
| 9 |
|
| 10 |
\makeglossaries |
| 11 |
|
| 12 |
\GlsXtrEnableEntryCounting |
| 13 |
{abbreviation}% list of categories to use entry counting |
| 14 |
{2}% trigger value |
| 15 |
|
| 16 |
\newabbreviation{html}{HTML}{hypertext markup language} |
| 17 |
\newabbreviation{xml}{XML}{extensible markup language} |
| 18 |
\newabbreviation{css}{CSS}{cascading style sheet} |
| 19 |
|
| 20 |
\newglossaryentry{sample}{name={sample},description={sample}} |
| 21 |
|
| 22 |
\begin{document} |
| 23 |
This is a sample document that uses entry counting. The entry counting |
| 24 |
has been enabled on the \texttt{abbreviation} category. |
| 25 |
This means that abbreviations will only be added to the glossary |
| 26 |
if they have been used more than $n$ times, where in this |
| 27 |
document $n$ has been set to |
| 28 |
\glsgetcategoryattribute{abbreviation}{entrycount}. |
| 29 |
Entries in other categories behave as normal. |
| 30 |
|
| 31 |
|
| 32 |
Used once: \gls{html}. |
| 33 |
|
| 34 |
Used twice: \gls{xml} and \gls{xml}. |
| 35 |
|
| 36 |
Used three times: \gls{css} and \gls{css} and \gls{css}. |
| 37 |
|
| 38 |
Used once but this entry is in the ``general'' category |
| 39 |
which doesn't have the ``entrycount'' attribute set: |
| 40 |
\gls{sample}. |
| 41 |
|
| 42 |
\printglossaries |
| 43 |
|
| 44 |
\end{document} |