Pure HTML for math symbols.

I may have to re-do some of the symbols file to make this work properly.
Some of the entities used may have been MathML only.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33942 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-03-30 00:24:54 +00:00
parent b8550d11e8
commit ad49c45475
2 changed files with 21 additions and 3 deletions

View File

@ -186,9 +186,8 @@ char const * MathMLtype(docstring const & s)
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
// FIXME We may need to do more interesting things
// with MathMLtype.
char const * type = MathMLtype(sym_->extra);
os << '<' << type << "> ";
if (sym_->xmlname == "x")
@ -200,6 +199,23 @@ void InsetMathSymbol::mathmlize(MathStream & os) const
}
void InsetMathSymbol::htmlize(HtmlStream & os) const
{
// FIXME We may need to do more interesting things
// with MathMLtype.
char const * type = MathMLtype(sym_->extra);
bool op = (std::string(type) == "mo");
if (sym_->xmlname == "x")
// unknown so far
os << ' ' << name() << ' ';
else if (op)
os << ' ' << sym_->xmlname << ' ';
else
os << sym_->xmlname;
}
void InsetMathSymbol::octave(OctaveStream & os) const
{
if (name() == "cdot")

View File

@ -63,6 +63,8 @@ public:
///
void mathmlize(MathStream &) const;
///
void htmlize(HtmlStream &) const;
///
void octave(OctaveStream &) const;
///
void write(WriteStream & os) const;