I'd like to be able to control which \gls
-entries shows up with pagenumbers in the glossary. I've read the manual and found that the glsignore
format does this partially, but only seem to make the number illegible rather than removing it fully. I.e. note the 1, ,
for the pizza
entry, I would only like the 1
there (since that is the only reference from the text body).
Is there any way to fix this without resorting to bib2gls
? Converting my very large and crossreferenced and full of macro to bib
-format is a significant venture, which I'd like to avoid.
I'm quite handy with awk
/ sed
/ grep
etc, so having to reformat all calls to \gls{*entry*}
in the main body would not be an issue (I guess I could convert my glossary to .bib
as well, but I really don't want to).
Here in the example I'm using a \mygls
-macro to apply glsignore
on entries within the glossary itself. I would like to use it on some entries outside the glossary as well, but inside the glossary is the most important.
I am fully aware that I need to run makeglossaries
at least twice since not all standards are directly referenced in the text body.
MWE:
\documentclass{article}
\usepackage[xindy,acronym]{glossaries-extra}
\makeglossaries
\newcommand{\mygls}[1]{\gls[format=glsignore]{#1}}
\newglossaryentry{tech}
{%
name={technology},
description={Not to be confused with \mygls{pizza}.}
}
\newglossaryentry{pizza}
{%
name={pizza},
description={Food usually consumed with \mygls{beer}.}
}
\newglossaryentry{beer}
{%
name={beer},
description={Drink normally consumed with \mygls{pizza}.}
}
\newglossaryentry{sim}
{%
name={simulated},
description={A simulated newpage \newpage which also references \mygls{pizza}.}
}
\begin{document}
A glossary example. International \gls{tech} and \gls{pizza} use has
reached peak oil levels. As has \gls{sim} shenanigans.
\newpage
\printglossaries
\end{document}
As a further description of my case, one of my glossaries (in my very-large-thesis*tm) contains a hundred or so standards with many cross-references, and I'd like to get rid of those cross-references pagenumbering because they completely garble the glossary (i.e. the pagenumbers take up more space than the descriptions of the entries themselves) but still keep the pagenumbers for when the standards are referenced in the text, and keep the links for readers reading the pdf rather than printed version.
Got any ideas?