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] section title customization

Sorry for the delay in answering, but I couldn't find my example.  It turns out it is in a stylesheet I created for a client, so I can't reproduce it here, but I can describe what I did.
I merged the template named 'section.heading' with the template that calls it, which starts with:
<xsl:template match="section/title
Those are the final templates in the sequence of section title templates.
Instead of creating in that template a variable named 'title' whose content was the result of using mode="object.title.markup" (which generates a combined number label and title), I created a fo:list-block with a single fo:list-item child to format the label and title.  The section number goes in the fo:list-item-label, with the text-align property set to "right", and the section title goes in fo:list-item-body, left-aligned.  On the list-block set the provisional-label-separation equal to the space you want between the label and title, and set the provisional-distance-between starts equal to the width of the area for the label (including the separation space). 
To generate the title, process the section in mode="title.markup".  To generate the label, process the section in mode="label.markup".  Since the above template's context element is the title itself, to get the section parent you need to use a select=".." when you apply templates in those modes. 
Hope this is enough to get you started.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
----- Original Message -----
Sent: Thursday, March 30, 2006 6:27 AM
Subject: [docbook-apps] section title customization



I would like to customize section titles in more advanced way than by means of section.title.properties attributes. But in comparison to chapter title templates this seems to be a much more complicated task. I had a look at section.heading template, but I am not quite sure where to start.


My idea of customizing section titles is like this:


1            Title

   Text of section

         1.2       Title

                     Text of section    

      1.2.3       Title

                    Text of section


I would like to indent the body text and wrap section numer label and title into two separate fo:inline elements so that the number label is aligned to the right and the title starts at the beginning of body text indentation. The problem is I was not able to find out proper parts of template which generate this content. The structure of section templates is much different from chapter templates.


Has anyone tried such a bit more complicated layout? I would be very grateful for any response and experience.


Best regards


Pavel Skopik



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