3

Really impressed by the extensive potential of glossaries package by Nicola L.C. Talbot to manage different types of glossaries in a generic approach, however I tried to look for this feature in the user-manual, but couldn't find help though.
As in the MWE, sometimes you want to make use of all benefits of the defining new entries by glossaries package, yet you don't want them to make their way into the glossary list, or that type of list to which they don't really belong, which happened to be Acronyms in my case, and the entry Xxx is not welcomed to be in the acronym list as it is something not belonging to the rest of acronyms, an odd one. In keeping with this, another wish is not to get this entry even counted like others in that glossary list or any other, it is like rendering it as a''ghost entry'', if it fits the description, i.e., to be typeset but not listed, like ghosts may visit election campaigns but their votes would never be counted!

Is there any way to suppress entries similar to Xxx from appearing in the Acronym list, while still ''\gls''ing it in the text?

Note: glossaries package is v3.07 from TexLive 2013 distribution.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}

\usepackage{xcolor}
\usepackage[hyperindex=true]{hyperref}
\definecolor{dark-red}{rgb}{0.4,0.15,0.15}
\hypersetup{colorlinks, linkcolor={dark-red}}

\usepackage[xindy, nonumberlist=true]{glossaries}
\makeglossaries

\newacronym{lab1}{Acr1}{long description 1}
\newacronym{lab2}{Acr2}{long description 2}
\newacronym{lab3}{Acr3}{long description 3}
\newacronym{lab4}{Xxx}{description in text but not to be listed}

\begin{document}

Here is the first use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \gls{lab4}.

This is the second use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \gls{lab4}.

\end{document}  

Result of MWE:
enter image description here

0

1 Answer 1

8

[ Just to answer the unanswered, converting the comment into an answer ]

The glossaries package provides lots of commands that allow you to display entry details without adding any information to the glossary. You can find them in the Chapter 9 of its documentation.

In your case, you can use \glsentryfirst{lab4} for the first use of the acronym and then \glsentrytext{lab4} for later use.

So, the MWE

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}

\usepackage{xcolor}
\usepackage[hyperindex=true]{hyperref}
\definecolor{dark-red}{rgb}{0.4,0.15,0.15}
\hypersetup{colorlinks, linkcolor={dark-red}}

\usepackage[xindy, nonumberlist=true]{glossaries}
\makeglossaries

\newacronym{lab1}{Acr1}{long description 1}
\newacronym{lab2}{Acr2}{long description 2}
\newacronym{lab3}{Acr3}{long description 3}
\newacronym{lab4}{Xxx}{description in text but not to be listed}

\begin{document}

Here is the first use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \glsentryfirst{lab4}.

This is the second use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \glsentrytext{lab4}.

\printglossaries

\end{document} 

should do what you want:

enter image description here

BTW: Probably you would also want to use the option acronym when loading glossaries.

2
  • Does that not remove one of the benefits of using glossaries - i.e. the automatic first-time expansion? I use acronym with no list of acronyms, rather than glossaries, so I'm not too familiar with it - maybe it has other benefits.
    – Chris H
    Sep 30, 2013 at 15:40
  • @ChrisH Yes, it does. I don't know any better method. Sep 30, 2013 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .