summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-04 22:21:15 +0000
committerKarl Berry <karl@freefriends.org>2022-02-04 22:21:15 +0000
commit0e90fd83763d63a3460c4a730b3377f02dbfd088 (patch)
tree4d8d172ca2a14fcfe321f80ae37a2d3bc0db3f42 /Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex
parent1bde92bd528b3ba41950517fa33b93fa3005f691 (diff)
lua-widow-control (4feb22)
git-svn-id: svn://tug.org/texlive/trunk@61880 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex')
-rw-r--r--Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex15
1 files changed, 9 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex
index 787b91e8dc5..fc773ea11e7 100644
--- a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex
+++ b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-sample.tex
@@ -6,7 +6,7 @@
\startbuffer[demo-text]
\definepapersize[smallpaper][
width=6cm,
- height=9cm
+ height=8.3cm
]\setuppapersize[smallpaper]
\setuplayout[
@@ -23,20 +23,23 @@
\setupbodyfont[9pt]
\setupindenting[yes, 2em]
- \setupalign[tolerant]
\definepalet[layout][grid=middlegray]
\showgrid[nonumber, none, lines]
- \definefontfeature[default][default][expansion=quality]
- \setupalign[hz]
+ \definefontfeature[default][default][expansion=quality,protrusion=quality]
+
+ \usetypescript[modern-base]
+ \setupbodyfont[reset,modern]
+
+ \setupalign[hz,hanging,tolerant]
\starttext
\Lwc/ can remove most widows and orphans from a document, \emph{without} stretching any glue or shortening any pages.
- It does so by automatically lengthening a paragraph on a page where a widow or orphan would otherwise occur. While \TeX{} breaks paragraphs into their natural length, \lwc/ is breaking the paragraph 1~line longer than its natural length. \TeX{}'s paragraph is output to the page, but \lwc/'s paragraph is just stored for later. When a widow or orphan occurs, \lwc/ can take over. It selects the previously-saved paragraph with the least badness; then, it replaces \TeX{}'s paragraph with its saved paragraph. This lengthens the page by 1~line.
+ It does so by automatically lengthening a paragraph on a page where a widow or orphan would otherwise occur. While \TeX{} breaks paragraphs into their natural length, \lwc/ is breaking the paragraph 1~line longer than its natural length. \TeX{}'s paragraph is output to the page, but \lwc/'s paragraph is just stored for later. When a widow or orphan occurs, \lwc/ can take over. It selects the previously-saved paragraph with the least badness; then, it replaces \TeX{}'s paragraph with its saved paragraph. This increases the text block height of the page by 1~line.
- Now, the last line of the current page can be pushed to the top of the next page. This removes the widow or the orphan without creating any additional work for the document's author.
+ Now, the last line of the current page can be pushed to the top of the next page. This removes the widow or the orphan without creating any additional work.
\stoptext
\stopbuffer
\savebuffer[list=demo-text]