#include "InsetMathExFunc.h"
#include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
#include "MathStream.h"
#include "MathSupport.h"
-using std::string;
+namespace lyx {
+
using std::auto_ptr;
+using std::vector;
+using std::string;
-InsetMathExFunc::InsetMathExFunc(string const & name)
+InsetMathExFunc::InsetMathExFunc(docstring const & name)
: InsetMathNest(1), name_(name)
{}
-InsetMathExFunc::InsetMathExFunc(string const & name, MathArray const & ar)
+InsetMathExFunc::InsetMathExFunc(docstring const & name, MathArray const & ar)
: InsetMathNest(1), name_(name)
{
cell(0) = ar;
}
-string InsetMathExFunc::name() const
+docstring InsetMathExFunc::name() const
{
return name_;
}
}
-string asMathematicaName(string const & name)
+static string asMathematicaName(string const & name)
{
if (name == "sin") return "Sin";
if (name == "sinh") return "Sinh";
}
+static docstring asMathematicaName(docstring const & name)
+{
+ return from_utf8(asMathematicaName(to_utf8(name)));
+}
+
+
void InsetMathExFunc::mathematica(MathematicaStream & os) const
{
os << asMathematicaName(name_) << '[' << cell(0) << ']';
}
-void InsetMathExFunc::mathmlize(MathMLStream & os) const
+void InsetMathExFunc::mathmlize(MathStream & os) const
{
os << MTag(name_.c_str()) << cell(0) << ETag(name_.c_str());
}
{
os << name_ << '(' << cell(0) << ')';
}
+
+
+} // namespace lyx