I have a collection of math contest. After each question, i am writing the topics of the question like

\index {Cyclic Quadrilateral}
\index {Euler's $\phi$ function}

But makeindex refers a page number, not the problem itself. How can I achieve such an indexing.

  • I guess that the glossaries package is what you're looking for.
    – egreg
    Commented Jan 1, 2013 at 13:28

1 Answer 1


It is not clear what you want to achieve. To insert the problem number a possibility would be to create a macro (assuming that a problem counter exists)

\newcommand*{\Tindex}[1]{\index{#1 \arabic{problem}}}

A second possibility is to create an index of topics and problems. This can be done using the index package. Here is an example of how to use it (for the documentation of the package use texdoc index)


\newindex[theproblem]*{topics}{pdx}{pnd}{Topics in Problems Index}





Then run

makeindex -o file.pnd file.pdx

where file is the name of the LaTeX source file.

  • Seems not. .pnd and .pdx are the suffices of the files as defined in \newindex
    – Tobi
    Commented Jan 1, 2013 at 15:25
  • @HarishKumar Tobi is right. It is not a typo. The second and third argument of \newindex are the extensions of the index files.
    – Guido
    Commented Jan 1, 2013 at 15:39

You must log in to answer this question.

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