]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathStackrel.cpp
Add \makeat switches to babel settings if necessary.
[lyx.git] / src / mathed / InsetMathStackrel.cpp
index 84e2d95191c47da70c73369312afddd78b47d25d..200fde5a358a748f1e63b3c13cee957c6627f4ef 100644 (file)
@@ -11,6 +11,8 @@
 #include <config.h>
 
 #include "InsetMathStackrel.h"
+
+#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 
@@ -74,4 +76,27 @@ void InsetMathStackrel::mathmlize(MathStream & ms) const
        ms << "<mover accent='false'>" << cell(1) << cell(0) << "</mover>";
 }
 
+
+void InsetMathStackrel::htmlize(HtmlStream & os) const
+{
+       // at the moment, this is exactly the same as overset
+       os << MTag("span", "class='overset'")
+                << MTag("span", "class='top'") << cell(0) << ETag("span")
+                << MTag("span") << cell(1) << ETag("span")
+                << ETag("span");
+}
+
+
+void InsetMathStackrel::validate(LaTeXFeatures & features) const
+{
+       // from overset
+       if (features.runparams().math_flavor == OutputParams::MathAsHTML)
+               features.addCSSSnippet(
+                       "span.overset{display: inline-block; vertical-align: bottom; text-align:center;}\n"
+                       "span.overset span {display: block;}\n"
+                       "span.top{font-size: 66%;}");
+
+       InsetMathNest::validate(features);
+}
+
 } // namespace lyx