* Licence details can be found in the file COPYING.
*
* \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include "InsetMathRoot.h"
#include "MathData.h"
+#include "MathExtern.h"
#include "MathStream.h"
#include "Cursor.h"
namespace lyx {
-InsetMathRoot::InsetMathRoot()
- : InsetMathNest(2)
+InsetMathRoot::InsetMathRoot(Buffer * buf)
+ : InsetMathNest(buf, 2)
{}
dim.des = max(dim0.descent() - 5, dim1.descent()) + 2;
dim.wid = dim0.width() + dim1.width() + 10;
metricsMarkers(dim);
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
void InsetMathRoot::write(WriteStream & os) const
{
+ MathEnsurer ensurer(os);
os << "\\sqrt[" << cell(0) << "]{" << cell(1) << '}';
}
}
-void InsetMathRoot::mathmlize(MathStream & os) const
+docstring InsetMathRoot::mathmlize(MathStream & os) const
{
- os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
+ os << MTag("mroot");
+ docstring rv = lyx::mathmlize(cell(1), os);
+ rv += lyx::mathmlize(cell(0), os);
+ os << ETag("mroot");
+ return rv;
}