I'm writing a book using memoir with a lot of technical words. I want to have an index at the end, which, for each word or term I choose, will refer the reader to the relevant pages. Is there any efficient way to build this index as I write?

3 Answers 3


I would suggest using the memoir documentation source as a start to see how a LaTeX document, which uses the memoir document class, creates an index. Although this may not always be done "efficiently", since it depends on the writer's choice of technique, it's a start none the less.

In many cases, automated index entry generation through a macro is preferred. For example, creating


and then using


rather than constantly typing

... and then there was a word\index{word} at ...

However, this limits one to using a one-dimensional index. Multi-dimensional index usage (for example, using \index{word!sentence!paragraph}, say) requires more work to define an appropriate macro. For example, using optional parameters based on the depth.

The main motivation should be consistency, and ease of adaptation, if things require some future modification.


You can make an index. See for a description of making an index (see comment of Zooba) and for an example for an index for wiki LaTeX.


To create index, you need to include makeidx package, call \makeindex command in the preamble, put indexes in \index{}, and finally \printindex at the place where index needs to be printed. Once the document is set up as above, build the document in the following three steps:

  1. pdflatex <<filename.tex>>, then this command produces filename.idx that will be an argument for the command in step 2
  2. makeindex <<filename.idx>>, and then run
  3. pdflatex <<filename.tex>>

The following is a minimum working example.




\chapter{Chapter One}
Content of chapter one with two indexes indexone\index{indexone} and indextwo\index{indextwo}. 

\chapter{Chapter Two}
Content of chapter two with three indexes indexone\index{indexone}, indexthree\index{indexthree} and indextwo\index{indextwo}.  



Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .