Draft
Conversation
todo: test
might want to rethink this
however, there are widows...
even if headers and footers are interleaved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5375 and #5377
Similar to #6168, but for footers:
Implementation details
This will be expanded later. There will still be some significant changes to the code, but here are the most important points:
Considerations on non-repeating footers
Non-repeating footers are still useful for widow prevention, but for this initial implementation I chose to skip widow prevention for non-repeating footers to focus on repeating footers. Still, a sketch of an idea is to add the non-repeating footer height to the footer height to subtract as soon as we reach the row - or unbreakable group of rows - immediately before the non-repeating footer (or its group of consecutive footers).
Then, it's as if the non-repeating footer's height became part of the preceding row's height, ensuring both fit on the same page.
TODO