UNPKG

mathml-to-latex-adm

Version:

A JavaScript tool to convert mathml string to LaTeX string

19 lines (18 loc) 773 B
"use strict"; 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 mathml_element_to_latex_converter_1.mathMLElementToLaTeXConverter(child); }) .map(function (converter) { return converter.convert(); }) .join(' '); return "\\color{red}{" + latexJoinedChildren + "}"; }; return MError; }()); exports.MError = MError;