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] Separating Numbers and Titles


Hi,
I meant to reply to this but I guess I never did.

The design you want can't be done with just parameters and attribute-sets,
it requires a customization.  It can be implemented with a fo:list-block
containing a single fo:list-item.  You put the section number in the
fo:list-item-label and the title in the fo:list-item-body.  Then if a title
is so long it needs to wrap, it will do so indented to the distance
specified by the 'provisional-distance-between-starts' property on the
fo:list-block.
To get the number, you can process the current element in
mode="label.markup", which returns just the number of an element.  And to
get the title you can process the current element in mode="title.markup",
which returns just the title.

You can do this in a customization of the template named 'section.heading'
in fo/sections.xsl. Don't use the $title parameter that is provided to that
template, because it contains the result of processing in
mode="object.title.markup", which combines the label and the title in one
string.  You could compute the indent width as some multiple of the section
level, which is available in the $level parameter passed to the template.

Let me know if you need more details.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Thomas Schraitle" <tom_schr@web.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, April 21, 2005 10:49 AM
Subject: [docbook-apps] Separating Numbers and Titles


> Hi,
>
> there are a number of parameters or attribute sets in the FO stylesheets
> which can modify the appearance of, lets say, section titles. This is
> very effective if you need a different font size or something similar.
>
> With the help of parameters / attribute sets you can't change the
> appearance. The default looks like this:
>
>   9.3  A very long section title
>   wrapping to second line of title
>
> I would like to have it this way:
>
>   9.3  A very long section title
>        wrapping to second line of title
>
> As far as I can see, a solution would be to separate the section number
> from the title and put it into a list or invisible table. I know there is
> the template "gentext.template" which can extract the respective objects
> from the l10n files. Unfortunatly the numbers are dependend of the
> section level, so sometimes a list/table is needed and sometimes not.
>
> Does anybody know of a better solution? I would prefer a method that is
> very general and it is independent of any language. :)
>
> Thanks,
> Tom
>
> -- 
> Thomas Schraitle <tom_schr@web.de>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>




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