OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Alignment / tabular formatting of ToC in FO


Dear Richard,

 

briefly, your proposal needs advanced customizations.

 

But to be honest, I still prefer a default behavior.

 

I‘ve already had to defend my opinion several times. Our graphics designers wished the same thing, but none of them was aware of several typographic issues:

 

1. Imagine more then 9 chapters. In that case all 1-9 items will have a huge space between numbers and titles (introduced by that two digit number).

 

2. Imagine chapters with less then 10 sections and chapters with more then 10 sections. In that case second level titles will never be aligned the same way. This could be solved by not generating the FO table for each level separately, but globally for the whole ToC, but in that case those gaps could be even worse (imagine two digit numbers on every particular level).

 

While a default behaviour doesn’t look well on the first look, it is much more flexible for complex documents with many nestes levels – all levels have the corresponding (and same) indentation.

 

A different styling is possible, see the exhaustive Bob’s guide at http://www.sagehill.net/docbookxsl/PrintToc.html

 

Jan

 

 

From: Kerry, Richard [mailto:richard.kerry@atos.net]
Sent: Friday, April 26, 2013 7:52 PM
To: DocBook Apps Mailing List ‎[docbook-apps@lists.oasis-open.org]‎
Subject: [docbook-apps] Alignment / tabular formatting of ToC in FO

 

 

I'm working on a docbook document which I am currently trying to process to PDF via FO.

The document is an <article>.

 

I'm generally copying the formatting of an existing set of Word documents.

In particular at the moment I'm looking at the appearance of the ToC pages.

 

In the standard stylesheets, each line of ToC is generated looking rather like this :

 

1. Overview .......................................................................................... 3

2. Description ....................................................................................... 3

3. Applicable Documents ......................................................................... 3

4. Configuration procedure ...................................................................... 3

5. Starting up ....................................................................................... 3

       5.1. Dependencies .......................................................................... 3

               5.1.1. Level 3 Heading ............................................................. 3

6. Features .......................................................................................... 3

      6.1. Diagnostics .............................................................................. 4

      6.2. Test procedures ....................................................................... 4

7. Known Issues ................................................................................... 5

8. Version History ................................................................................. 5

 

ie the title string is immediately followed by the leader.  No difference in styling. 

(the page numbers are aligned in the PDF document, even though they may not be here.

 

The apearance I am looking for is more like the following :

 

Contents ..................................................................................................... 1

1           Overview  ................................................................................................ 4

1.1               Description  4

1.2               Device firmware version  4

1.3               Configuration  ................................................................................ 4

1.3.1   The v1/v2 Location 4

1.3.2   The V3 Location 5

1.3.3   The V4 Location ............................................................................ 5

1.4               Driver compatibility  5

1.5               Version  5

1.5.1   Automatic Shutdown on Closing  ........................................................ 5

1.6               Messaging System – If32.dll.  5

 

 

Again the page numbers should appear lined up.  Not sure if the rest of this will come through on this list.

The different section levels should have different styles.

 

The particular requirements here are :

1. Section numbers at each level are aligned.

2. Headings at each level are alligned.

3. Headings and section numbers at each level have different styles.

 

Can the styling can be done using existing attribute sets ?  I can see that such attibute sets exist for the actual section titles, but I can't see any for the titles as shown in the ToC.

 

I am not sure how I can do the alignment.

I was thinking it might be doable using an fo:table, but there are a number of separate alignment lines (columns) so that doesn't seem to me like a table.

I see that the default stylesheet does start each level at the same alignment.  But that only applies to the section numbers.  The title text starts immediately after the number, where I want that text also to be on a per-level alignment.

 

Can anyone advise how I should approach this.

 

I believe the per-line formatting is done by template toc.line, from fo/autotoc.xsl.  But I'm not clear where the page is generated from.

 

 

Appreciatively,

Richard.

 

 

 

 

 

Richard Kerry

BNCS Engineer

T: +44 (0)20 82259063

M: +44 (0)7812 325518

Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ

richard.kerry@atos.net

uk.atos.net

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]