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 found this related topic but it didn't seem to fix my problem: How to fix symbol index entry?

I was using good old \|\cdot\| for norms but my index wasn't liking it. So then I did the new command \norm to be \|. This works great except in subscripts. To be specific I have something like this:


And it appears in the index as $B_{weird stuff}(x,r)$. More specifically, going into the index file I see it's recorded as this:

$B_{\delimiter 026B30D \cdot \delimiter 026B30D }(x,r)$

Any ideas?

share|improve this question
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Guido Feb 25 '13 at 13:31
What happens with \DeclareRobustCommand*{\norm}{\|}? (to be used in math mode) – jfbu Feb 25 '13 at 13:51
That fixes it! Thank you user700902! – danzibr Feb 25 '13 at 14:37
@danzibr: I will make it into an answer so that you can accept it and help me get all the reputation I deserve ;-) – jfbu Feb 25 '13 at 16:11

The phenomenon is an instance of TeX "expanding" things. Sometimes you do not want this to happen: this is discussed in LaTeX: a document preparation system under the name of fragile and robust commands. One way to make things "robust" is to use \DeclareRobustCommand: so here


can be used to solve your problem.

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.