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