Hacker News new | past | comments | ask | show | jobs | submit login

I wonder how does it render synchronously without needing to reflow the page?



Server-side rendering will do that.


So this only refers to the server-side rendering mode, not in-browser rendering (which KaTeX supports too)?


If by "this" you mean "no reflowing", yes. If the maths is laid out client-side at run time, the exact dimensions of the formula are not known until the Latex code is interpreted.


Thanks. I was hoping there was a way to manipulate the DOM on the client before it is rendered, but this seems to be impossible with JS. Currently, I render various things during page load with NodeObserver. It mostly performs well on modern devices, but it can get sluggish on very large HTML pages (like 5MB+ of HTML code), so it looks like I have to resort to infinite scrolling with automatic unloading.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: