]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNumber.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathNumber.cpp
index c9ae470decf9dcdd690936270dfa9002517722e0..5a35415786988fc0bbfcc06f9c4387784124775f 100644 (file)
@@ -15,6 +15,8 @@
 #include "MathStream.h"
 #include "MathSupport.h"
 
+#include "MetricsInfo.h"
+
 using namespace std;
 
 
@@ -67,12 +69,17 @@ void InsetMathNumber::octave(OctaveStream & os) const
 }
 
 
-void InsetMathNumber::mathmlize(MathStream & os) const
+void InsetMathNumber::mathmlize(MathStream & ms) const
+{
+       ms << "<" << from_ascii(ms.namespacedTag("mn")) << ">"
+          << str_
+          << "</" << from_ascii(ms.namespacedTag("mn")) << ">";
+}
+
+
+void InsetMathNumber::htmlize(HtmlStream & os) const
 {
-       if (os.inText())
-               os << str_;
-       else
-               os << "<mn>" << str_ << "</mn>";
+       os << str_;
 }