[tex-eplain] Indexing Java relational OR (|) and conditional OR (||)

Dorai Sitaram ds26@gte.com
Sun, 18 Feb 2001 11:11:53 -0500 (EST)


> Using the command \sidx{operator}{\char`\|} produces the indexentry:
> 
> \indexentry{operator!\char `\|}{6}
> 
> in my .idx file.  This isn't displayed after being processed by
> makeindex.
> 
> How is it possible to display the vertical bar symbol?

Here are some possibilities:

1.

\def\pipe{\char`\|}

\sidx{operator}[\pipe]

2.

\sidx{operator}[\char`"\"|]

3.

\sidx{operator!\char`"\"|}

*

All three alternatives are tested.

I suspect you may want to wrap a {\tt...}
around the \char`\| .

In alternatives 2 and 3, I'm using the special
character " to quote the \ and the |.  Typically,
one doesn't need to quote \, but in this case
one does because it is followed by ".

--d