From 08ccf305ee79ab8e5ba9d1a8f3d22e74dccedd80 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 5 Feb 2022 03:00:59 +0000 Subject: CTAN sync 202202050300 --- macros/luatex/generic/lua-widow-control/README.md | 2 +- .../lua-widow-control/lua-widow-control.lua | 6 +++--- .../lua-widow-control/lua-widow-control.pdf | Bin 313200 -> 318979 bytes .../lua-widow-control/lua-widow-control.sty | 2 +- .../lua-widow-control/lua-widow-control.tex | 2 +- .../lua-widow-control/lwc-documentation.tex | 2 +- .../generic/lua-widow-control/lwc-sample.tex | 15 +++++++++------ .../lua-widow-control/t-lua-widow-control.mkxl | 4 ++-- 8 files changed, 18 insertions(+), 15 deletions(-) (limited to 'macros/luatex/generic') diff --git a/macros/luatex/generic/lua-widow-control/README.md b/macros/luatex/generic/lua-widow-control/README.md index 2486ba110a..07c24e3c59 100644 --- a/macros/luatex/generic/lua-widow-control/README.md +++ b/macros/luatex/generic/lua-widow-control/README.md @@ -42,4 +42,4 @@ Lua-widow-control is licensed under the [_Mozilla Public License_, version 2.0]( Please note that a compiled document is absolutely **not** considered to be an "Executable Form" as defined by the MPL. The use of lua-widow-control in a document does not place **any** obligations on the document's author or distributors. The MPL and CC-BY-SA licenses **only** apply to you if you distribute the lua-widow-control source code or documentation. --- -_v1.1.3 (2022-01-30)_ +_v1.1.4 (2022-02-04)_ diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.lua b/macros/luatex/generic/lua-widow-control/lua-widow-control.lua index 56fa77e991..9a8b2efa78 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.lua +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.lua @@ -65,8 +65,8 @@ if lwc.context then elseif lwc.plain or lwc.latex then luatexbase.provides_module { name = lwc.name, - date = "2022/01/30", --%%date - version = "1.1.3", --%%version + date = "2022/02/04", --%%date + version = "1.1.4", --%%version description = [[ This module provides a LuaTeX-based solution to prevent @@ -195,7 +195,7 @@ function lwc.save_paragraphs(head) -- Offset the accumulated \\prevdepth local prevdepth = node.new("glue") - prevdepth.width = -1 * long_info.prevdepth + prevdepth.width = natural_info.prevdepth - long_info.prevdepth last(long_node).next = prevdepth table.insert(lwc.paragraphs, {demerits = long_demerits, node = long_node}) diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf b/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf index 2a8f319bbf..5ee7f9995e 100644 Binary files a/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf and b/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf differ diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty index 31d58237f6..81dd969d8d 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty @@ -5,7 +5,7 @@ \NeedsTeXFormat{LaTeX2e}[2015/01/01] % Formats built after 2015 include \LuaTeX{}Base \ProvidesPackage{lua-widow-control}% - [2022/01/30 v1.1.3] %%version %%date + [2022/02/04 v1.1.4] %%version %%date \clubpenalty=1 \widowpenalty=1 diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex b/macros/luatex/generic/lua-widow-control/lua-widow-control.tex index eb2c1a070b..a9b236f966 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.tex @@ -3,7 +3,7 @@ % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2021 Max Chernoff -\wlog{lua-widow-control v1.1.3} %%version +\wlog{lua-widow-control v1.1.4} %%version \input ltluatex % \LuaTeX{}Base diff --git a/macros/luatex/generic/lua-widow-control/lwc-documentation.tex b/macros/luatex/generic/lua-widow-control/lwc-documentation.tex index 78ae260794..bf0bf8877b 100644 --- a/macros/luatex/generic/lua-widow-control/lwc-documentation.tex +++ b/macros/luatex/generic/lua-widow-control/lwc-documentation.tex @@ -37,7 +37,7 @@ \startdocument[ title=lua-widow-control, author=Max Chernoff, - version=1.1.3, %%version + version=1.1.4, %%version github=https://github.com/gucci-on-fleek/lua-widow-control, ctan=https://www.ctan.org/pkg/lua-widow-control, ] diff --git a/macros/luatex/generic/lua-widow-control/lwc-sample.tex b/macros/luatex/generic/lua-widow-control/lwc-sample.tex index 787b91e8dc..fc773ea11e 100644 --- a/macros/luatex/generic/lua-widow-control/lwc-sample.tex +++ b/macros/luatex/generic/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] diff --git a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl index 85b1e340b6..436eb880cb 100644 --- a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl +++ b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl @@ -1,10 +1,10 @@ %D \module %D [ file=t-lua-widow-control, -%D version=1.1.3, %%version +%D version=1.1.4, %%version %D title=lua-widow-control, %D subtitle=\ConTeXt module for lua-widow-control, %D author=Max Chernoff, -%D date=2022-01-30, %%date +%D date=2022-02-04, %%date %D copyright=Max Chernoff, %D license=MPL-2.0+, %D url=https://github.com/gucci-on-fleek/lua-widow-control] -- cgit v1.2.3