Test Plan: Searched for `[^\x00-\x7f]` in vim and had no results, where there were before.
Reviewers: emily
Reviewed By: emily
Differential Revision: http://phabricator.khanacademy.org/D13459
changed stopType (string) parameter to breakOnInfix (boolean)
renamed rewriteInfixNodes to handleInfixNodes
added a test for {1 \over 2} \over 3, fixed some grammar, and added code in the parser to squash superfluous ordgroups
removed squashOrdGroups and instead don't create an "ordgroup" if one already exists
removed unnecessary variable
moved variable declarations out of "if" statements
removed comment
Fixed style issue with where variables are declared and remove unnecessary comment from functions.js
Summary:
Create a fonts.less file which generates identical css to fonts.css, but using
less rules to be more understandable and customizable. For example, add the
ability to change where the fonts directory is located (instead of mandating it
be located next to the less file), and add the ability to disable specific font
formats (like disable EOTs when IE8 support isn't needed).
Test Plan:
- Ensure that the test page and huxley page still work
- Ensure that the output of `./node_modules/.bin/lessc static/fonts.less` is
the same as the original css by running both through
`./node_modules/.bin/cleancss` and diffing them.
- Ensure that the huxley screenshots haven't changed
- Ensure that the build step still works
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13326
Update huxley, and then use the Dockerfile to create new huxley screenshots.
Test plan:
- Make sure generating new huxley screenshots works
- Ensure that re-generating huxley screenshots produces no changes
Auditors: alpert
Summary: This makes typing into the box bearable with break-on-exception enabled.
Test Plan: Typed into box; I didn't blow up.
Reviewers: emily
Reviewed By: emily
Subscribers: jessie
Differential Revision: http://phabricator.khanacademy.org/D13314
Summary:
KaTeX doesn't work correctly in quirks mode. Warn in the console and disable
rendering if that happens.
Test Plan:
- Make sure the test still loads and renders math
- Make sure a warning is thrown when the doctype is removed, and no more math
is rendered
- Make sure the tests pass both on the web and with `make test`
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13192
Summary:
Add the ability to base the metrics for a TTF character on the metrics
from one of the TFM characters.
Test Plan:
- Make sure the tests still work
- Make sure huxley tests didn't change
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13217
Summary:
Add the dockerfile that I've been using to make huxley screenshots so
others can test their changes by making huxley screenshots. Include a readme
about how to use it correctly.
Test Plan: - Use the dockerfile by running the given commands, see it works
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D12773
Summary:
Improve the build process by combining the CSS files, automatically
selecting font files to include, and building .tar.gz and .zip files.
Test Plan:
- Make sure tests work
- Make sure huxley screenshots didn't change
- Make sure zip and tar.gz files contain only files we want to distribute
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13159
Summary:
Add comments everywhere! Also fix some small bugs like using Style.id
instead of Style.size, and rename some variables to be more descriptive.
Fixes#22
Test Plan:
- Make sure the huxley screenshots didn't change
- Make sure the tests still pass
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13158
Summary:
Add support for math-mode accents. This involves a couple changes.
First, in order to correctly position the accents, we must know the kern between
every character and the "skewchar" in that font. To do this, we improve our tfm
parser to run the mini-kern-language and calculate kerns. We then export these
into fontMetrics.js.
Then, we add normal support for accents. In particular, we do some special
handling for supsubs around accents. This involves building the supsub
separately without the accent, and then replacing its base with the built
accent.
Finally, the character in the fonts for the \vec command is a combining unicode
character, so it is shifted to the left, but none of the other characters do
this. We add some special handling for \vec to account for this.
Fixes#7
Test Plan:
- Make sure tests pass
- Make sure no huxley screenshots changed, and the new one looks good
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13157
Test Plan: Ran unit tests. Looked at `\blue{\displaystyle \left(\dfrac{a^\sigma}{\sin \theta}\right\Updownarrow \intop_{1/2}^{z^z} \sum_{i=0}^\infty x \,dx}` in Chrome and saw the future in my eyes.
Reviewers: emily
Reviewed By: emily
Subscribers: jessie
Differential Revision: http://phabricator.khanacademy.org/D13154
This tests against Node 0.10 (latest stable) and 0.11 (latest dev).
Test Plan: Crossed fingers. In theory we'll see this at https://travis-ci.org/Khan/KaTeX as soon as I push it.
Auditors: emily
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
Fix getting a NaN maxFontSize in makeVList because symbolNodes don't have a
maxFontSize property.
Test plan:
- Make sure no huxley screenshots changed
Auditors: alpert