diff --git a/src/mathed/InsetMathUnderset.cpp b/src/mathed/InsetMathUnderset.cpp index a447cac7f7..0da62f9155 100644 --- a/src/mathed/InsetMathUnderset.cpp +++ b/src/mathed/InsetMathUnderset.cpp @@ -101,9 +101,26 @@ void InsetMathUnderset::mathmlize(MathStream & ms) const } +void InsetMathUnderset::htmlize(HtmlStream & os) const +{ + os << MTag("span", "class='underset'") + << MTag("span") << cell(0) << ETag("span") + << MTag("span", "class='bottom'") << cell(1) << ETag("span") + << ETag("span"); +} + + void InsetMathUnderset::validate(LaTeXFeatures & features) const { - features.require("amsmath"); + if (features.runparams().isLaTeX()) + features.require("amsmath"); + else if (features.runparams().math_flavor == OutputParams::MathAsHTML) + features.addPreambleSnippet(""); + InsetMathNest::validate(features); } diff --git a/src/mathed/InsetMathUnderset.h b/src/mathed/InsetMathUnderset.h index c2af955ba2..239a576aeb 100644 --- a/src/mathed/InsetMathUnderset.h +++ b/src/mathed/InsetMathUnderset.h @@ -40,6 +40,8 @@ public: /// void mathmlize(MathStream &) const; /// + void htmlize(HtmlStream &) const; + /// void validate(LaTeXFeatures & features) const; /// InsetCode lyxCode() const { return MATH_UNDERSET_CODE; }