% This file is embedded in glossaries-extra-manual.pdf % Example 122 Entry unit counting (per section) according to category % Label: "ex:catunitentrycount" % arara: pdflatex % arara: pdflatex % arara: makeglossaries % arara: pdflatex % arara: pdfcrop \documentclass[12pt]{article} \pagestyle{empty} \usepackage[colorlinks]{hyperref} \usepackage{glossaries-extra} \GlsXtrEnableEntryUnitCounting{abbreviation}{2}{section} \makeglossaries % category=abbreviation: \newabbreviation{html}{HTML}{hypertext markup language} \newabbreviation{css}{CSS}{cascading style sheet} % category=general: \newglossaryentry{sample}{name={sample},description={an example}} \begin{document} \section{Sample} Used once: \gls{html}. Used three times: \gls{css} and \gls{css} and \gls{css}. Used once: \gls{sample}. \section{Another Sample} Used once: \gls{css}. Used twice: \gls{html} and \gls{html}. \printglossaries \end{document}