summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-22 21:44:23 +0000
committerKarl Berry <karl@freefriends.org>2022-11-22 21:44:23 +0000
commitcebc6e65cc9a429afbc4ae53d5a8b67d18d72351 (patch)
tree6a5968db3890233a4e800993860d35f39d080db2 /Master/texmf-dist/tex/lualatex
parentf14a9cb23b19c7bd3bd80081f5a697296ae2ebea (diff)
lua-widow-control (22nov22)
git-svn-id: svn://tug.org/texlive/trunk@65084 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty4
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty43
2 files changed, 39 insertions, 8 deletions
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 bdfa099947c..d7f8601e60a 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/08/23 %%slashdate
- v2.2.2 %%version
+ 2022/11/22 %%slashdate
+ v3.0.0 %%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 f5db525ab40..ad3e95a28ae 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.2}{2022-08-23} %%version %%dashdate
+\DeclareCurrentRelease{v3.0.0}{2022-11-22} %%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/08/23} %%slashdate
- {v2.2.2} %%version
+ {2022/11/22} %%slashdate
+ {v3.0.0} %%version
{Use Lua to remove widows and orphans}
% Message and String Constants
@@ -76,6 +76,10 @@
emergencystretch .value_required:n = true,
emergencystretch .initial:x = \dim_max:nn { 3em } { 30pt },
+ draftoffset .dim_gset:N = \g__lwc_draftoffset_dim,
+ draftoffset .value_required:n = true,
+ draftoffset .initial:x = 1in,
+
max-cost .int_gset:N = \g__lwc_maxcost_int,
max-cost .value_required:n = true,
max-cost .initial:x = \c_max_int,
@@ -145,6 +149,14 @@
\fi
}
+\prg_new_conditional:Nnn \__lwc_if_lmtx: { T, F, TF } {
+ \int_compare:nNnTF { \tex_luatexversion:D } > { 200 } {
+ \prg_return_true:
+ } {
+ \prg_return_false:
+ }
+}
+
% Expansion of some parts of the document, such as section headings, is quite
% undesirable, so we'll disable \lwc/ for certain commands.
\int_new:N \g__lwc_disable_int
@@ -197,6 +209,12 @@
\clist_map_function:NN \g__lwc_disablecmds_cl \__lwc_patch_cmd:n
}
+\__lwc_if_lmtx:T {
+ \int_gset:Nn \normalizelinemode {
+ \numexpression\normalizelinemode bor 2\relax
+ }
+}
+
%%% Class and package-specifc patches
% KOMA-Script
@@ -226,9 +244,22 @@
debug .default:n = true,
debug .value_required:n = false,
- draft .choice:,
- draft / true .code:n = \__lwc_draft:n { true },
- draft / false .code:n = \__lwc_draft:n { false },
+ showcolours .choice:,
+ showcolours / true .code:n = \__lwc_show_colours:n { true },
+ showcolours / false .code:n = \__lwc_show_colours:n { false },
+ showcolours .default:n = true,
+ showcolours .value_required:n = false,
+
+ showcosts .choice:,
+ showcosts / true .code:n = \__lwc_show_costs:n { true },
+ showcosts / false .code:n = \__lwc_show_costs:n { false },
+ showcosts .default:n = true,
+ showcosts .value_required:n = false,
+
+ draft .meta:n = {
+ showcolours = { #1 },
+ showcosts = { #1 },
+ },
draft .default:n = true,
draft .value_required:n = false,