diff --git a/src/buildMathML.js b/src/buildMathML.js index cd29c2748..3fb89b047 100644 --- a/src/buildMathML.js +++ b/src/buildMathML.js @@ -265,7 +265,7 @@ var groupTypes = { // TODO(emily): Add a space in the middle of some of these // operators, like \limsup. node = new mathMLTree.MathNode( - "mo", [new mathMLTree.TextNode(group.value.body.slice(1))]); + "mi", [new mathMLTree.TextNode(group.value.body.slice(1))]); } return node; diff --git a/test/katex-spec.js b/test/katex-spec.js index 1b531d52d..6aab20d7d 100644 --- a/test/katex-spec.js +++ b/test/katex-spec.js @@ -1214,5 +1214,8 @@ describe("A MathML builder", function() { var text = getMathML("\\text{a}").children[0].children[0]; expect(text.children[0].type).toEqual("mtext"); + + var textop = getMathML("\\sin").children[0].children[0]; + expect(textop.children[0].type).toEqual("mi"); }); });