@qtikit/mathml-to-latex
Version:
A JavaScript tool to convert mathml string to LaTeX string
19 lines (18 loc) • 684 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 (0, helpers_1.mathMLElementToLaTeXConverter)(child); })
.map(function (converter) { return converter.convert(); })
.join(' ');
return "\\sqrt{".concat(latexJoinedChildren, "}");
};
return MSqrt;
}());
exports.MSqrt = MSqrt;