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

> Replacing TeX is pretty easy since it is a fairly small language.

Conceptually, easy. In practice, it can go sideways. Take JMathTeX, for instance:

http://jmathtex.sourceforge.net/

The code had (has?) a particularly nasty bottleneck. An exception is thrown while parsing for every single character in a macro name until the macro name resolves to a known TeX command. In Java, throwing an exception requires filling out a complete stack trace. I forked the project to fix that issue and then optimized the font glyph to SVG path conversion algorithm. The TeX library went from non-real-time rendering of a few formulas to real-time rendering of 1,000 formulas.

https://github.com/DaveJarvis/JMathTeX

Here's a screenshot showing the JMathTeX fork integrated into my text editor, KeenWrite:

https://github.com/DaveJarvis/keenwrite/blob/master/docs/scr...

See also the build instructions for Knuth's original TeX:

https://tex.stackexchange.com/a/576314/2148



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

Search: