xymostech
Joined 15 years ago
Joined 15 years ago
KaTeX depends on the browser engine to do most of the layout, so generating an image would require a tool which converts the HTML nodes back into an image. There are some tools that can do that (like html2canvas), but using LaTeX to generate a PDF and then converting that to an image is probably going to be easier.
From what I can tell, modern fonts using OpenType just have tables to accomplish something similar now, in the form of the GSUB and GPOS tables?
Documentation for the TFM format here: https://tug.org/TUGboat/Articles/tb02-1/tb02fuchstfm.pdf (search for lig/kern)
Edit: Looks like there were also around 3m "automated" views to the page based on user agent. Maybe some bot script went awry but used non-bot user agents half the time?
Most importantly though, when they started writing `and_then`, my eyes lit up and I said "It's a Monad!" I think this is the first time I've really identified a Monad out in the wild, so I enjoyed that immensely.
[1]: https://flowtype.org/blog/2015/02/20/Flow-Comments.html
[2]: https://github.com/Khan/aphrodite/blob/master/src/generate.j...
MathJax also does strange things involving inserting elements into the DOM to look at metrics that it uses in its calculations, then removing them, which takes a lot of time. We make sure that the same input is rendered the same every time, and try to make sure it looks good everywhere (there are a couple cases where we aren't the best at this, mostly because browser font rendering isn't great).
We also support less environments than MathJax, for example we only support HTML+CSS output (for now, though MathML is in the works for accessibility reasons), whereas MathJax supports HTML+CSS, SVG, MathML, and older browsers like IE 6. This means it can't rely on things like good CSS rendering like we do. It's a worthwhile tradeoff for us, because we can make ours so much faster, but it is a tradeoff.
https://github.com/xymostech
[ my public key: https://keybase.io/xymostech; my proof: https://keybase.io/xymostech/sigs/X4gWdG2AX9mYlklCEZ3Ox4wIwt_NHwxru4b1py5pwrw ]