Into paragraph I use:
\lefthyphenmin=2
\righthyphenmin=2
and it's correctly for me. But some paragraphs ends with too short right part (two ot three letters) of hypenated word (looks like widow-letters in words context).
In this case I'm using one of the folowing methods (or both):
1) \mbox{last word of paragraph}, or
2) set \parfillskip= after paragraph.
(I wrote \ParFilling{}{}{}{}{} macros with actions:
\parfillskip=1.5\parindent plus .9\textwidth \par
\parfillskip=0pt plus .9\textwidth \par
\parfillskip=0pt \par
\looseness=-1
\looseness=+1
choiced by 1. So \ParFilling{}{}{}{}{1} add \parfillskip=0pt \par to paragraph, and so one. This macros inserted by script at end of the each paragraph, and I can change appearance of paragraph with turning on or off according field).
But may be we can change hyphenation rules (e.g.\righthyphenmin=6, as I set for TOC) only at last word (or words) of paragraph? Or select last word(s) via script and put it in \nohyphens{last (long) word of paragraph} for hyphenat package?
Some ideas? Thank you.