To make index I have to write word two times,
\documentclass[12pt,oneside]{book}
\usepackage{makeidx}
\makeindex
\begin{document}
This will not print \index{anything} !!!
However it will make an entery in Index.
To print the word in text and index you need to write word \index{word}.
\printindex
\end{document}
To make an index for we need to write word \index{word}
. I find it redundant.
Is there any way (package or code) to just write \index{word}
?
\newcommand{\iindex}[1]{#1\index{#1}}
and then you type\iindex{word}
– Sigur Feb 26 '16 at 16:09#
in brackets. – Sigur Feb 26 '16 at 16:23