]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSize.cpp
Add support for stmaryrd.sty (bug #8434)
[lyx.git] / src / mathed / InsetMathSize.cpp
index e038c7a8f5abda8a2a8d7728325caddcd81eb093..a638f43851d368fbdfde456c37edda9185b57c0c 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "InsetMathSize.h"
 
+#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathParser.h"
 #include "MathStream.h"
@@ -84,6 +85,14 @@ void InsetMathSize::mathmlize(MathStream & ms) const
 }
 
 
+void InsetMathSize::htmlize(HtmlStream & os) const
+{
+       string const & name = to_utf8(key_->name);
+       os <<   MTag("span", "class='" + name + "'")
+                       << cell(0) << ETag("span");
+}
+
+
 void InsetMathSize::normalize(NormalStream & os) const
 {
        os << '[' << key_->name << ' ' << cell(0) << ']';
@@ -96,4 +105,14 @@ void InsetMathSize::infoize(odocstream & os) const
 }
 
 
+void InsetMathSize::validate(LaTeXFeatures & features) const
+{
+       if (features.runparams().math_flavor == OutputParams::MathAsHTML)
+               features.addCSSSnippet(
+                       "span.displaystyle, span.textstyle{font-size: normal;}\n"
+                       "span.scriptstyle {font-size: small;}\n"
+                       "span.scriptscriptstyle {font-size: x-small;}");
+       InsetMathNest::validate(features);
+}
+
 } // namespace lyx