From: Richard Heck Date: Wed, 31 Mar 2010 20:12:52 +0000 (+0000) Subject: HTML for underset. X-Git-Tag: 2.0.0~3598 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=36e2a2c95f3757fff6a734bad18b05f2e8d10eb1;p=features.git HTML for underset. Neither underset nor overset will work reliably, I'm afraid, but such is the price of using HTML rather than MathML. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33982 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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; }