From 791d28bf0b26aa22baea1d083cdf57f24d746d12 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 31 Dec 2009 21:54:00 +0000 Subject: [PATCH 1/1] MathML for Stackrel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32720 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/HTML/HTML.notes | 3 --- src/mathed/InsetMathStackrel.cpp | 5 +++++ src/mathed/InsetMathStackrel.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index 2db751d81d..f833550eaf 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -57,7 +57,6 @@ Math - Box: There is a general issue here with text mode nesting. See the FIXME attached to the SetMode class. - Lefteqn - - Overset: Use . - Par? - Phantom: There is some support for this in MathML.... - Ref: Needs to be deferred. @@ -66,12 +65,10 @@ Math - Space: Needs checking. - SpecialChar: Needs checking. - Split - - Stackrel: Use , probably. - Substack: This is a stack of however many cells, all in a smaller style. 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. - - Underset: Use . - XArrow: Contents above and below an arrow. Use...? - XYMatrix: Not sure how this differs from ordinary ones. diff --git a/src/mathed/InsetMathStackrel.cpp b/src/mathed/InsetMathStackrel.cpp index 0a934f21d2..84e2d95191 100644 --- a/src/mathed/InsetMathStackrel.cpp +++ b/src/mathed/InsetMathStackrel.cpp @@ -69,4 +69,9 @@ void InsetMathStackrel::normalize(NormalStream & os) const } +void InsetMathStackrel::mathmlize(MathStream & ms) const +{ + ms << "" << cell(1) << cell(0) << ""; +} + } // namespace lyx diff --git a/src/mathed/InsetMathStackrel.h b/src/mathed/InsetMathStackrel.h index 87397f3bbf..707985b4be 100644 --- a/src/mathed/InsetMathStackrel.h +++ b/src/mathed/InsetMathStackrel.h @@ -31,12 +31,13 @@ public: void metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo & pi, int x, int y) const; - /// void write(WriteStream & os) const; /// void normalize(NormalStream &) const; /// + void mathmlize(MathStream &) const; + /// InsetCode lyxCode() const { return MATH_STACKREL_CODE; } private: -- 2.39.5