Skip to content

Commit

Permalink
Page splitting: revamp, fix some issues
Browse files Browse the repository at this point in the history
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
poire-z committed Jul 10, 2021
1 parent a56b242 commit 01a6626
Show file tree
Hide file tree
Showing 2 changed files with 462 additions and 4 deletions.
Loading

0 comments on commit 01a6626

Please sign in to comment.