diff options
author | Karl Berry <karl@freefriends.org> | 2022-05-20 21:38:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-05-20 21:38:27 +0000 |
commit | fc716f318871295dd96471dd48dd08c117faab50 (patch) | |
tree | f6bb74a345d0b69af810207c2c4883717d997f6f /Master/texmf-dist/tex/context | |
parent | 59514af7db4b65b7f3a143dfbad7c80896dc7d1c (diff) |
lua-widow-control (20may22)
git-svn-id: svn://tug.org/texlive/trunk@63345 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context')
-rw-r--r-- | Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv | 105 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl | 4 |
2 files changed, 3 insertions, 106 deletions
diff --git a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv index 090ff5aa809..5f277c2b144 100644 --- a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv +++ b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkiv @@ -1,104 +1 @@ -%D \module -%D [ file=t-lua-widow-control, -%D version=2.1.0, %%version -%D title=lua-widow-control, -%D subtitle=\ConTeXt module for lua-widow-control, -%D author=Max Chernoff, -%D date=2022-05-14, %%dashdate -%D copyright=Max Chernoff, -%D license=MPL-2.0+, -%D url=https://github.com/gucci-on-fleek/lua-widow-control] -\startmodule[lua-widow-control] -\unprotect - -\installnamespace{lwc} - -\installcommandhandler \????lwc {lwc} \????lwc - -\newdimen\lwc_emergency_stretch -\newcount\lwc_max_cost -\appendtoks - \lwc_emergency_stretch=\lwcparameter{emergencystretch} - - \doifelse{\lwcparameter{\c!state}}\v!start{ - \lwc_enable - }{ - \lwc_disable - } - - \lwc_debug{\lwcparameter{debug}} - - \lwc_nobreak{\lwcparameter{nobreak}} - - \lwc_max_cost=\lwcparameter{maxcost} - - % We can't just set the penalties because they will be reset automatically - % at \\starttext. - \startsetups[*default] - \directsetup{*reset} - - \clubpenalty=\lwcparameter{orphanpenalty} - \widowpenalty=\lwcparameter{widowpenalty} - \displaywidowpenalty=\lwcparameter{widowpenalty} - \brokenpenalty=\lwcparameter{brokenpenalty} - \stopsetups - - \startsetups[grid][*default] - \directsetup{*reset} - - \clubpenalty=\lwcparameter{orphanpenalty} - \widowpenalty=\lwcparameter{widowpenalty} - \displaywidowpenalty=\lwcparameter{widowpenalty} - \brokenpenalty=\lwcparameter{brokenpenalty} - \stopsetups - - \setups[*default] -\to\everysetuplwc - -\ctxloadluafile{lua-widow-control} - -\setuplwc[ - emergencystretch=3em, - \c!state=\v!start, - debug=\v!stop, - orphanpenalty=1, - widowpenalty=1, - brokenpenalty=1, - nobreak=keep, - maxcost=2147483647, -] - - -% Here, we enable font expansion/contraction. It isn't strictly necessary for -% \lwc/'s functionality; however, it is required for the -% lengthened paragraphs to not have terrible spacing. -\definefontfeature[default][default][expansion=quality] -\setupalign[hz] - -% Expansion of some parts of the document, such as section headings, is quite -% undesirable, so we'll disable \lwc/ for certain commands. -% We should only reenable \lwc/ at the end if it was already enabled. -\newcount\lwc_disable_count - -\define\lwc_patch_pre{% - \lwc_if_enabled% - \advance\lwc_disable_count by 1% - \setuplwc[\c!state=\v!stop]% - \fi% -} - -\define\lwc_patch_post{ - \ifnum\lwc_disable_count>0\relax% - \setuplwc[\c!state=\v!start]% - \advance\lwc_disable_count by -1% - \fi% -} - -\prependtoks\lwc_patch_pre\to\everybeforesectionheadhandle % Sectioning -\prependtoks\lwc_patch_post\to\everyaftersectionheadhandle - -% Make the commands public -\let\iflwc=\lwc_if_enabled - -\protect -\stopmodule +\input t-lua-widow-control.mkxl diff --git a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl index 090ff5aa809..13637756ae4 100644 --- a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl +++ b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl @@ -1,10 +1,10 @@ %D \module %D [ file=t-lua-widow-control, -%D version=2.1.0, %%version +%D version=2.1.1, %%version %D title=lua-widow-control, %D subtitle=\ConTeXt module for lua-widow-control, %D author=Max Chernoff, -%D date=2022-05-14, %%dashdate +%D date=2022-05-20, %%dashdate %D copyright=Max Chernoff, %D license=MPL-2.0+, %D url=https://github.com/gucci-on-fleek/lua-widow-control] |