CTAN Comprehensive TeX Archive Network

lua-widow-control – Automatically remove widows and orphans from any document

Unmodified has very few ways of preventing widows and orphans. In documents with figures, section headings, and equations, can stretch the vertical glue between items in order to prevent widows and orphans, but many documents have no figures or headings. 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 \looseness=1, 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 Lua-based formats. All that is required is to load the package at the start of your document. To load:

  • Plain Lua: \input lua-widow-control
  • Lua: \usepackage{lua-widow-control}
  • Cont (LMTX): \usemodule[lua-widow-control]

Sources/macros/luatex/generic/lua-widow-control
Documentation
Supporthttps://github.com/gucci-on-fleek/lua-widow-control/discussions
Bug trackerhttps://github.com/gucci-on-fleek/lua-widow-control/issues
Repositoryhttps://github.com/gucci-on-fleek/lua-widow-control
Version1.0.0 2021-10-09
LicensesFree license not otherwise listed
CC BY-SA 4.0
Copyright2021 gucci-on-fleek
MaintainerMax Chernoff
TDS archivelua-widow-control.tds.zip
Contained inTeX Live as lua-widow-control
MiKTeX as lua-widow-control
TopicsLua
Layout

Download the contents of this package in one zip archive (259.8k).

Community Comments

Loading...

Announcements

Here you can see a respective diagram in newer browsers.

more

Package Links

Guest Book Sitemap Contact Contact Author