Hi Luca, Luca Furini a écrit : > Hi all! > > At long last, I'm finally allowed some time to look at the float branch > and ... wow! Really impressive, a great lot of good work!
Well, thanks! > In order to apologize for my long absence :-) , I'm trying to see what's > wrong with the failing testcases, in particular the ones with footnotes. > > Looking at the behaviour of the page breaking algorithm during the > processing of testcase "footnote_footnote-separator", I found out that: > > - the "right" page break (12 lines of content, some space, the separator > and 2 footnote lines) does not create a new active node, it just updates > lastTooShort; this is right, as there are no stretchable elements and > the resulting adjustment ratio would be +inf; > > - but then, instead of having a restart, new active nodes are found that > fill the page but "push" the footnotes in the following page. > > I'm going to see how best to fix this behaviour ... obviously if nobody > else is quicker than me! :-) I don't think there is much you can do in that case. It appears that the 15 lines of text at 12 pt exactly fill the 3 inch-high page. So that makes a feasible node which is always preferred to too-short nodes. Change the page-height to 3.1 inch and you no longer have the footnotes deferred to the next page. That's exactly why I introduced the MIN_NORMAL_PAGE_FILL_RATIO constant in PageBreakingAlgorithm: to give a chance to underfull pages with no deferred floats to be preferred over full pages with deferred ones. Keep the page-height of 3 inches and change that constant to 0.9 and you have your footnotes back on the first page. The actual problem IMO is to define the right demerits for underfull pages and deferred before-floats and footnotes in order to have a decent result (i.e., that a human would expect) in every case. Vincent
