summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/lua-widow-control
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-15 21:32:44 +0000
committerKarl Berry <karl@freefriends.org>2021-12-15 21:32:44 +0000
commitcb9265990c7b42a4f9e12debabbbf5ebd5b1f31b (patch)
tree94fcaba9febf6e56aaba2c7456438c2c4dc80978 /Master/texmf-dist/tex/luatex/lua-widow-control
parent92339a6135ff2c1d0e09d6d874ba6fabcf76ad3c (diff)
lua-widow-control (15dec21)
git-svn-id: svn://tug.org/texlive/trunk@61317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lua-widow-control')
-rw-r--r--Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua10
-rw-r--r--Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex2
2 files changed, 7 insertions, 5 deletions
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 587288e1da0..dd488f3bd21 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
@@ -60,12 +60,13 @@ assert(lwc.context or luatexbase, [[
if lwc.context then
lwc.warning = logs.reporter("module", lwc.name)
lwc.attribute = attributes.public(lwc.name)
- lwc.contrib_head = 'contribute_head' -- For \LuaMetaTeX{}
+ lwc.contrib_head = 'contributehead' -- For \LuaMetaTeX{}
+ lwc.stretch_order = "stretchorder"
elseif lwc.plain or lwc.latex then
luatexbase.provides_module {
name = lwc.name,
- date = "2021/11/26", --%%date
- version = "1.1.1", --%%version
+ date = "2021/12/14", --%%date
+ version = "1.1.2", --%%version
description = [[
This module provides a LuaTeX-based solution to prevent
@@ -77,6 +78,7 @@ elseif lwc.plain or lwc.latex then
lwc.warning = function(str) luatexbase.module_warning(lwc.name, str) end
lwc.attribute = luatexbase.new_attribute(lwc.name)
lwc.contrib_head = 'contrib_head' -- For \LuaTeX{}
+ lwc.stretch_order = "stretch_order"
else -- uh oh
error [[
Unsupported format.
@@ -167,7 +169,7 @@ function lwc.save_paragraphs(head)
-- Prevent ultra-short last lines (\TeX{}Book p. 104), except with narrow columns
local parfillskip = last(new_head)
if parfillskip.id == glue_id and tex.hsize > min_col_width then
- parfillskip.stretch_order = 0
+ parfillskip[lwc.stretch_order] = 0
parfillskip.stretch = 0.8 * tex.hsize -- Last line must be at least 20% long
end
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 cba8ecfe396..715652186e8 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: 2021 Max Chernoff
-\wlog{lua-widow-control v1.1.1} %%version
+\wlog{lua-widow-control v1.1.2} %%version
\input ltluatex % \LuaTeX{}Base