ConTEXt Group: Modules

Module: lua-widow-control

Id: lua-widow-control
Title: lua-widow-control
Short: Automatically remove widows and orphans from any document
Description: Lua-widow-control is a Plain TeX/LaTeX/ConTeXt/OpTeX package that removes widows and orphans without any user intervention. Using the power of LuaTeX, it does so without stretching any glue or shortening any pages. Instead, lua-widow-control automatically lengthens a paragraph on a page where a widow or orphan would otherwise occur. 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 \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 LuaTeX-based formats. All that is required is to load the package at the start of your document. To load: - Plain LuaTeX: \input lua-widow-control - LuaLaTeX: \usepackage{lua-widow-control} - ConTeXt: \usemodule[lua-widow-control] - OpTeX: \load[lua-widow-control]
Homepage: https://github.com/gucci-on-fleek/lua-widow-control
Keywords: widows and orphans, typography, line breaking
Module maintainer: Max Chernoff
Type: Macro module
License: Mozilla Public License v2.0
Version: v3.0.0
Message: - Add new TUGboat and Zpravodaj articles. - Add and document the public Lua interfaces. - Change \parfillskip settings for lengthened paragraphs to more strongly prevent short last lines. **May affect page breaks.** - Add the ability to configure the horizontal offset for the paragraph costs printed in draft mode. - Add support for LuaMetaLaTeX and LuaMetaPlain. All features should work identically to the LuaTeX-based version, although there are a few minor bugs. (#40) - Fully support inserts/footnotes in LuaMetaTeX (#38). - Add support for presets in ConTeXt. - Add support for node colouring in ConTeXt and OpTeX (#39).
Date: 30-8-2023 18:22
File list: doc/luatex/lua-widow-control/lua-widow-control.pdf
doc/luatex/lua-widow-control/tb133chernoff-widows.pdf
doc/luatex/lua-widow-control/lwc-zpravodaj.pdf
doc/luatex/lua-widow-control/README.md
source/luatex/lua-widow-control/CHANGELOG.md
source/luatex/lua-widow-control/lwc-manual.mkxl
source/luatex/lua-widow-control/tb133chernoff-widows.ltx
source/luatex/lua-widow-control/lwc-manual.bib
source/luatex/lua-widow-control/lwc-zpravodaj.bib
source/luatex/lua-widow-control/lwc-manual.tex
source/luatex/lua-widow-control/lwc-zpravodaj-figure.ctx
source/luatex/lua-widow-control/tb133chernoff-widows.bib
source/luatex/lua-widow-control/lwc-zpravodaj.ltx
source/luatex/lua-widow-control/lwc-manual-samples.tex
source/luatex/lua-widow-control/tb133chernoff-widows-plot.dat
source/luatex/lua-widow-control/tb133chernoff-widows-figure.ctx
tex/lualatex/lua-widow-control/lua-widow-control-2022-02-22.sty
tex/lualatex/lua-widow-control/lua-widow-control.sty
tex/optex/lua-widow-control/lua-widow-control.opm
tex/luatex/lua-widow-control/lua-widow-control.lua
tex/luatex/lua-widow-control/lua-widow-control.tex
tex/context/third/lua-widow-control/t-lua-widow-control.mkxl
tex/context/third/lua-widow-control/t-lua-widow-control.mkiv
download