commit 50c1242147757ea9c965874f2ec0645cd7768fdb
parent 8c179252c576ad571c9e5e0fa2a2aac0b9e7cc5d
Author: Alex Lopatin <alex@khanacademy.org>
Date: Tue, 28 Jan 2014 16:20:14 -0800
Added \! (negative thin space)
Test Plan: Parses and renders locally. \!\, and \,\! are now no-ops.
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D6395
Diffstat:
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Parser.js b/Parser.js
@@ -289,6 +289,7 @@ var copyFuncs = {
"\\nleq"
],
"spacing": [
+ "\\!",
"\\ ",
"\\,",
"\\:",
diff --git 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
@@ -232,6 +232,10 @@ big parens
.mspace {
display: inline-block;
+ &.negativethinspace {
+ margin-left: -@thinspace;
+ }
+
&.thinspace {
width: @thinspace;
}