Hi Georg,

Georg Datterl wrote:
Hi Vincent,

Indeed, it worked on a small example, but a bigger example gave me an 
unexpected heart attack.
Maybe you shouldn't take this task too seriously. I'd hate that FOP causes you 
health problems ;-)

You have no idea how many health problems I have already avoided just because 
FOP did what I needed. :-)

Phew, I’m feeling reassured!

Although you might not want to read further :-(

If the wide block is in the first column, the result looks like I expected it, but then I had a wide block in the second column and instead of moving to the next page, I got balancing again:

I couldn't reproduce that. Can you please post the FO file showing the issue?

I attached my test file. On page three, the first line of Block U should be on 
page four.


The diagnostic is quite easy: the first column doesn’t contain any
elastic space and doesn’t exactly fill the page; so there’s enough room
for the spanning block to squeeze in one line of content, instead of
being deferred to the next page. Set background-color="#F0F0F0" on the
region-body to more easily see what’s happening.

(As a side note, I saw you put the fox-needs-balancing property on the
page-sequence element. I think you want to define it on the spanning
block instead.)

What eludes me in this particular case, though, is why the algorithm
didn’t put an additional line of Qs at the bottom of the first column
since there is room for it.

Anyway, this suddenly makes the problem a lot more difficult, I’m
afraid, because it becomes necessary to do something on the layout side.
I’m not too keen on it, I must say, since this whole area is likely to
be revised when introducing the new approach to line- and page-breaking.

You can work around the problem by making sure that the columns will
always exactly fill the pages, i.e. by adding elastic spaces between
paragraphs. If your content is so made that at least one elastic space
can be found on every column, then you should never encounter the issue.
Or it will occur rarely enough that you will be happy to manually fix it
when it does. Then it’s still worth implementing the solution
I proposed, but it will have to be demoted from the status of official
FOP extension to the less glossy one of cheap unofficial hack. At any
rate, I think it’s your only hope to have something working by the 5th
of December... Then it’s always possible to discuss about a more
definitive solution.


Reply via email to