commit ba84964d6fbe342b70a631dd0a31c43d3752b7bd
parent a3663ce17c775987891c585f2ec4f518e166e6a4
Author: Alex Lopatin <alex@khanacademy.org>
Date: Wed, 29 Jan 2014 18:14:12 -0800
Add \enspace (0.5em space)
Summary:
TeX spacing is complicated - there's \enskip and \enspace and the two are
subtly different in some weird way. But \enspace seems to be the preferred
half em space in LaTeX, and the only one which MathJax supports.
Test Plan: Parsed and rendered correctly.
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D6437
Diffstat:
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Parser.js b/Parser.js
@@ -294,6 +294,7 @@ var copyFuncs = {
"\\,",
"\\:",
"\\;",
+ "\\enspace",
"\\qquad",
"\\quad",
"\\space"
diff --git a/buildTree.js b/buildTree.js
@@ -285,6 +285,7 @@ var groupTypes = {
var spacingClassMap = {
"\\qquad": "qquad",
"\\quad": "quad",
+ "\\enspace": "enspace",
"\\;": "thickspace",
"\\:": "mediumspace",
"\\,": "thinspace",
diff --git a/static/katex.less b/static/katex.less
@@ -248,6 +248,10 @@ big parens
width: @thickspace;
}
+ &.enspace {
+ width: 0.5em;
+ }
+
&.quad {
width: 1em;
}