From: Richard Heck Date: Wed, 31 Mar 2010 21:17:30 +0000 (+0000) Subject: HTML for substack. Sort of. There's an odd problem here, that is X-Git-Tag: 2.0.0~3589 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6a702a2f99af4308973fb5b088db6edcc49fbe90;p=features.git HTML for substack. Sort of. There's an odd problem here, that is actually a general LyX bug, but I'll report that to the list. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33991 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathSubstack.cpp b/src/mathed/InsetMathSubstack.cpp index 544230a659..5f7e9f644b 100644 --- a/src/mathed/InsetMathSubstack.cpp +++ b/src/mathed/InsetMathSubstack.cpp @@ -118,9 +118,25 @@ void InsetMathSubstack::maple(MapleStream & os) const } +void InsetMathSubstack::htmlize(HtmlStream & os) const +{ + os << MTag("span", "class='substack'"); + for (row_type row = 0; row < nrows(); ++row) + os << MTag("span") << cell(index(row, 0)) << ETag("span"); + os << ETag("span"); +} + + void InsetMathSubstack::validate(LaTeXFeatures & features) const { - features.require("amsmath"); + if (features.runparams().isLaTeX()) + features.require("amsmath"); + else if (features.runparams().math_flavor == OutputParams::MathAsHTML) + features.addPreambleSnippet(""); + InsetMathGrid::validate(features); } diff --git a/src/mathed/InsetMathSubstack.h b/src/mathed/InsetMathSubstack.h index fbf5f756cc..612187ae89 100644 --- a/src/mathed/InsetMathSubstack.h +++ b/src/mathed/InsetMathSubstack.h @@ -39,11 +39,13 @@ public: /// void write(WriteStream & os) const; /// + void htmlize(HtmlStream &) const; + /// void normalize(NormalStream &) const; /// void maple(MapleStream &) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures &) const; /// InsetCode lyxCode() const { return MATH_SUBSTACK_CODE; }