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: [EMAIL PROTECTED]