Little bit of fixup for math symbols.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31983 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-11-14 16:21:33 +00:00
parent 487053deb8
commit 886304a588

View File

@ -175,19 +175,24 @@ void InsetMathSymbol::mathematica(MathematicaStream & os) const
} }
// FIXME This will likely need some work.
char const * MathMLtype(docstring const & s) char const * MathMLtype(docstring const & s)
{ {
if (s == "mathop") if (s == "mathord")
return "mo"; return "mi";
return "mi"; return "mo";
} }
void InsetMathSymbol::mathmlize(MathStream & os) const void InsetMathSymbol::mathmlize(MathStream & os) const
{ {
// FIXME To get this working properly, we need to do add the
// XML entity definitions to lib/symbols. And probably do more
// interesting things with MathMLtype
char const * type = MathMLtype(sym_->extra); char const * type = MathMLtype(sym_->extra);
os << '<' << type << "> "; os << '<' << type << "> ";
if (sym_->xmlname == "x") // unknown so far if (sym_->xmlname == "x")
// unknown so far
os << name(); os << name();
else else
os << sym_->xmlname; os << sym_->xmlname;