Maybe not really answer your questions.
it is recommended that these pages do not have less than 6 lines.
I think this is much similar to the issues of widows and/or orphans. As far as I can tell there is no reliable and general way to do this in TeX. The better way is still to rely on a good editor (I mean a human editor, not a text editor or whatever).
I don't suggest to force a page break in a previous page. That will definitely make the documents look worse. Underfull vbox is very easy to be spotted by eyes and should be avoided as much as possible. It does much more harm than a few points of underfull or overfull hbox.
Hyphenation rules.
This can be partially addressed by microtypography, namely protrusion, expansion, and sometimes tracking.
When using pdftex, launch the microtype
package. Its document is quite comprehensive and also contains a brief but good introduction to microtypography.
When using luatex, though microtype
has support for it since luatex 0.4, support for opentype fonts loaded with luaotfload
/fontspec
is still in a upcoming version the last time I check. But you can use
\pdfprotrudechars2
\pdfadjustspacing2
to turn on these features. And with the protrusion
and expansion
features to setup the factors. With fontspec
, use RawFeature = {protrusion = ...}
, or define a new font feature or other methods. See documents of luaotfload
for these two features. See fontspec
documents for setting features.
With microtypography, the hyphenation is largely improved, and you will see much less hyphenation. Therefore much less chance you get three successive lines with hyphenations or a last in odd page with hyphenated work.
However this just reduces the chance of such things happening (dramatically), not prevent anyway. But if there are still such hyphenations left, they should be very few and can be addressed by an editor.