7 ms·
The commenter says pre-rendered/server-side-rendered mathematics (via katex) is great - I’ve found the opposite. It’s probably great if you have an article with
by joppy 11mo ago
The commenter says pre-rendered/server-side-rendered mathematics (via katex) is great - I’ve found the opposite. It’s probably great if you have an article with one or two equations. On the other hand, if you have an article which uses mathematics pervasively, like many pure mathematics articles, it quickly becomes far more space efficient to render the mathematics on the client side. You can quickly get 200kB+ pages by pre-rendering.
- djoldman 11mo agoCould you please provide an example?
- Galanwe 11mo agoMy experience with dynamically rendered math has been the opposite: if you have lots of equations to render, it inevitably takes some milliseconds to render, which makes the whole content move around and shake as rendering takes places.
- Vosporos 11mo agoIt's not too late to delete this comment.
- Latitude7973 11mo agoDid you read the article? That's what the KaTeX project specifically claims to address.
- cubefox 11mo agoThe previous comment was about using KaTeX for pre-rendered equations.
- ayhanfuat 11mo agoIndeed. It was hell to navigate pages that rendered MathJax on demand. That also improved a lot though.
- blenderob 11mo ago> it inevitably takes some milliseconds to render, which makes the whole content move around and shake as rendering takes places. What a boldly incorrect comment! It's like you didn't even read the first point in TFA!
- lifthrasiir 11mo agoKaTeX weighs about the same if you do care about those metrics, however.
- susam 11mo agoIn case anyone wants to look at actual numbers about how much KaTeX weighs for a simple mathematics page: https://news.ycombinator.com/item?id=44614133 https://news.ycombinator.com/item?id=44614133 Quoting the relevant part from that link: katex.min.css 23.6 kB katex.min.js 277.0 kB auto-render.min.js 3.7 kB KaTeX_Main-Regular.woff2 26.5 kB KaTeX_Main-Italic.woff2 16.7 kB ---------------------------------- Total Additional 347.5 kB Of course, if the page uses more symbols in various sizes, then a few more fonts files (.woff2) need to be pulled in which case the weight of KaTeX would increase a bit too. Each font file weighs between 4 kB and 28 kB.
- adastra22 11mo agoIs 200kB supposed to be a lot?
- eviks 11mo agoBut how is better space efficiency at this level better than worse rendering efficiency?