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] Caption spacing in mediaobject


Hi,
You could do two things:

1.  Remove the para wrapper in the caption. A caption doesn't require a 
para to contain its text, and the para uses the normal.para.spacing 
attribute-set that adds extra space.

2.  Customize the template that handles caption, from fo/graphics.xsl:

<xsl:template match="caption">
  <fo:block>
    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
      <xsl:attribute name="text-align"><xsl:value-of
                         select="@align"/></xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

You can add spacing properties to the fo:block element.  There really ought 
to be a caption.properties attribute-set, if you care to file a feature 
request on the DocBook SourceForge site.  8^)

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Tavmjong Bah" <tavmjong@free.fr>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, February 12, 2007 2:04 PM
Subject: [docbook-apps] Caption spacing in mediaobject


>
> Hi,
>
> How do I control the spacing between an imageobject and a caption in
> PDF output? The default spacing puts a caption closer to a following
> figure than to the figure it belongs to. Also, is there a way to keep
> the image and caption on the same page? I see some reference that FOP
> 0.93 supports keeps but don't understand how they work.
>
> This is an example of what I have in my source file:
>
>  <mediaobject>
>   <imageobject>
>    <imagedata fileref="test.png" format="PNG" align="center"/>
>   </imageobject>
>   <textobject>
>    <phrase>Test</phrase>
>   </textobject>
>   <caption>
>    <para>
>     The caption.
>    </para>
>   </caption>
>  </mediaobject>
>  <mediaobject>
>   ...
>
> I am using FOP SVN and docbook-xsl-snapshot.
>
> Thanks,
>
> Tav
>
>
>
> ---------------------------------------------------------------------
> 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]