You can use the category attribute indexonlyfirst
(not to be confused with the package option of the same name).
\documentclass{article}
\usepackage{glossaries-extra}
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\glssetcategoryattribute{notation}{indexonlyfirst}{true}
\newglossaryentry{symb:c}{type=notation, category=notation, name=$c$, description=the speed of light}
\newglossaryentry{symb:m}{name=$m$, description=mass}
\makeglossaries
\begin{document}
Referencing my glossary items: \gls{symb:c}, \gls{symb:m}.
\newpage
Referencing my glossary items again: \gls{symb:c}, \gls{symb:m}.
\printglossaries
\end{document}
If you use a wrapper macro for defining the notation entries (or all of the other ones), you can set the category in the definition of that wrapper macro (the built-in wrappers like \newabbreviation
already do that) and just have to set the category attribute for the correct category.
If you do define the entries for all of your glossaries directly with \newglossaryentry
, you can set the category for all of them using \glsforeachincategory
after the definitions. (This feels clumsy, but I could not find any more elegant way to do it.)
\documentclass{article}
\usepackage{glossaries-extra}
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\glssetcategoryattribute{notation}{indexonlyfirst}{true}
\newglossaryentry{symb:c}{type=notation, name=$c$, description=the speed of light}
\newglossaryentry{symb:m}{name=$m$, description=mass}
\makeatletter
\glsforeachincategory[notation]{general}{\@temp@glsry}{\@temp@label}{%
\glsxtrsetcategory{\@temp@label}{notation}%
}
\makeatother
\makeglossaries
\begin{document}
Referencing my glossary items: \gls{symb:c}, \gls{symb:m}.
\newpage
Referencing my glossary items again: \gls{symb:c}, \gls{symb:m}.
\printglossaries
\end{document}
indexonlyfirst
is in effect) but nothing more (so it isn't confusing and unnecessarily long), that makes an answerer's job much easier.