4 #include "math_exintinset.h"
5 #include "math_support.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
8 #include "math_symbolinset.h"
11 #include <boost/scoped_ptr.hpp>
14 MathExIntInset::MathExIntInset(string const & name)
15 : MathNestInset(4), symbol_(name)
24 MathInset * MathExIntInset::clone() const
26 return new MathExIntInset(*this);
30 void MathExIntInset::symbol(string const & symbol)
36 bool MathExIntInset::hasScripts() const
38 // take empty upper bound as "no scripts"
39 return !cell(3).empty();
44 void MathExIntInset::normalize(NormalStream & os) const
46 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
47 << cell(2) << ' ' << cell(3) << ']';
51 void MathExIntInset::metrics(MetricsInfo &) const
53 lyxerr << "should not happen\n";
57 void MathExIntInset::draw(PainterInfo &, int, int) const
59 lyxerr << "should not happen\n";
63 void MathExIntInset::maple(MapleStream & os) const
72 os << '=' << cell(2) << ".." << cell(3);
77 void MathExIntInset::maxima(MaximaStream & os) const
79 if ( symbol_ == "int" )
89 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
94 void MathExIntInset::mathematica(MathematicaStream & os) const
96 if ( symbol_ == "int" )
98 else if (symbol_ == "sum")
101 os << symbol_ << '[';
104 os << cell(0) << ',';
108 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
110 os << cell(1) << ']';
114 void MathExIntInset::mathmlize(MathMLStream & os) const
116 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
118 // mathmlize(sym, os);
121 os << cell(0) << "<mo> ⁢ </mo>"
122 << MTag("mrow") << "<mo> ⅆ </mo>"
123 << cell(1) << ETag("mrow");
127 void MathExIntInset::write(WriteStream &) const
129 lyxerr << "should not happen\n";