KaTeX/metrics
Emily Eisenberg 79ab06d88d Get rid of the lookahead-y dots
Summary:
The `\dots` and `\dots{c,o,b,i,m}` commands do more than just show characters,
they add extra space and `\dots` also looks ahead to determine what kind of
environment it is in (see [this math.sx post]
(http://tex.stackexchange.com/questions/122491/difference-of-the-dots)). We
can't support that yet, so remove them.

Also, add comments to the extract_ttf script to show what caracters we are
extracting metrics for.

Test Plan: - Make sure tests work

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13151
2014-09-12 17:29:49 -07:00
..
extract_tfms.py Add support for \left and \right 2014-09-04 21:58:43 -07:00
extract_ttfs.py Get rid of the lookahead-y dots 2014-09-12 17:29:49 -07:00
mapping.pl Update metrics using TeX metrics instead of TTF metrics 2014-09-03 20:12:00 -07:00
parse_tfm.py Update metrics using TeX metrics instead of TTF metrics 2014-09-03 20:12:00 -07:00
README.md Add the ability to extract metrics from ttfs 2014-09-12 14:59:28 -07:00
replace_line.py Update metrics using TeX metrics instead of TTF metrics 2014-09-03 20:12:00 -07:00

How to generate new metrics


There are several requirements for generating the metrics used by KaTeX.

  • You need to have an installation of TeX which supports kpathsea. You can check this by running tex --version, and seeing if it has a line that looks like

    kpathsea version 6.2.0

  • You need the JSON module for perl. You can install this either from CPAN or with your package manager.

  • You need the python fontforge module. This is probably either installed with fontforge or can be installed from your package manager.

Once you have these things, run

make metrics

which should generate new metrics and place them into fontMetrics.js. You're done!