From c617f3c41b0840c82ed1f943d62a60cdadb9b2e5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 28 Jul 2022 20:06:23 +0000 Subject: lua-widow-control (28jul22) git-svn-id: svn://tug.org/texlive/trunk@63994 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/luatex/lua-widow-control/README.md | 2 +- .../luatex/lua-widow-control/lua-widow-control.pdf | Bin 509126 -> 506634 bytes .../lua-widow-control/tb133chernoff-widows.pdf | Bin 391529 -> 391523 bytes .../source/luatex/lua-widow-control/CHANGELOG.md | 7 ++++- .../source/luatex/lua-widow-control/lwc-manual.tex | 4 +-- .../lua-widow-control/t-lua-widow-control.mkxl | 4 +-- .../lua-widow-control-2022-02-22.sty | 4 +-- .../lua-widow-control/lua-widow-control.sty | 6 ++--- .../luatex/lua-widow-control/lua-widow-control.lua | 29 ++++++--------------- .../luatex/lua-widow-control/lua-widow-control.tex | 2 +- .../optex/lua-widow-control/lua-widow-control.opm | 2 +- 11 files changed, 26 insertions(+), 34 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/luatex/lua-widow-control/README.md b/Master/texmf-dist/doc/luatex/lua-widow-control/README.md index 61e62cb59ad..ff167352c6b 100644 --- a/Master/texmf-dist/doc/luatex/lua-widow-control/README.md +++ b/Master/texmf-dist/doc/luatex/lua-widow-control/README.md @@ -48,4 +48,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. --- -_v2.2.0 (2022-06-17)_ +_v2.2.1 (2022-07-28)_ diff --git a/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf b/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf index 36b8db29084..0914f4a2235 100644 Binary files a/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf and b/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf differ diff --git a/Master/texmf-dist/doc/luatex/lua-widow-control/tb133chernoff-widows.pdf b/Master/texmf-dist/doc/luatex/lua-widow-control/tb133chernoff-widows.pdf index b5061094963..344604fb466 100644 Binary files a/Master/texmf-dist/doc/luatex/lua-widow-control/tb133chernoff-widows.pdf and b/Master/texmf-dist/doc/luatex/lua-widow-control/tb133chernoff-widows.pdf differ diff --git a/Master/texmf-dist/source/luatex/lua-widow-control/CHANGELOG.md b/Master/texmf-dist/source/luatex/lua-widow-control/CHANGELOG.md index 0314b88e6bc..b6822129f57 100644 --- a/Master/texmf-dist/source/luatex/lua-widow-control/CHANGELOG.md +++ b/Master/texmf-dist/source/luatex/lua-widow-control/CHANGELOG.md @@ -9,7 +9,12 @@ Changelog All notable changes to lua-widow-control will be listed here, in reverse chronological order. **Changes listed in bold** are important changes: they either remove options or commands, or may change the location of page breaks. -## v2.2.0 (2022-06-17) +## v2.2.1 (2022-07-28) + +- Fix crashes with recent LuaMetaTeX (ConTeXt MkXL) +- No longer show "left parfill skip" warnings with ConTeXt LMTX/MkXL ([#7](https://github.com/gucci-on-fleek/lua-widow-control/issues/7)) + +## [v2.2.0 (2022-06-17)](https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-9a5deba53545adc5ab25a5caa0b8ebf4104843f9) - Fix paragraphs not being properly saved for potential expansion. **May affect page breaks.** - Add a new `draft` option ([#36](https://github.com/gucci-on-fleek/lua-widow-control/issues/36)). diff --git a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-manual.tex b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-manual.tex index c8902383714..c22375e34ce 100644 --- a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-manual.tex +++ b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-manual.tex @@ -64,7 +64,7 @@ \startdocument[ title=lua-widow-control, author=Max Chernoff, - version=2.2.0, %%version + version=2.2.1, %%version github=https://github.com/gucci-on-fleek/lua-widow-control, ctan=https://www.ctan.org/pkg/lua-widow-control, ] @@ -390,7 +390,7 @@ Any others, though, you'll need to patch yourself. \NC\NR \stopTABLE -The Plain~\TeX{}, \OpTeX, and \ConTeXt commands \emph{append} to the list of patched commands: they simply patch the provided commands while leaving the original patches in place. The \LaTeX{} option \emph{sets} the list of patched commands: it replaces the default list with the provided list. +The Plain~\TeX{}, \OpTeX{}, and \ConTeXt{} commands \emph{append} to the list of patched commands: they simply patch the provided commands while leaving the original patches in place. The \LaTeX{} option \emph{sets} the list of patched commands: it replaces the default list with the provided list. \subsection{\estretch/} diff --git a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl index 59825332020..cc1932d8e1d 100644 --- a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl +++ b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl @@ -1,10 +1,10 @@ %D \module %D [ file=t-lua-widow-control, -%D version=2.2.0, %%version +%D version=2.2.1, %%version %D title=lua-widow-control, %D subtitle=\ConTeXt module for lua-widow-control, %D author=Max Chernoff, -%D date=2022-06-17, %%dashdate +%D date=2022-07-28, %%dashdate %D copyright=Max Chernoff, %D license=MPL-2.0+, %D url=https://github.com/gucci-on-fleek/lua-widow-control] diff --git a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty b/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty index 74645635600..fc410085e34 100644 --- a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty +++ b/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty @@ -12,8 +12,8 @@ % report a real version number here for debugging. \PackageInfo{lua-widow-control}{% Real version: - 2022/06/17 %%slashdate - v2.2.0 %%version + 2022/07/28 %%slashdate + v2.2.1 %%version } \PackageWarning{lua-widow-control}{% diff --git a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty b/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty index 7d1be850b91..8b768637670 100644 --- a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty +++ b/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty @@ -13,7 +13,7 @@ \DeclareRelease{}{0000-00-00}{lua-widow-control-2022-02-22.sty} \DeclareRelease{v1.1.6}{2022-02-22}{lua-widow-control-2022-02-22.sty} -\DeclareCurrentRelease{v2.2.0}{2022-06-17} %%version %%dashdate +\DeclareCurrentRelease{v2.2.1}{2022-07-28} %%version %%dashdate % If this version of LaTeX doesn't support command hooks, then we load % the last v1.1.X version of the package. @@ -23,8 +23,8 @@ \ProvidesExplPackage {lua-widow-control} - {2022/06/17} %%slashdate - {v2.2.0} %%version + {2022/07/28} %%slashdate + {v2.2.1} %%version {Use Lua to remove widows and orphans} % Unconditional Package Loads diff --git a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua index 800faf56242..0f23f42592a 100644 --- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua +++ b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua @@ -194,8 +194,8 @@ elseif plain or latex or optex then debug("Plain/LaTeX") luatexbase.provides_module { name = lwc.name, - date = "2022/06/17", --%%slashdate - version = "2.2.0", --%%version + date = "2022/07/28", --%%slashdate + version = "2.2.1", --%%version description = [[ This module provides a LuaTeX-based solution to prevent @@ -344,25 +344,19 @@ local function long_paragraph(head) -- We can't modify the original paragraph head = copy_list(head) + if lmtx then + tex.preparelinebreak(head) + end + -- Prevent ultra-short last lines (\TeX{}Book p. 104), except with narrow columns -- Equivalent to \\parfillskip=0pt plus 0.8\\hsize - local parfillskip - if lmtx or last(head).id ~= glue_id then - -- LMTX does not automatically add the \\parfillskip glue - parfillskip = new_node("glue", "parfillskip") - else - parfillskip = last(head) - end + local parfillskip = last(head) if tex.hsize > min_col_width then parfillskip[stretch_order] = 0 parfillskip.stretch = 0.8 * tex.hsize -- Last line must be at least 20% long end - if lmtx or last(head).id ~= glue_id then - last(head).next = parfillskip - end - -- Break the paragraph 1 line longer than natural return linebreak(head, { looseness = 1, @@ -379,15 +373,8 @@ local function natural_paragraph(head) -- We can't modify the original paragraph head = copy_list(head) - --[[ Contrary to the documentation, LMTX does not automatically add - the \\parfillskip glue before `pre_linebreak_filter`, so we need - to add it here so that our \\prevgraf comparisons are correct. - ]] if lmtx then - parfillskip = new_node("glue", "parfillskip") - parfillskip[stretch_order] = 1 - parfillskip.stretch = 1 -- 0pt plus 1fil - last(head).next = parfillskip + tex.preparelinebreak(head) end -- Break the paragraph naturally to get \\prevgraf diff --git a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex index 2e1dcef902e..45c9e288e45 100644 --- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex +++ b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex @@ -3,7 +3,7 @@ % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2022 Max Chernoff -\wlog{lua-widow-control v2.2.0} %%version +\wlog{lua-widow-control v2.2.1} %%version \ifx\directlua\undefined \errmessage{% diff --git a/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm b/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm index ff26f856c5f..d628a401e46 100644 --- a/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm +++ b/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm @@ -3,7 +3,7 @@ % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2022 Max Chernoff -\_codedecl\lwcenable{lua-widow-control } %%version +\_codedecl\lwcenable{lua-widow-control } %%version \_namespace{lwc} \_clubpenalty=1 -- cgit v1.2.3