overleaf/services/web/frontend/js/directives/mathjax.js
Tim Down d420c247e1 Merge pull request #10785 from overleaf/ae-mathjax-inline-single-dollar
Move MathJax inlineMath configuration from element to page

GitOrigin-RevId: f17af484a0df517d6006ee1d42bde01d9c1fed08
2022-12-09 09:04:25 +00:00

15 lines
328 B
JavaScript

/* global MathJax */
import App from '../base'
export default App.directive('mathjax', function ($compile, $parse) {
return {
link(scope, element, attrs) {
if (!(MathJax && MathJax.Hub)) return
setTimeout(() => {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, element.get(0)])
}, 0)
},
}
})