[XeTeX] Customizing Index - Adding chapter heading and verse number to index entries

A u akupadhyayula at gmail.com
Thu Oct 20 16:25:31 CEST 2011


I would like to provide the chapter title and the verse number for each
entry in the index. This is unusual but the book I am working on requires
such formatting.

In the output I want the chapter title to appear between the indexed text
and the verse number. For verses I am using the verse environment but do not
show here.

In the output shown below, the first line is the header, repeated on each
page of the index. Then, based on the three example verses, the desired
output:

Indexed text, Chapter Name, Verse Number.

Fairest... First... 1

decease... Second... 1

thine... Third... 4

I would like to suppress page numbers in the index.

\documentclass[12pt,a4paper]{book}
\usepackage{index}
\usepackage{idxlayout}
\makeindex

\begin{document}
\printindex

\chapter*{First}
  From \index*{fairest} creatures we desire increase,
  That thereby beauty's rose might never die ... |1|

\chapter*{Second}
  But as the riper should by time \index*{decease},
  His tender heir might bear his memory ... |1|

\chapter*{Third}
  But thou contracted to \index*{thine} own bright eyes,
  Feed'st thy light's flame with self-substantial fuel ... |4|
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20111020/dbd1ed35/attachment-0001.html>


More information about the XeTeX mailing list