diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-10-13 17:23:54 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-10-13 17:23:54 +0200 |
commit | cc7fcf11d31b2db23ba3adca896507f9faf128cc (patch) | |
tree | e77d461cccb9ab50aa4f83f73f1e57ece4bd732d /doc/context/sources/general/manuals/languages/languages-hyphenation.tex | |
parent | b2db36adbd89b2dba9591da5fc13b4eba57d581e (diff) | |
download | context-cc7fcf11d31b2db23ba3adca896507f9faf128cc.tar.gz |
2021-10-13 16:58:00
Diffstat (limited to 'doc/context/sources/general/manuals/languages/languages-hyphenation.tex')
-rw-r--r-- | doc/context/sources/general/manuals/languages/languages-hyphenation.tex | 50 |
1 files changed, 50 insertions, 0 deletions
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 |