LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsUsing \makeindex \printindex

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
jerryf
Posts: 3
Joined: Sun Sep 08, 2013 12:30 am

Using \makeindex \printindex

Postby jerryf » Thu Jul 21, 2016 8:54 pm

I am using TeXworks, which I think uses LaTeX2e.
I am working on a book, but can't seem to make the index show up in the PDF.
A simple program I use would look like:

  1. \documentclass[12pt,latexsym]{book}
  2. \usepackage{makeidx}
  3. \begin{document}
  4. I want to build\index{build} an index.
  5. \printindex
  6. \end{document}


I get a file: Ntext.idf, which shows: \indexentry{build}, but how do I get the actual index to show up at the end of the PDF of the book?
Last edited by cgnieder on Fri Jul 22, 2016 3:36 pm, edited 1 time in total.
Reason: added code markup

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8209
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Jul 21, 2016 11:13 pm

You need to write also \makeindex in the document header. And you need to run the Makeindex tool, you can click it in the TeXworks typeset list box of available engines.

But imakeindex makes it much easier - no extra Makeindex run needed.

Try:

  1. \documentclass[12pt,latexsym]{book}
  2. \usepackage{imakeidx}
  3. \makeindex
  4. \begin{document}
  5. I want to build\index{build} an index.
  6. \printindex
  7. \end{document}


Stefan
Site admin


Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 0 guests