mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 18:20:09 +02:00
Move MathJax inlineMath configuration from element to page GitOrigin-RevId: f17af484a0df517d6006ee1d42bde01d9c1fed08
15 lines
330 B
JavaScript
15 lines
330 B
JavaScript
/* global MathJax */
|
|
import { configureMathJax } from './configure'
|
|
import { mathJaxLoaded } from './util'
|
|
|
|
function render(el) {
|
|
if (!mathJaxLoaded()) return
|
|
configureMathJax()
|
|
|
|
setTimeout(() => {
|
|
MathJax.Hub.Queue(['Typeset', MathJax.Hub, el])
|
|
}, 0)
|
|
}
|
|
|
|
document.querySelectorAll('[data-ol-mathjax]').forEach(render)
|