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::mathematicize(MathematicaStream & os) const
84 if ( symbol_ == "int" )
97 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
103 void MathExIntInset::mathmlize(MathMLStream & os) const
105 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
107 // mathmlize(sym, os);
110 os << cell(0) << "<mo> ⁢ </mo>"
111 << MTag("mrow") << "<mo> ⅆ </mo>"
112 << cell(1) << ETag("mrow");
116 void MathExIntInset::write(WriteStream &) const
118 lyxerr << "should not happen\n";