Hi all

I recently had the time (and the pleasure) to look at before-float implementation branch, and I played a bit with it.

I focused on the handling of footnotes, as I noticed that sometimes they were placed on a page following their citations without a real necessity to do it; as I wrote some time ago (and I rememeber there was some consesuns on this) this behaviour is acceptable for before floats, but is probably not what a user would expect for footnotes.

I have tried to fix this in the PageBreakingAlgorithm, computing a "minimum required index" for footnotes, so that no page break will be considered that unnecessarily defers some old footnotes to the next page.

I'm attaching a diff file showing the changes (or maybe should I just apply it?); after applying the patch, there are 4 more passing testcases (foonote_footnote-separator, footnote_large, footnote_positioning_{4,5}) and no regressions. Testcases footnote_positioning_{2,3} still generate some run-time exception, and in the next days I'm going to see what's wrong with them.

I add just a few comments about the new classes: I must admit that it took me a while to see and understand the interaction between the PageBreakingAlgorithm and the Footnotes / BeforeFloats Record, together with their inner Footnotes / BeforeFloats Progress.

In particular, at the beginning I thought the *Progress classes were just convenience classes to get "pieces" of footnotes and floats without directly fiddling with element lists, and I found only later that their methods can actually create new active nodes.

Another thing that I find a bit strange is that the PageBreakingAlgorithm does not directly interact with the before floats, as the calls to BeforeFloatsProgress.consider() are "hidden" in the FootnotesProgress class.

So, I was wondering whether it wouldn't be more "clear" to have the PageBreakingAlgorit control all the node creation logic, after having accessed information about footnotes and floats that could be placed in the page via the helper classes.



Reply via email to