How to use the mathjax-full/js/core/MathItem.js.STATE.ENRICHED function in mathjax-full

To help you get started, we’ve selected a few mathjax-full examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathjax / MathJax-demos-node / speech / action.js View on Github external
if (name.substr(0, 14) === 'data-semantic-' && name !== 'data-semantic-speech') {
                delete attributes[name];
            }
        }
    });
}

//
//  The renderActions needed to remove the data-semantic-attributes.
//    STATE.ENRICHED is the priority of the enrichment, so this will rung just after enrichment.
//    The first function is the one for when the document's render() method is called.
//    The second is for when a MathItem's render(), rerender() or convert() method is called.
//
exports.speechAction = {
    simplfy: [
        STATE.ENRICHED + 1,
        (doc) => {
            for (const math of doc.math) {
                removeSemanticData(math);
            }
        },
        (math, doc) => {
            removeSemanticData(math);
        }
    ]
};

mathjax-full

Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers and in server-side node applications. This package includes the source code as well as

Apache-2.0
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis