await require("mathjax").init({
startup: {
ready() {
//
// Prevent the serialized MathML from including any of MathJax's data attributes
//
const {SerializedMmlVisitor} = MathJax._.core.MmlTree.SerializedMmlVisitor;
SerializedMmlVisitor.prototype.getDataAttributes = function () {return {}}
//
// Do the usual startup ready actions (create document, input/output jax, etc).
//
MathJax.startup.defaultReady();
}
},
options: {
skipHtmlTags: ["script","noscript","style","textarea","pre","code"],
sre: {
speech: 'deep',
domain: 'mathspeak',
style: 'default',
locale: 'en'
},
enableEnrichment: true,
renderActions: action.speechAction,
},
loader: {
load: ['input/tex', 'input/mml', 'output/svg', 'a11y/sre', 'a11y/semantic-enrich'],
require: require
},
tex: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true,
macros: {...}
}
}
Sending something like: