Hi Georg, Georg Datterl wrote: > Hello Vincent, > >>> Well, most of the time even I would use the balancing algorithm, but not in >>> all cases. I guess I could implement a kind of fox-useBalancer="false" >>> for this cases, but even that would not make Block C (see below) possible. > >> Well, I think it would. Basically the option would be "do not balance >> columns before a block that spans the whole page". So, on your example >> below, the >> bottom of page 1 is reached before block E is encountered, so columns are >> balanced. On page 2, block E is encountered so column balancing is disabled, >> then re-enabled after block E until the bottom of the page, etc. Actually >> this would be more efficient since there would be no need to re-typeset the >> content, in order to balance columns before a spanning block, as I believe >> it's done ATM. Might be a useful extension. > > So it would be an extension for the page, not for the block. Either for > simple-page-master or (probably better) for region-body, if I understand you > correctly.
Oh, you’re right actually, this can well be an extension for the spanning block. That would provide more flexibility since it would be possible to individually customize the behaviour. If the option were set on the region-body it would be the same for all spanning blocks. > Do you think that's possible and how much work would it be? Mind, I'm > not asking you to implement it, but if you say it's possible and you > could do it in a day, I guess I might be able to do it in a reasonable > time (actually, not me, but a colleague of mine who actually knows his > way around the fop source code, I hope). I’ve just had a quick look and there seems to be almost nothing to do on the layout side (which is good news). You just have to go on l.111 of org.apache.fop.layoutmgr.PageBreaker (handleSpanChange method) and replace the assignment appropriately. Instead of: needColumnBalancing = (childLC.getNextSpan() == Constants.EN_ALL); something like needColumnBalancing = (childLC.getNextSpan() == Constants.EN_ALL) && childLC.nextHasFoxBalancingOption(); Simply setting false already gave me the desirable result on a small example. The difficulty is to make the necessary wiring in order to communicate the value of the option from the FO tree to the layout engine. I can’t really help you on that matter, sorry, but you may want to have a look at how the fox:orphan-content-limit is implemented and do something similar: http://xmlgraphics.apache.org/fop/trunk/extensions.html#widow-orphan-content-limit If you decide to give it a go then switch to the fop-dev mailing list for any question: http://xmlgraphics.apache.org/fop/dev/index.html#mail-fop-dev <snip/> Thanks, Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]