diff --git a/Parser.js b/Parser.js index ff4798707..fdce97e2e 100644 --- a/Parser.js +++ b/Parser.js @@ -289,6 +289,7 @@ var copyFuncs = { "\\nleq" ], "spacing": [ + "\\!", "\\ ", "\\,", "\\:", diff --git a/buildTree.js b/buildTree.js index 42d9587b1..e05bd70cb 100644 --- a/buildTree.js +++ b/buildTree.js @@ -287,7 +287,8 @@ var groupTypes = { "\\quad": "quad", "\\;": "thickspace", "\\:": "mediumspace", - "\\,": "thinspace" + "\\,": "thinspace", + "\\!": "negativethinspace" }; return makeSpan(["mord", "mspace", spacingClassMap[group.value]]); diff --git a/static/katex.less b/static/katex.less index 03ad4cafd..fa2489c4d 100644 --- a/static/katex.less +++ b/static/katex.less @@ -232,6 +232,10 @@ big parens .mspace { display: inline-block; + &.negativethinspace { + margin-left: -@thinspace; + } + &.thinspace { width: @thinspace; }