1

In a document where some acronyms are defined, and only long versions are used throughout the document, is it possible to have these long forms not show in the list of acronyms?

MWE

\documentclass[a4paper, 12pt]{article}

\usepackage[toc,xindy,acronym,shortcuts,nomain]{glossaries}

\newacronym{test1}{T1}{test1}
\newacronym{test2}{T2}{test2}

\makeglossaries

\begin{document}
\printglossaries

This is \acrlong{test1} and this is \gls{test2}.

\end{document}

To clarify, what I am looking for is that after pdflatex -> makeglossaries -> pdflatex, T1 does not show in the list of acronyms. Is this possible?

1 Answer 1

1

If you use \glsentrylong instead of \acrlong, the entry won't be indexed:

\documentclass[a4paper, 12pt]{article}

\usepackage[toc,xindy,acronym,shortcuts,nomain]{glossaries}

\newacronym{test1}{T1}{test1}
\newacronym{test2}{T2}{test2}

\makeglossaries

\begin{document}
\printglossaries

This is \glsentrylong{test1} and this is \gls{test2}.

\end{document}

This doesn't check for the existence of test1 but you could define a command to perform this check in case you make a mistake when you type the label:

\documentclass[a4paper, 12pt]{article}

\usepackage[toc,xindy,acronym,shortcuts,nomain]{glossaries}

\newacronym{test1}{T1}{test1}
\newacronym{test2}{T2}{test2}

\makeglossaries

\newcommand{\glsl}[1]{\glsdoifexists{#1}{\glsentrylong{#1}}}

\begin{document}
\printglossaries

This is \glsl{test1} and this is \gls{test2}.

\end{document}

Image of document

Another possibility is to create an "ignored" glossary (using \newignoredglossary) and put the entries that you don't want indexed in there.

\documentclass[a4paper, 12pt]{article}

\usepackage[acronymlists={acronym,ignoredacronyms},
  toc,xindy,acronym,shortcuts,nomain]{glossaries}

\newignoredglossary{ignoredacronyms}

\newacronym[type=ignoredacronyms]{test1}{T1}{test1}
\newacronym{test2}{T2}{test2}

\makeglossaries

\begin{document}
\printglossaries

This is \acrlong{test1} and this is \gls{test2}.

\end{document}
1
  • \glsentrylong is perfect, second approach requires per-document manual work that I like to avoid. Thanks! Commented Feb 9, 2015 at 15:19

You must log in to answer this question.

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