From 77bd365b391d64684f7faa78b44345ea6da1ff0f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 31 Mar 2010 20:04:39 +0000 Subject: [PATCH] HTML for overset. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33979 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathOverset.cpp | 19 ++++++++++++++++++- src/mathed/InsetMathOverset.h | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/mathed/InsetMathOverset.cpp b/src/mathed/InsetMathOverset.cpp index 6b49dce35c..cf7d6d3feb 100644 --- a/src/mathed/InsetMathOverset.cpp +++ b/src/mathed/InsetMathOverset.cpp @@ -90,9 +90,26 @@ void InsetMathOverset::mathmlize(MathStream & ms) const } +void InsetMathOverset::htmlize(HtmlStream & os) const +{ + os << MTag("span", "class='overset'") + << MTag("span", "class='top'") << cell(0) << ETag("span") + << MTag("span") << cell(1) << ETag("span") + << ETag("span"); +} + + void InsetMathOverset::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/InsetMathOverset.h b/src/mathed/InsetMathOverset.h index 5fdeb32e04..ac055e1dc9 100644 --- a/src/mathed/InsetMathOverset.h +++ b/src/mathed/InsetMathOverset.h @@ -38,6 +38,8 @@ public: /// void mathmlize(MathStream &) const; /// + void htmlize(HtmlStream &) const; + /// void validate(LaTeXFeatures & features) const; /// InsetCode lyxCode() const { return MATH_OVERSET_CODE; } -- 2.39.2