Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude entry from glossary?

I'm using the glossaries package in LaTeX. I've got \gls{foo} in my document, but I don't want the entry for "foo" to appear in the glossary. How can I keep a working (i.e. expanding) \gls{foo} in the body of my document, but exclude the entry for "foo" from the glossary?

EDIT: I want to use \gls{foo} to indicate "as used here, 'foo' has its specific meaning within this document." In a few cases, though, I've ended up with a "foo" whose definition is too obvious--or difficult--to articulate in the glossary.

So I want \gls{foo} to be expanded as usual, but I don't want the "foo" entry to appear in the glossary.

I hope this adds a little more information about what I'm trying to accomplish. It may be an abuse of glossaries, but I find it helpful to make sure I'm always using the same words and the right words while writing technical documents.

like image 204
draebek Avatar asked May 10 '26 02:05

draebek


1 Answers

If you are using the glossaries package you can create an "ignored" glossary like

\documentclass{article}

\usepackage{glossaries}
\newglossary[glignoredl]{ignored}{glignored}{glignoredin}{Ignored Glossary}
\makeglossaries

\newglossaryentry{foofoo}{name={FOOFOO},description={foofoo stuff}}
\newglossaryentry{foo}{name={FOO},type={ignored},description={no good description}}
\newglossaryentry{bar}{name={BAR},description={bar of stuff}}

\begin{document}

Here is a \gls{foo} that is also a \gls{bar}, but of course it's also a \gls{foofoo}.
Why not consider buying a \gls{foo}?

\printglossary
% \printglossary[type={ignored}]

\end{document}
like image 136
Ivan Andrus Avatar answered May 12 '26 13:05

Ivan Andrus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!