Live data from Hacker News

Problems with math rendering on the web (2020)

danilafe.com

11–20 of 87 posts

Re: Problems with math rendering on the web (2020)

#11
> ...they use client-side rendering for static content. In my opinion, this is absurd.

Rendering equations client-side doesn't seem absurd to me. All of HTML and CSS and SVG is rendered client-side, why shouldn't equations be too?

I'm completely unclear why the author thinks equations specifically should be rendered server-side. Do they think HTML pages should be delivered as prerendered images or SVG's too...? Because it seems like the philosophy would apply the same way.

Re: Problems with math rendering on the web (2020)

#13
post #10
post #6

Earlier quoted context omitted.

given the origin of the web at cern, it's actually surprising that it didn't include LaTeX from day 1.

The web would be so pretty if “HTML” was actually hyperlinked TeX.

I'm not sure banner ads would be much better if aligned using TeX.

Re: Problems with math rendering on the web (2020)

#14

I 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…

> The plan is to convert ximera.osu.edu to this new backend by the fall.

Have you verified that this will not be an accessibility regression for blind users?

Re: Problems with math rendering on the web (2020)

#16
I apologize if this is pedantic but you can absolutely "render" KaTeX server-side: https://github.com/jdan/thatjdanisso.cool/blob/902f1c421b02b...

MathJax does not support this because, IIRC, it runs layout calculations in the browser whereas KaTeX passes it off to CSS.

If your argument is then that layout calculations should _also_ happen on the server then... I'm not sold and that would be a critique of web browsers and not math rendering.

Re: Problems with math rendering on the web (2020)

#18
This article is kinda weird--it mentions MathML in passing and then spends a large amount of time on MathJax. I'm not sure what the point is.

The correct fix is to implement MathML natively in all browsers (no JS)--and, indeed, someone is working on that: https://mathml.igalia.com/faq/ section "Which browsers support MathML?".

Re: Problems with math rendering on the web (2020)

#19

I apologize if this is pedantic but you can absolutely "render" KaTeX server-side: https://github.com/jdan/thatjdanisso.cool/blob/902f1c421b02b... MathJax does not support this because, IIRC, it runs layout calculations in the browser whereas KaTeX passes it off to CSS. If your argument is then that layout calculations should _also_ happen on the server then... I'm not sold and that would be a critique of web browser…

It sounds like they want PDF. It’s rendered, not some image. But it’s also consistently laid out.

I think that’s a neat idea in general.

When I make little toy games for the web the part I hate the most is the boilerplate for ensuring every browser, mobile and desktop, gets a viewport of the same ratio. Would be neat to be able to say “give me a 16x9 viewport, and scale everything inside of it depending on how large that ends up actually being on the screen so that the same amount of content is seen by every user.”

Re: Problems with math rendering on the web (2020)

#20

I 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 implemented a TeX engine in WebAssembly so you really can run TeX in the browser.

Kinda misses the point of the blog post. The idea is to do that server side, preferably only once.

Post reply on HN