News for hackers. Stuff that matters.
Re:Polymath: A Markup Language for Everything by gwern on Saturday February 08, 2020 @08:03PM (#22279735)
> The only third-party components so far are the KaTeX\KaTeXKATE X rendering engine which generates beautiful and insanely performant HTML/CSS components from TeX\TeXTE X expressions – it is much, much faster than MathJax, which seems to be by far the most common

But is it as fast as running MathJax pages through mathjax-node-page to create static pages which don't need JS at all?

Re:Polymath: A Markup Language for Everything by johnmorrison on Saturday February 08, 2020 @09:15PM (#22279960)
> But is it as fast as running MathJax pages through mathjax-node-page to create static pages which don't need JS at all?

Not sure, I should note that I've only ever used MathJax and KaTeX with the client-side JS rendering option, primarily because it's just faster to hack onto an early prototype.

If you prefer to do server-side rendering to avoid scripts, I imagine that the end user performance is roughly the same, however it is my understanding that MathJax has some advantages here in (a) also supporting MathML and (b) rendering to PNG, SVG, etc, while I believe KaTeX only has one rendering option in fairly CSS/HTML heavy nested sets of HTML elements and an imported web font.

Thereby I could see a potential preference for MathJax (esp. to render just a few PNG/SVG equations into the static site and serve those) but I think for really long documents, pre-rendered KaTeX might still be superior because you only need to load a single web font and the HTML itself instead of numerous copies of the same symbols in hundreds of image files. KaTeX also seems much faster if you do client-side rendering with JS.

Btw, your site has been a big source of inspiration to improve my own (in both design and infrastructure). I liked your post about A/B testing CSS and HTML, and the margin footnotes are really cool.

Re:Polymath: A Markup Language for Everything by gwern on Sunday February 09, 2020 @10:14AM (#22282469)
> Btw, your site has been a big source of inspiration to improve my own (in both design and infrastructure). I liked your post about A/B testing CSS and HTML, and the margin footnotes are really cool.

Thanks.

Re:Polymath: A Markup Language for Everything by Jaxan on Sunday February 09, 2020 @03:52AM (#22281123)
You don’t need JavaScript for KaTeX. So I suppose the two options are equally fast.
Re:Polymath: A Markup Language for Everything by gwern on Sunday February 09, 2020 @10:03AM (#22282424)
Apparently he does:

" <script defer src='https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js' integrity='sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz' crossorigin='anonymous'></script>"

Re:Polymath: A Markup Language for Everything by johnmorrison on Sunday February 09, 2020 @10:31AM (#22282545)
Yup. For my personal site, I'll probably move the rendering server side soon if it doesn't add too much to the render time. Likely will make both options accessible to other Polymath users - I think server side and client side both have their merits.