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


 
Thank you very much Bob for your explanation.

I would appreciate if someone who have already done such an "advance"
customization for the admonition's title would be so kind to share it.

Regards,
Pedro

-----Mensaje original-----
De: Bob Stayton [mailto:bobs@sagehill.net] 
Enviado el: viernes, 25 de abril de 2008 7:57
Para: Pedro Pastor; docbook-apps@lists.oasis-open.org
CC: 'Pedro Pastor'
Asunto: Re: [docbook-apps] Customizing admonitions

Hi,
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>
</xsl:attribute-set>


Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- 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
>
>
> 

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.4/1396 - Release Date: 24/04/2008
18:32
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.4/1396 - Release Date: 24/04/2008
18:32
 



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