If we encounter a macro we don't recognize, then export this bit of math

as an image.

The math macro now exports as XHTML + MathML and can be viewed in
Firefox.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38190 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-04-01 20:15:43 +00:00
parent 0b1fdca0fa
commit 4052facca6

View File

@ -753,13 +753,23 @@ void MathMacro::maple(MapleStream & os) const
void MathMacro::mathmlize(MathStream & os) const void MathMacro::mathmlize(MathStream & os) const
{ {
os << expanded_.cell(0); MathData const & data = expanded_.cell(0);
if (data.empty()) {
// this means that we do not recognize the macro
throw MathExportException();
}
os << data;
} }
void MathMacro::htmlize(HtmlStream & os) const void MathMacro::htmlize(HtmlStream & os) const
{ {
os << expanded_.cell(0); MathData const & data = expanded_.cell(0);
if (data.empty()) {
// this means that we do not recognize the macro
throw MathExportException();
}
os << data;
} }