Skip to content

TeXLayout.jl - possible successor to MathTeXEngine.jl? #160

@dawbarton

Description

@dawbarton

I wanted to let you know about a new package I've been working on (rather, that I've been getting Claude to work on): TeXLayout.jl, an OpenType-aware LaTeX math typesetter for Makie.

I started from MathTeXEngine but fairly quickly concluded that achieving what I was after would require rewriting essentially all of it. So a new package made more sense than a PR. The main differences:

  • Layout constants come entirely from the font's OpenType MATH table (no hard-coded fallbacks), so metrics are always consistent with the font in use.
  • Any OpenType Math font works out of the box; eight families (New Computer Modern, STIX Two, Fira Math, TeX Gyre variants, Luciole) are bundled as lazily-downloaded Julia Artifacts — zero configuration for end users.
  • Full TeX style cascade (D/T/S/SS with cramped variants), correct inter-atom spacing, italic correction, auto-sized delimiters, matrices, horizontal braces, \boldsymbol, and more.

It integrates with Makie via a package extension that intercepts generate_tex_elements(::LaTeXString), so existing Makie code works without changes (but type piracy abounds - I'd want to fix this if possible).

It's still early days with the code, but it's got pretty good TeX math coverage. I still need to wire up quite a few bits and pieces (including CI...).

I wanted to ask what you think makes most sense going forward. A few options as I see them:

  1. Deprecate MathTeXEngine in favour of TeXLayout
  2. Fold TeXLayout into MathTeXEngine — replace the layout engine under the existing package name.
  3. Maintain both independently
  4. Something else entirely?

No pressure at all, happy to discuss. (I haven't registered this package yet as I wanted to get your thoughts before doing that.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions