MiniLaTeX: Parse LaTeX to HTML
summary
MiniLaTeX parses a substantial subset of LaTeX to HTML in real time by splitting math to MathJax and text to an AST (a 12-line algebraic type) then rendering; the parser is hand-built with parser combinators in Elm, about 350–400 lines of parser code and a larger renderer. The grammar proves non‑context‑free (environments need matching begin/end), user text‑mode macros can be defined at runtime, and live editing uses greatest‑common‑prefix/suffix reuse so editors like MiniLaTeX Live and MiniLaTeX Reader render updates very quickly.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:30What is LaTeX
- 4:47Demo
- 7:46Example
- 9:19Question
- 11:03Abstract Syntax Tree
- 17:01Summary
- 17:30Grammar for LaTeX
- 17:45Abstract Syntax
- 25:06Parse
- 32:41Associated Grammar
- 35:53Environment Grammar
- 38:19Haskell
- 38:44Monads
- 39:14Rendering
- 42:37Full Pipeline
- 44:26Folding
related talks
47mNovel Markup Language Editing System
15mAccessible Math on the Web: A Server/Client Solution
29mMy Little Parser: Tooling is Magic
31mBuilding a Programming Language in Swift
20mA Markup for the Statically Typed
45mHow to Make a Programming Language
17mEfficient, Expressive, and Extensible HTML Templates
28mBuilding a Better LMS, One Tiny Block at a Time
