LuaTeX Comes of Age

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • publisher

    speedata Publisher - a professional database Publishing system

  • LuaTeX is what TeX should have been from the start (and would have been, if the technology of the time had permitted it). Apart from modern Unicode and font-handling, the main thing IMO is the hooks it provides (in the form of callbacks).

    With other TeX engines (mainly: pdfTeX, XeTeX, or the original Knuth TeX), the only "programming" facility is in the form of macros, which were originally added by Knuth only for some simple text substitution to save typing. He never intended to add programming features into TeX, but of course, it doesn't take much to become "accidentally Turing-complete", and that's what TeX macros became. (There's also some rudimentary support for counters/registers, which Knuth added after he found users were (ab)using macros to encode numbers using unary or Church numerals.) So the only way to influence anything TeX does automatically, whether it's hyphenation or line-breaking or page-breaking or whatever, is to set up some macros whose blind expansion will ultimately result in the outcome you want, without affecting anything else (e.g. even an accidental space might get typeset with undesirable results). This of course is cumbersome and error-prone.

    With LuaTeX you can program these things at the level you actually intend, e.g. while you can still use macros (or use the `process_input_buffer` callback in Lua), you can now also directly, say, influence the page layout, in a Lua callback that is actually aware of data at the relevant level of abstraction (the vboxes on the page, say), rather than everything being at the lowest (text expansion) level.

    Knuth has said that he never intended for TeX macros to be used as a full-fledged programming language (he expected people would directly edit the SAIL/Pascal code of the TeX program for anything nontrivial), and that he dislikes each tool coming with its own Turing-complete programming language, and that if a standard embeddable programming language had been available he'd of course have used it in TeX — I think Lua would count.

    You can see "TeX without TeX" page on the LuaTeX wiki for an example of the power of LuaTeX, typesetting with TeX while completely bypassing TeX syntax: http://wiki.luatex.org/index.php/TeX_without_TeX — a more elaborate production system is Speedata Publisher: https://github.com/speedata/publisher

    As for myself, here is the most fancy thing I did with LuaTeX: https://tex.stackexchange.com/questions/401604/book-on-a-sin... (never "productionized" into a package or whatever). Also, something possibly illuminating is this TeX-vs-LuaTeX comparison of something hyphenation-related (https://tex.stackexchange.com/questions/378704/how-to-avoid-...), and in this answer (https://tex.stackexchange.com/questions/398310/why-in-2017-d...) I link to some other times I used LuaTeX, though some of them just use the Lua part of LuaTeX rather than LuaTeX hooks, such as computing digits of pi for generating pretty pictures (https://tex.stackexchange.com/questions/367902/tikz-color-op...).

  • KeenWrite

    Discontinued Free, open-source, cross-platform desktop Markdown text editor with live preview, string interpolation, and math.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • keenwrite-themes

    Discontinued Document typesetting configurations using ConTeXt

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts