From: Richard Heck Date: Thu, 31 Dec 2009 22:02:19 +0000 (+0000) Subject: MathML for XArrow. X-Git-Tag: 2.0.0~4632 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ab1f7c3fc575989cd0cc3b558729f3c66bb6d9aa;p=lyx.git MathML for XArrow. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32721 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index f833550eaf..1f484b7f3f 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -69,7 +69,6 @@ Math Probably do something with , again. - Tabular: This is more or less a text-like table in math. Probably output it as a table, but set the font. - - XArrow: Contents above and below an arrow. Use...? - XYMatrix: Not sure how this differs from ordinary ones. diff --git a/src/mathed/InsetMathXArrow.cpp b/src/mathed/InsetMathXArrow.cpp index d9579ba5cf..54d7356381 100644 --- a/src/mathed/InsetMathXArrow.cpp +++ b/src/mathed/InsetMathXArrow.cpp @@ -76,6 +76,16 @@ void InsetMathXArrow::normalize(NormalStream & os) const } +void InsetMathXArrow::mathmlize(MathStream & ms) const +{ + char const * const arrow = name_ == "xleftarrow" + ? "←" : "→"; + ms << "" + << arrow << cell(1) << cell(0) + << ""; +} + + void InsetMathXArrow::validate(LaTeXFeatures & features) const { features.require("amsmath"); diff --git a/src/mathed/InsetMathXArrow.h b/src/mathed/InsetMathXArrow.h index 469bec1d0b..ac6eaae0f9 100644 --- a/src/mathed/InsetMathXArrow.h +++ b/src/mathed/InsetMathXArrow.h @@ -32,6 +32,8 @@ public: /// void normalize(NormalStream & os) const; /// + void mathmlize(MathStream &) const; + /// void validate(LaTeXFeatures & features) const; /// InsetCode lyxCode() const { return MATH_XARROW_CODE; }