TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 want to have an index entry typeset as $a_\text{T}$, so I issue the command \index{at@$a_\text{T}$}. Each use of this index command creates a separate line in the index. How can I get \makeindex to recognize they all reference the same topic?

My index entries look like this:

enter image description here

share|improve this question
Can you show an example? – egreg May 10 '14 at 15:14
I think what @egreg meant was can you provide a minimal working example (MWE)? – Nicola Talbot May 10 '14 at 15:23
For solvers: +\usepackage{amsmath} – Malipivo May 10 '14 at 15:29
@GregH We need some code that shows the problem: I trust you when you say you get duplicate entries, but I can't know how you input them. – egreg May 10 '14 at 15:34
Having answered I remembered having answered before, this is probably a duplicate of tex.stackexchange.com/a/105713/1090 assuming it is the same issue. – David Carlisle May 10 '14 at 15:59
up vote 7 down vote accepted

Hard to say as you provided no example but I'd guess you have done this:

enter image description here







One argument is read verbatim and the other not, resulting in an idx file like

\indexentry{at@$a_\mathrm  {T}$}{1}

with different entries. The easiest solution is to wrap both in the same command. If you put \mbox (or anything) around the first \index then the index entries are merged.

share|improve this answer

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.