[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:
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.