Integration of MathJax, KaTeX and Asymptote with scribble, to typeset math in Racket documentation
![]() Summary: In LaTeX, large delimiters are the same font size as they are at a normal size, regardless of the actual size. This means that we need to scale up the font size in the inner nodes, which is annoying because we run into the same problem we had with \Huge, etc in those nodes. Thus, this fixes both problems at once. The problem was that when we used our baseline-align-hack and then increased the font size inside of one of the middle (display: block and height: 0) nodes, the node with the increased font size would shift downards (misaligning its baseline). To fix this, we add a method for calculating the maximum font size used in each of the nodes, and adding a small node with this font size to each of the other nodes (including the fix-ie node). This shifts all of the nodes down the same amount, and gets their baselines aligned. Test Plan: - Do dumb things by putting \Huge and \big in places they shouldn't be, and make sure they behave responsibly - Do the same thing in IE 8, 9, 10, 11, Safari, Firefox, and make sure they all behave the same (to some approximation) - Make sure the new huxley image looks good, and the images that changed don't have significant changes Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D12684 |
||
---|---|---|
build | ||
dockers/MathJaxFonts | ||
static | ||
test | ||
.arcconfig | ||
.gitignore | ||
buildTree.js | ||
domTree.js | ||
fontMetrics.js | ||
katex.js | ||
Lexer.js | ||
LICENSE.txt | ||
Makefile | ||
metric_parse.rb | ||
Options.js | ||
package.json | ||
ParseError.js | ||
Parser.js | ||
parseTree.js | ||
README.md | ||
server.js | ||
Style.js | ||
symbols.js | ||
utils.js |
KaTeX
Fast math!
To run locally
make setup
make serve
Perceptual diff
make pdiff