On 18.12.2008 12:10:27 Georg Datterl wrote:
> Hi Jeremias,
> 
> > <block keep-together.within-column="1">
> >  <block>I use 30% height</block>
> >  <block>I use 30% height</block>
> >  <block>I use 50% height</block>
> > </block>
> > In this case, the 50% block is moved to the next 
> > page if the layout engine doesn't find a better 
> > solution, for example by keeping the first block 
> > on the previous page and keeping the latter two 
> > together. (all assuming those nested blocks are 
> > unbreakable for example by carrying a
> > keep-together.within-column="always")
> 
> So, without a keep-together.within-column, the sequence would be:
> most preferable break: after third block. (impossible, since 110%)
> less preferable: after second block. (possible, if blocks before take <= 40%)
> even less preferable: after first block. (possible, if blocks before take 41% 
> to 70%)
> even less preferable: before first block. (possible, if blocks before take 
> >71% )

It's difficult to say exactly that as this also depends on the
surrounding content if any. A break before the first block will never
happen if the content above is the only content in the document.

> => Meaning: fit as much as possible on the previous page

More or less, yes.

> So, with keep-together.within-column="1", the sequence would be (from your 
> description):
> most preferable break: after third block. (impossible, since 110%)
> less preferable: after first block. (possible, if blocks before take <= 70%)
> even less preferable: after second block. ( would only happen if 
> block2+block3 would use more than 100% and blocks before block1 would take 
> <=40%)
> even less preferable: before first block. (possible, if blocks before take 
> >71% )

Hmmm. At least what you can say is that the most preferable break is
after the third block. Whether then the break possibility after the
first or second block is more preferable depends on the surrounding
content.

> I don't understand why. 

I hope the above clears that up a bit. However, if you want an exact
description of how this works I have to give you a pointer into the
spec:
http://www.w3.org/TR/xsl11/#keepbreak
That explains everything though maybe in a very technical way and
without examples.

> Of course my example was buggy, I meant: keep-with-next, not keep-together. 

:-)

> What I was trying to say is: keep-with-next if in any way possible.
> Separate from next ONLY if both blocks together would never ever fit
> on a page, since they take more than 100%.
> 
> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block>

I don't really like the use of the shorthand. That can lead to nasty
side-effects, especially with keep-together.

> <block>I use 50% height</block>
> 
> would break before the second block, but

Yes.

> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block>
> <block>I use 80% height</block>
> 
> would break after the second block. 

Yes.

<snip/>



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to