CTAN update: lua-widow-control
**Breaking Changes** - Page breaks may be slightly different - Removed `\lwcemergencystretch` and `\lwcdisablecmd` in LaTeX. Please use the new key–value interface Other Changes - Use expl3 for the LaTeX files (#20) - Use a key–value interface for configuration with LaTeX (#11) - Silence some extraneous `luatexbase` info messages - Add a "debug mode" to print extra information (#12) - Fix error message line wrapping - Don't reset `\interlinepenalty` and `\brokenpenalty` - Set and analyze `\displaywidowpenalty` - Keep section headings with moved orphans (#17) - Add the ability to configure the maximum paragraph cost (#22) - Add a "strict" mode - Use an improved cost function to select the best paragraph to lengthen (#23) - Dozens of bug fixes - Miscellaneous documentation updates You can view the full changelog on GitHub: https://github.com/gucci-on-fleek/lua-widow-control/compare/release-2c7201854d89535ef7c02f6c38486205677f1aa1...release-cea06ddad8dfcf15fa9ba2a86c6640648b9df523
This package is located at https://mirrors.ctan.org/macros/luatex/generic/lua-widow-control More information is at https://www.ctan.org/pkg/lua-widow-control
Thanks for the upload. For the CTAN Team Erik Braun
CTAN is run entirely by volunteers and supported by TeX user groups. Please join a user group or donate to one, see https://ctan.org/lugs
lua-widow-control – Automatically remove widows and orphans from any document
Unmodified TeX has very few ways of preventing widows and orphans.
In documents with figures, section headings, and equations, TeX can
stretch the vertical glue between items in order to prevent widows
and orphans, but many documents have no figures or headings.
TeX can also shorten the page by 1 line, but this will give each
page a different length which can make a document look uneven.
The typical solution is to strategically insert
but this requires manual editing every time that the document is edited.
Lua-widow-control is essentially an automation of the
\looseness method: it uses Lua callbacks to find
“stretchy” paragraphs, then it lengthens them to remove widows and orphans.
Lua-widow-control is compatible with all LuaTeX and LuaMetaTeX-based formats. All that is required is to load the package at the start of your document. To load:
- Plain LuaTeX:
- 2022-07-29 CTAN update: lua-widow-control
- 2022-04-25 CTAN update: lua-widow-control
- 2022-04-15 CTAN update: lua-widow-control
- 2022-04-08 CTAN update: lua-widow-control
- 2022-03-30 CTAN update: lua-widow-control
- 2022-03-22 CTAN update: lua-widow-control
- 2022-03-20 CTAN update: lua-widow-control
- 2022-03-09 CTAN update: lua-widow-control