Math
We have a fair bit of math now working via MathML output, but there are still some
isues, and not all the insets work. Here are the ones I know still need work:
- - AMSArray
- - Array
- - Big: Not sure if we can actually do anything here. Probably they should
- just be treated as delimiters.
- - BoldSymbol: Should be easy.
- - Box
- - Cases
- - Diff: Code exists, but I do not know if it is right.
- - Font
- - Binom (in Frac): None of these tags exist in MathML 2.0. We'll
- just output a fraction with delimiters.
- - Lefteqn
- - MBox: Use <mtext>.
- - Overset: Use <mover>.
- - Par?
- - Phantom: There is some support for this in MathML....
- - Ref: Probably needs to be deferred somehow, which is a hassle, because it
- means the whole MathML output business needs a new argument.
- - Size: Unclear if we want to do anything here, though we could. See
- lib/symbols for the commands supported, of course.
- - Space: Needs checking.
- - SpecialChar: Needs checking.
- - Split
- - Stackrel: Use <mover>, probably.
- - Substack: This is a stack of however many cells, all in a smaller style.
- Probably do something with <mover>, again.
- - Tabular: This is more or less a text-like table in math. Probably output it
- as a table, but set the font.
- - Underset: Use <munder>.
- - XArrow: Contents above and below an arrow. Use...?
- - XYMatrix: Not sure how this differs from ordinary ones.
+ - AMSArray
+ - Array
+ - Big: Not sure if we can actually do anything here. Probably they should
+ just be treated as delimiters.
+ - BoldSymbol: Should be easy.
+ - Box
+ - Cases
+ - Diff: Code exists, but I do not know if it is right.
+ - Font
+ - Binom (in Frac): None of these tags exist in MathML 2.0. We'll
+ just output a fraction with delimiters.
+ - Lefteqn
+ - MBox: Use <mtext>.
+ - Overset: Use <mover>.
+ - Par?
+ - Phantom: There is some support for this in MathML....
+ - Ref: Needs to be deferred.
+ - Size: Unclear if we want to do anything here, though we could. See
+ lib/symbols for the commands supported, of course.
+ - Space: Needs checking.
+ - SpecialChar: Needs checking.
+ - Split
+ - Stackrel: Use <mover>, probably.
+ - Substack: This is a stack of however many cells, all in a smaller style.
+ Probably do something with <mover>, again.
+ - Tabular: This is more or less a text-like table in math. Probably output it
+ as a table, but set the font.
+ - Underset: Use <munder>.
+ - XArrow: Contents above and below an arrow. Use...?
+ - XYMatrix: Not sure how this differs from ordinary ones.
These insets do not work and are not yet scheduled to work:
}
-void InsetMath::mathmlize(MathStream & os) const
+docstring InsetMath::mathmlize(MathStream & os) const
{
os << MTag("mi");
NormalStream ns(os.os());
normalize(ns);
os << ETag("mi");
+ return docstring();
}
/// write content as something readable by Mathematica
virtual void mathematica(MathematicaStream &) const;
/// write content as something resembling MathML
- virtual void mathmlize(MathStream &) const;
+ virtual docstring mathmlize(MathStream &) const;
/// write content as something readable by Octave
virtual void octave(OctaveStream &) const;
}
-void InsetMathBox::mathmlize(MathStream & ms) const
+docstring InsetMathBox::mathmlize(MathStream & ms) const
{
// FIXME This doesn't actually work yet. We need to be able to signal
// that we are in text mode and then just call ms << cell(0). So we
ms << MTag("mtext");
ms.os() << cell(0);
ms << ETag("mtext");
+ return docstring();
}
///
void normalize(NormalStream & ns) const;
///
- void mathmlize(MathStream & ms) const;
+ docstring mathmlize(MathStream & ms) const;
///
void infoize(odocstream & os) const;
///
/// write normalized content
void normalize(NormalStream & ns) const;
///
- //void mathmlize(MathStream & ms) const;
+ //docstring mathmlize(MathStream & ms) const;
///
void infoize(odocstream & os) const;
private:
/// write normalized content
void normalize(NormalStream & ns) const;
///
- //void mathmlize(MathStream & ms) const;
+ //docstring mathmlize(MathStream & ms) const;
///
mode_type currentMode() const { return TEXT_MODE; }
///
///
void write(WriteStream & os) const;
///
- //void mathmlize(MathStream & ms) const;
+ //docstring mathmlize(MathStream & ms) const;
/// write normalized content
void normalize(NormalStream & ns) const;
///
#include "InsetMathBrace.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathSupport.h"
#include "MetricsInfo.h"
}
-void InsetMathBrace::mathmlize(MathStream & os) const
+docstring InsetMathBrace::mathmlize(MathStream & os) const
{
- os << MTag("mrow") << cell(0) << ETag("mrow");
+ os << MTag("mrow");
+ docstring const rv = lyx::mathmlize(cell(0), os);
+ os << ETag("mrow");
+ return rv;
}
///
void octave(OctaveStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void infoize(odocstream & os) const;
///
// mathalpha, then we'll treat it as an identifier, otherwise as an
// operator.
// Worst case: We get bad spacing, or bad italics.
-void InsetMathChar::mathmlize(MathStream & ms) const
+docstring InsetMathChar::mathmlize(MathStream & ms) const
{
switch (char_) {
- case '<': ms << "<mo><</mo>"; return;
- case '>': ms << "<mo>></mo>"; return;
- case '&': ms << "<mo>&</mo>"; return;
+ case '<': ms << "<mo><</mo>"; return docstring();
+ case '>': ms << "<mo>></mo>"; return docstring();
+ case '&': ms << "<mo>&</mo>"; return docstring();
default: break;
}
? "mi" : "mo";
// we don't use MTag and ETag because we do not want the spacing
ms << "<" << type << ">" << char(char_) << "</" << type << ">";
+ return docstring();
}
///
void octave(OctaveStream & os) const;
///
- void mathmlize(MathStream & ms) const;
+ docstring mathmlize(MathStream & ms) const;
/// identifies Charinsets
InsetMathChar const * asCharInset() const { return this; }
///
{}
-void InsetMathComment::mathmlize(MathStream & os) const
+docstring InsetMathComment::mathmlize(MathStream & os) const
{
os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
+ return docstring();
}
///
void octave(OctaveStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void infoize(odocstream & os) const;
///
#include "InsetMathDecoration.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathParser.h"
#include "MathSupport.h"
#include "MathStream.h"
}
}
-void InsetMathDecoration::mathmlize(MathStream & os) const
+docstring InsetMathDecoration::mathmlize(MathStream & os) const
{
Translator const & t = translator();
Translator::const_iterator cur = t.find(to_utf8(key_->name));
- LASSERT(cur != t.end(), return);
+ LASSERT(cur != t.end(), return docstring());
char const * const outag = cur->second.over ? "mover" : "munder";
- os << MTag(outag)
- << MTag("mrow") << cell(0) << ETag("mrow")
+ os << MTag(outag) << MTag("mrow");
+ docstring const rv = lyx::mathmlize(cell(0), os);
+ os << ETag("mrow")
<< from_ascii("<mo stretchy=\"true\">" + cur->second.tag + "</mo>")
<< ETag(outag);
+ return rv;
}
///
InsetCode lyxCode() const { return MATH_DECORATION_CODE; }
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
private:
virtual Inset * clone() const;
#include "InsetMathDelim.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathSupport.h"
#include "MetricsInfo.h"
}
-void InsetMathDelim::mathmlize(MathStream & os) const
+docstring InsetMathDelim::mathmlize(MathStream & os) const
{
- os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>" << left_ << "</mo>"
- << cell(0) << "<mo form='postfix' fence='true' stretchy='true' symmetric='true'>" << right_ << "</mo>";
+ os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>" << left_ << "</mo>";
+ docstring const rv = lyx::mathmlize(cell(0),os);
+ os << "<mo form='postfix' fence='true' stretchy='true' symmetric='true'>" << right_ << "</mo>";
+ return rv;
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///
#include "InsetMathDiff.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "support/debug.h"
}
-void InsetMathDiff::mathmlize(MathStream & os) const
+docstring InsetMathDiff::mathmlize(MathStream & os) const
{
os << "diff(";
+ docstring rv;
for (idx_type idx = 0; idx < nargs(); ++idx) {
if (idx != 0)
os << ',';
- os << cell(idx);
+ rv += lyx::mathmlize(cell(idx), os);
}
os << ')';
+ return rv;
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void maxima(MaximaStream &) const;
///
}
-void InsetMathDots::mathmlize(MathStream & os) const
+docstring InsetMathDots::mathmlize(MathStream & os) const
{
// which symbols we support is decided by what is listed in
// lib/symbols as generating a dots inset
else
LASSERT(false, ent = "…");
os << MTag("mi") << from_ascii(ent) << ETag("mi");
+ return docstring();
}
} // namespace lyx
///
InsetCode lyxCode() const { return MATH_DOTS_CODE; }
///
- void mathmlize(MathStream & os) const;
+ docstring mathmlize(MathStream & os) const;
protected:
/// cache for the thing's height
mutable int dh_;
#include "InsetMathEnsureMath.h"
-#include "MathStream.h"
+#include "MathExtern.h"
#include "MathData.h"
+#include "MathStream.h"
#include <ostream>
}
-void InsetMathEnsureMath::mathmlize(MathStream & os) const
+docstring InsetMathEnsureMath::mathmlize(MathStream & os) const
{
- os << cell(0);
+ return lyx::mathmlize(cell(0), os);
}
///
void write(WriteStream & os) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void infoize(odocstream & os) const;
///
#include "InsetMathExFunc.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathSupport.h"
#include "MetricsInfo.h"
}
-void InsetMathExFunc::mathmlize(MathStream & os) const
+docstring InsetMathExFunc::mathmlize(MathStream & os) const
{
os << "<mi>" << name_ << "</mi><mo>⁡</mo>";
- os << cell(0);
+ return lyx::mathmlize(cell(0), os);
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///
#include "InsetMathExInt.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathStream.h"
#include "InsetMathSymbol.h"
}
-void InsetMathExInt::mathmlize(MathStream & os) const
+docstring InsetMathExInt::mathmlize(MathStream & os) const
{
// At the moment, we are not extracting sums and the like for MathML.
// If we should decide to do so later, then we'll need to re-merge
os << ETag("msub");
else if (upper)
os << ETag("msup");
- os << cell(0) << "<mo> ⁢ </mo>"
+ docstring rv = lyx::mathmlize(cell(0), os);
+ os << "<mo> ⁢ </mo>"
<< MTag("mrow") << "<mo> ⅆ </mo>"
<< cell(1) << ETag("mrow");
+ return rv;
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void write(WriteStream & os) const;
///
#include "Cursor.h"
#include "LaTeXFeatures.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathSupport.h"
#include "MetricsInfo.h"
}
-void InsetMathFrac::mathmlize(MathStream & os) const
+docstring InsetMathFrac::mathmlize(MathStream & os) const
{
- os << MTag("mfrac")
- << MTag("mrow") << cell(0) << ETag("mrow")
- << MTag("mrow") << cell(1) << ETag("mrow")
- << ETag("mfrac");
+ os << MTag("mfrac") << MTag("mrow");
+ docstring rv = lyx::mathmlize(cell(0), os);
+ os << ETag("mrow") << MTag("mrow");
+ rv += lyx::mathmlize(cell(1), os);
+ os << ETag("mrow") << ETag("mfrac");
+ return rv;
}
}
-void InsetMathBinom::mathmlize(MathStream & os) const
+docstring InsetMathBinom::mathmlize(MathStream & os) const
{
+ // FIXME This all needs fixing
switch (kind_) {
case BINOM:
os << MTag("mbinom") << cell(0) << cell(1) << ETag("mbinom");
os << MTag("mdbinom") << cell(0) << cell(1) << ETag("mdbinom");
break;
}
+ return docstring();
}
///
void octave(OctaveStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void validate(LaTeXFeatures & features) const;
public:
///
bool extraBraces() const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void validate(LaTeXFeatures & features) const;
///
#include "InsetMathGrid.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathParser.h"
#include "MathStream.h"
#include "MetricsInfo.h"
}
-void InsetMathGrid::mathmlize(MathStream & os) const
+docstring InsetMathGrid::mathmlize(MathStream & os) const
{
bool const havetable = nrows() > 1;
if (havetable)
os << MTag("mtable");
+ docstring rv;
for (row_type row = 0; row < nrows(); ++row) {
os << MTag("mrow");
for (col_type col = 0; col < ncols(); ++col)
- os << cell(index(row, col));
+ rv += lyx::mathmlize(cell(index(row, col)), os);
os << ETag("mrow");
}
if (havetable)
os << ETag("mtable");
+ return rv;
}
///
//void maple(MapleStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
//void octave(OctaveStream &) const;
}
-void InsetMathHull::mathmlize(MathStream & os) const
+docstring InsetMathHull::mathmlize(MathStream & os) const
{
- InsetMathGrid::mathmlize(os);
+ return InsetMathGrid::mathmlize(os);
}
xs << StartTag("math",
"display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
MathStream ms(xs.os());
- InsetMathGrid::mathmlize(ms);
+ docstring const rv = InsetMathGrid::mathmlize(ms);
xs << EndTag("math");
- return docstring();
+ return rv;
}
///
void write(WriteStream & os) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void normalize(NormalStream &) const;
///
}
+docstring InsetMathKern::mathmlize(MathStream &) const
+{
+ return docstring();
+}
+
+
} // namespace lyx
///
void normalize(NormalStream & ns) const;
///
- void mathmlize(MathStream &) const { }
+ docstring mathmlize(MathStream &) const;
///
InsetCode lyxCode() const { return MATH_KERN_CODE; }
#include "InsetMathLim.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "support/debug.h"
}
-void InsetMathLim::mathmlize(MathStream & os) const
+docstring InsetMathLim::mathmlize(MathStream & os) const
{
// FIXME XHTML We need a form of MTag that takes attributes.
os << "<munder>"
<< "<mo form='prefix'>" << "lim" << "</mo>"
- << "<mrow>" << cell(1) << "<mo>→</mo>" << cell(2) << "</mrow></munder>"
- << "<mo>(</mo>" << cell(0) << "<mo>)</mo>" ;
+ << "<mrow>" << cell(1) << "<mo>→</mo>" << cell(2)
+ << "</mrow></munder>" << "<mo>(</mo>";
+ docstring const rv = lyx::mathmlize(cell(0), os);
+ os << "<mo>)</mo>";
+ return rv;
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void write(WriteStream & os) const;
///
#include "InsetMathMatrix.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
}
-void InsetMathMatrix::mathmlize(MathStream & os) const
+docstring InsetMathMatrix::mathmlize(MathStream & os) const
{
os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
<< left_ << "</mo>";
os << MTag("mtable");
+ docstring rv;
for (row_type row = 0; row < nrows(); ++row) {
os << MTag("mtr");
- for (col_type col = 0; col < ncols(); ++col)
- os << MTag("mtd") << cell(index(row, col)) << ETag("mtd");
+ for (col_type col = 0; col < ncols(); ++col) {
+ os << MTag("mtd");
+ rv += lyx::mathmlize(cell(index(row, col)), os);
+ os << ETag("mtd");
+ }
os << ETag("mtr");
}
os << ETag("mtable");
os << "<mo form='postfix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
<< right_ << "</mo>";
+ return rv;
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///
}
-void InsetMathNumber::mathmlize(MathStream & os) const
+docstring InsetMathNumber::mathmlize(MathStream & os) const
{
os << "<mn> " << str_ << " </mn>";
+ return docstring();
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void write(WriteStream & os) const;
///
#include "InsetMathRoot.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "Cursor.h"
}
-void InsetMathRoot::mathmlize(MathStream & os) const
+docstring InsetMathRoot::mathmlize(MathStream & os) const
{
- os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
+ os << MTag("mroot");
+ docstring rv = lyx::mathmlize(cell(1), os);
+ rv += lyx::mathmlize(cell(0), os);
+ os << ETag("mroot");
+ return rv;
}
///
void normalize(NormalStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void maple(MapleStream &) const;
///
#include "InsetMathScript.h"
#include "InsetMathSymbol.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "MathSupport.h"
// It may be worth trying to output munder, mover, and munderover
// in certain cases, e.g., for display formulas. But then we would
// need to know if we're in a display formula.
-void InsetMathScript::mathmlize(MathStream & os) const
+docstring InsetMathScript::mathmlize(MathStream & os) const
{
bool d = hasDown() && down().size();
bool u = hasUp() && up().size();
else if (d)
os << MTag("msub");
- if (nuc().size())
- os << MTag("mrow") << nuc() << ETag("mrow");
- else
+ docstring rv;
+ if (nuc().size()) {
+ os << MTag("mrow");
+ rv = lyx::mathmlize(nuc(), os);
+ os << ETag("mrow");
+ } else
os << "<mrow />";
if (u && d)
os << MTag("mrow") << up() << ETag("mrow") << ETag("msup");
else if (d)
os << MTag("mrow") << down() << ETag("mrow") << ETag("msub");
+ return rv;
}
/// write content as something readable by Mathematica
void mathematica(MathematicaStream &) const;
/// write content as something resembling MathML
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
/// write content as something readable by Octave
void octave(OctaveStream &) const;
}
-void InsetMathSpace::mathmlize(MathStream & ms) const
+docstring InsetMathSpace::mathmlize(MathStream & ms) const
{
SpaceInfo const & si = space_info[space_];
if (si.negative || !si.visible)
- return;
+ return docstring();
string l;
if (si.custom)
l = length_.asHTMLString();
if (!l.empty())
ms << " width=\"" << from_ascii(l) << "\"";
ms << " />";
+ return docstring();
}
///
void octave(OctaveStream &) const;
///
- void mathmlize(MathStream & ms) const;
+ docstring mathmlize(MathStream & ms) const;
///
void write(WriteStream & os) const;
/// generate something that will be understood by the Dialogs.
}
-void InsetMathSpecialChar::mathmlize(MathStream & ms) const
+docstring InsetMathSpecialChar::mathmlize(MathStream & ms) const
{
switch (char_) {
case '&':
ms.os().put(char_);
break;
}
+ return docstring();
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream & ms) const;
+ docstring mathmlize(MathStream & ms) const;
/// identifies SpecialChar insets
InsetMathSpecialChar const * asSpecialCharInset() const { return this; }
///
#include "InsetMathSqrt.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "TextPainter.h"
#include "frontends/Painter.h"
}
-void InsetMathSqrt::mathmlize(MathStream & os) const
+docstring InsetMathSqrt::mathmlize(MathStream & os) const
{
- os << MTag("msqrt") << cell(0) << ETag("msqrt");
+ os << MTag("msqrt");
+ docstring const rv = lyx::mathmlize(cell(0), os);
+ os << ETag("msqrt");
+ return rv;
}
///
void octave(OctaveStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
InsetCode lyxCode() const { return MATH_SQRT_CODE; }
}
-void InsetMathString::mathmlize(MathStream & /*os*/) const
-{
- // useless, no doubt, but we should not be here
- LASSERT(false, /* */);
-}
-
-
void InsetMathString::write(WriteStream & os) const
{
if (!os.latex() || os.lockedMode()) {
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
- ///
void write(WriteStream & os) const;
///
InsetCode lyxCode() const { return MATH_STRING_CODE; }
}
-void InsetMathSymbol::mathmlize(MathStream & os) const
+docstring 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
else
os << sym_->xmlname;
os << " </" << type << '>';
+ return docstring();
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///
}
-void InsetMathUnknown::mathmlize(MathStream & os) const
+docstring InsetMathUnknown::mathmlize(MathStream & os) const
{
os << MTag("mi") << name_ << ETag("mi");
+ return docstring();
}
///
void mathematica(MathematicaStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///
}
-void mathmlize(MathData const & dat, MathStream & os)
+docstring mathmlize(MathData const & dat, MathStream & os)
{
MathData ar = dat;
extractStructure(ar, MATHML);
+ docstring retval;
if (ar.size() == 0)
os << "<mrow/>";
else if (ar.size() == 1)
- os << ar.front();
+ retval = ar.front()->mathmlize(os);
else {
os << MTag("mrow");
for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
- (*it)->mathmlize(os);
+ retval += (*it)->mathmlize(os);
os << ETag("mrow");
}
+ return retval;
}
// convert this inset somehow to a number
void maple(MathData const &, MapleStream &);
void maxima(MathData const &, MaximaStream &);
void mathematica(MathData const &, MathematicaStream &);
-void mathmlize(MathData const &, MathStream &);
+docstring mathmlize(MathData const &, MathStream &);
void octave(MathData const &, OctaveStream &);
bool extractNumber(MathData const & ar, int & i);
}
// FIXME Other external things need similar treatment.
///
- void mathmlize(MathStream & ms) const { ms << mathMacro_.cell(idx_); }
+ docstring mathmlize(MathStream & ms) const {
+ ms << mathMacro_.cell(idx_);
+ return docstring();
+ }
///
void draw(PainterInfo & pi, int x, int y) const {
if (mathMacro_.editMetrics(pi.base.bv)) {
}
-void MathMacro::mathmlize(MathStream & os) const
+docstring MathMacro::mathmlize(MathStream & os) const
{
os << expanded_.cell(0);
+ return docstring();
}
///
void maple(MapleStream &) const;
///
- void mathmlize(MathStream &) const;
+ docstring mathmlize(MathStream &) const;
///
void octave(OctaveStream &) const;
///