summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2023-06-26 14:48:27 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-18 18:16:19 +0200
commit341075687fbd1b411e1339a8d8083d2278358d38 (patch)
treeab4045f2f5896d765a16326c3b3c7a23046f3671 /gnu/packages
parent1bd8f4e1cb2b287b9b1cc71a44865a4cb25affe2 (diff)
gnu: Add texlive-lua-widow-control.
* gnu/packages/tex.scm (texlive-lua-widow-control): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/tex.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ab178273aa..c2bc7f19af 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -16249,6 +16249,39 @@ glues, kerns and penalties in the PDF output. The package is known to work in
LaTeX and Plain TeX documents.")
(license license:expat)))
+(define-public texlive-lua-widow-control
+ (package
+ (name "texlive-lua-widow-control")
+ (version (number->string %texlive-revision))
+ (source (texlive-origin
+ name version
+ (list "doc/luatex/lua-widow-control/"
+ "source/luatex/lua-widow-control/"
+ "tex/context/third/lua-widow-control/"
+ "tex/lualatex/lua-widow-control/"
+ "tex/luatex/lua-widow-control/"
+ "tex/optex/lua-widow-control/")
+ (base32
+ "1c2n0hmf4kgvdfqday9pk673nxmpddg2wr91wkgalvrn7jw82js4")))
+ (outputs '("out" "doc"))
+ (build-system texlive-build-system)
+ (home-page "https://ctan.org/pkg/lua-widow-control")
+ (synopsis "Automatically remove widows and orphans from any document")
+ (description
+ "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
+@samp{\\looseness=1}, but this requires manual editing every time that the
+document is edited. Lua-widow-control is essentially an automation of the
+@code{\\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.")
+ ;; Use either license.
+ (license (list license:mpl2.0 license:cc-by-sa4.0))))
+
(define-public texlive-babel-czech
(package
(name "texlive-babel-czech")