Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Page splitting: revamp, fix some issues
Rewritten page splitter, which should be easier to understand and tweak. The old code was quite tedious, trying to do everything in one single pass. This new code first finds out group of consecutive lines that should be kept together (break avoid), and process each group when they end, and only then the footnotes they contain (with delay if they don't fit). This fixes 2 small issues: - footnotes could slice a paragraph with floats on the line the footnotes happen; now, they are delayed till the end of the block, and the full block can go to the next page (with its footnotes) if it is taller than the current page. - if a first footnote and its separator didn't fit on a page, a new page was made so it can be added, leaving some blank at bottom of previous page ; now, we delay footnotes in this case, allowing an additional line of the main text to be added if it fits.
- Loading branch information