4

In previous questions the focus was on ignoring acronyms that were only used once in a document (here and here). Since glossaries version 4.14, the command \cgls was provided to deal with this (as provided here).

However, in certain situations you want the full length of an acronym at each chapter or section (for which \glsresetall can be used), but you might still want to ignore acronyms that are used only once in the full document. In these situations, it turns out it's impossible to use \cgls (from this page):

Using \glsresetall resets the "currcount" field to zero for all entries. When an entry isn't used after \glsresetall, the "currcount" field for that entry is zero at the end of the document. This means that at the start of the next LaTeX run "prevcount" for the entry is 0. Commands such as \cgls test for prevcount=1, which is false, so \cgls behaves like \gls.

The following MWE and image shows how ANT shows up in the glossaries list and in full with abbreviation in the text. How is it possible to ignore the ANT entry without using acronym-specific commands (such as \newignoredglossary{label} or \glsreset{label})?

\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\glsenableentrycount

\newacronym{ANO}{ANO}{Acronym Number One}
\newacronym{ANT}{ANT}{Acronym Number Two}
\newglossaryentry{test} {
    name={test},
    description={A test is used for testing}
}

\begin{document}

\printglossaries

\glsresetall
\section{Section One}
\gls{ANO}, \gls{ANO}\\
\cgls{ANT}\\
\gls{test}

\glsresetall
\section{Section Two}
\gls{ANO}\\

\end{document}

ANT is described in full but I want it ignored

Note: my actual document has about 150 acronyms and many chapters, where I have \glsresetall at the beginning of each chapter to always get the full acronyms for each first use in the chapter.

DoubleYou
  • 277

0 Answers0