Reuben D. Budiardja wrote:

> 
> Hello,
> Is there any plan for lyx to implement export to MathML? This would be a
> great feature to put lyx documents (which in most cases have equations)
> for the web.
> 
> RDB

mathed already supports (at least some of) MathML. Try exporting to linuxdoc 
or docbook.

See Extended.lyx (Extended Features in the Help menu)
6.1 Using LyX with SGML-Tools (aka LinuxDoc)

int InsetFormula::linuxdoc(Buffer const * buf, ostream & os) const
{
        return docbook(buf, os, false);
}


int InsetFormula::docbook(Buffer const * buf, ostream & os, bool) const
{
        MathMLStream ms(os);
        ms << MTag("equation");
        ms <<   MTag("alt");
        ms <<    "<[CDATA[";
        int res = ascii(buf, ms.os(), 0);
        ms <<    "]]>";
        ms <<   ETag("alt");
        ms <<   MTag("math");
        ms <<    par_;
        ms <<   ETag("math");
        ms << ETag("equation");
        return ms.line() + res;
}

-- 
Angus

Reply via email to