diff --git a/src/buildHTML.js b/src/buildHTML.js index 11faf4088..98903252e 100644 --- a/src/buildHTML.js +++ b/src/buildHTML.js @@ -32,7 +32,8 @@ var buildExpression = function(expression, options, prev) { return groups; }; -// List of types used by getTypeOfGroup +// List of types used by getTypeOfGroup, +// see https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types var groupToType = { mathord: "mord", textord: "mord", @@ -43,7 +44,7 @@ var groupToType = { close: "mclose", inner: "minner", genfrac: "mord", - array: "minner", + array: "mord", spacing: "mord", punct: "mpunct", ordgroup: "mord", @@ -615,7 +616,7 @@ var groupTypes = { } } body = makeSpan(["mtable"], cols); - return makeSpan(["minner"], [body], options.getColor()); + return makeSpan(["mord"], [body], options.getColor()); }, spacing: function(group, options, prev) { diff --git a/src/symbols.js b/src/symbols.js index b620d730f..b5d8f6cf4 100644 --- a/src/symbols.js +++ b/src/symbols.js @@ -7,6 +7,7 @@ normal font), or "ams" (the ams fonts). * - group (required): the ParseNode group type the symbol should have (i.e. "textord", "mathord", etc). + See https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types * - replace (optional): the character that this symbol or function should be * replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi * character in the main font). diff --git a/test/screenshotter/images/ArrayType-firefox.png b/test/screenshotter/images/ArrayType-firefox.png new file mode 100644 index 000000000..c108bf123 Binary files /dev/null and b/test/screenshotter/images/ArrayType-firefox.png differ diff --git a/test/screenshotter/ss_data.json b/test/screenshotter/ss_data.json index e5f9359f2..deaf70c4c 100644 --- a/test/screenshotter/ss_data.json +++ b/test/screenshotter/ss_data.json @@ -1,6 +1,7 @@ { "Accents": "http://localhost:7936/test/screenshotter/test.html?m=\\vec{A}\\vec{x}\\vec x^2\\vec{x}_2^2\\vec{A}^2\\vec{xA}^2", "Arrays": "http://localhost:7936/test/screenshotter/test.html?m=\\left(\\begin{array}{rlc}1%262%263\\\\1+1%262+1%263+1\\cr1\\over2%26\\scriptstyle 1/2%26\\frac12\\\\[1ex]\\begin{pmatrix}x\\\\y\\end{pmatrix}%260%26\\begin{vmatrix}a%26b\\\\c%26d\\end{vmatrix}\\end{array}\\right]", + "ArrayType": "http://localhost:7936/test/screenshotter/test.html?m=1\\begin{array}{c}2\\\\3\\end{array}4", "Baseline": "http://localhost:7936/test/screenshotter/test.html?m=a+b-c\\cdot d/e", "BasicTest": "http://localhost:7936/test/screenshotter/test.html?m=a", "BinomTest": "http://localhost:7936/test/screenshotter/test.html?m=\\dbinom{a}{b}\\tbinom{a}{b}^{\\binom{a}{b}+17}",