Reflow TeX

An open-source renderer that brings real, typeset LaTeX to the web and lets it reflow like ordinary text.

Reflow TeX: responsive LaTeX for the web
Responsive LaTeX for the web.

Reflow TeX renders genuine LaTeX in the browser and re-flows it to fit any screen, so mathematics stays selectable, searchable, and comfortable to read in dark mode or at a larger text size — instead of being frozen in a fixed-width PDF. I offer it as a small contribution to the wider research community and to the accessibility of scholarly writing.

Tech stack

LuaTeX and a Lua serializer capture a genuine TeX run’s full node list; a Python pipeline (protobuf, fonttools) packs it into a compact binary; and a dependency-free vanilla JS viewer re-runs the Knuth–Plass line-breaking algorithm in the browser, painting the result as inline SVG. It ships as static-site integrations for Hugo and plain HTML.