Red Hat Bugzilla – Bug 785697
Index range entries are incorrect and display the final page twice.
Last modified: 2012-02-16 02:30:43 EST
Description of problem:
When I create a book and include indexes where the <indexterm>s are used to define a startofrange and endofrange, the index entry should look like this:
Publican tools 101-125
Instead the output generated is like the following:
Subject start-end, end
Publican tools 101-125, 125
Version-Release number of selected component (if applicable):
Seen in Publican 2.8 on Fedora 16 64 bit. Probably affects other versions and OS versions.
Steps to Reproduce:
1. Create a document. At some point add an index tag as follows:
2. At the beginning of the document, add an indexterm tag as follows:
<indexterm class="startofrange" id="StartOfPTR">
3. At the end of the range, put this indexterm:
<indexterm class="endofrange" startref="StartOfPTR">
4. Build a pdf document.
When the index is generated, you get something like:
Whatever 10-22, 22
The last page in the range - 22 - has been duplicated.
When the index is generated, you should get this:
Hi, I believe there may be an error in your example, to quote the docbook guide:
Place an IndexTerm at the beginning of the range with Class set to StartOfRange and give this term an ID. Place another IndexTerm at the end of the range with StartRef pointing to the ID of the starting IndexTerm. This second IndexTerm must be empty.
Your endofrange indexterm is not empty. If you remove all content does it work?
<indexterm class="endofrange" startref="StartOfPTR" />
FYI we don't override any of the index code.
Yes that fixed it - thanks. My own source of information was http://www.sagehill.net/docbookxsl/GenerateIndex.html#Indexterms and there, the example given is as follows:
<indexterm class="startofrange" id="makestuff">
<indexterm class="endofrange" startref="makestuff">
So that's where my error comes from.
I think we can close this one.
Cool, there are probably some people who would want it displayed that way :)