https://issues.apache.org/bugzilla/show_bug.cgi?id=46905
--- Comment #17 from Andreas L. Delmelle adelme...@apache.org 2009-06-03
11:59:59 PST ---
(In reply to comment #16)
This won't work. If keep-together.within-column=1 and
keep-together.within-page=always then a break must be completely forbidden
at
a page. Hinting penalties won't prevent that in every case, for example if the
only feasible page break is at such a place.
OK, I thought so...
I had this working for strength always, with the modified implementation for
Keep.compare() I suggested earlier (comment #4). Anyway, that case is easy. The
more complicated case is keep-together.within-column=1 and on a nested block
.within-page=10. Both column-breaks and page-breaks are allowed, but the
page-breaks should preferably be made before/after the nested block. A
page-break in the nested block would be permitted only if its content does not
fit into one page.
In that situation the node recovery mechanism must be launched,
and an earlier too-short/long node selected.
As far as I can tell, we currently only remember the last deactivated node. As
soon as we deactivate another node, either it will replace that one (if it
produces better demerits) or it is just disregarded completely (after my
modifications: if the deactivated node does not end a page, PBA.compareNodes()
will return the preceding page-break, so that the column-break node is
deactivated but not used as the point from which to restart later on).
If I interpret that remark correctly, then either we have to remember more
deactivated nodes in order to be able to select an earlier one, or we should
make sure (somehow?) that the nodes for the breaks before/after the nested
block produce better demerits than those corresponding to page-breaks within
that block...
Another question-mark: if the keep-constraints would lead to a break
mid-column, would end-users expect column-balancing to be applied to the part
before the page-break...? Currently not trivial to implement, if I judge
correctly. I'll first see if I can get it working without column-balancing, and
add this later.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.