Bug Tracker
I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)
ID | 138🔗 |
---|---|
Date: | 2019-11-05 18:27:06 |
Status | Closed (Not a Bug) |
Category | glossaries-extra |
Version | 1.41 |
Summary | Superfluous comma printed |
Sign in to subscribe to notifications about this report.
Description
Discussion: LaTeX Community Forum.Let us save the source
\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 ⦄. \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={|\}}} \begin{document} \(\finiteMap{\binding{x}{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.ntnin a loop until no changes occur. Observe the needless comma in the list of symbols of the resulting PDF after the page number: "1,".
I expect that the last item does not have a comma after it. The bug occurs using the most recent versions (glossaries v4.43, glossaries-extra v1.41). Any bugfix? Thanks in advance.
MWE
Download (778B)
\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 ⦄. \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={|\}}} \begin{document} \(\finiteMap{\binding{x}{a}}\) \backmatter \glsaddallunused \printglossaries \end{document}
Evaluation
This isn't a bug. The entry hasn't been marked as used in the document so \glsaddallunused
behaves the same as \glsaddall
with the format (encap) set to glsignore
. This essentially indexes the entry with \glsignore
which ignores its argument so the location list is 1, \glsignore{1}
. I recommend you add \glsunset{not:finiteMap}
to the definition of \finiteMap
if you want to use \glsaddallunused
. (An alternative solution is to switch to bib2gls where you can use selection=all
which doesn't add phantom locations.)
I've added a more detailed explanation in the linked post.
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=138