2 * \file InsetMathExInt.cpp
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 "InsetMathExInt.h"
15 #include "MathStream.h"
16 #include "MathStream.h"
17 #include "InsetMathSymbol.h"
20 #include "support/docstring.h"
27 InsetMathExInt::InsetMathExInt(docstring const & name)
28 : InsetMathNest(4), symbol_(name)
37 Inset * InsetMathExInt::clone() const
39 return new InsetMathExInt(*this);
43 void InsetMathExInt::symbol(docstring const & symbol)
49 bool InsetMathExInt::hasScripts() const
51 // take empty upper bound as "no scripts"
52 return !cell(3).empty();
57 void InsetMathExInt::normalize(NormalStream & os) const
59 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
60 << cell(2) << ' ' << cell(3) << ']';
64 void InsetMathExInt::metrics(MetricsInfo &, Dimension &) const
66 lyxerr << "should not happen" << endl;
70 void InsetMathExInt::draw(PainterInfo &, int, int) const
72 lyxerr << "should not happen" << endl;
76 void InsetMathExInt::maple(MapleStream & os) const
85 os << '=' << cell(2) << ".." << cell(3);
90 void InsetMathExInt::maxima(MaximaStream & os) const
102 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
104 os << cell(1) << ')';
107 void InsetMathExInt::mathematica(MathematicaStream & os) const
109 if (symbol_ == "int")
111 else if (symbol_ == "sum")
114 os << symbol_ << '[';
117 os << cell(0) << ',';
121 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
123 os << cell(1) << ']';
127 void InsetMathExInt::mathmlize(MathStream & os) const
129 InsetMathSymbol sym(symbol_);
131 // mathmlize(sym, os);
134 os << cell(0) << "<mo> ⁢ </mo>"
135 << MTag("mrow") << "<mo> ⅆ </mo>"
136 << cell(1) << ETag("mrow");
140 void InsetMathExInt::write(WriteStream &) const
142 lyxerr << "should not happen" << endl;