-void MathSymbolInset::draw(Painter & pain, int x, int y) const
-{
- MathTextCodes Code = code();
- if (sym_->latex_font_id > 0 && math_font_available(Code))
- drawChar(pain, Code, mi_, x, y - h_, sym_->latex_font_id);
- else if (sym_->id > 0 && sym_->id < 255 && math_font_available(LM_TC_SYMB))
- drawChar(pain, code2(), mi_, x, y, sym_->id);
+char const * MathMLtype(string const & s)
+{
+ if (s == "mathop")
+ return "mo";
+ return "mi";
+}
+
+
+bool MathSymbolInset::match(MathInset * p) const
+{
+ MathSymbolInset const * q = p->asSymbolInset();
+ return q && name() == q->name();
+}
+
+
+void MathSymbolInset::mathmlize(MathMLStream & os) const
+{
+ char const * type = MathMLtype(sym_->extra);
+ os << '<' << type << "> ";
+ if (sym_->xmlname == "x") // unknown so far
+ os << name();