From: Richard Heck Date: Wed, 31 Mar 2010 20:54:27 +0000 (+0000) Subject: HTML for stackrel. X-Git-Tag: 2.0.0~3591 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bab268352b1fe88a50129d10adca7f957fc65afe;p=features.git HTML for stackrel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33989 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathStackrel.cpp b/src/mathed/InsetMathStackrel.cpp index 84e2d95191..a7cb00b322 100644 --- a/src/mathed/InsetMathStackrel.cpp +++ b/src/mathed/InsetMathStackrel.cpp @@ -11,6 +11,8 @@ #include #include "InsetMathStackrel.h" + +#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" @@ -74,4 +76,28 @@ void InsetMathStackrel::mathmlize(MathStream & ms) const ms << "" << cell(1) << cell(0) << ""; } + +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.addPreambleSnippet(""); + + InsetMathNest::validate(features); +} + } // namespace lyx diff --git a/src/mathed/InsetMathStackrel.h b/src/mathed/InsetMathStackrel.h index 88f0800713..11160c37ef 100644 --- a/src/mathed/InsetMathStackrel.h +++ b/src/mathed/InsetMathStackrel.h @@ -32,6 +32,10 @@ public: /// void mathmlize(MathStream &) const; /// + void htmlize(HtmlStream &) const; + /// + void validate(LaTeXFeatures &) const; + /// InsetCode lyxCode() const { return MATH_STACKREL_CODE; } private: