2 * \file math_exintinset.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "math_exintinset.h"
14 #include "math_mathmlstream.h"
15 #include "math_streamstr.h"
16 #include "math_symbolinset.h"
24 MathExIntInset::MathExIntInset(string const & name)
25 : MathNestInset(4), symbol_(name)
34 auto_ptr<InsetBase> MathExIntInset::clone() const
36 return auto_ptr<InsetBase>(new MathExIntInset(*this));
40 void MathExIntInset::symbol(string const & symbol)
46 bool MathExIntInset::hasScripts() const
48 // take empty upper bound as "no scripts"
49 return !cell(3).empty();
54 void MathExIntInset::normalize(NormalStream & os) const
56 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
57 << cell(2) << ' ' << cell(3) << ']';
61 void MathExIntInset::metrics(MetricsInfo &, Dimension &) const
63 lyxerr << "should not happen" << endl;
67 void MathExIntInset::draw(PainterInfo &, int, int) const
69 lyxerr << "should not happen" << endl;
73 void MathExIntInset::maple(MapleStream & os) const
82 os << '=' << cell(2) << ".." << cell(3);
87 void MathExIntInset::maxima(MaximaStream & os) const
89 if ( symbol_ == "int" )
99 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
101 os << cell(1) << ')';
104 void MathExIntInset::mathematica(MathematicaStream & os) const
106 if ( symbol_ == "int" )
108 else if (symbol_ == "sum")
111 os << symbol_ << '[';
114 os << cell(0) << ',';
118 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
120 os << cell(1) << ']';
124 void MathExIntInset::mathmlize(MathMLStream & os) const
126 boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
128 // mathmlize(sym, os);
131 os << cell(0) << "<mo> ⁢ </mo>"
132 << MTag("mrow") << "<mo> ⅆ </mo>"
133 << cell(1) << ETag("mrow");
137 void MathExIntInset::write(WriteStream &) const
139 lyxerr << "should not happen" << endl;