texlive[62976] Master/texmf-dist: lua-widow-control (7apr22)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 7 22:32:04 CEST 2022


Revision: 62976
          http://tug.org/svn/texlive?view=revision&revision=62976
Author:   karl
Date:     2022-04-07 22:32:04 +0200 (Thu, 07 Apr 2022)
Log Message:
-----------
lua-widow-control (7apr22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/lua-widow-control/README.md
    trunk/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf
    trunk/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex
    trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv
    trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl
    trunk/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty
    trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua
    trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex
    trunk/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm

Modified: trunk/Master/texmf-dist/doc/luatex/lua-widow-control/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/lua-widow-control/README.md	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/doc/luatex/lua-widow-control/README.md	2022-04-07 20:32:04 UTC (rev 62976)
@@ -48,4 +48,4 @@
 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.0.3 (2022-03-28)_ <!--%%version %%dashdate-->
+_v2.0.4 (2022-04-07)_ <!--%%version %%dashdate-->

Modified: trunk/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex
===================================================================
--- trunk/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex	2022-04-07 20:32:04 UTC (rev 62976)
@@ -37,7 +37,7 @@
 \startdocument[
     title=lua-widow-control,
     author=Max Chernoff,
-    version=2.0.3, %%version
+    version=2.0.4, %%version
     github=https://github.com/gucci-on-fleek/lua-widow-control,
     ctan=https://www.ctan.org/pkg/lua-widow-control,
 ]
@@ -312,6 +312,8 @@
 
 \Lwc/ automatically patches the default \LaTeX{}, \ConTeXt{}, and Plain~\TeX{} section commands, so you shouldn't need to patch these yourself. \Lwc/ also patches the commands provided by \sans{memoir}, \sans{\acronym{KOMA}-script}, and \sans{titlesec}. You'll need to patch any other section commands yourself.
 
+Note that the \LaTeX{} option does not \emph{append} commands to the disable list; rather, it \emph{sets} the list from scratch. This means that you can set an empty list to disable any command patching; however, this also means that if you want to disable one command on top of the defaults, you'll also need to manually include the default list.
+
 \startTABLE
     \NC Plain \TeX{}
     \NC \inlineTEX{\lwcdisablecmd{$\meta{\backslash macro}$}}

Modified: trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv	2022-04-07 20:32:04 UTC (rev 62976)
@@ -1,10 +1,10 @@
 %D \module
 %D   [     file=t-lua-widow-control,
-%D      version=2.0.3, %%version
+%D      version=2.0.4, %%version
 %D        title=lua-widow-control,
 %D     subtitle=\ConTeXt module for lua-widow-control,
 %D       author=Max Chernoff,
-%D         date=2022-03-28, %%dashdate
+%D         date=2022-04-07, %%dashdate
 %D    copyright=Max Chernoff,
 %D      license=MPL-2.0+,
 %D          url=https://github.com/gucci-on-fleek/lua-widow-control]

Modified: trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl	2022-04-07 20:32:04 UTC (rev 62976)
@@ -1,10 +1,10 @@
 %D \module
 %D   [     file=t-lua-widow-control,
-%D      version=2.0.3, %%version
+%D      version=2.0.4, %%version
 %D        title=lua-widow-control,
 %D     subtitle=\ConTeXt module for lua-widow-control,
 %D       author=Max Chernoff,
-%D         date=2022-03-28, %%dashdate
+%D         date=2022-04-07, %%dashdate
 %D    copyright=Max Chernoff,
 %D      license=MPL-2.0+,
 %D          url=https://github.com/gucci-on-fleek/lua-widow-control]

Modified: trunk/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty	2022-04-07 20:32:04 UTC (rev 62976)
@@ -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.0.3}{2022-03-28} %%version %%dashdate
+\DeclareCurrentRelease{v2.0.4}{2022-04-07} %%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/03/28} %%slashdate
-    {v2.0.3} %%version
+    {2022/04/07} %%slashdate
+    {v2.0.4} %%version
     {Use Lua to remove widows and orphans}
 
 % Unconditional Package Loads

Modified: trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua	2022-04-07 20:32:04 UTC (rev 62976)
@@ -107,8 +107,8 @@
         debug_print("Plain/LaTeX")
         luatexbase.provides_module {
             name = lwc.name,
-            date = "2022/03/28", --%%slashdate
-            version = "2.0.3", --%%version
+            date = "2022/04/07", --%%slashdate
+            version = "2.0.4", --%%version
             description = [[
 
 This module provides a LuaTeX-based solution to prevent
@@ -231,6 +231,13 @@
 
 --- Saves each paragraph, but lengthened by 1 line
 function lwc.save_paragraphs(head)
+    -- Ensure that we were actually given a par (only under \ConTeXt{} for some reason)
+    if (head.id ~= par_id and context) or
+        status.output_active -- Don't run during the output routine
+    then
+        return head
+    end
+
     -- Prevent the "underfull hbox" warnings when we store a potential paragraph
     local renable_box_warnings
     if (context or optex) or
@@ -240,10 +247,6 @@
         lwc.callbacks.disable_box_warnings.enable()
     end
 
-    -- Ensure that we were actually given a par (only under \ConTeXt{} for some reason)
-    if head.id ~= par_id and context then
-        return head
-    end
 
     -- We need to return the unmodified head at the end, so we make a copy here
     local new_head = copy(head)
@@ -307,9 +310,11 @@
 --- some arbitrary number for \lwc/, and the value corresponds to the
 --- paragraphs index, which is negated for the end of the paragraph.
 function lwc.mark_paragraphs(head)
-    set_attribute(head, attribute, #paragraphs + (100 * pagenum()))
-    set_attribute(last(head), attribute, -1 * (#paragraphs + (100 * pagenum())))
-    last_paragraph = #paragraphs
+    if not status.output_active then
+        set_attribute(head, attribute, #paragraphs + (100 * pagenum()))
+        set_attribute(last(head), attribute, -1 * (#paragraphs + (100 * pagenum())))
+        last_paragraph = #paragraphs
+    end
 
     return head
 end

Modified: trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex	2022-04-07 20:32:04 UTC (rev 62976)
@@ -3,7 +3,7 @@
 % SPDX-License-Identifier: MPL-2.0+
 % SPDX-FileCopyrightText: 2022 Max Chernoff
 
-\wlog{lua-widow-control v2.0.3} %%version
+\wlog{lua-widow-control v2.0.4} %%version
 
 \ifx\directlua\undefined
     \errmessage{%

Modified: trunk/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm	2022-04-07 20:31:47 UTC (rev 62975)
+++ trunk/Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm	2022-04-07 20:32:04 UTC (rev 62976)
@@ -3,7 +3,7 @@
 % SPDX-License-Identifier: MPL-2.0+
 % SPDX-FileCopyrightText: 2022 Max Chernoff
 
-\_codedecl\lwcenable{lua-widow-control <v2.0.3>} %%version
+\_codedecl\lwcenable{lua-widow-control <v2.0.4>} %%version
 
 \_clubpenalty=1
 \_widowpenalty=1



More information about the tex-live-commits mailing list.