Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
I can not help you with your actually question. -but the glossaries package is more advanced and with many benefits over accronym. –  Hans-Peter E. Kristiansen Jun 11 '12 at 14:04
3  
I do agree with your reasoning. I would definitely define the acronym, even if it is not used elsewhere in the text. It will enlighten the reader, and make it possible for the reader to understand the acronym from elsewhere within the same topic. –  Hans-Peter E. Kristiansen Jun 11 '12 at 14:09
add comment

1 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

share|improve this answer
    
Interesting. Is there any specific reason why decided to use different definition macros? E.g. in the example you use \DeclareAcronym, whereas the acronym package uses \acrodef. Seems to me it would be easier for people to switch if you adhere to the 'standard' of the acronym package. –  Rabarberski Jul 3 '12 at 6:54
    
I do not know how to decide what the “standard” way is: acronym also allows you to define acronyms with \acro inside the acronym environment or to use \newacro. On the other hand glossaries uses \DefineAcronym... That is a problem which can be solved by a simple 'search and replace'. What will be more troubling when switching “mid-document” is that the syntax of these commands are different. –  cgnieder Jul 3 '12 at 8:18
    
thanks for your reply, I wasn't aware of glossaries ... –  Rabarberski Jul 3 '12 at 10:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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