Latest news 2021-09-06: new blog post "Legacy Documents and TeX Live Docker Images".

Feature Tracker

ID 33🔗
Date: 2015-06-23 09:59:07
Status Closed (Implemented)
Category glossaries
Summary Option to display specific locations in the glossary
Cross Ref 26

Sign in to subscribe to notifications about this report.

Description

Dear Nicola,

Thank you for your glossaries package!

I use the \gls{} macro to add glossary entries and acronyms. All of these locations are added in the glossary. Unfortunately, a user will have no glue which back reference has the most interesting information. Is it possible to add an option that suppresses the location of the \gls{} macro?

I discussed it on StackExchange: Display specific locations in the glossary

Kind regards,
Dirk

MWE

No mwe.tex

Evaluation

The commands described in Using Glossary Terms Without Links are provided for no-indexing purposes, however version 4.16 now has a hook \glswriteentry which controls the indexing for commands like \gls. The default definition is

\newcommand*{\glswriteentry}[2]{%
  \ifglsindexonlyfirst
    \ifglsused{#1}{}{#2}%
  \else
    #2%
  \fi
}
(The first argument is the entry's label and the second argument is the code that actually writes the indexing information.) This can be redefined to customize when indexing occurs. To completely suppress the indexing you can redefine \glswriteentry to do nothing:
\renewcommand*{\glswriteentry}[2]{}

Update 2020-02-29:

I think this may be a duplicate of create link, but no link target by \gls macros, so I'm also closing this as "implemented" now that glossaries-extra provides the "noindex" option for commands like \gls.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the feature request ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=33