hyperref icon indicating copy to clipboard operation
hyperref copied to clipboard

Hyperref + makeindex + entails problem

Open jamesjer opened this issue 9 years ago • 1 comments

I am not certain that this is a hyperref bug. If you can determine that it is not, please let me know and I will file this bug elsewhere.

I maintain the PVS package (http://pvs.csl.sri.com/) for the Fedora Linux distribution. A few years ago, after a TeXLive update, the build started failing while trying to make the user manual. Details are available here: https://bugzilla.redhat.com/show_bug.cgi?id=886158. The issue arises with this paragraph in the manual:

The \cmd{x-show-current-proof} command creates a window showing the cur-rent proof tree. Every sequent in the tree is represented by a $\vdash$ symbol\index{"|-@$\vdash$}. The proof commands used to create the tree will also be shown between the $\vdash$ symbols. This tree will be automatically updated after every proof command.

Prior to TeXLive 2012, that index command resulted in the following entry in user-guide.ind (the last entry in the section for symbols):

\item $\vdash$, \hyperpage{52}

With TeXLive 2012 and later, this is generated instead:

\item $\vdash$}, 52

The missing \hyperpage is annoying, but the extraneous right curly brace is fatal. The problem seems to be caused by hyperref deciding that the - in "|- might represent a page range and wrapping the whole thing in hyperindexformat, thereby hiding the escaping " from makeindex. If I have misdiagnosed the problem, pointers in the right direction would be appreciated. Thank you.

jamesjer avatar Nov 04 '16 15:11 jamesjer

Perhaps Heiko can comment if something changed since 2012, perhaps this?


2012-11-06  6.83m  Heiko Oberdiek
    * Option `hyperindex': The latest encapsulating command is repeated
      for the close range entries, if it is not already given. That improves
      compatibility to `xindy'. (Formatting commands remain unsupported.)

As a workaround I think you can use extra braces as in

\index{{"|-}@$\vdash$}

which isn't perfect as it will sort as {|-} rather than |- but in practice sort order of symbols is perhaps fairly arbitrary anyway...

This document runs for me without error and makes an index hyperlinking |- back to page 1

\documentclass{article}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{makeidx}
\makeindex
\begin{document}
\makeatletter

The {x-show-current-proof} command creates a window showing the
cur-rent proof tree. Every sequent in the tree is represented by a
$\vdash$ symbol\index{{"|-}@$\vdash$}. The proof commands used to create
the tree will also be shown between the $\vdash$ symbols. This tree will
be automatically updated after every proof command.

\printindex
\end{document}

davidcarlisle avatar Nov 04 '16 16:11 davidcarlisle