X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathUnderset.cpp;h=0da62f915535cb8a1ed5736b8de67b0a9aeaf994;hb=573500dd04f154f27318ac5ec469a337f97fe9f0;hp=eb0f63b2eb83962320b13b27bcc0c2c7574cc57b;hpb=31713932b247802b5b59482f5157c8a4f7206825;p=lyx.git
diff --git a/src/mathed/InsetMathUnderset.cpp b/src/mathed/InsetMathUnderset.cpp
index eb0f63b2eb..0da62f9155 100644
--- a/src/mathed/InsetMathUnderset.cpp
+++ b/src/mathed/InsetMathUnderset.cpp
@@ -3,7 +3,7 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
@@ -84,9 +84,8 @@ bool InsetMathUnderset::idxUpDown(Cursor & cur, bool up) const
void InsetMathUnderset::write(WriteStream & os) const
{
- bool brace = ensureMath(os);
+ MathEnsurer ensurer(os);
os << "\\underset{" << cell(0) << "}{" << cell(1) << '}';
- os.pendingBrace(brace);
}
@@ -96,9 +95,32 @@ void InsetMathUnderset::normalize(NormalStream & os) const
}
+void InsetMathUnderset::mathmlize(MathStream & ms) const
+{
+ ms << "" << cell(1) << cell(0) << "";
+}
+
+
+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);
}