At the end of each paragraph, TeX usually adds infinitely stretchable glue, since the usual setting of \parfillskip
is equivalent to
\setlength{\parfillskip}{0pt plus 1fill}
One way might be to set
\setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent}
but this would work only for normal paragraphs. In lists one should reset the \parfillskip
with \linewidth
instead of \textwidth
: its value stated as before is not dynamically computed, but rather it's fixed. If \parfillskip
had been a macro, instead of a skip parameter (or if Knuth had provided an \everyendofpar
token parameter), things would be different. One might redefine \par
, of course, but LaTeX already does it in some cases.
Note that glue can always stretch more than the stated value, but in this case the badness of the line would increase, usually producing an Underfull \hbox
message. In general I'm inclined not to be overly confident in automatic adjustments like this: no automated system will be able to do this as well as you, writes Knuth about page breaking, but paragraph breaking is very much alike, particularly with respect to the final line.
impnattypo
in German :-) – ℝaphink Jul 19 '12 at 5:31