On 07.06.2007 10:01:23 Vincent Hennebert wrote: > Hi Eric, > > Lewis, Eric a écrit : > <snip/> > > However, I still don't know whether it's a FOP bug that before, the text > > went down to the bottom of the page, ignoring margins and was partially > > lost. > > This behaviour is specified by the overflow property [1]. When not > specified the default behaviour is left to the implementation's choice > and FOP chose "visible". That is, the content will go down the > region-body, and will be clipped only when reaching the bottom of the page. > > As to your needs, AFAICT there is no standard way in XSL-FO to make > keep-together optional only if the content would otherwise not fit in > the page. You could specify an integer value instead of "always", but > (besides the fact that integer values aren't supported yet by FOP) as I > understand the spec this doesn't let you achieve what you want.
I disagree. I think it's exactly the feature that would be needed here. See also: http://www.dpawson.co.uk/xsl/sect3/keepsNbreaks.html An example: <fo:block keep-together.within-page="1" id="section1"> <fo:block keep-together.within-page="2" id="block1"> <fo:block font-weight="bold" keep-together.within-column="always" keep-with-next.within-column="always">title</fo:block> <fo:block>some text</fo:block> <fo:block> <fo:block keep-together.within-page="2" id="block2"> <fo:block font-weight="bold" keep-together.within-column="always" keep-with-next.within-column="always">title</fo:block> <fo:block>some text</fo:block> <fo:block> </fo:block> This would do the following: - Never split a title apart and keep it together with the following text (or at least the first few lines specified by orphans) - Tries to keep block1 together but only if it fits in a page. - Tries to keep block2 together but only if it fits in a page. - Tries to keep section1 together but only if it fits in a page. - Splits between block1 and block2 if the whole section1 doesn't fit in a page but it will still try to keep together block1 and block2. In other words: if the keeps with strength 1 cannot be satisfied, they are relaxed but the strengths 2 will still be honored as if they were set to "always". But if even that would lead to an overflow the keeps with strength 2 will also be relaxed. Keeps with strength "always" will never be relaxed and lead to an overflow if the content is longer than the available space (that's what happens in Eric's example). > [1] http://www.w3.org/TR/xsl11/#overflow > > Vincent Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
