Bug 703477

Summary: FOP: Issues with Table of Contents
Product: [openSUSE] openSUSE 11.4 Reporter: Tanja Roth <taroth>
Component: DocumentationAssignee: Thomas Schraitle <thomas.schraitle>
Status: VERIFIED FIXED QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Documentation Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 702276    
Attachments: HA Guide, built with FOP

Description Tanja Roth 2011-07-01 14:46:16 UTC
The table of contents does not appear in a very clean fashion when generating PFDs with FOP. Found the following issues: 

1. preface "About This Guide" appears on separate side in TOC, should appear on same side as the rest of the contents.

2. page numbers for chapters and sections have different distances from the right side of the page, this looks very scraggy. Page numbers should all have the same distance from the right side of the page (or from the type area). This would also fix the problem that page numbers currently stick out to the right with each digit that is added (see p.4 in the electronic version of the PDF, entries for p. 96 and p.108).
Comment 1 Tanja Roth 2011-07-01 14:51:32 UTC
Created attachment 438015 [details]
HA Guide, built with FOP
Comment 2 Tanja Roth 2011-07-18 12:51:37 UTC
Comment on attachment 438015 [details]
HA Guide, built with FOP

sorry, wrong attachment, see instead: https://bugzilla.novell.com/attachment.cgi?id=437718
Comment 3 Thomas Schraitle 2012-04-20 07:09:44 UTC
(In reply to comment #0)
> 
> 1. preface "About This Guide" appears on separate side in TOC, should appear on
> same side as the rest of the contents.

This is fixed in revision 1255 now.

Implementation detail:
The preface, chapter, and appendix titles contained a fo:block with a "keep-with-next.within-line" attribute/property. Unfortunately, FOP has got (still) only minor support for keep properties. In this situation, FOP didn't find any break opportunities and moved the complete blocks to the next page. 

Solution: I've added the keep property only, when fop1.extensions parameter is not set (or in other words: this is only inserted, when we use XEP).

 
> 2. page numbers for chapters and sections have different distances [...]

Still working on this...
Comment 4 Thomas Schraitle 2012-04-20 12:30:46 UTC
I had to take a different approach and completely revamped the TOC mechanism.

I've tested it on the DAPS User Guide, Studio Guides, and HA. Can you have a look and test it with your manual(s) please?
Comment 5 Thomas Schraitle 2012-04-20 15:07:03 UTC
The current implementation now solves all the reported issues. Thanks to Tanja for helping me.