8

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.

0
11

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}
5

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.

2

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

\index{$"|"|$ operator}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.