Integration of MathJax, KaTeX and Asymptote with scribble, to typeset math in Racket documentation
Go to file
Emily Eisenberg 04f13b9be8 Fix font sizing issues
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
2014-08-27 01:12:15 -07:00
build Add a setup rule to Makefile 2013-07-30 13:54:43 -07:00
dockers/MathJaxFonts Fix the OS/2 font tables to prevent clipping on windows 2014-08-08 17:55:33 -07:00
static Fix font sizing issues 2014-08-27 01:12:15 -07:00
test Fix font sizing issues 2014-08-27 01:12:15 -07:00
.arcconfig Rename everything to KaTeX 2013-07-10 14:08:50 -07:00
.gitignore Somehow manage to fix the sizing bugs 2014-03-20 21:36:37 -04:00
buildTree.js Fix font sizing issues 2014-08-27 01:12:15 -07:00
domTree.js Fix font sizing issues 2014-08-27 01:12:15 -07:00
fontMetrics.js Update fonts from MathJax 2014-08-06 17:52:26 -07:00
katex.js Empty the output element before parsing the input 2013-11-12 14:09:13 -08:00
Lexer.js Make errors more informative 2014-03-30 23:05:37 -04:00
LICENSE.txt Add MIT License 2014-01-31 17:47:12 -08:00
Makefile Don't die if things are already installed 2014-03-20 18:30:24 -07:00
metric_parse.rb Update fonts from MathJax 2014-08-06 17:52:26 -07:00
Options.js Fix font sizing issues 2014-08-27 01:12:15 -07:00
package.json Basic perceptual diffing support for KaTeX 2014-01-29 16:29:21 -08:00
ParseError.js Make errors more informative 2014-03-30 23:05:37 -04:00
Parser.js Add support for \overline 2014-08-05 17:48:10 -07:00
parseTree.js Remove Parser options usage 2013-07-13 18:15:17 -07:00
README.md Add "http://" to links in README 2014-02-18 17:34:30 -08:00
server.js Compile .less on demand for test page 2014-03-20 20:22:07 -07:00
Style.js Add support for \overline 2014-08-05 17:48:10 -07:00
symbols.js Add delimiter sizing 2014-08-05 16:43:43 -07:00
utils.js Don't change global prototype: local utils.indexOf 2014-01-14 19:52:53 -08:00

KaTeX

Fast math!

To run locally

make setup
make serve

Perceptual diff

make pdiff

License

MIT License