1

I am using the glossaries-extra package in my document. Here is an excerpt:

\chapter{List of Nicknames}
\label{chapter:nicknames}
% PAGE 4 OF THE OUTPUT PDF
% I am actually using the `acronyms` package in conjunction with `glossaries`, but I removed it from this post in the interest of clarity.
\begin{itemize}
    \item \gls{Joseph} is also called ``Joe."
    \item \gls{Robert} goes by ``Bob."
    \item \gls{Samantha}'s nickname is ``Sam."
\end{itemize}

% ... Some other chapters ...

\chapter{Walmart}
% PAGE 7 OF THE OUTPUT PDF

\gls{Joseph} (Joe) was going to Walmart one day, and he ran into \gls{Robert} (Bob) and \gls{Samantha} (Sam).

% ... Some more paragraphs ...
% PAGE 8 OF THE OUTPUT PDF

When they got into the store, \gls{Joseph} asked \gls{Robert} to give him advice on a critical quandary: should he buy Cheerios or Rice Chex?

I want my glossary to look like this:

Joe 7, 8
(Description of Joe)

Bob 7, 8
(Description of Bob)

Sally 7
(Description of Sally)

... not this:

Joe 4, 7, 8
(Description of Joe)

Bob 4, 7, 8
(Description of Bob)

Sally 4, 7
(Description of Sally)

In other words: when I print the glossary with \printunsrtglossaries, I don't want the page numbers from the "List of Nicknames" chapter. I do, however, want the page numbers of the glossaries references within the "Walmart" chapter. How can I accomplish this?

The references on page 4 should still link to the glossary entry, but they should not appear in the page number list.


I am not looking for an answer that uses the acronyms feature of glossaries. If there is another command that I can use instead of \gls (e.g., \glsNoPageNum or something) in the "List of abbreviations" chapter, that is fine. If there is a command that I can use to exclude page numbers from the entire chapter (e.g., \glsExcludeNumbersFrom{chapter:nicknames} or something), that is even better. Please avoid redefining macros that already exist in a CTAN package.


0

You must log in to answer this question.