TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
I guess that the glossaries package is what you're looking for. – egreg Jan 1 '13 at 13:28

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.

share|improve this answer
Seems not. .pnd and .pdx are the suffices of the files as defined in \newindex – Tobi Jan 1 '13 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 Jan 1 '13 at 15:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.