6

Whilst reading the manual for MakeIndex I stumbled upon:

MakeIndex assumes that all page numbers are either arabic or lower-case roman numerals; it assumes that pages numbered with roman numerals precede those numbered with arabic numerals.

and wondered... how can I lift this restriction? Specifically: how can I tell MakeIndex to not verify the page numbering format?

For instance, if I have an index entry on an \alph page.

I'm open to suggestions regarding alternative indexing preprocessors, but they should work with hyperref (ruling out xindy if memory serves).

2
  • It's a limitation of MakeIndex, yes. Why isn't xindy a choice?
    – egreg
    Dec 31, 2011 at 20:54
  • As far as I remember xindy had no support for hyperref... please do correct me if I'm wrong! :)
    – mpr
    Dec 31, 2011 at 21:00

1 Answer 1

7

The following test.tex document compiles perfectly and all the page references have their hyperlink:

\documentclass{book}
\usepackage{imakeidx}
\usepackage{hyperref}

\makeindex[program=texindy]

\begin{document}
\frontmatter
abc\index{abc}

\mainmatter
xyz\index{xyz}

abc\index{abc}

\newpage
abc\index{abc}

\cleardoublepage
\pagenumbering{alph}

\appendix
abc\index{abc}

\newpage
abc\index{abc}

\printindex

\end{document}

Of course imakeidx is not necessary, I used it just for doing everything in one step, running

pdflatex --shell-escape test

Pages with alphabetic numbering are sorted after arabic numbered ones, which come after roman numbered ones, but I guess it's possible to customize Xindy's behavior.

On the other hand, the same result is obtained with MakeIndex.

4
  • This, sir, is one great answer :)
    – mpr
    Jan 1, 2012 at 0:00
  • @egreg: Why texindy? In other words, why not xindy?
    – Sony
    Jan 1, 2012 at 1:09
  • @Sony It's a script that calls xindy after some common initializations relative to LaTeX usage
    – egreg
    Jan 1, 2012 at 10:48
  • @egreg: Thanks. I will ask a (detailed) question to get a more detailed answer. :)
    – Sony
    Jan 2, 2012 at 0:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .