Created
September 9, 2020 12:40
-
-
Save adeel/1640e016702dbbc40512598941257b03 to your computer and use it in GitHub Desktop.
Enable MathJax in Roam (this goes in roam/js).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.MathJax = { | |
tex: { | |
inlineMath: [["$","$"]], | |
displayMath: [["\\[","\\]"]], | |
processEscapes: true, | |
} | |
}; | |
(function() { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
(doTypeset = function() { | |
window.setTimeout(doTypeset, 700); | |
if (MathJax.startup) { | |
MathJax.startup.promise = MathJax.startup.promise.then( | |
() => {return MathJax.typesetPromise()} | |
).catch( | |
(err) => console.log('Typeset failed: ' + err.message) | |
); | |
} | |
})(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment