Feature 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 | 36🔗 |
---|---|
Date: | 2015-09-23 12:23:00 |
Status | Closed (Not Implemented) Sign in if you want to like this report. |
Category | glossaries |
Summary | Provide an easier way to skip an entries from glossaries |
Sign in to subscribe to notifications about this report.
Description
Looking for a way to not display well known acronyms in list of acronyms, I found this question:Do not display one special acronym in list of acronyms
and saw your comment that says it is enough to define the entries as usual and use \glsmoveentry
to move them to an undefined glossary, as explained here:
Moving Entries to Another Glossary
But, an easier way to skip entries from glossaries would be nice. In the spirit of \glsadd
, a command such as \glsskip{label}
could be nice. I agree that additional commands, such as \acrshortskip{label}
could be necessary.
MWE
No mwe.tex
Evaluation
\glsadd
works by adding a line to the indexing file. It's not so easy to perform the reverse operation, particularly since the possibility of hyperlinks needs to be taken into account. I have therefore decided not to implement this feature.
The simplest method is to create an ignored glossary and (for acronyms with just the base package) identify it as a list of acronyms. The acronym should then be defined with the type
set to that ignored glossary. This will ensure that no hyperlinks are created for that entry (since obviously the hypertarget won't exist). It's also the best method from a semantic point of view as it clearly identifies the acronym as being somehow different from the others when it's defined (for example, too common to need an explanation).
With the glossaries-extra package you can use of combination of hyper=false,noindex
when referencing the particular entries, which will prevent both the hyperlink and indexing but obviously this is a bit tedious if you reference the term multiple times.
The question really is why do you want particular acronyms to be omitted from the list? If it's because they're only referenced once then the entry counting mechanism is better. If it's because the terms are so common that they don't need to be described then it's better to have an ignored glossary. With the glossaries-extra package you don't need to identify the ignored glossary as a list of acronyms.
Examples:
- Use an ignored glossary with the base package:
\documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage[acronymlists={main,common}]{glossaries} \newignoredglossary{common} \makeglossaries \setacronymstyle{long-short} \loadglsentries[common]{example-glossaries-acronym} \loadglsentries{example-glossaries-acronym-desc} \begin{document} \gls{lid} and \gls{mal}. \printglossaries \end{document}
Only the MAL entry appears in the list. The LID entry doesn't have a hyperlink. The first sentence reads "lorem ipsum dolor (LID) and morbi auctor lorem (MAL)." - It's marginally simpler with the glossaries-extra package as you don't need to identify the acronym lists:
\documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{glossaries-extra} \newignoredglossary{common} \makeglossaries \setabbreviationstyle[acronym]{long-short} \loadglsentries[common]{example-glossaries-acronym} \loadglsentries{example-glossaries-acronym-desc} \begin{document} \gls{lid} and \gls{mal}. \printglossaries \end{document}
The result is the same as before. - Entry counting with the base package:
\documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{glossaries} \glsenableentrycount \makeglossaries \setacronymstyle{long-short} \loadglsentries{example-glossaries-acronym} \loadglsentries{example-glossaries-acronym-desc} \begin{document} \cgls{lid} and \cgls{mal}. Another \cgls{mal}. \printglossaries \end{document}
(Document build: pdflatex, pdflatex, makeglossaries, pdflatex.) Again only the MAL entry is listed but now the first sentence is "lorem ipsum dolor and morbi auctor lorem (MAL)." If you prefer to have the full form ("lorem ipsum dolor (LID)") or just the short form ("LID") then you can redefine\cglsformat
and\cglsplformat
as appropriate. - Entry counting with the glossaries-extra package:
\documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{glossaries-extra} \makeglossaries \GlsXtrEnableEntryCounting{acronym}{1} \setabbreviationstyle[acronym]{long-short} \loadglsentries{example-glossaries-acronym} \loadglsentries{example-glossaries-acronym-desc} \begin{document} \gls{lid} and \gls{mal}. Another \gls{mal}. \printglossaries \end{document}
(Document build: pdflatex, pdflatex, makeglossaries, pdflatex.)
With bib2gls, you can use record counting (instead of entry counting) or you can use filtering or you can again use an ignored glossary. However, the entry must be selected somehow in order for it to be defined even if it shouldn't be displayed in the glossary.
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=36