mathml-to-latex-adm
Version:
A JavaScript tool to convert mathml string to LaTeX string
19 lines (18 loc) • 674 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MSqrt = void 0;
var helpers_1 = require("../../../helpers");
var MSqrt = /** @class */ (function () {
function MSqrt(mathElement) {
this._mathmlElement = mathElement;
}
MSqrt.prototype.convert = function () {
var latexJoinedChildren = this._mathmlElement.children
.map(function (child) { return helpers_1.mathMLElementToLaTeXConverter(child); })
.map(function (converter) { return converter.convert(); })
.join(' ');
return "\\sqrt{" + latexJoinedChildren + "}";
};
return MSqrt;
}());
exports.MSqrt = MSqrt;