[NTG-context] Length range control of the last line of paragraph

Hans Hagen pragma at wxs.nl
Tue Mar 22 11:54:27 CET 2016


On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> Dear All,
>
> when paragraphs are separated by indenting the first line (instead of an
> empty line), these rules should be followed:

a next beta will provide a bit more control over last words

\usemodule[art-01] \setupbodyfont[10pt]

\definehyphenationfeatures
   [words-1]
   [rightwords=3,
    lefthyphenmin=4,
    righthyphenmin=4]

\definehyphenationfeatures
   [words-2]
   [rightwords=3,
    rightchars=word,
    lefthyphenmin=4,
    righthyphenmin=4]

\definehyphenationfeatures
   [words-3]
   [rightwords=3,
    rightchars=8,
    lefthyphenmin=4,
    righthyphenmin=4]

\enabletrackers[hyphenator.visualize]

\setupalign[verytolerant,stretch]

\dontcomplain

\setuphyphenation
   [method=traditional]

\edef\tufte{\cldloadfile{tufte}}

\starttext

\dorecurse{100}{
     \hsize\dimexpr\textwidth-#1mm\relax
     \start \sethyphenationfeatures[words-1] \tufte \par
     \hsize\dimexpr\textwidth-#1mm\relax
     \start \sethyphenationfeatures[words-2] \tufte \par
     \hsize\dimexpr\textwidth-#1mm\relax
     \start \sethyphenationfeatures[words-3] \tufte \par
     \page
}

\stoptext

not uploaded yet


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list