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] Customizing admonitions

The first customization is a bit more complicated, because the content model 
of an admonition permits many kinds of elements besides para to be the first 
child of note.  A customization has to take that into account.  Then you 
have to turn off the normal admon title template, and have the first para 
template process the content of title as an inline rather than a block.

The second solution to control the title spacing is much easier.  There are 
three attribute-sets that apply when using the nongraphical admonitions:

- nongraphical.admonition.properties, which is applied to the outer fo:block 
containing the whole thing.

- admonition.title.properties, which is applied to the title fo:block inside 
the outer block.

- admonition.properties, which is applied to the block containing all the 
other children of the admonition element.

If you look at the admonition.title.properties in fo/param.xsl, you will see 
that it has no spacing attributes.  It turns out that the space before the 
admon para comes from processing the para element, which applies the 
normal.para.spacing attribute-set.  You could write a custom template to 
match only on the first para inside an admon, and that custom template could 
omit the reference to normal.para.spacing.

Or you could add zero space-after properties to admon.title.properties, and 
add a precedence of "force" to override the para spacing:

<xsl:attribute-set name="admonition.title.properties">
  <xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
  <xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
  <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
  <xsl:attribute name="space-after.precedence">force</xsl:attribute>

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Pedro Pastor" <pps@dlsi.ua.es>
To: <docbook-apps@lists.oasis-open.org>
Cc: "'Pedro Pastor'" <pps@ua.es>
Sent: Wednesday, April 23, 2008 1:46 AM
Subject: [docbook-apps] Customizing admonitions

> Hello,
> How could I control the admonition's "title" element in order to print it 
> at
> the beginning of the first line of the admonition's <para> (like
> <formalpara> behaviour)? I mean, I'd like to change the default behaviour
> for "title" and I don't want it on a separate initial line.
> On the other hand, in case of keeping the default behaviour for "title": 
> How
> could I control the space between the title's line and the first line for
> <para>? I get an extra line in between.
> Thank you very much.
> Pedro
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.3/1392 - Release Date: 
> 22/04/2008
> 15:51
> ---------------------------------------------------------------------
> 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]