[xep-support] floats and the block to wich they belong

Peter Kester peter.kester at daidalos.nl
Fri Oct 1 02:36:50 PDT 2004


Hello all,

I have a question about floats.
 We are using side floats to highlight certain terms.
Those floats belong to a certain block of text.
The problem arises when the float is larger than the block it belongs to.
The float texts flows along the next block of text which can also contain a
float.
How can I force a blank line after the block with the first float to avoid
the float flowing through the next block.
What I mean is this is what happens now:
Float text block1   Normal text block 1,normal text block 1,
float text block1   normal text block 1,normal text block 1,
float text block1   normal text block 1,normal text block 1.
float text block1   Normal text block 2,normal text block 2,
float text block1   normal text block 2,normal text block 2,
Float text block2  normal text block 2,normal text block 2.

And this is what I would like to happen:
Float text block1   Normal text block 1,normal text block 1,
float text block1   normal text block 1,normal text block 1,
float text block1   normal text block 1,normal text block 1.
float text block1
float text block1
Float text block2  Normal text block 2,normal text block 2,
                            normal text block 2,normal text block 2,
                            normal text block 2,normal text block 2.

This is the XML I am using for the sample:
<block>
<float>Float text block1 float text block1 float text block1 float text
block1 float text block1</float>
<text>Normal text block 1,normal text block 1,  normal text block 1,normal
text block 1, normal text block 1,normal text block 1.</text>
</block>
<block>
<float>Float text block2 </float>
<text>Normal text block 2,normal text block 2, normal text block 2,normal
text block 2, normal text block 2,normal text block 2. </text>
</block>

This is the template I use for that part:
  <xsl:template match="block">
    <fo:block>
          <xsl:apply-templates select="*"/>
    </fo:block>
  </xsl:template>

  <xsl:template match="text">
    <fo:block>
          <xsl:apply-templates select="*"/>

    </fo:block>
  </xsl:template>

  <xsl:template match="float">
    <fo:float float="outside" start-indent="0mm" end-indent="0mm"
clear="both">
          <fo:block-container width="20mm">
                <fo:block text-align="left">
                      <xsl:apply-templates select="*"/>
                </fo:block>
          </fo:block-container>
    </fo:float>
  </xsl:template>

What do I have to use to force the blank lines between the to blocks?

Thanx in advance,

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20041001/1ce81be6/attachment.html>


More information about the Xep-support mailing list