Skip to content
@go-tex

go-tex

go-tex

go-tex

Pure-Go TeX that runs the real LaTeX classes — in Go and in the browser.

BSD-3-Clause CGO=0 Go 1.26.4+ js/wasm ready

go-tex is a pure-Go (CGO_ENABLED=0) TeX effort. Its engine is a faithful re-implementation of TeX — the category-code mouth and gullet, a scaled-point stomach, math, fonts, and PDF/SVG output — and on top of it, it loads and runs the genuine LaTeX classes: \documentclass{article}, {report} and {book} execute the real, embedded .cls files (LPPL, verbatim) — not an emulation — in native builds and in the browser via js/wasm, with no TeXLive and no server.

What it does

  • Runs the standard base classes for real. article, report and book load and execute the genuine LaTeX .cls files, typesetting a numbered title, a dotted \tableofcontents, numbered sections/subsections, \chapter (report/book), numbered figure/table captions, itemize/enumerate, and math.
  • A full pipeline. A category-code mouth and gullet, a scaled-point stomach with Knuth–Plass line breaking and a cost-based page builder, \halign tables, math via go-tex/math (vector output), OpenType fonts (a built-in default font, kerning, ligatures), and PDF + SVG output — the SVG carries a source map for click-to-line.
  • In the browser. Genuine LaTeX class rendering client-side via js/wasm — no TeXLive, no server (a self-contained WASM demo ships with the engine).
  • Gated by objective oracles. A byte-exact conformance ratchet (TestConformance) and a whole-document prose fidelity check against a real LaTeX engine (tectonic). On a sample of real arXiv article papers, the real class reproduces about 90% (median) of the reference engine's prose words.
  • Portable and clean. CGO_ENABLED=0, go vet clean, CI green across three 64-bit arches under QEMU (riscv64/ppc64le/s390x) plus macOS, Linux and Windows, and both js/wasm and wasip1/wasm.

Repositories

  • engine — the pure-Go TeX engine: faithful mouth + gullet, scaled-point stomach, math, OpenType fonts, PDF/SVG, and the real LaTeX base classes (article/report/book), native and js/wasm.
  • math — pure-Go TeX math-mode typesetter (fractions, radicals, matrices, big operators, in-math font switches, named operators, \operatorname, \bmod/\pmod, long arrows) → vector output.
  • tex — a lightweight LaTeX-subset document processor → semantic HTML (macro expansion + structure + math), js/wasm-ready.
  • brand — logos & icons.
  • docs · landing

Scope — honest limits

The engine loads and runs the standard base classes; it is functional-parity-oriented and held to real-LaTeX fidelity, not a claim of full TeXLive parity. amsart and heavy packages (tikz, hyperref, …) are not yet run as real files — that is the roadmap, not done.

Conventions

Every module is CGO_ENABLED=0 and standard-library-first, BSD-3-Clause licensed, with a ratcheted conformance gate in CI.

Popular repositories Loading

  1. math math Public

    Pure-Go (CGO=0) TeX math-mode typesetter → SVG via the OpenType MATH table; wasm-ready for offline math preview

    Go

  2. brand brand Public

    Brand assets — logos & icons

  3. .github .github Public

    go-tex org profile

    JavaScript

  4. go-tex.github.io go-tex.github.io Public

    go-tex org landing page

    Go

  5. docs docs Public

    go-tex documentation (MkDocs Material + mike)

  6. tex tex Public

    Pure-Go (CGO=0) processor for a subset of LaTeX documents — macro expansion + structure + math → HTML (not just rendering; a foundation for full LaTeX)

    Go

Repositories

Showing 9 of 9 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…