Problems with math rendering on the web (2020)
danilafe.com
Problems with math rendering on the web (2020)
1–10 of 87 posts
Re: Problems with math rendering on the web (2020)
#2Sure it would be nice of browsers could render the LaTeX natively instead of using JS.
Re: Problems with math rendering on the web (2020)
#3I use this on https://vcvrack.com/manual/DSP to parse $inline$ and $$block$$ TeX into MathML with a couple lines of server-side code (simplified for readability):
html = require('markdown-it')({html: true, linkify: true, typographer: true})
.use(require('markdown-it-texmath'), {engine: 'katex', delimiters: 'dollars'})
.render(body)Re: Problems with math rendering on the web (2020)
#4To make it relatively fast, the TeX engine gets snapshotted and shipped to the browser with much of TeXlive already loaded. So even things like TikZ work reasonably well. There is of course a lot more to do! The plan is to convert ximera.osu.edu to this new backend by the fall.
Re: Problems with math rendering on the web (2020)
#5I implemented a TeX engine in WebAssembly so you really can run TeX in the browser. You can see a demo of this at https://tex.rossprogram.org/ and at https://github.com/kisonecat/web2js you can find a Pascal compiler that targets WebAssembly which can compile Knuth's TeX. Interesting primitives like \directjs are also implemented, so you can execute javascript from inside TeX. The rendering is handled with https://gi…
I'm a wasm neophyte -- even the set up seems complex to me. Do you have any recommendations for where to dive in?
Re: Problems with math rendering on the web (2020)
#6Eh. Every client already renders all the HTML into visual format. I don't see what's wrong with rendering the LaTeX too. Sure it would be nice of browsers could render the LaTeX natively instead of using JS.
Re: Problems with math rendering on the web (2020)
#7I implemented a TeX engine in WebAssembly so you really can run TeX in the browser. You can see a demo of this at https://tex.rossprogram.org/ and at https://github.com/kisonecat/web2js you can find a Pascal compiler that targets WebAssembly which can compile Knuth's TeX. Interesting primitives like \directjs are also implemented, so you can execute javascript from inside TeX. The rendering is handled with https://gi…
This is wonderful! I'm a wasm neophyte -- even the set up seems complex to me. Do you have any recommendations for where to dive in?
Re: Problems with math rendering on the web (2020)
#8Re: Problems with math rendering on the web (2020)
#9I implemented a TeX engine in WebAssembly so you really can run TeX in the browser. You can see a demo of this at https://tex.rossprogram.org/ and at https://github.com/kisonecat/web2js you can find a Pascal compiler that targets WebAssembly which can compile Knuth's TeX. Interesting primitives like \directjs are also implemented, so you can execute javascript from inside TeX. The rendering is handled with https://gi…
Re: Problems with math rendering on the web (2020)
#10Eh. Every client already renders all the HTML into visual format. I don't see what's wrong with rendering the LaTeX too. Sure it would be nice of browsers could render the LaTeX natively instead of using JS.
given the origin of the web at cern, it's actually surprising that it didn't include LaTeX from day 1.