7

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

1
  • The package acro has the option index to add index entries automatically every time you use \ac.
    – Socowi
    Sep 13 '19 at 15:18
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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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