1

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.

  • 1
    I don't think there is any reasonable way to do this in classic tex or xetex (you could probably use a callback filter to adjust the last word of a paragraph in luatex) – David Carlisle Nov 14 '15 at 10:06
  • If the final word is quite long, would you tolerate a hyphenation that places, say, four or more letters on the final line? Or are you looking to disable hyphenation outright for any final word in a paragraph? – Mico Nov 14 '15 at 10:11
  • There are many long words in my language (russian), and I think about first case - disable a hypenation, only for word, shortest, say, 8 or 10 letters. Word, that longer this, can be hyphenated. So length right-hypenated part must >= 1.5\parindent. – Elisey Nov 14 '15 at 10:24
  • Perhaps, solution located in paragraph-space area, like in that post:minimal-length-of-last-line, and that: minimum-length-of-last-line-of-a-paragraph. There is special solution for russian-style paragraph – Elisey Nov 16 '15 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.