Vincent Hennebert wrote:

there is something I don't get with the handling of footnotes. When
there is not enough room on the current page to place all the footnotes,
the algorithm tries to find a place where to split them. But there is a
condition: it must be possible to defer old footnotes
(PageBreakingAlgorithm, l.332). And this is possible only if there is no
legal breakpoint between the previous active node and the currently
considered breakpoint (checkCanDeferOldFootnotes method). I don't
understand this latter condition?


This is to avoid keeping deferring part of the old footnotes when there is no real need to do it.

Let me explain with an example: let's pretend we have a long footnote, which cannot be wholly placed on the same page where its citation is; so, when we start building the following page we should try to place all the remaining "old" footnote lines, if this is possible.

However, it can happen that the breaking algorithm, without this check, prefers filling the page with "normal" lines, such placing just a single footnote line and deferring the others to the next pages.

For example, the footnote has 10 lines, and 3 are placed on the first page while the others are deferred one first time as there is not enough space for them; without this condition, it could happen that if there are no new footnotes (which would force a "flush" of the old one) the algorithm places just a single footnote line in the following seven pages, filling the remaining space with normal lines, while we want the footnote to be deferred again only if there is no way to place lines 4 to 10 together.

And, reading the code, I don't understand if this method's purpose is to
determine if it is /allowable/ to defer footnotes (am I authorized to
defer footnotes if any), or if it is /possible/ (are there footnotes to
defer). Ok, this is a bit subtile, but understanding that would help me
get the intent of the algorithm.

The former one, the method purpose is to determine if the algorithm is allowed to break the foonote once again, which can happen only if we have added only the slightest bit of normal lines () and the remaining space is not enough.

If there are no old footnotes the method return false (which is maybe not very clear), but has no effect.

HTH

    Luca

Reply via email to