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 Dimension MathExIntInset::metrics(MetricsInfo &) const
53 lyxerr << "should not happen\n";
58 void MathExIntInset::draw(PainterInfo &, int, int) const
60 lyxerr << "should not happen\n";
64 void MathExIntInset::maple(MapleStream & os) const
73 os << '=' << cell(2) << ".." << cell(3);
78 void MathExIntInset::maxima(MaximaStream & os) const
80 if ( symbol_ == "int" )
90 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
95 void MathExIntInset::mathematica(MathematicaStream & os) const
97 if ( symbol_ == "int" )
99 else if (symbol_ == "sum")
102 os << symbol_ << '[';
105 os << cell(0) << ',';
109 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
111 os << cell(1) << ']';
115 void MathExIntInset::mathmlize(MathMLStream & os) const
117 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
119 // mathmlize(sym, os);
122 os << cell(0) << "<mo> ⁢ </mo>"
123 << MTag("mrow") << "<mo> ⅆ </mo>"
124 << cell(1) << ETag("mrow");
128 void MathExIntInset::write(WriteStream &) const
130 lyxerr << "should not happen\n";