Take the 2-minute tour ×
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.

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
    
This doesn't seem LaTeX specific. –  András Salamon Aug 4 '10 at 16:36
add comment

3 Answers

up vote 8 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
add comment

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
add comment

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

\index{$"|"|$ operator}
share|improve this answer
add comment

Your Answer

 
discard

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.