Files
KaTeX/test/huxley/Huxleyfile.json
Emily Eisenberg 0c9e9738c3 Fix our parsing strategy so it is the same as (or very similar to) TeX's
Summary:
Rewrote the parser to make this work, and added a bunch of tests to make sure
this does work. In the process, refactored all of our functions into a separate
file, functions.js. Added a bunch of comments to Parser.js. Also, update jasmine
so we can make our tests better, and add a lint_blacklist.txt to not lint bad
jasmine stuff.

Fixes #10
Fixes #12

Test Plan:
- Make sure all of the tests still work, and all of the new ones work also
- Make sure huxley screenshots didn't change

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D12989
2014-09-09 23:18:37 -07:00

164 lines
5.1 KiB
JSON

[
{
"name": "BasicTest",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a"
},
{
"name": "FractionTest",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\dfrac{a}{b}\\frac{a}{b}\\tfrac{a}{b}"
},
{
"name": "NestedFractions",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\dfrac{\\frac{a}{b}}{\\frac{c}{d}}\\dfrac{\\dfrac{a}{b}}{\\dfrac{c}{d}}\\frac{\\frac{a}{b}}{\\frac{c}{d}}"
},
{
"name": "Exponents",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a^{a^a_a}_{a^a_a}"
},
{
"name": "Colors",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\blue{a}\\color{%230f0}{b}\\color{red}{c}"
},
{
"name": "GreekLetters",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\alpha\\beta\\gamma\\omega"
},
{
"name": "Baseline",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a+b-c\\cdot d/e"
},
{
"name": "Spacing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=^3+[-1][1-1]1=1(=1)\\lvert a\\rvert~b"
},
{
"name": "Functions",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\sin\\cos\\tan\\ln\\log"
},
{
"name": "Sizing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m={\\Huge x}{\\LARGE y}{\\normalsize z}{\\scriptsize w}"
},
{
"name": "SizingBaseline",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m={\\tiny a+b}a+b{\\Huge a+b}&pre=x&post=M"
},
{
"name": "Text",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\frac{a}{b}\\text{c~ {ab} \\ e}+fg"
},
{
"name": "KaTeX",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\KaTeX"
},
{
"name": "RlapBug",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\frac{\\rlap{x}}{2}"
},
{
"name": "SupSubCharacterBox",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a_2f_2{f}_2{aa}_2{af}_2"
},
{
"name": "Lap",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=ab\\llap{f}cd\\rlap{g}h"
},
{
"name": "DelimiterSizing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\bigl\\uparrow\\Bigl\\downarrow\\biggl\\updownarrow\\Biggl\\Uparrow\\Biggr\\Downarrow\\biggr\\langle\\Bigr\\}\\bigr\\rfloor"
},
{
"name": "Overline",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\overline{x}\\overline{x}\\overline{x^{x^{x^x}}} \\blue{\\overline{y}}"
},
{
"name": "DeepFontSizing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a^{\\big| x^{\\big(}}_{\\Big\\uparrow} + i^{i^{\\Huge x}_y}_{\\Huge z} + \\dfrac{\\Huge x}{y}"
},
{
"name": "VerticalSpacing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?pre=potato<br>blah&post=<br>moo&m=x^{\\Huge y}z"
},
{
"name": "SupSubHorizSpacing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=x^{x^{x}}\\Big|x_{x_{x_{x_{x}}}}\\bigg|x^{x^{x_{x_{x_{x_{x}}}}}}\\bigg|"
},
{
"name": "Rule",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\rule{1em}{0.5em}\\rule{1ex}{2ex}\\rule{1em}{1ex}\\rule{1em}{0.431ex}"
},
{
"name": "LeftRight",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\left( x^2 \\right) \\left\\{ x^{x^{x^{x^x}}} \\right."
},
{
"name": "LeftRightStyleSizing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=+\\left\\{\\rule{0.1em}{1em}\\right.x^{+\\left\\{\\rule{0.1em}{1em}\\right.x^{+\\left\\{\\rule{0.1em}{1em}\\right.}}"
},
{
"name": "PrimeSpacing",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=f'+f_2'+f^{f'}"
},
{
"name": "NullDelimiterInteraction",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=a \\bigl. + 2 \\quad \\left. + a \\right)"
},
{
"name": "Sqrt",
"screenSize": [1024, 768],
"url": "http://localhost:7936/test/huxley/test.html?m=\\sqrt{\\sqrt{\\sqrt{x}}}_{\\sqrt{\\sqrt{x}}}^{\\sqrt{\\sqrt{\\sqrt{x}}}^{\\sqrt{\\sqrt{\\sqrt{x}}}}}"
}
]