Re: [NTG-context] Length range control of the last line of paragraph
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 -----------------------------------------------------------------
On 3/22/2016 11:54 AM, Hans Hagen wrote:
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 three new keywords (related to n times parindent filling, fwiw) \starttext \dontcomplain \setupindenting[big] \indenting[yes] \edef\ward{\cldloadfile{ward}} \setupalign[verytolerant,stretch] \dorecurse{100}{ \startnarrower[left] \setupalign[four] 4>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[three] 3>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[two] 2>\the\parfillskip \ward \par \stopnarrower \page } \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2016-03-22 Hans Hagen wrote:
On 3/22/2016 11:54 AM, Hans Hagen wrote:
On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
when paragraphs are separated by indenting the first line (instead of an empty line), these rules should be followed:
a next beta will provide three new keywords (related to n times parindent filling, fwiw)
\setupalign[four] \setupalign[three] \setupalign[two]
...
Thanks for this! I'd personally prefer more self-decriptive keywords. After several months I usually forgot the original meaning. But I understand this is unacceptable: last-line-length-greater-than-four-parindents :-)
On Tue, 22 Mar 2016, Hans Hagen wrote:
a next beta will provide three new keywords (related to n times parindent filling, fwiw)
\startnarrower[left] \setupalign[four] 4>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[three] 3>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[two] 2>\the\parfillskip \ward \par \stopnarrower
I think that two, three, four are not very descriptive. An easier to remember interface could be \setupalign[3*parindent], etc. Aditya
On 3/24/2016 3:10 AM, Aditya Mahajan wrote:
On Tue, 22 Mar 2016, Hans Hagen wrote:
a next beta will provide three new keywords (related to n times parindent filling, fwiw)
\startnarrower[left] \setupalign[four] 4>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[three] 3>\the\parfillskip \ward \par \stopnarrower \startnarrower[left] \setupalign[two] 2>\the\parfillskip \ward \par \stopnarrower
I think that two, three, four are not very descriptive. An easier to remember interface could be \setupalign[3*parindent], etc.
- i don't wanted new keywords - we don't scan for n* in setupalign (and "3*parindent" could be a keyword of course but messes the interface) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2016-03-22 Hans Hagen wrote:
On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
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]>
...
not uploaded yet
I am impressed by your passion. Thanks for your continuous tweaking and inventing various approaches to fulfil my needs! Jan
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Jan Tosovsky