% lua-widow-control % https://github.com/gucci-on-fleek/lua-widow-control % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2022 Max Chernoff \_codedecl\lwcenable{lua-widow-control } %%version \_clubpenalty=1 \_widowpenalty=1 \_displaywidowpenalty=1 \_brokenpenalty=1 \_newdimen\lwcemergencystretch \lwcemergencystretch=3em \_newcount\lwcmaxcost \lwcmaxcost=2147483647 \_directlua{require "lua-widow-control"} % Define \TeX{} wrappers for Lua functions \_def\lwcenable{\_directlua{lwc.enable_callbacks()}} \_def\lwcdisable{\_directlua{lwc.disable_callbacks()}} \_def\iflwc{\_directlua{lwc.if_lwc_enabled()}} % Enable \lwc/ by default when the package is loaded. \lwcenable \_endcode