summaryrefslogtreecommitdiff
path: root/macros/luatex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-08 03:01:49 +0000
committerNorbert Preining <norbert@preining.info>2022-04-08 03:01:49 +0000
commitd1d30aef56e5df7bbe7ee55e9fecf7d72514b6bf (patch)
tree4451fea46d2b0b3ed47697c11110a0fe6df8e890 /macros/luatex
parent4ab0687cfdd546779ccb6d8589a671441bf5865f (diff)
CTAN sync 202204080301
Diffstat (limited to 'macros/luatex')
-rw-r--r--macros/luatex/generic/lua-widow-control/README.md2
-rw-r--r--macros/luatex/generic/lua-widow-control/lua-widow-control.lua23
-rw-r--r--macros/luatex/generic/lua-widow-control/lua-widow-control.opm2
-rw-r--r--macros/luatex/generic/lua-widow-control/lua-widow-control.pdfbin379185 -> 380127 bytes
-rw-r--r--macros/luatex/generic/lua-widow-control/lua-widow-control.sty6
-rw-r--r--macros/luatex/generic/lua-widow-control/lua-widow-control.tex2
-rw-r--r--macros/luatex/generic/lua-widow-control/lwc-documentation.tex4
-rw-r--r--macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkiv4
-rw-r--r--macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl4
9 files changed, 27 insertions, 20 deletions
diff --git a/macros/luatex/generic/lua-widow-control/README.md b/macros/luatex/generic/lua-widow-control/README.md
index 219a1f5eb1..850f034f8e 100644
--- a/macros/luatex/generic/lua-widow-control/README.md
+++ b/macros/luatex/generic/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.0.3 (2022-03-28)_ <!--%%version %%dashdate-->
+_v2.0.4 (2022-04-07)_ <!--%%version %%dashdate-->
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 cd1c6adb93..2e374ac6e1 100644
--- a/macros/luatex/generic/lua-widow-control/lua-widow-control.lua
+++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.lua
@@ -107,8 +107,8 @@ elseif plain or latex or optex then
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 @@ end
--- 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 @@ function lwc.save_paragraphs(head)
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 @@ local last_paragraph = 0
--- 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
diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.opm b/macros/luatex/generic/lua-widow-control/lua-widow-control.opm
index cfe2ddf248..6ff6281583 100644
--- a/macros/luatex/generic/lua-widow-control/lua-widow-control.opm
+++ b/macros/luatex/generic/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 <v2.0.3>} %%version
+\_codedecl\lwcenable{lua-widow-control <v2.0.4>} %%version
\_clubpenalty=1
\_widowpenalty=1
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 fff2fc72bf..007b3136f0 100644
--- a/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf
+++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf
Binary files 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 367c73adfe..0690a23208 100644
--- a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty
+++ b/macros/luatex/generic/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.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
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 29bfdc15f1..4ff5bd993b 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: 2022 Max Chernoff
-\wlog{lua-widow-control v2.0.3} %%version
+\wlog{lua-widow-control v2.0.4} %%version
\ifx\directlua\undefined
\errmessage{%
diff --git a/macros/luatex/generic/lua-widow-control/lwc-documentation.tex b/macros/luatex/generic/lua-widow-control/lwc-documentation.tex
index 7bec7a0a33..8d59b2a735 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=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 @@ You could just disable then reenable \lwc/ every time that you use the command;
\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}$}}
diff --git a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkiv b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkiv
index 74f61d941e..83f72b3905 100644
--- a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkiv
+++ b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkiv
@@ -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]
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 74f61d941e..83f72b3905 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=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]