I'm using the acronym package. Is it possible to automatically add an index entry each time an acronym is used?
Asked
Active
Viewed 2,006 times
1 Answers
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
indexto add index entries automatically every time you use\ac. – Socowi Sep 13 '19 at 15:18