3 ms·
> The only third-party components so far are the KaTeX\KaTeXKATE X rendering engine which generates beautiful and insanely performant HTML/CSS components from T
by gwern 7y ago
> 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?
- johnmorrison 7y ago> 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.
- gwern 7y ago> 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.
- Jaxan 7y agoYou don’t need JavaScript for KaTeX. So I suppose the two options are equally fast.
- gwern 7y agoApparently he does: " <script defer src='https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js' https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js' integrity='sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz' crossorigin='anonymous'></script>"
- johnmorrison 7y agoYup. 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.