Re:Show HN: Latex.to – LaTeX to image converter running in t...
by Wdorf on Tuesday October 29, 2024 @11:31AM
(#41984934)
Thank 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
Re:Show HN: Latex.to – LaTeX to image converter running in t...
by jszymborski on Tuesday October 29, 2024 @11:15AM
(#41984698)
Not OP, but do you mind me asking what advantages you hope to achieve by using WebAssembly rather than KaTeX?
Re:Show HN: Latex.to – LaTeX to image converter running in t...
by trurl42 on Tuesday October 29, 2024 @11:33AM
(#41984991)
Well, 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.
Re:Show HN: Latex.to – LaTeX to image converter running in t...
by red_trumpet on Tuesday October 29, 2024 @12:50PM
(#41986421)
There is TikZJax[1], which apparently compiles TeX to WebAssembly, to run TikZ in the browser.
Re:Show HN: Latex.to – LaTeX to image converter running in t...
by dunham on Tuesday October 29, 2024 @03:26PM
(#41988389)
I 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).
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?