erweixin/RaTeX
 Watch   
 Star   
 Fork   
14 days ago
RaTeX

v0.1.15

[0.1.15] - 2026-10-16

What's Changed

Compatibility

  • LayoutOptions keeps the v0.1.14 fields and layout(nodes, options) keeps its signature. Existing full struct literals and exhaustive patterns remain valid. Host-provided glyph metrics use the additive layout_with_fallback_metrics API; no caller migration is required. The C ABI and DisplayList JSON remain unchanged.

Added

  • \slashed and \centernot commands.
  • Mac Catalyst support in the Apple XCFramework and Swift package.
  • layout_with_fallback_metrics(nodes, options, metrics) for host-provided fallback glyph metrics and more accurate text spacing. See the API rustdoc for an example and layout validation for resource limits.
  • Configurable PNG/SVG padding in the CLI.
  • Borrowed lexer tokens via Lexer::next_span() and TokenSpan.

Fixed

  • PNG rendering reports malformed large-font errors instead of succeeding with missing glyphs.
  • PNG glyphs shifting by one pixel after cache reuse at different positions.
  • mhchem spacing regression caused by escaped ## source locations.
  • Color inheritance for rules, boxes, and related symbols.
  • Website rendering before fonts finish loading.
  • Website font-loading failures now time out and allow retrying without reloading the page.
  • Delimiter cache keys no longer serialize the host's fallback glyph metrics map on every lookup.
  • iOS linking failures involving unwind symbols.

Security

  • Bound macro expansion, mhchem intermediates, and layout work, including \edef/\xdef, \pmb, and Array/CD padding.
  • Reject overflowing \char values and oversized PNG allocations.
  • Bound dashed-line rendering and clip work to the viewport.
  • Enforce Android 16 KB ELF alignment and verify release packages.

See resource limits for scope and limitations.

Performance

  • Cache glyph masks and emoji rasters; share font buffers and load fallback fonts on demand.
  • Reuse built-in macros and delimiter measurements; reduce allocations in PNG encoding and SVG serialization.

Latest comparison with v0.1.14 (lower is better):

Metric v0.1.14 Unreleased Change
PNG render 717 μs 339 μs −53%
SVG standalone 938 μs 403 μs −57%
End-to-end PNG 1,030 μs 506 μs −51%
Peak RSS 389.5 MiB 218.6 MiB −44%

Measured on x86_64 macOS with Rust 1.95.0 and matching dependencies: 100 formulas in release mode, one warmup and three measured renders per formula, median of five alternating runs. RSS excludes compilation. These are warmed-render results; cold renders and continually changing glyph positions may differ.

PRs

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.14...v0.1.15

2026-07-28 16:41:16
RaTeX

v0.1.14

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.13...v0.1.14

2026-07-07 21:25:49
RaTeX

v0.1.13

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.12...v0.1.13

2026-06-25 12:19:29
RaTeX

v0.1.12

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.11...v0.1.12

2026-05-31 22:45:53
RaTeX

v0.1.11

v0.1.11 — Security Bugfix

Security patch for two DoS issues in ratex-parser. Upgrade from ≤ v0.1.10 if you parse untrusted LaTeX.

Advisory Severity Trigger Impact
GHSA-4hgp-59h5-gvrj High \verb with a multibyte UTF-8 delimiter (e.g. \verbéxé) Parser panics → whole process aborts
GHSA-4w5h-hx6r-28q7 Medium Deep nesting ({…}, \left, \sqrt{, ^{, etc.) Stack overflow → whole process aborts

Affected: All RaTeX distributions that parse LaTeX — Rust crates, CLI, npm/WASM, JVM, Android, iOS, Flutter, React Native.

Not affected: Trusted local LaTeX with normal nesting and ASCII \verb delimiters.

Reported by @nikkoenggaliano.


ratex-parser 的两个 DoS 安全修复。若解析 不可信 LaTeX,请升级到 > v0.1.10* 的版本。

公告 等级 触发条件 影响
GHSA-4hgp-59h5-gvrj 高危 \verb 使用 多字节 UTF-8 定界符(如 \verbéxé) 解析器 panic → 整个进程 abort
GHSA-4w5h-hx6r-28q7 中危 极深嵌套({…}、\left、\sqrt{、^{ 等) 栈溢出 → 整个进程 abort

影响范围: 所有通过 RaTeX 解析 LaTeX 的分发形态 — Rust crate、CLI、npm/WASM、JVM、Android、iOS、Flutter、React Native。

不受影响: 可信 LaTeX,嵌套深度正常,\verb 使用 ASCII 定界符。

感谢 @nikkoenggaliano 报告。

2026-05-28 17:17:59
RaTeX

v0.1.10

What's Changed

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.9...v0.1.10

2026-05-19 01:25:16
RaTeX

v0.1.9

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.8...v0.1.9

2026-05-18 11:20:56
RaTeX

v0.1.8

What's Changed

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.7...v0.1.8

2026-05-16 10:47:39
RaTeX

v0.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.6...v0.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/commits/v0.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/commits/v0.1.7

2026-05-13 19:11:34
RaTeX

v0.1.6

What's Changed

Full Changelog: https://github.com/erweixin/RaTeX/compare/v0.1.5...v0.1.6

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/commits/v0.1.6

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/commits/v0.1.6

What's Changed

New Contributors

Full Changelog: https://github.com/erweixin/RaTeX/commits/v0.1.6