12

In my document I use several acronyms which I do not wish to be displayed in the list of acronyms. This solution using the acronym-package unfortunately doesn't work as it clashes with my use of the glossaries-package. The minimal example ist as follows:

\documentclass{article}

\usepackage[acronym,shortcuts]{glossaries}
\makeglossaries

\newacronym{ex1}{Example 1}{should be displayed in list of acronyms when used at least once}
\newacronym{ex2}{Example 2}{should never be displayed in list of acronyms}

\begin{document}
\printglossaries

I use \textbf{\acs{ex1}} and \textbf{\acs{ex2}}  in my text.

\end{document}
10

The following seems to work:

  • Define a second acronym list (say, "hidden") using the acronymlists package option;

  • Declare the name and the filename extensions for this new "glossary";

  • Add the optional argument type=hidden to \newacronyms that shouldn't be displayed;

  • Instead of \printglossaries, use \printglossary and specify the type (and do so for all glossaries/acronym lists except the "hidden" one).


\documentclass{article}

\usepackage[acronym,shortcuts,acronymlists={hidden}]{glossaries}
\newglossary[algh]{hidden}{acrh}{acnh}{Hidden Acronyms}
\makeglossaries

\newacronym{ex1}{Example 1}{should be displayed in list of acronyms when used at least once}
\newacronym[type=hidden]{ex2}{Example 2}{should never be displayed in list of acronyms}

\begin{document}
\printglossary[type=\acronymtype]

% \printglossary[type=hidden]% umcomment for testing purposes

I use \textbf{\ac{ex1}} and \textbf{\ac{ex2}}  in my text.

\end{document}
  • 4
    You don't actually need to define a new glossary type. You can define the entry as usual and use \glsmoveentry to move it to an undefined glossary. See Moving Entries to Another Glossary – Nicola Talbot Dec 10 '13 at 9:31
  • Extremely useful, Nicola. Perhaps this feature should have been easier to find? It is quite useful to use the package to make sure the way you write terms is consistent, even if it does not belong in a list of abbreviations. – user1603472 Feb 1 '17 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.