7 #include "math_exintinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
11 #include "math_symbolinset.h"
14 #include <boost/scoped_ptr.hpp>
17 MathExIntInset::MathExIntInset(string const & name)
18 : MathNestInset(4), symbol_(name)
27 MathInset * MathExIntInset::clone() const
29 return new MathExIntInset(*this);
33 void MathExIntInset::symbol(string const & symbol)
39 bool MathExIntInset::hasScripts() const
41 // take empty upper bound as "no scripts"
42 return !cell(3).empty();
47 void MathExIntInset::normalize(NormalStream & os) const
49 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
50 << cell(2) << ' ' << cell(3) << ']';
54 void MathExIntInset::metrics(MathMetricsInfo &) const
56 lyxerr << "should not happen\n";
60 void MathExIntInset::draw(MathPainterInfo &, int, int) const
62 lyxerr << "should not happen\n";
66 void MathExIntInset::maplize(MapleStream & os) const
75 os << '=' << cell(2) << ".." << cell(3);
80 void MathExIntInset::maximize(MaximaStream & os) const
82 if ( symbol_ == "int" )
92 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
97 void MathExIntInset::mathematicize(MathematicaStream & os) const
99 if ( symbol_ == "int" )
101 else if (symbol_ == "sum")
104 os << symbol_ << '[';
107 os << cell(0) << ',';
111 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
113 os << cell(1) << ']';
117 void MathExIntInset::mathmlize(MathMLStream & os) const
119 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
121 // mathmlize(sym, os);
124 os << cell(0) << "<mo> ⁢ </mo>"
125 << MTag("mrow") << "<mo> ⅆ </mo>"
126 << cell(1) << ETag("mrow");
130 void MathExIntInset::write(WriteStream &) const
132 lyxerr << "should not happen\n";