X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSize.cpp;h=a638f43851d368fbdfde456c37edda9185b57c0c;hb=f67cf6f4bb3e3d22ac9aebfa22027c3537cbdf61;hp=e038c7a8f5abda8a2a8d7728325caddcd81eb093;hpb=1d6923b65ba0ef94b627fda9e968fff7f37666c1;p=lyx.git diff --git a/src/mathed/InsetMathSize.cpp b/src/mathed/InsetMathSize.cpp index e038c7a8f5..a638f43851 100644 --- a/src/mathed/InsetMathSize.cpp +++ b/src/mathed/InsetMathSize.cpp @@ -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