Re: XSL FO keep-together=int Implementation?
G. Ken Holman wrote: [snip] Thank you for your extensive explanation. I was, however, after more concrete advice. Let's say I have a listing in a block which should be printed on the next page if it fits it, possibly leaving a large space on the current page, but which should just continue on the current page if it doesn't fit completely on the next page. I believe it depends on the processor whether this can be achieved.
Let's say the processor implements a penalty based algorithm similar to Knuth's paragraph filling (which is currently implemented in FOP dev
Is this block floating somehow?
I've been mostly concerned with sequential block stacking where I want the page breaks to occur to minimize odd spacing but to obey my keep constraints.
If I remember the discussion of this when XSL FO was being developed,
the idea is that you have to iterate over the block sequence some number
of times to really do this nicely. A bad choice for break might cause
really bad things to happen to keeps constraints, floats, and/or cause odd spaces
on pages to obey the keeps.
One way out of this is to keep track of "bad placement" of blocks. Beyond some threshold, you might re-place a subsequence of them to try to achieve a better flow of areas.
However, I don't think this is portable, and the FO processor might decide to start a new page anyway once it detects the block wont fit completely onto the current page (as FOP 0.20.5 does).
I'm not sure what "portable" means here.
So the question remains: How do I achieve the layout described above in a processor independent way, using keep precedence levels or whatever, and without guessing in advance whether the content will fit on a page (for assigning different keep precendences in pre-layout stages or whatever)?
I've been anxious to find implementations of relative keep strength in order to improve the presentation of the annexes of my XSL-FO book, but I haven't seen any yet. I would have liked to help Alex by citing an implementation, but I didn't have anything to contribute to his question.
-- Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
Bertrand Russell in a footnote of Principles of Mathematics
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format