From ab1f7c3fc575989cd0cc3b558729f3c66bb6d9aa Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 31 Dec 2009 22:02:19 +0000 Subject: [PATCH] MathML for XArrow. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32721 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/HTML/HTML.notes | 1 - src/mathed/InsetMathXArrow.cpp | 10 ++++++++++ src/mathed/InsetMathXArrow.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) 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; } -- 2.39.2