* 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)
{}
void InsetMathRoot::write(WriteStream & os) const
{
- bool brace = ensureMath(os);
+ MathEnsurer ensurer(os);
os << "\\sqrt[" << cell(0) << "]{" << cell(1) << '}';
- os.pendingBrace(brace);
}
}
-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;
}