9 #include "math_exintinset.h"
10 #include "math_support.h"
11 #include "math_mathmlstream.h"
12 #include "math_streamstr.h"
13 #include "math_symbolinset.h"
16 #include <boost/scoped_ptr.hpp>
19 MathExIntInset::MathExIntInset(string const & name)
20 : MathNestInset(4), symbol_(name)
29 MathInset * MathExIntInset::clone() const
31 return new MathExIntInset(*this);
35 void MathExIntInset::symbol(string const & symbol)
41 bool MathExIntInset::hasScripts() const
43 // take empty upper bound as "no scripts"
44 return !cell(3).empty();
49 void MathExIntInset::normalize(NormalStream & os) const
51 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
52 << cell(2) << ' ' << cell(3) << ']';
56 void MathExIntInset::metrics(MathMetricsInfo &) const
58 lyxerr << "should not happen\n";
62 void MathExIntInset::draw(MathPainterInfo &, int, int) const
64 lyxerr << "should not happen\n";
68 void MathExIntInset::maplize(MapleStream & os) const
77 os << '=' << cell(2) << ".." << cell(3);
82 void MathExIntInset::maximize(MaximaStream & os) const
84 if ( symbol_ == "int" )
94 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
99 void MathExIntInset::mathematicize(MathematicaStream & os) const
101 if ( symbol_ == "int" )
103 else if (symbol_ == "sum")
106 os << symbol_ << '[';
109 os << cell(0) << ',';
113 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
115 os << cell(1) << ']';
119 void MathExIntInset::mathmlize(MathMLStream & os) const
121 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
123 // mathmlize(sym, os);
126 os << cell(0) << "<mo> ⁢ </mo>"
127 << MTag("mrow") << "<mo> ⅆ </mo>"
128 << cell(1) << ETag("mrow");
132 void MathExIntInset::write(WriteStream &) const
134 lyxerr << "should not happen\n";