From cc7fcf11d31b2db23ba3adca896507f9faf128cc Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 13 Oct 2021 17:23:54 +0200 Subject: 2021-10-13 16:58:00 --- .../manuals/languages/languages-hyphenation.tex | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'doc/context/sources/general/manuals/languages/languages-hyphenation.tex') diff --git a/doc/context/sources/general/manuals/languages/languages-hyphenation.tex b/doc/context/sources/general/manuals/languages/languages-hyphenation.tex index b9131d905..ac456502e 100644 --- a/doc/context/sources/general/manuals/languages/languages-hyphenation.tex +++ b/doc/context/sources/general/manuals/languages/languages-hyphenation.tex @@ -871,6 +871,56 @@ discretionaries. \stopsection +\startsection[title=Neat tricks] + +The following two examples are for users to test. The first one shows all hyphenation +points in a paragraph: + +\starttyping +\bgroup + \setupalign[flushright] + \hyphenpenalty-100000 + \input tufte + \par % force hyphenation +\egroup +\stoptyping + +The second one shows the cases where a hyphenated word ends a page: + +\starttyping +\bgroup + \page + \interlinepenalty10000 + \brokenpenalty-10000 + \input tufte + \page +\egroup +\stoptyping + +A less space consuming variant of that one is: + +\starttyping +\bgroup + \setbox\scratchboxone\vbox \bgroup + \interlinepenalty10000 + \brokenpenalty-10000 + \input tufte + \egroup + \doloop { + \ifvoid\scratchboxone + \hrule + \exitloop + \else + \setbox\scratchboxtwo\vsplit\scratchboxone to 1pt + \hrule + \unvbox\scratchboxtwo + \fi + } +\egroup +\stoptyping + +\stopsection + \stopchapter \stopcomponent -- cgit v1.2.3