This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: sapcing before image
- From: Bob Stayton <bobs at caldera dot com>
- To: ~ion~ <vnhu38f93 at subdimension dot com>,docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 17 Dec 2002 13:28:09 -0800
- Subject: Re: DOCBOOK-APPS: sapcing before image
- References: <1040144119.209.0.camel@halltc251.bham.ac.uk>
On Tue, Dec 17, 2002 at 04:55:19PM +0000, ~ion~ wrote:
> How can I impose spacing before images in print output?
>
> I know I need the FO to be:
>
> <fo:external-graphic space-before.optimum="0.5cm" src="images/blah.png"
> width="auto" height="auto" content-width="auto" content-height="auto"
> text-align="center"/>
>
> But I don't know how to put this into my customisation layer, if
> I see an example of how to do this it should help me apply the
> example to other things I want to do as well.
Here is one way to do this:
<xsl:template match="mediaobject[not(ancestor::figure)]/imageobject/imagedata">
<fo:block space-before.optimum="0.5cm">
<xsl:apply-imports/>
</fo:block>
</xsl:template>
This wraps a fo:block around the normal output of imagedata
(the fo:external-graphic), and the space-above is
specified in that block.
This template will apply to all imagedata graphics in a mediaobject
(but not an inlinemediaobject), and excludes any
mediaobjects inside a figure (would put too much space between
title and graphic).
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com