Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Presto, now if the user makes an edit on page 223, TeX can quickly back up to the state of the world just before page 223, and continue on forward with the modified input. Page 223 gets recomposed and immediately redisplayed, essentially in real-time.

Isn't it possible, in the worst case, that editing the source line that maps to page 223 could trigger re-rendering arbitrarily far back before page 223? Like if you wrote all 223 pages without any chapters, parts, \newpage, etc. How does your program handle this?



Sure. It seems best to redisplay quickly, then update the screen again when everything is quiescent (the user hasn’t typed anything for a few tenths of a second, and the whole document has been fully recompiled with no changes detected). Usually it’s not even noticeable, though of course there are degenerate cases where a document oscillates, which gets called out in the UI in the unlikely case it happens.




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

Search: