[Tex/LaTex] Automatically index acronyms

acronymsindexing

I'm using the acronym package. Is it possible to automatically add an index entry each time an acronym is used?

Best Answer

Modify the \ac command so that in addition to its original function it will call \index.

\documentclass{article}

\usepackage{makeidx}
\makeindex

\usepackage{acronym}

\let\oldac\ac
\renewcommand*{\ac}[1]{\oldac{#1}\index{#1}}

\begin{document}

\begin{acronym}
\acro{NATO}{North Atlantic Treaty Organization}
\end{acronym}

Some text about the \ac{NATO}.

\printindex

\end{document}
Related Question