mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
* Implement \verb * Implement @gagern's comments * \verb: look up characters one at a time. * Add screenshot test for \verb * Add error tests for \verb * Include space symbol in typewriter font, and fix single quotes This is based on https://github.com/Khan/MathJax-dev/pull/2 which hasn't been accepted yet at the time this commit is made. * Add \verb* tests * \verb should use Typewriter-Regular font! * Switch \verb to use text mode and no-break space. * Screenshot update with Typewriter-Regular * \verb test: fix *, add commas to make spaces clear * Fix spaces and style handling * Implement @kevinbarabash's comments * Make error clearly an assertion failure * verb screenshot for Chrome
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 likekpathsea version 6.2.0
-
You need the JSON module for perl. You can install this either from CPAN (possibly using the
cpan
command line tool) or with your package manager. -
You need the python module fonttools. You can install this either from PyPi (using
easy_install
orpip
) or with your package manager.
Once you have these things, run
make metrics
which should generate new metrics and place them into fontMetricsData.json
.
You're done!