mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
e46dd418b3c6782a82c0f3965101d0a21f12aa5c
\text
Summary: In something like `\text {hello, world}` we want to ignore the first space but not the second. This suggests to me that perhaps we shouldn't be in text-lexing mode until we actually see the first curly brace, so this changes us to do that. Note that this disallows doing unbraced text things now; it seemed nontrivial to lex a single text character while ignoring spaces. We should probably fix it sometime, but for now we'll fall back to MathJax anyway so I'm not super concerned. We should also add a huxley test for this. Test Plan: `\text {2x 2}` rendered `2x 2` in a non-italic font. Reviewers: jack, emily Reviewed By: emily Differential Revision: http://phabricator.khanacademy.org/D9376
KaTeX
Fast math!
To run locally
make setup
make serve
Perceptual diff
make pdiff
License
Languages
JavaScript
85.7%
Perl
4.6%
Prolog
3.2%
HTML
2.3%
Less
1.3%
Other
2.8%