#include <config.h>
#include "InsetMathRoot.h"
+
+#include "LaTeXFeatures.h"
#include "MathData.h"
#include "MathStream.h"
#include "Cursor.h"
}
+void InsetMathRoot::htmlize(HtmlStream & os) const
+{
+ os << MTag("span", "class='root'")
+ << MTag("sup") << cell(0) << ETag("sup")
+ << from_ascii("√")
+ << MTag("span", "class='rootof'") << cell(1) << ETag("span")
+ << ETag("span");
+}
+
+
+void InsetMathRoot::validate(LaTeXFeatures & features) const
+{
+ if (features.runparams().math_flavor == OutputParams::MathAsHTML)
+ features.addPreambleSnippet("<style type=\"text/css\">\n"
+ "span.rootof{border-top: thin solid black;}\n"
+ "span.root sup{font-size: 75%;}\n"
+ "</style>");
+}
+
} // namespace lyx
///
void mathmlize(MathStream &) const;
///
+ void htmlize(HtmlStream &) const;
+ ///
void maple(MapleStream &) const;
///
void mathematica(MathematicaStream &) const;
void octave(OctaveStream &) const;
///
InsetCode lyxCode() const { return MATH_ROOT_CODE; }
+ ///
+ void validate(LaTeXFeatures &) const;
private:
virtual Inset * clone() const;
#include <config.h>
#include "InsetMathSqrt.h"
+
+#include "LaTeXFeatures.h"
#include "MathData.h"
#include "MathStream.h"
#include "TextPainter.h"
}
+void InsetMathSqrt::htmlize(HtmlStream & os) const
+{
+ os << MTag("span", "class='sqrt'")
+ << from_ascii("√")
+ << MTag("span", "class='sqrtof'") << cell(0) << ETag("span")
+ << ETag("span");
+}
+
+
+void InsetMathSqrt::validate(LaTeXFeatures & features) const
+{
+ if (features.runparams().math_flavor == OutputParams::MathAsHTML)
+ features.addPreambleSnippet("<style type=\"text/css\">\n"
+ "span.sqrtof{border-top: thin solid black;}\n"
+ "</style>");
+}
+
} // namespace lyx
///
void mathmlize(MathStream &) const;
///
+ void htmlize(HtmlStream &) const;
+ ///
InsetCode lyxCode() const { return MATH_SQRT_CODE; }
+ ///
+ void validate(LaTeXFeatures &) const;
private:
virtual Inset * clone() const;