[Tex/LaTex] acronym package: don’t write acronym if single occurence

acronyms

I use the acronym package for managing acronyms. There is one option I am missing (couldn't find it in the manual): that is, suppressing the abbreviated form if the acronym occurs only once throughout the text.

(The reasoning being that there is no need to use an acronym in the text if the word doesn't reappear elsewhere in the text, however, as an author/editor you don't always know this upfront.)

Is there an easy way to work around this, and make the acronym package do this, without modifying the package itself?

Best Answer

If you don't mind switching packages you could used the package acro(*). It provides the package option single which exactly does what you want: don't use an acronym at all if it is used only once throughout the document. However, all in all it is very similar to the acronym package.

The following example needs to be run at least twice:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{acro}
\acsetup{single}

\DeclareAcronym{nato}{
  short = NATO ,
  long  = North Atlantic Treaty Organization
}
\DeclareAcronym{un}{
  short = UN ,
  long  = United Nations
}
\DeclareAcronym{eu}{
  short = EU ,
  long  = European Union
}
\DeclareAcronym{icc}{
  short = ICC ,
  long  = International Criminal Court
}

\begin{document}

\printacronyms

Only once: \ac{eu}

Twice: \ac{nato}; again: \ac{nato}

Twice: \ac{icc}; again: \ac{icc}

Once: \ac{un}

\end{document}

enter image description here

(*) Disclaimer: I am the author