Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to create index in LaTeX

📅 2014-Jul-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

If you are writing a report or a book using LaTeX, it might be a good idea to generate an index or glossary of key terms at the end. The typical method to do this is using the makeidx package. Place its makeindex command in the preamble at the beginning of the document to indicate that an index should be generated. Use the index command and pass it the name of the index entry whenever a key term is used. Finally, place the printindex command at the end of the document to print the generated index at that location.

% In the preamble
\usepackage{makeidx}
\makeindex

% Whenever a key term is defined or used
\index{normal distribution}
\index{poisson distribution}

% At end of document
\printindex

Tried with: Ubuntu 14.04