]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_exintinset.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_exintinset.C
index e26a74e6b69890d8e0a40749839bafab48e96e19..4cdf247e419da196c23029ce777075e574dfa9c9 100644 (file)
@@ -1,3 +1,4 @@
+
 #include <config.h>
 
 #include "math_exintinset.h"
@@ -9,8 +10,6 @@
 
 #include <boost/scoped_ptr.hpp>
 
-using std::endl;
-
 
 MathExIntInset::MathExIntInset(string const & name)
        : MathNestInset(4), symbol_(name)
@@ -51,17 +50,17 @@ void MathExIntInset::normalize(NormalStream & os) const
 
 void MathExIntInset::metrics(MathMetricsInfo &) const
 {
-       lyxerr << "should not happen" << endl;
+       lyxerr << "should not happen\n";
 }
 
 
 void MathExIntInset::draw(MathPainterInfo &, int, int) const
 {
-       lyxerr << "should not happen" << endl;
+       lyxerr << "should not happen\n";
 }
 
 
-void MathExIntInset::maplize(MapleStream & os) const
+void MathExIntInset::maple(MapleStream & os) const
 {
        os << symbol_ << '(';
        if (cell(0).size())
@@ -75,6 +74,43 @@ void MathExIntInset::maplize(MapleStream & os) const
 }
 
 
+void MathExIntInset::maxima(MaximaStream & os) const
+{
+       if ( symbol_ == "int" )
+               os << "integrate(";
+       else
+               os << symbol_ << '(';
+
+       if (cell(0).size())
+               os << cell(0) << ',';
+       else
+               os << '1' << ',';
+       if (hasScripts())
+               os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
+       else
+               os << cell(1) << ')';
+}
+
+void MathExIntInset::mathematica(MathematicaStream & os) const
+{
+       if ( symbol_ == "int" )
+               os << "Integrate[";
+       else if (symbol_ == "sum")
+               os << "Sum[";
+       else
+               os << symbol_ << '[';
+
+       if (cell(0).size())
+               os << cell(0) << ',';
+       else
+               os << '1' << ',';
+       if (hasScripts())
+               os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
+       else
+               os << cell(1) << ']';
+}
+
+
 void MathExIntInset::mathmlize(MathMLStream & os) const
 {
        boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
@@ -90,5 +126,5 @@ void MathExIntInset::mathmlize(MathMLStream & os) const
 
 void MathExIntInset::write(WriteStream &) const
 {
-       lyxerr << "should not happen" << endl;
+       lyxerr << "should not happen\n";
 }