]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathExFunc.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathExFunc.cpp
index 3398e9049addec135e74611d96ed394d5c492e40..9782e25cf3ff2aefdbe56b06d53aa1ca5fdf9cc1 100644 (file)
@@ -44,7 +44,7 @@ Inset * InsetMathExFunc::clone() const
 
 void InsetMathExFunc::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       mathed_string_dim(mi.base.font, name_, dim);
+       metricsStrRedBlack(mi, dim, name_);
 }
 
 
@@ -122,11 +122,21 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathExFunc::mathmlize(MathStream & os) const
+void InsetMathExFunc::mathmlize(MathStream & ms) const
 {
-       ++os.tab(); os.cr(); os.os() << '<' << name_ << '>';
-       os << cell(0);
-       os.cr(); --os.tab(); os.os() << "</" << name_ << '>';
+       ms << "<" << from_ascii(ms.namespacedTag("mi")) << ">"
+          << name_
+       << "</" << from_ascii(ms.namespacedTag("mi")) << ">"
+          << "<" << from_ascii(ms.namespacedTag("mo")) << ">"
+          << "&af;"
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+          << cell(0);
+}
+
+
+void InsetMathExFunc::htmlize(HtmlStream & os) const
+{
+       os << name_ << cell(0);
 }