Simple ranges
In hyperref
2012/11/06 v6.83m the encapsulating command will be repeated, if it is not explicitly given for the closing range entry. Then both Makeindex
and xindy
should be happy in case of simple ranges:
\index{...|(}
\index{...|)}
The .idx
file will contain hyperpage
in both cases.
Formatting commands
From the manual page of xindy
:
For raw index entries in LaTeX syntax, \index{aaa|bbb}
is
interpreted differently. For MakeIndex bbb
is markup that is
output as a LaTeX tag for this page number. For xindy, this is a
location attribute, an abstract identifier that will be later
associated with markup that should be output for that attribute.
For straight-forward usage, when bbb
is textbf
or similar,
we supply location attribute definitions that mimic MakeIndex
's
behaviour.
For more complex usage, when bbb
is not an identifier, no such
compatibility definitions exist and may also not been created with
current xindy
. In particular, this means that by default the
LaTeX package hyperref
will create raw index files that cannot
be processed with xindy
. This is not a bug, this is the
unfortunate result of an intented incompatibility. It is currently
not possible to get both hyperref
's index links and use xindy
.
A similar situation is reported to exist for the memoir
LaTeX
class.
Programmers who know Common Lisp and Lex and want to work on a
remedy should please contact the author.
Ad 3.
Easy, hyperref
index redefinitions are suppressed by
\usepackage[hyperindex=false]{hyperref}
Maybe there is a way to insert \hyperpage
for linked page numbers in xindy
.
Minimal page range
Xindy
make page ranges starting with three consecutive page numbers. This can changed by setting :min-page-range
to 1
(default is 2
). The following file mypagerange.xdy
also includes page-ranges.xdy
that contains the definition of the range separator:
; File mypagerange.xdy
(require "page-ranges.xdy")
(define-location-class "arabic-page-numbers"
("arabic-numbers") :min-range-length 1)
Then xindy
is called with option -M mypagerange.xdy
.
It appears that latexmk
can't detect that an idx file has been written via the imakeidx package so "makeindex" isn't run. I placed "makeindex" in quotes because what latexmk
actually runs is determined by a Perl variable, $makeindex
, and that can be changed in a configuration file. As far as I can tell, if latexmk
could detect that the idx file was created via the log file one need only set the $makeindex
variable to run splitindex
(which splits the index and runs makeindex
on each split) with the appropriate argument. I'd get in touch with John Collins, the maintainer of latexmk
, and discuss the what has to be done with him.
PS: the splitindexmk
engine for TeXShop that I wrote is really a fudge that takes advantage of the fact that latexmk
does nothing. Basically it first runs pdflatexmk
(an TeXShop engine using latexmk
), then splitindex
and finally a single run of pdflatex
with appropriate options so that TeXShop can sync properly and also Go
Best Answer
This should work and, apart from
\usepackage
instead of an option to\documentstyle
has always been the method also in LaTeX209.Check what the undefined command is, it would be very strange if it were
\index
.For multiple indices there is a choice between a few packages:
I wouldn't recommend index that's not as customizable as the last two ones. The advantages of imakeidx over splitidx are that it can compile automatically all indices during the LaTeX run and that it's compatible with idxlayout that extends its customization possibilities. It also supports
xindy
(as splitidx does). (Disclaimer: I'm one of the authors of imakeidx.)