3 #include "math_exintinset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "math_symbolinset.h"
10 #include <boost/scoped_ptr.hpp>
15 MathExIntInset::MathExIntInset(string const & name)
16 : MathNestInset(4), symbol_(name)
25 MathInset * MathExIntInset::clone() const
27 return new MathExIntInset(*this);
31 void MathExIntInset::symbol(string const & symbol)
37 bool MathExIntInset::hasScripts() const
39 // take empty upper bound as "no scripts"
40 return !cell(3).empty();
45 void MathExIntInset::normalize(NormalStream & os) const
47 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
48 << cell(2) << ' ' << cell(3) << ']';
52 void MathExIntInset::metrics(MathMetricsInfo &) const
54 lyxerr << "should not happen" << endl;
58 void MathExIntInset::draw(MathPainterInfo &, int, int) const
60 lyxerr << "should not happen" << endl;
64 void MathExIntInset::maplize(MapleStream & os) const
73 os << '=' << cell(2) << ".." << cell(3);
78 void MathExIntInset::mathematicize(MathematicaStream & os) const
80 if ( symbol_ == "int" )
93 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
99 void MathExIntInset::mathmlize(MathMLStream & os) const
101 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
103 // mathmlize(sym, os);
106 os << cell(0) << "<mo> ⁢ </mo>"
107 << MTag("mrow") << "<mo> ⅆ </mo>"
108 << cell(1) << ETag("mrow");
112 void MathExIntInset::write(WriteStream &) const
114 lyxerr << "should not happen" << endl;