#endif
#include "math_rootinset.h"
-#include "support/LOstream.h"
+#include "math_mathmlstream.h"
#include "Painter.h"
}
-void MathRootInset::write(MathWriteInfo & os) const
+void MathRootInset::write(WriteStream & os) const
{
os << "\\sqrt[" << cell(0) << "]{" << cell(1) << '}';
}
-void MathRootInset::writeNormal(std::ostream & os) const
+void MathRootInset::normalize(NormalStream & os) const
{
- os << "[root ";
- cell(1).writeNormal(os);
- os << " ";
- cell(0).writeNormal(os);
- os << "] ";
+ os << "[root " << cell(1) << ' ' << cell(1) << ']';
}
-bool MathRootInset::idxUp(int & idx, int & pos) const
+bool MathRootInset::idxUp(idx_type & idx, pos_type & pos) const
{
if (idx == 0)
return false;
}
-bool MathRootInset::idxDown(int & idx, int & pos) const
+bool MathRootInset::idxDown(idx_type & idx, pos_type & pos) const
{
if (idx == 1)
return false;
pos = 0;
return true;
}
+
+
+void MathRootInset::octavize(OctaveStream & os) const
+{
+ os << "root(" << cell(1) << ',' << cell(0) <<')';
+}
+
+
+void MathRootInset::mathmlize(MathMLStream & os) const
+{
+ os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
+}