Bug 785697

Summary: Index range entries are incorrect and display the final page twice.
Product: [Community] Publican Reporter: Norman Dunbar <norman>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED NOTABUG QA Contact: Ruediger Landmann <rlandman+disabled>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.8CC: rlandman+disabled
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-16 02:30:43 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Norman Dunbar 2012-01-30 06:51:45 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:

Subject start-end

For example:

Publican tools 101-125

Instead the output generated is like the following:

Subject start-end, end

For example:

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.

How reproducible:

Steps to Reproduce:
1. Create a document. At some point add an index tag as follows:

<index />

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.

Actual results:
When the index is generated, you get something like:

Whatever 10-22, 22

The last page in the range - 22 - has been duplicated.

Expected results:
When the index is generated, you should get this:

Whatever 10-22

Additional info:
Comment 1 Jeff Fearn 2012-02-13 00:12:18 EST
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.
Comment 2 Norman Dunbar 2012-02-16 02:08:41 EST
Hi Jeff,

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. 

Thanks again.

Comment 3 Jeff Fearn 2012-02-16 02:30:43 EST
Cool, there are probably some people who would want it displayed that way :)