mp-tikz-wasm : MetaPost & TikZ in the browser
MetaPost 2.11, pdfTeX 1.40, LuaTeX 1.21 and dvisvgm 3.4, all compiled to WebAssembly: MetaPost figures with LaTeX labels, and whole TikZ/PGF documents, graph drawing included — no server.
loading engine…
MetaPost
TikZ / LaTeX
Preview
SVG
EPS
JSON
Log
Stats
What you are looking at. In TikZ mode the whole document goes through pdfTeX (DVI mode) and then dvisvgm (~3 MB wasm, with PGF's special handlers), so shadings, patterns, clipping, opacity and pgfplots all come out as native SVG. A document that uses TikZ's graph drawing library, \directlua or luacode is sent to LuaTeX instead (luatex.wasm, 4 MB, fetched the first time it is needed, with its own DVI-mode format). In MetaPost mode the interpreter (mplib, ~1.2 MB wasm) runs in a Web Worker. Text in btex … etex is extracted before the run, typeset in one batched pdfTeX job (DVI mode, ~1.1 MB wasm) with a format built by the wasm engine itself, converted with MetaPost's own dvitomp, cached by content hash, and served back through mplib's make_text callback. Fonts are Type 1 outlines converted to SVG paths by MetaPost's SVG backend (prologues:=3); TeX packages, fonts and formats load lazily from static files. Output is byte-identical to native mpost from TeX Live 2025 on the golden corpus.