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-based formats. All that is required is to load the package at the start of your document. To load:
- Plain LuaTeX:
|Licenses||CC BY-SA 4.0|
Free license not otherwise listed
|Contained in||TeX Live as lua-widow-control|
MiKTeX as lua-widow-control
Download the contents of this package in one zip archive (379.9k).
- 2022-05-15 CTAN update: lua-widow-control
- 2022-03-30 CTAN update: lua-widow-control
- 2022-03-22 CTAN update: lua-widow-control
Maybe you are interested in the following packages as well.
- lua-typo: Highlighting typographical flaws with LuaLaTeX
- luaxml: Lua library for reading and serialising XML files
- ctablestack: Catcode table stable support
- luatexbase: Basic resource management for LuaTeX code