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"
19 #include "support/debug.h"
20 #include "support/docstring.h"
25 InsetMathExInt::InsetMathExInt(Buffer * buf, docstring const & name)
26 : InsetMathNest(buf, 4), symbol_(name)
35 Inset * InsetMathExInt::clone() const
37 return new InsetMathExInt(*this);
41 void InsetMathExInt::symbol(docstring const & symbol)
47 bool InsetMathExInt::hasScripts() const
49 // take empty upper bound as "no scripts"
50 return !cell(3).empty();
55 void InsetMathExInt::normalize(NormalStream & os) const
57 os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
58 << cell(2) << ' ' << cell(3) << ']';
62 void InsetMathExInt::metrics(MetricsInfo &, Dimension &) const
64 LYXERR0("should not happen");
68 void InsetMathExInt::draw(PainterInfo &, int, int) const
70 LYXERR0("should not happen");
74 void InsetMathExInt::maple(MapleStream & os) const
83 os << '=' << cell(2) << ".." << cell(3);
88 void InsetMathExInt::maxima(MaximaStream & os) const
100 os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
102 os << cell(1) << ')';
105 void InsetMathExInt::mathematica(MathematicaStream & os) const
107 if (symbol_ == "int")
109 else if (symbol_ == "sum")
112 os << symbol_ << '[';
115 os << cell(0) << ',';
119 os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
121 os << cell(1) << ']';
125 void InsetMathExInt::mathmlize(MathStream & os) const
127 InsetMathSymbol sym(symbol_);
129 // mathmlize(sym, os);
132 os << cell(0) << "<mo> ⁢ </mo>"
133 << MTag("mrow") << "<mo> ⅆ </mo>"
134 << cell(1) << ETag("mrow");
138 void InsetMathExInt::write(WriteStream &) const
140 LYXERR0("should not happen");