3 ms·
Cool project! I like the idea of easily sharing LaTeX formulas. It's impressive how smooth it works right in the browser. I've always thought compiling LaTeX i
by mgt19937 2y ago
Cool project! I like the idea of easily sharing LaTeX formulas. It's impressive how smooth it works right in the browser.
I've always thought compiling LaTeX in WebAssembly would be a tough nut to crack, so I was curious if that's what you'd done here. Turns out you're using KaTeX.
Have you considered any WebAssembly approaches?
- jszymborski 2y agoNot OP, but do you mind me asking what advantages you hope to achieve by using WebAssembly rather than KaTeX?
- trurl42 2y agoWell, for one, KaTeX doesn't do "LaTeX" but a limited subset of the TeX equation syntax. As such, it can't handle more complicated macros or typesetting anything apart from equations.
- Wdorf 2y agoThank you for your positive feedback. KaTeX does not support all LaTeX features but initializes very quickly. LaTeX via WebAssembly supports more features but might need longer to initialize. There's an existing WebAssembly project: https://www.swiftlatex.com https://www.swiftlatex.com
- red_trumpet 2y agoThere is TikZJax[1], which apparently compiles TeX to WebAssembly, to run TikZ in the browser. [1] https://tikzjax.com/ https://tikzjax.com/
- dunham 2y agoI played with web2js a couple of years ago. TeX ends up being a 500kb WASM file (88kb gzipped). The LaTeX format file or the memory image after LaTeX is loaded are a bit bigger though (2.3 MB and 6.3MB gzipped, respectively).