https://issues.apache.org/bugzilla/show_bug.cgi?id=51304

--- Comment #4 from Andreas L. Delmelle <adelme...@apache.org> 2011-06-21 
19:22:53 UTC ---

Just summarizing again what I think would work (helps me get a clearer picture
in my head if I force myself to write it down...):
[starting from the situation after attached patch]

1° Footnotes.handleFootnotes()
  - should get a helper list of boxes whose footnotes are present in the list
    (will in fact only contain the boxes that are 'in scope' for the current
page)
  - should check this list, and if the boxes' footnotes were already added,
just skip
    (if yes, then we would be restarting due to a
new-footnotes-before-last-column condition (see below)

2° Footnotes.getDifference() (still going to rename that one, as it is a bit
confusing, I think... That was just a quick rename after extraction from
PBA.computeDifference())
  - if we are restarting due to footnotes before the last column, then just add
the height for all "current" footnotes
    (at that point, those will include the footnotes that were encountered
later on the page the first time around)

3° PBA.restartFrom()
If there is a footnotes-before-last-column condition, then:
  - do not reset the footnotes, but
  - restart from the last break that started a page
    (this should then trigger the special treatment under 1° and 2°)
If there is no such condition, then the helper list in Footnotes should be
cleared too, so that we get a 'proper' restart.

Still left to figure out what needs to happen once the second pass is complete.
Situations can arise where the anchor(s) of the last footnote(s) would be
pushed off the page, due to the earlier breaks in the first columns, if we
would include all footnotes. 
This can probably be checked (at least approximately) right before restarting
(i.e. at that point, we could already decide to defer a few footnote-lines to
the next pass?)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to