Version 5
5.5
5.5.21 (2026-05-13)
- Fix ForAll crash on empty selection with the new XPath parser. ↗
When the new XPath parser returned nil for a select expression with no matches (e.g. <ForAll select="foo/bar/*"/> where foo/bar has no children), ForAll crashed on #selection. The legacy-parser branch already guarded against this; the newxpath branch now does too, so an empty sequence is a silent no-op (#691). - Harden the cgo XML-to-Lua bridge: binary-safe strings and typed key/value helpers. ↗ ↗
Two related changes in splib. (1) pushString now uses lua_pushlstring with an explicit length so embedded NUL bytes survive intact; lua_pushstring would silently truncate at the first \0, which could corrupt XML CDATA or binary attribute values. The C-side malloc/free round trip via C.CString is gone — Lua copies the bytes internally, so the Go string can be passed directly. (2) The any-typed addKeyValueToTable helper, which boxed its arguments into interfaces and would panic on an unexpected concrete type, is replaced with three typed helpers (addStringValueToTable, addIntValueToTable, addBoolValueToTable); all call sites in the streaming parser, the tree renderer and the CSS-to-Lua renderer pick the matching one statically. No user-visible behaviour change.
5.5.20 (2026-05-13)
- Call lua_checkstack in splib before pushing XML data to Lua. ↗
The streaming XML-to-Lua bridge (used for both layout and data files, including xi:include expansion) and the recursive tree renderer pushed values onto the Lua stack without ever calling lua_checkstack. Lua only guarantees LUA_MINSTACK (20) free slots; any further push without explicit reservation is undefined behaviour. With deeply nested or large documents this could manifest as nondeterministic STATUS_HEAP_CORRUPTION / STATUS_BAD_STACK crashes on Windows (issue #691). The bridge now reserves headroom before the document table and on every token iteration; the tree renderer reserves headroom in RenderToLua, in pushElement, and around each child push.
5.5.19 (2026-05-11)
- Fix tablerule misplacement inside stretched vboxes when tablerulefix=yes. ↗
tablerulefix="yes" collects rule whatsits during page shipout and re-emits them at absolute (curx, cury) positions. The cursor update for glue nodes used the natural width only and ignored the effective width after the surrounding box stretched or shrunk its glue, so rules that sat after stretched glue in a vlist were placed too high. The effective glue width is now computed from the parent box’s glue_sign, glue_set, and glue_order before advancing the cursor. - Fix lxpath misparsing $a*$b as a wildcard QName. ↗
The lxpath QName scanner accepted * as a regular name character, so expressions like $a*$b were swallowed into a single QName instead of being parsed as a multiplication. * is now only accepted at the start of a QName or immediately after the namespace colon, where it is a legitimate wildcard. - Fix crashes in the legacy XPath parser on missing attributes/elements/variables. ↗
Issue #691 reported two crashes in the legacy XPath parser when expressions referenced unbound values: an arithmetic-on-nil in eval_addition (reachable via SetVariable/select) and a compare-with-nil in eval_comparison (reachable via Switch/Case). get_argument_number now treats the nilmarker sentinel like a real nil so the existing “evaluating to 0” fallback applies, and tex.sp is wrapped in pcall to fall back to 0 on inputs LuaTeX rejects. eval_comparison gained a post-tonumber guard mirroring the nilmarker convention: nil compared to anything is false, except != which is true. lxpath remains the recommended parser; this only patches the legacy fallback.
5.5.18 (2026-05-09)
- Fix Lua stack overflow and major slowdown caused by Tr/Tablehead/Tablefoot origin references. ↗
Tr, Tablehead and Tablefoot stored their layoutxml and dataxml directly on the row value table since 5.5.10 (commit ea433dc7, for the new eval-on-split feature). When a SetVariable overwrote a variable that contained such a structure, flush_table recursed through the entire layout and data XML trees. With deeply nested data this hit Lua’s stack limit; with shallower data it caused dramatic slowdowns (120s → 1000s in one report). The references are now kept in a weak-keyed origin map, so the value tables stay clean and flush_table no longer follows them (#690).
5.5.17 (2026-05-07)
- Fix panic on sp –help / –version and on early startup errors. ↗
sp --help and sp --version crashed with a nil-pointer dereference because the help branch ran exitProgram before the configuration was loaded, and exitProgram calls showDuration which reads an option from the still-uninitialized config. The same panic could mask the real error message on early startup failures (e.g. when the bundled sdluatex binary cannot be executed on Windows). The help branch now exits directly, and ConfigData.String is safe against a nil receiver (#689).
5.5.16 (2026-05-05)
- Generate placeholder images via placeholder:// URL. ↗
A new file="placeholder://WxH" form on Image renders a grey rectangle with a diagonal cross at a natural size of W × H bp, useful during layout development when the final assets are not yet available. The standard image scaling and aspect-ratio handling apply unchanged. - Fix absolute positioning of objects inside groups. ↗
PlaceObject with absolute column/row inside a Group always landed in the group’s top-left corner instead of the requested coordinates. The group branch was reading the wrong fields from the parameter table. - Fix background-text on table cells. ↗
background-text on a Td aborted the run with a Lua error since the Lua-modularization refactor in 5.5.x. Three issues were fixed: a wrong call signature for mknodelist, an erroneous %d in a format string for a float value, and the watermark geometry (the rotated bounding box is asymmetric around the rotation origin, and descenders on glyphs like ( ) g y were ignored). Existing watermarks may shift slightly because they are now correctly centered.
5.5.15 (2026-05-04)
- Fix wrong font in long documents that mix scripts. ↗ ↗
In documents that switch fonts inside a paragraph — for example a non-Latin body text with Latin verse or footnote numbers — text in later Output blocks could end up shaped against the wrong font once it crossed a column or page break, causing characters to be replaced or to disappear from the page. An internal font-state variable was leaking between unrelated parts of the layout; both spots that exposed the leak are now properly scoped.
5.5.14 (2026-05-03)
- Fix crash and excessive warnings during complex-script shaping. ↗
Avoid an indexing crash in hbglyphlist when a backmapped codepoint has no entry in the font’s characters table (triggered e.g. by Khmer subscript consonant stacks), skip HarfBuzz sentinel glyphs (codepoint 0xFFFF with x_advance=0) emitted during complex reordering, and deduplicate “Glyph is missing from the font” warnings: each (font, codepoint) pair is reported only on first occurrence, with a count-based summary at the end of the run. - sp filter scripts now run on Lua 5.4. ↗
The Lua VM for sp filter scripts was switched from yuin/gopher-lua (Lua 5.1) to speedata/go-lua (Lua 5.4), bringing it closer to the LuaTeX side and consolidating Lua tooling. Includes a new in-tree luahttp module as a replacement for cjoudrey/gluahttp.
5.5.13 (2026-04-27)
- Publishing API v1. ↗
New server API version 1 with improved endpoints for publishing runs, status queries, and PDF retrieval. - Show progress with sp –progress. ↗
New command line option --progress that displays the typesetting progress during a publishing run.
5.5.12 (2026-04-27)
- Update to LuaTeX version 1.24.0.
- Variable font support. ↗
Load variable fonts and pin design axes (weight, width, optical size, etc.) to create static font instances using harfbuzz subsetting. Adds weight and width shortcut attributes and a generic Axis child element to LoadFontfile. - Reduce memory usage for large data XML files by ~50%. ↗
Streaming SAX parser builds Lua tables directly without an intermediate Go tree, omits unused metadata fields in data mode, handles ignoreeol during parsing, and fixes createTable size hints to avoid repeated hash table resizes. - XPath 3.1 arrays, maps, lookup operator and string concatenation. ↗
Add arrays ([1,2,3], array { 1 to 3 }), maps (map { 'key': value }), the lookup operator (?), and the || string concatenation operator to XPath. Includes array: and map: function libraries (size, get, put, append, keys, contains, merge, etc.).
5.5.11 (2026-04-23)
- Implement fn:serialize() in XPath. ↗
The XPath function fn:serialize() converts a node set into its XML string representation. - Fix HTML/CSS processing of inline style attributes. ↗ ↗
Fix incorrect quoting of HTML attributes during reconstruction (Lua’s %q introduced backslashes before newlines) and fix element detection in Copy-of and SetVariable.
5.5.10 (2026-04-22)
- Allow colspan="*" in table cells. ↗
Use colspan="*" on a Td element to automatically span all remaining columns from the current position, removing the need to hard-code the column count. - Remove Debian package generation. ↗
It is too much work to keep the Debian packages maintained. - Configurable list marker gap via CSS. ↗
The gap between list marker and text is now configurable via li::marker { padding-right: … } in CSS. The default remains 5pt. - Alternating row colors restart on each page. ↗
Background colors in table cells are now deferred until after page splitting. The new Table attribute eval-on-split allows alternating row colors to restart correctly on each new page. - Fix hairline artifacts between table cells. ↗
When all cells in a row share the same background color, the background is now drawn as a single rectangle, eliminating hairline rendering artifacts between adjacent cells in some PDF viewers. - Fix empty lines between HTML block elements. ↗
Whitespace-only text nodes between HTML block elements (e.g. between two paragraphs) are no longer rendered as empty lines. - Fix space rendering in some fonts. ↗
Font backmap now prefers printable characters when multiple codepoints share a glyph ID, fixing broken space rendering in some fonts like HelveticaNeue-Bold. - Better error handling for undefined colors. ↗
The layout now shows a warning instead of crashing with a Lua error when encountering problems like undefined colors. - Security: update Go dependencies. ↗
Update golang.org/x/net and golang.org/x/image to fix CVEs (XSS, HTTP proxy bypass, OOM via crafted TIFF). - Fix Windows DLL cleanup crash. ↗
Work around a Go runtime issue where the shared library cleanup on Windows caused an access violation (0xc0000005) even though the PDF was generated successfully.
5.5.9 (2026-04-20)
- Documentation: move to Hugo static site generator, reorganize structure.
- Allow Textblock in Td for better control with rotation.
- Support css ::marker.
CSS ::marker pseudo-element is now supported for list styling, including custom content and colors. - Images are drawn when trace objects=“yes”.
- Bug fix HTML borders width calculation.
5.5.8 (2026-04-14)
- Honor box height in lines (line height).
- Box border.
- Vertical align for Box in paragraph mode.
- Images: vertical alignment in Paragraph.
- Remove action command.
- Suppressinfo for metadata.
- Show sum mismatch in sp compare.
- New attribute match on Record.
5.5.7 (2026-04-02)
- Bugfix table shrink algorithm.
5.5.6 (2026-04-02)
- Bugfix PDF copy/paste hyphen minus.
5.5.5 (2026-04-01)
- Fix minimum width in tables with colspan and rowspan.
- Fix CSS inheritance on td/tr.
5.5.4 (2026-04-01)
- HTML tables: honor rowspan and colospan, Prevent rowspan at bottom of page.
5.5.3 (2026-03-09)
- Server mode: add endpoint to retrieve publisher-protocol.xml.
5.5.2 (2026-03-06)
- Correct lots of spelling mistakes in the documentation.
- Implement accessibility for Output/Text (#614).
- PDF/UA structure tree.
- Fix PDF/UA and InsertPages / SavePages (#613).
- Add search path, don’t duplicate files.
- Better error message for function calls and old XPath parser.
- Bugfix letter-spacing and hyphenation.
- Filter: set classpath for Saxon correctly, including all required JAR files.
5.5.1 (2026-03-02)
- Bug fixe for image inclusion (opacity), attribute context handling and Creator version.
5.5.0 (2026-02-26)
- Bugfix letter-spacing in tables.
5.4
5.4.3 (2026-03-04)
- Bugfix letter-spacing and hyphenation.
- Better error message for function calls and old XPath parser.
- Filter: set classpath for Saxon correctly, including all required JAR files.
5.4.2 (2026-02-27)
- Fix attribute context handling.
- Fix transparent PDF inclusion.
- Fix Creator/Producer version in PDF metadata.
5.4.1 (2026-02-26)
- Bugfix letter-spacing in tables.
5.4.0 (2026-02-24)
- Release stable version 5.4.
5.3
5.3.24 (2026-02-23)
- New command Section to organize layout files (without affecting formatting).
5.3.23 (2026-02-19)
- Bugfix ForAll keeping the context.
5.3.22 (2026-02-18)
- Massive speed improvement.
- Margin protrusion setting is now in 1/1000 em.
5.3.21 (2026-02-05)
- Bugfix: hyphenation now works correctly with letter-spacing.
5.3.20 (2026-01-29)
- Bugfix: calculate remaining height in PlaceObject / absolute positioning.
5.3.19 (2026-01-29)
- Fix panic on sp –help / –version.
5.3.18 (2026-01-26)
- Add letter-spacing attribute to DefineTextformat (in 1/1000 em).
- Fix infinite loop in post_linebreak.
5.3.17 (2026-01-23)
- Fix infinite loop in HTML tables.
- Better handling of killing child processes in sp.
5.3.16 (2026-01-20)
- HTML tables with only header or footer (empty body) are now rendered correctly.
5.3.15 (2026-01-19)
- Bugfix for empty HTML tables.
- Implement Until for the new XPath parser.
- HTML enhancements (including documentation).
5.3.14 (2026-01-15)
- HTML can now wrap across multiple pages.
5.3.13 (2026-01-14)
- Remove infinite loop in HTML tables.
5.3.12 (2025-12-05)
- Add global html option in Options command and –option html=off command line flag to control HTML parsing.
5.3.11 (2025-12-04)
- Improve typesetting performance with early exits, cached lookups, and leaner attribute handling in mknodes.
- Modularize publisher.lua into color, links, and metadata modules to reduce file size.
- Update qrencode to the latest upstream version.
5.3.10 (2025-11-30)
- Fix CSS/HTML rendering slowdown.
5.3.9 (2025-11-25)
- Allow text formats to use the font size defined in CSS for HTML content.
- Fix handling of relative (em) font sizes based on the current font size.
- Fix HTML border rendering in regular paragraph mode.
- Update to latest Saxon HE.
- Remove Rust source code.
5.3.8 (2025-11-21)
- Fix HTML borders and currentcolor in table rules.
5.3.7 (2025-11-19)
- Rewrite HTML border.
- Allow styles in HTML tables.
5.3.6 (2025-11-11)
5.3.5 (2025-11-10)
- Fix @font-face in CSS (fatal crash).
5.3.4 (2025-11-10)
- HTML: add support for more list style types (lower-alpha, upper-alpha, etc.).
- Set exit code when error count is greater than zero.
- Compare tool: refactor for stability and improved HTML report (checksums, build errors, thumbnails, sorting).
- Refactor HTML → Lua rendering pipeline for structured output and cleaner CSS separation.
5.3.3 (2025-11-04)
- Reinstate old curly brace syntax for Value/select and old xpath parser (#680).
- Remove building of Rust library (#678).
5.3.2 (2025-11-01)
- Fix indentation after br newline.
5.3.1 (2025-10-21)
- Fix Windows/Rust loading.
5.3.0 (2025-10-21)
- Alternative Rust library for dynamic binding.
5.2
5.2.0 (2025-10-14)
5.1
5.1.29 (2025-10-14)
- Rewrite parts of the Go-XML parser.
5.1.28 (2025-10-05)
- Fix PDF metadata / ISO dates.
5.1.27 (2025-10-04)
- Bugfix XPath function doc() returns root node instead of document node.
5.1.26 (2025-09-23)
- New XPath function translate().
- Documentation: clarified use of px (pixels).
- tabular.lua converted into a module (internal change only).
- Safeguard for missing file name in AttachFile.
- New XPath function distinct-values().
5.1.25 (2025-09-15)
- Publisher now continues multiple runs even if errors occur.
- Support for Japanese typesetting.
- Fixed fallback with multi-character sequences.
5.1.24 (2025-09-15)
- Warning when empty hyperlink.
- Improved error message for empty group/trace.
- Improved error messages for duplicate files and errors writing aux-file.
- XPath: Added format-number() and round-half-to-even().
- New attribute type “rawstring” without {} escaping.
5.1.23 (2025-09-10)
- Optional resizehandler for DPI setting (configuration file).
- CSS font-family can now have multiple entries.
5.1.22 (2025-08-25)
- More HTML/CSS features (pseudo classes, padding in tables and borders).
5.1.21 (2025-08-23)
- NoBreak with background color.
- NoBreak in table cells (#670).
- Bugfix image conversion with same filename and different extensions.
- Extend basic HTML features (custom fonts, border, rem size).
5.1.20 (2025-08-19)
- Set trapped to false in PDF for preflight check.
- Do some safeguards to prevent Go/Lua thread errors.
5.1.19 (2025-08-18)
- Allow paragraph shape in groups.
- Bugfix: copy files truncate itself (#668).
- Put PDF producer entry in metadata.
5.1.18 (2025-08-01)
- Bugfix PlaceObject/rotate and vreference.
5.1.17 (2025-07-30)
- Bugfix lxpath mode and new XPath parser.
- Re-implemented HTML mode.
- Set log level in server mode.
5.1.16 (2025-07-15)
- Fix sd:format-number (#664).
5.1.15 (2025-07-14)
- Proper escaping of XML metadata in ZUGFeRD attachments.
5.1.14 (2025-07-10)
- Bugfix HTML and uppercase tags.
5.1.13 (2025-07-03)
- Ignore DEL (decimal 127) control character in input (#663).
5.1.12 (2025-06-25)
- Fix (XPath) boolean value of attributes.
5.1.11 (2025-06-18)
- No fatal error in case of missing http-image.
5.1.10 (2025-06-06)
- Better log messages.
- New XPath function sd:symbol() to enter a glyph id.
- Remove old XPath documentation.
5.1.9 (2025-05-23)
- New option ‘addlocalpath’ in the configuration file for turning off recursive search of the working directory.
- New Option mpcolorwarning to show the MetaPost color warning (defaults to true).
5.1.8 (2025-05-22)
- Bugfix: layout function sd:current-framenumber() and new XPath parser.
5.1.7 (2025-05-18)
- cache=none works for SVG conversion (#622).
5.1.6 (2025-05-15)
- New command
sp checkversion to see if a newer version is available (#660).
5.1.5 (2025-05-05)
- Update to new LuaTeX binaries (1.22.0).
- Change Windows system font directory discovery.
5.1.4 (2025-05-05)
- Bugfix: table split in AtPageShipout (#659).
- Absolute positioning within a group.
5.1.3 (2025-04-07)
- Fix spaces in imagehandler.
5.1.2 (2025-04-07)
- Change then width and the height for vertical rules. Internal change, should not create visible changes.
5.1.1 (2025-04-07)
- Lua-preprocessor: runtime.execute returns success/exit code.
5.1.0 (2025-04-04)
- Set background-color for each page.
5.0
5.0.2 (2025-04-04)
- Bugfix image handler automatic conversion.
5.0.1 (2025-04-01)
- Bugfix: rounding error in some grid configurations.
5.0.0 (2025-03-11)