bug-texinfo
[Top][All Lists]

## Indexing | (vertical bar) in LaTeX output

 From: Gavin Smith Subject: Indexing | (vertical bar) in LaTeX output Date: Sun, 2 Oct 2022 12:52:04 +0100

The groff manual indexes "\|" which is output in the LaTeX output as

\index[es]{\textbackslash{}"|@\texttt{\textbackslash{}"|}}%

However this leads to an error:

! Extra }, or forgotten \endgroup.

l.72   \item \texttt{\textbackslash{}|}}
, 186
?

es.idx has a line

\indexentry{\textbackslash{}"|hyperindexformat{\@\texttt{\textbackslash{}"|}}}{1

which becomes in es.ind

\item \texttt{\textbackslash{}|}}, 186

" is supposed to escape the first | but this doesn't work properly.

https://tex.stackexchange.com/questions/176931/how-to-escape-character-in-index

but this only treats | in the math context.  A commenter there says it
"confuses hyperref".

The "hyperindexformat" texts appears to be something added by hyperref.

Does anybody know (or know where we could ask) how to escape a | character
in an index entry correctly?