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.
Header positions
We now avoid a widow header, so there is a higher likelihood that a header will appear on the same page as the content it is a header to:
Screenshots are before & after
The level 1 header will always create a new page
Other page break changes
The
<br>
or---
horizontal rule will now act like a page break when creating a PDFBefore this PR, Pluto avoids all page breaks inside of a
pluto-cell
. I.e. if a cell (content + code (if not folded)) needs to be fragmented between pages, it will be moved to the next page.This PR adds an exception for "prose cells": cells that contain mostly text. This means that cells that just contain a couple paragraphs are allowed to break inside. Here, you expect breaks inside, and it creates a less fragmented document overall.
Avoid empty final page
Made some changes that were sometimes causing an extra empty page at the end of the document.
Full before/after comparisons
I printed all the featured notebooks before and after:
before.zip
after.zip