summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/optex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-14 20:33:11 +0000
committerKarl Berry <karl@freefriends.org>2022-05-14 20:33:11 +0000
commit1b913ce64901669921736117b2ed8aa36c55110e (patch)
tree67cb6e4d19b2f0a4a575555053632c423362937e /Master/texmf-dist/tex/optex
parent102d0c6119afd0d7b28ac3e3fa6a5997e96028c6 (diff)
lua-widow-control (14may22)
git-svn-id: svn://tug.org/texlive/trunk@63302 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/optex')
-rw-r--r--Master/texmf-dist/tex/optex/lua-widow-control/lua-widow-control.opm21
1 files changed, 10 insertions, 11 deletions
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 afae1aa6a60..cb6f4c06f97 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 <v2.0.6>} %%version
+\_codedecl\lwcenable{lua-widow-control <v2.1.0>} %%version
\_namespace{lwc}
\_clubpenalty=1
@@ -19,14 +19,6 @@
\_directlua{require "lua-widow-control"}
-% Define \TeX{} wrappers for Lua functions
-\_def\.enable{\_directlua{lwc.enable_callbacks()}}
-\_def\.disable{\_directlua{lwc.disable_callbacks()}}
-\_def\.iflwc{\_directlua{lwc.if_lwc_enabled()}}
-
-\_let\lwcenable=\.enable
-\_let\lwcdisable=\.disable
-
% Enable \lwc/ by default when the package is loaded.
\.enable
@@ -37,7 +29,7 @@
\_newcount\.disable_count
\_def\.patch_pre{%
- \.iflwc%
+ \.if_enabled%
\_advance\.disable_count by 1%
\.disable%
\_fi%
@@ -70,11 +62,18 @@
\_endgroup%
\_fi%
}
-\_let\lwcdisablecmd=\.disable_cmd
\.disable_cmd{\_printchap}
\.disable_cmd{\_printsec}
\.disable_cmd{\_printsecc}
+% Make the commands public
+\_let\lwcenable=\.enable
+\_let\lwcdisable=\.disable
+\_let\lwcdisablecmd=\.disable_cmd
+\_let\lwcdebug=\.debug
+\_let\iflwc=\.if_enabled
+\_let\lwcnobreak=\.nobreak
+
\_endnamespace
\_endcode