This question led to a new feature in a package:
impnattypo
One rule in French typography is that the last line of a paragraph should not be shorter than the double of the indentation of the next paragraph.
Is it possible to specify that, or least considering that all paragraphs are indented of the same value, to make sure the last line is longer than twice this value?
A LuaTeX-specific solution is welcome, too.
Best Answer
You asked for a LuaTeX solution and you get one:
What it does is it adds ties (
~
) between the words at the end of a paragraph, when the distance to the end is less then 2*\parindent
. If the\parindent
is large enough, the paragraphs will get ugly.Note: this does not prevent hyphenation. So the minimal amount is not enforced by an hbox or so. This is an exercise left to the ambitious reader.
Edit: do not hardcode glyph ids...