LICENSE=BSD-3-ClauseCGO_ENABLED=0macros: LPPL-1.3cfonts: OFL-1.1go-tex is a pure-Go (CGO_ENABLED=0) TeX effort. Its engine is a faithful re-implementation of TeX, 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. They also run in the browser through js/wasm, with no server.
out, _ := engine.New().Run(`\def\twice#1{#1#1}\message{\twice{\twice A}}`)
// out == "AAAA"The engine is a faithful re-implementation of TeX — the category-code mouth and gullet, a scaled-point stomach with Knuth–Plass line breaking and a cost-based page builder, \halign tables, math, OpenType fonts, and PDF/SVG output. The class files are embedded and the resolver needs no filesystem, so the real classes also run in the browser — genuine LaTeX class rendering client-side, with no TeXLive and no server.
article, report and book load and run the genuine embedded LaTeX .cls files — numbered title, dotted TOC, numbered sections and chapters, figure and table captions, lists, math.
Category-code mouth and gullet, a scaled-point stomach with Knuth–Plass line breaking, a cost-based page builder that keeps TeX’s page_total and page_depth apart — the depth of a page’s last line is capped at \maxdepth and not charged against the goal, so a page that fills to exactly \textheight is accepted — and \halign tables.
Math via go-tex/math (vector output); OpenType fonts with a built-in default font, kerning and ligatures — runs with no assets, and a full family (roman, bold, italic, slanted, typewriter, sans) when one is given.
Embedded-subset-font PDF with selectable text, and self-contained SVG pages carrying a source map for click-to-line.
A self-contained js/wasm build renders real LaTeX classes client-side — no TeXLive, no server.
A .tex is a program, and the playground runs whatever you paste. A document compiled by the engine cannot run a process, cannot write a file, cannot read one outside the search roots (TeX Live’s openin_any=p, with GOTEX_READ_ANY=1 as a named opt-out), and cannot exhaust memory or run forever: one paragraph is capped at 200 000 nodes.
A byte-exact conformance ratchet plus a whole-document prose check against a real LaTeX engine (tectonic): on 154 real arXiv papers the median is 101% of the reference’s prose words, with 10 of them below 95%. Pagination lands on the reference exactly for 36 of the 154 at v0.263.0, and the open figure is the signed bias of +72 pages — a one-column phenomenon, tracked as engine#622.
The engine loads and runs the standard base classes — article, report, book and amsart as real embedded files — and any resolvable .cls/.sty runs as real TeX macros. Heavy drawing (tikz/pgf) is gated and still in bring-up, biblatex is partly supported, PDF figures need the pdfrender module, and floats typeset inline unless placement is enabled. Every supported feature — and every remaining gap — is listed in the capability reference.
The pure-Go TeX engine: a faithful mouth and gullet, a scaled-point stomach with Knuth–Plass line breaking and a cost-based page builder that keeps page_total and page_depth apart, \halign tables, e-TeX, math, OpenType fonts, PDF and SVG output, and the real embedded LaTeX classes (article, report, book, amsart), native and js/wasm.
Pure-Go TeX math-mode typesetter to self-contained SVG, through the OpenType MATH table: fractions, radicals, matrices, big operators with limits, stretchy delimiters, scripts. Ships STIX Two Math; wasm-ready.
Pure-Go (CGO=0) rasteriser for PDF figures. Plugs into the engine's RasterizePDF seam so \includegraphics{fig.pdf} renders pixels instead of a framed placeholder. A separate module, to keep the engine and wasm core free of a heavy dependency.
On-demand TeX support-tree fetcher for machines with no TeX distribution. Redistributes nothing: it fetches pinned, SHA-256-verified upstream macro source into a user cache and supplies Tree.Resolve to the engine. Never fetches speculatively.
Pure-Go (CGO=0) processor for a subset of LaTeX documents: macro expansion, structure and math to semantic HTML rather than to a page. Where the engine typesets, this one reads — a foundation for full LaTeX on the HTML path.
The documentation site (MkDocs Material + mike): every supported feature, and every remaining gap, in the capability reference. Source →
Logos and icons for the organization.
Pure Go, CGO_ENABLED=0, native and in the browser. Safe on untrusted input: a compiled document cannot run a process, write a file, or read one outside the search roots.