]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_exintinset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_exintinset.C
index 97754e10f21744ec6314662710b4f8ee8c0b55cc..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,23 +74,39 @@ void MathExIntInset::maplize(MapleStream & os) const
 }
 
 
-void MathExIntInset::mathematicize(MathematicaStream & 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" ) 
+       if ( symbol_ == "int" )
                os << "Integrate[";
-       else 
-               if (symbol_ == "sum") 
-                       os << "Sum[";
-               else 
-                       os << symbol_ << '[';
-       
+       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 
+       else
                os << cell(1) << ']';
 }
 
@@ -111,5 +126,5 @@ void MathExIntInset::mathmlize(MathMLStream & os) const
 
 void MathExIntInset::write(WriteStream &) const
 {
-       lyxerr << "should not happen" << endl;
+       lyxerr << "should not happen\n";
 }