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

Following the \index quoting rules (prepend a reserved character with a double-quote), I do

\index{"|"| operator}

but the entry never shows up in the index. Doing these (similar) things does work as expected:

\index{"!"! operator}
\index{"| operator}

So what is special about '||'? Needless to say, it also doesn't work without double-quotes.

share|improve this question
up vote 11 down vote accepted

Your example

\index{"|"| operator}

should work. However there seem to exist some problems with hyperref. Simply put the index key or just the problematic part in braces works:

\index{{"|"|} operator}
share|improve this answer

You might want to try using \| instead of || for the operator; both to deal with problematic escaping, but more importantly to get spacing right when you use it.

share|improve this answer

If you index the symbol in math mode, it should work. That is, try

\index{$"|"|$ operator}
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.