\documentclass{book} \usepackage[makeindex,nomain]{glossaries-extra} \setglossarystyle{long3col} \newcommand{\binding}[2]{#1\nolinebreak{\mapsto}\nolinebreak#2} \newcommand{\finiteMap}[1]{\mathopen{\glsuseri{not:finiteMap}}#1\mathclose{\glsuserii{not:finiteMap}}}%%% Finite map, e.g., ⦃ x1↦a1, ... xn↦an ⦄. \newcommand{\infiniteWordsSet}[1]{#1^{\gls{not:infiniteWordsSymbol}}} %%% Infinite sequences \newglossary[nlg]{notation}{not}{ntn}{List of symbols} \makeglossaries \newglossaryentry{not:finiteMap}{type=notation, name={\(\{|\dotso|\}\)}, text={\{|\dotso|\}}, sort={finiteMap}, description={A finite map: \(\{| \binding{c_1}{s_1},\,\dotsc,\,\binding{c_n}{s_n}|\}\) is a function that maps \(c_i\) to \(s_i\) for each \(i\).},user1={\{|},user2={|\}}} \newglossaryentry{not:infiniteWordsSymbol}{type=notation, name={\(\cdot^{\infty}\)}, text={\infty}, sort={*infiniteWordsSymbol}, description={Given an arbitrary set \(Z\), we denote by \(Z^{\infty}\) the set of all infinite words over \(Z\).}} \begin{document} \(\finiteMap{\binding{x}{\infiniteWordsSet{A}}}\) \backmatter \glsaddallunused \printglossaries \end{document}

in mwe.tex and then run

pdflatex mwe && makeindex -s mwe.ist -t mwe.nlg -o mwe.not mwe.ntn

in a loop until the output stabilizes.

Observe the needless comma on the last page of the resulting pdf: "1," in the entry corresponding to finite maps:

The entry corresponding to infinite words works as expected, without a comma.

Any help on how to get rid of the superfluous comma? We do need \glsaddallunused, since in a non-minimal example there are some symbols that are explained only in the list of symbols and intentionally not linked (in my non-minimal example, it would be a halmos symbol and "q.e.d.").

The issue has been reported to Nicola with a reference here.