diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-16 03:00:44 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-16 03:00:44 +0000 |
commit | e1b70cd3906c3b92e231eb8001f1a0c0eb2053c1 (patch) | |
tree | 8d8178c7c5b2fbd37ba1fad7e2d58d1bab7533a4 /macros/luatex/generic/lua-widow-control/lua-widow-control.sty | |
parent | f53e32586563f8905b64242c461f777360059e2e (diff) |
CTAN sync 202202160300
Diffstat (limited to 'macros/luatex/generic/lua-widow-control/lua-widow-control.sty')
-rw-r--r-- | macros/luatex/generic/lua-widow-control/lua-widow-control.sty | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty index 81dd969d8d..1be00709bc 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty @@ -5,7 +5,14 @@ \NeedsTeXFormat{LaTeX2e}[2015/01/01] % Formats built after 2015 include \LuaTeX{}Base \ProvidesPackage{lua-widow-control}% - [2022/02/04 v1.1.4] %%version %%date + [2022/02/15 v1.1.5] %%version %%date + +\ifdefined\directlua\else + \PackageError{lua-widow-control}{% + LuaTeX is required for this package.\MessageBreak + Make sure to compile with `lualatex'% + }{} +\fi \clubpenalty=1 \widowpenalty=1 @@ -22,7 +29,15 @@ % 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. -\RequirePackage[final]{microtype} +\RequirePackage{etoolbox} +\AtEndPreamble{ + \@ifpackageloaded{microtype}{}{ % Only load if not already loaded + \RequirePackage[ + final, + activate={true,nocompatibility} + ]{microtype} + } +} % Define \TeX{} wrappers for Lua functions \newcommand{\lwcenable}{\directlua{lwc.enable_callbacks()}} @@ -34,8 +49,6 @@ % Expansion of some parts of the document, such as section headings, is quite % undesirable, so we'll disable \lwc/ for certain commands. -\RequirePackage{etoolbox} - \newcommand{\lwc@patch@warning}[1]{\PackageWarning{lua-widow-control}{% Patching the \protect#1 command failed% }} |