Hacker News new | ask | show | jobs
by prezjordan 1823 days ago
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.

1 comments

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.”

You could achieve this with CSS by using “vw” units for everything, including font sizes
You could create a canvas for your game and everything will be in your control.