MathML for InsetMathBig.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32685 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-31 04:16:45 +00:00
parent 8a0134cc8c
commit f37a1b8aea
3 changed files with 50 additions and 2 deletions

View File

@ -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

View File

@ -102,6 +102,54 @@ void InsetMathBig::normalize(NormalStream & os) const
}
docstring InsetMathBig::mathmlize(MathStream & os) const
{
os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>";
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 << "&par;";
else if (delim_ == "\\\\" || delim_ == "\\backslash")
os <<" \\";
else if (delim_ == "\\langle")
os << "&lt;";
else if (delim_ == "\\rangle")
os << "&gt;";
else if (delim_ == "\\lceil")
os << "&lceil;";
else if (delim_ == "\\rceil")
os << "&rceil;";
else if (delim_ == "\\lfloor")
os << "&lfloor;";
else if (delim_ == "\\rfloor")
os << "&rfloor;";
else if (delim_ == "\\downarrow")
os << "&darr;";
else if (delim_ == "\\uparrow")
os << "&uarr;";
else if (delim_ == "\\Downarrow")
os << "&dArr;";
else if (delim_ == "\\Uparrow")
os << "&uArr;";
else if (delim_ == "\\updownarrow")
os << "&varr;";
else if (delim_ == "\\Updownarrow")
os << "&vArr;";
os << "</mo>";
return docstring();;
}
void InsetMathBig::infoize2(odocstream & os) const
{
os << name_;

View File

@ -35,6 +35,8 @@ public:
///
void normalize(NormalStream & os) const;
///
docstring mathmlize(MathStream &) const;
///
void infoize2(odocstream & os) const;
///
static bool isBigInsetDelim(docstring const &);