Sign up ×
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.

All my entries in the symbol index involving $\|\cdot\|$ get rejected. For instance {\index{symbol}{normx@{$\|\cdot\|_X$}}}.

How can I fix this?

share|improve this question
Can you please add to your question a minimal working example illustrating the problem? – Gonzalo Medina May 28 '12 at 4:17
Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill May 28 '12 at 4:54

2 Answers 2

The symbol | is special within the \index command as it deals with special page ranges. You need to hide this from TeX using something like


Also note that \index takes only one argument which is the index entry. If you want to also print this entry in text, you need to use the following format:

...blah blah symbol\index{symbol} blah blah...

virtually duplicating the typeset component and index entry. Here's your MWE with a the above modifications:

enter image description here

See $\|\cdot\|_X$\index{normx@$\norm\cdot\norm_X$} and the norm\index{norm}.


Consider reading through Leslie Lamport's MakeIndex : An Index Processor For LaTeX.

share|improve this answer

Special characters for MakeIndex should be quoted: so to index |x| you have to write


The " character before a special character makes it lose its meaning. However \" is not treated in a particular way (it's an accent command), so your entry should be


or \index{normx@"\"|x"\"|} if you want a string for specifying the alphabetic order.

If you use more entries with | than entries such as \index{abc|see def} you can create a personal MakeIndex style containing just one line

encap '*'

Call this file and call MakeIndex as

makeindex -s filename

This will disable the special feature of | (whose role is taken by *) and so you can type \index{normx@$\|x\|$} without other precautions.

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.