<script type="text/javascript" src="mathjax/es5/tex-chtml-full.js"></script>
<script>
MathJax.startup.promise
.then(() => MathJax.typesetPromise())
.then(() => /* other actions once MathJax is done */)
</script>
And I get the following error:
// defer relayouting by 'Paged' until 'MathJax' rendering is complete
// otherwise formulas wouldn't be replaced and content height can't be calculated by 'Paged'
// 'MathJax' needs to be loaded before 'Paged' to make this work
window.PagedConfig = {
before: () => {
return new Promise((resolve) => {
window.MathJax.Hub.Queue(resolve);
})
}
}
const mathJaxReadyPromise = new Promise((resolve) => {
window.MathJax = {
tex: {
inlineMath: [['\\\\(', '\\\\)']],
displayMath: [['\\\\[', '\\\\]']],
processEscapes: false,
tags: "${eqnumsValue}"
},
options: {
ignoreHtmlClass: 'nostem|noasciimath',
renderActions: {
adjustDisplay: [25, (doc) => {for (math of doc.math) {adjustDisplay(math, doc)}}, adjustDisplay]
}
},
startup: {
ready: () => {
MathJax.startup.defaultReady()
MathJax.startup.promise.then(() => resolve())
}
},
asciimath: {
delimiters: [['\\\\$', '\\\\$']]
},
loader: {load: ['input/asciimath', 'output/chtml', 'ui/menu']}
}
})
// defer relayouting by 'Paged' until 'MathJax' rendering is complete
// otherwise formulas wouldn't be replaced and content height can't be calculated by 'Paged'
// 'MathJax' needs to be loaded before 'Paged' to make this work
window.PagedConfig = {
before: () => mathJaxReadyPromise
};
window.MathJax = {// your main configuration (with no startup block)};
// defer relayouting by 'Paged' until 'MathJax' rendering is complete// otherwise formulas wouldn't be replaced and content height can't be calculated by 'Paged'// 'MathJax' needs to be loaded before 'Paged' to make this work
window.PageConfig = {before: (() => {let pagedResolve;let pagedPromise = new Promise((resolve) => {pagedResolve = resolve});MathJax.startup = {ready: () => {MathJax.startup.defaultReady();MathJax.startup.promise.then(() => pagedResolve());}};return () => pagedPromise;})()};
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/6a5c5113-f7a9-4409-b1f5-312b368be142%40googlegroups.com.
// main configuration (without startup block)
window.MathJax = {}
;(() => {
const mathJaxReadyPromise = new Promise((resolve) => {
MathJax.startup = {
ready: () => {
MathJax.startup.defaultReady()
MathJax.startup.promise.then(resolve)
}
}
})
// defer relayouting by 'Paged' until 'MathJax' rendering is complete
// otherwise formulas wouldn't be replaced and content height can't be calculated by 'Paged'
// 'MathJax' needs to be loaded before 'Paged' to make this work
window.PagedConfig = {
before: () => mathJaxReadyPromise
}
})()
window.PageConfig = {
before: () => MathJax.startup.initial
};