7

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

1 Answers1

5

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}
lockstep
  • 250,273