]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_spaceinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_spaceinset.C
index db2afe0d42cfff630db02037c60330d153f74440..60d759124661e3c15f36f8cfdee42803c1d3d3a3 100644 (file)
@@ -7,6 +7,7 @@
 #include "LColor.h"
 #include "frontends/Painter.h"
 #include "math_mathmlstream.h"
+#include "LaTeXFeatures.h"
 #include "debug.h"
 
 
@@ -27,8 +28,8 @@ MathSpaceInset::MathSpaceInset(int sp)
 MathSpaceInset::MathSpaceInset(string const & name)
        : space_(1)
 {
-       for (int i = 0; i < nSpace; ++i) 
-               if (latex_mathspace[i] == name) 
+       for (int i = 0; i < nSpace; ++i)
+               if (latex_mathspace[i] == name)
                        space_ = i;
 }
 
@@ -85,6 +86,15 @@ void MathSpaceInset::incSpace()
        space_ = (space_ + 1) % (nSpace - 2);
 }
 
+void MathSpaceInset::validate(LaTeXFeatures & features) const
+{
+       if (space_ >= 0 && space_< nSpace) {
+               if ((latex_mathspace[space_] == "negmedspace")
+                || (latex_mathspace[space_] == "negthickspace"))
+                       features.require("amsmath");
+       }
+}
+
 
 void MathSpaceInset::maplize(MapleStream & os) const
 {