The built-in ePub stylesheet has the following line:
Code:
body { padding-bottom: %1em !important; }
where %1 is the currently selected line height calculated from the position of the line spacing slider.
This has the effect of adding a blank line to the end of the chapter (assuming the book has been created in the normal way with files split at chapter boundaries), and if the last line of text in the chapter would have fallen on the last line of the page then it gets pushed to the next page. More than one line might get pushed to the next page if the book has widows/orphans set higher than 1, or perhaps in some other situations such as if the body font-size is larger than the paragraph font-size.
The
`ePub fixed/adjustable top/bottom margins` and
`Enforce user line spacing and justification in ePubs` patches remove this line from the built-in stylesheet to make room for other things, but if you don't use those patches and want to prevent the last line of the chapter being pushed to the next page, then the following patch can be used to disable it:
Multi-version patch, paste into libnickel.so.1.0.0.patch:
Edit: These screenshots show the last page(s) of an ePub chapter (with orphans:1;widows:1;) settings are unchanged except for the above patch:
Unpatched:
Patched: