[XeTeX] double dash in index

Mike Maxwell maxwell at umiacs.umd.edu
Sun Aug 23 04:23:34 CEST 2009


This ought to be simple, but it took me awhile to figure it out, since I 
didn't see anything obvious on the web.  So I'm going to take the risk 
of posting something to this group that may be obvious to y'all.

When there are two \indexentry's with the same first arg, but different 
page #s, by default \makeindex inserts '--' between them.

E.g.
\indexentry{Auxiliaries!Constructions|(hyperpage}
{210}
...
\indexentry{Auxiliaries!Constructions|(hyperpage}
{215}

results in something like
    Auxiliaries
      ...
      Constructions, 210--215
This intermediate stage is of course turned into an en-dash in standard 
LaTeX; but not in XeTeX.  There's a parameter delim_r which allows you 
to re-define this separator to something else, so I redefined it in an 
index.ist file to be a Unicode en-dash.

This works, in the sense that the index entry now contains an en-dash 
instead of the two ASCII dashes.  However, the hyperlink is broken; it's 
red (as are my other hyperlinks in the PDF), but clicking on it does 
nothing.

The solution (which I finally found at 
http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/), was to 
redefine delim_r as follows:
    delim_r "\\nohyperpage{–}"
This results in two hyperlinks, one to the first page in the range, the 
other to the last page.

Enjoy!
-- 
    Mike Maxwell
    What good is a universe without somebody around to look at it?
    --Robert Dicke, Princeton physicist


More information about the XeTeX mailing list