You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "J.Pietschmann" <j3...@yahoo.de> on 2002/07/01 00:14:27 UTC

Re: keep-with-next and keep-together

Peter Sparkes wrote:
> Hi,
> 
> I have a repeating <block> of data. Each instance of the block is of varying
> size but under half a page. I want to put two blocks on every page, with
> each block in its own half of the page and varying amounts of white space
> between the two blocks.
> 
> However, I can't get it to work: The two blocks close up on each other and
> where there is room part of a third block appears on the page.

Apart from a working keep-with-prev this would need
a block layout algorithm able to compute a variable
amount of space depending on constraints. None of this
is currently implemented, and even if it were, the
result is not quite predictable.
A more robust way would be to use a two row table of
100% page height and display-align="after" on the
second row, but this isn't implemented either.

You can try a somewhat ugly footnote hack:
       <fo:block break-before="page">top </fo:block>
       <fo:block>
         <fo:footnote><fo:inline></fo:inline>
           <fo:footnote-body>
             <fo:block>bottom </fo:block>
           </fo:footnote-body>
         </fo:footnote>
       </fo:block>

HTH
J.Pietschmann


RE: keep-with-next and keep-together

Posted by Peter Sparkes <pe...@didm.co.uk>.
Hi

Thank you both for your help.

I have used Matt's suggestion re table and a one-pixel-wide,
half-a-page-tall clear image.

It works fine.

Thanks again

Peter

-----Original Message-----
From: Matt Savino [mailto:matt@synergizethis.com]
Sent: 01 July 2002 05:33
To: fop-user@xml.apache.org
Subject: Re: keep-with-next and keep-together


You might try making a table with two columns and two rows. Make the
first (or last) column one pixel-wide and have each row of that column
contain a one-pixel-wide, half-a-page-tall clear image. This is an HTML
trick, please let me know if it works on FOP. (I've attached the image,
you'll need to resize it.)

-Matt


"J.Pietschmann" wrote:
>
> Peter Sparkes wrote:
> > Hi,
> >
> > I have a repeating <block> of data. Each instance of the block is of
varying
> > size but under half a page. I want to put two blocks on every page, with
> > each block in its own half of the page and varying amounts of white
space
> > between the two blocks.
> >
> > However, I can't get it to work: The two blocks close up on each other
and
> > where there is room part of a third block appears on the page.
>
> Apart from a working keep-with-prev this would need
> a block layout algorithm able to compute a variable
> amount of space depending on constraints. None of this
> is currently implemented, and even if it were, the
> result is not quite predictable.
> A more robust way would be to use a two row table of
> 100% page height and display-align="after" on the
> second row, but this isn't implemented either.
>
> You can try a somewhat ugly footnote hack:
>        <fo:block break-before="page">top </fo:block>
>        <fo:block>
>          <fo:footnote><fo:inline></fo:inline>
>            <fo:footnote-body>
>              <fo:block>bottom </fo:block>
>            </fo:footnote-body>
>          </fo:footnote>
>        </fo:block>
>
> HTH
> J.Pietschmann



Re: keep-with-next and keep-together

Posted by Matt Savino <ma...@synergizethis.com>.
You might try making a table with two columns and two rows. Make the
first (or last) column one pixel-wide and have each row of that column
contain a one-pixel-wide, half-a-page-tall clear image. This is an HTML
trick, please let me know if it works on FOP. (I've attached the image,
you'll need to resize it.) 

-Matt


"J.Pietschmann" wrote:
> 
> Peter Sparkes wrote:
> > Hi,
> >
> > I have a repeating <block> of data. Each instance of the block is of varying
> > size but under half a page. I want to put two blocks on every page, with
> > each block in its own half of the page and varying amounts of white space
> > between the two blocks.
> >
> > However, I can't get it to work: The two blocks close up on each other and
> > where there is room part of a third block appears on the page.
> 
> Apart from a working keep-with-prev this would need
> a block layout algorithm able to compute a variable
> amount of space depending on constraints. None of this
> is currently implemented, and even if it were, the
> result is not quite predictable.
> A more robust way would be to use a two row table of
> 100% page height and display-align="after" on the
> second row, but this isn't implemented either.
> 
> You can try a somewhat ugly footnote hack:
>        <fo:block break-before="page">top </fo:block>
>        <fo:block>
>          <fo:footnote><fo:inline></fo:inline>
>            <fo:footnote-body>
>              <fo:block>bottom </fo:block>
>            </fo:footnote-body>
>          </fo:footnote>
>        </fo:block>
> 
> HTH
> J.Pietschmann