From f37a1b8aeaf8f3a3a66a22bf0b396f7d1ceca2ff Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 31 Dec 2009 04:16:45 +0000 Subject: [PATCH] MathML for InsetMathBig. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32685 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/HTML/HTML.notes | 2 -- src/mathed/InsetMathBig.cpp | 48 +++++++++++++++++++++++++++++++++++++ src/mathed/InsetMathBig.h | 2 ++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index b9750e3043..21beba0e91 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -54,8 +54,6 @@ Math isues, and not all the insets work. Here are the ones I know still need work: - AMSArray - Array - - Big: Not sure if we can actually do anything here. Probably they should - just be treated as delimiters. - BoldSymbol: Should be easy. - Box - Cases diff --git a/src/mathed/InsetMathBig.cpp b/src/mathed/InsetMathBig.cpp index a707ab10e4..128cade0d6 100644 --- a/src/mathed/InsetMathBig.cpp +++ b/src/mathed/InsetMathBig.cpp @@ -102,6 +102,54 @@ void InsetMathBig::normalize(NormalStream & os) const } +docstring InsetMathBig::mathmlize(MathStream & os) const +{ + os << ""; + if (delim_ == "(" || delim_ == ")" + || delim_ == "[" || delim_ == "]" + || delim_ == "|" || delim_ == "/") + os << delim_; + else if (delim_ == "\\{" || delim_ == "\\lbrace") + os << "{"; + else if (delim_ == "\\}" || delim_ == "\\rbrace") + os << "}"; + else if (delim_ == "\\slash") + os << "/"; + else if (delim_ == "\\|" || delim_ == "\\vert") + os << "|"; + else if (delim_ == "\\Vert") + os << "∥"; + else if (delim_ == "\\\\" || delim_ == "\\backslash") + os <<" \\"; + else if (delim_ == "\\langle") + os << "<"; + else if (delim_ == "\\rangle") + os << ">"; + else if (delim_ == "\\lceil") + os << "⌈"; + else if (delim_ == "\\rceil") + os << "⌉"; + else if (delim_ == "\\lfloor") + os << "⌊"; + else if (delim_ == "\\rfloor") + os << "⌋"; + else if (delim_ == "\\downarrow") + os << "↓"; + else if (delim_ == "\\uparrow") + os << "↑"; + else if (delim_ == "\\Downarrow") + os << "⇓"; + else if (delim_ == "\\Uparrow") + os << "⇑"; + else if (delim_ == "\\updownarrow") + os << "↕"; + else if (delim_ == "\\Updownarrow") + os << "⇕"; + os << ""; + return docstring();; +} + + void InsetMathBig::infoize2(odocstream & os) const { os << name_; diff --git a/src/mathed/InsetMathBig.h b/src/mathed/InsetMathBig.h index 58880dc867..8049b9460a 100644 --- a/src/mathed/InsetMathBig.h +++ b/src/mathed/InsetMathBig.h @@ -35,6 +35,8 @@ public: /// void normalize(NormalStream & os) const; /// + docstring mathmlize(MathStream &) const; + /// void infoize2(odocstream & os) const; /// static bool isBigInsetDelim(docstring const &);