As Silver and StrachuDotNet recommended it on Discord, I’m opening a feature request for MathJax extensions: here is my original post from Discord.
I’m a total newbie to Obsidian, loving it so far!
But would it be possible to use MathJax extensions (like color.js
, etc: some of them are crucial for me (especially xypic
for commutative diagrams))?
Usually, the way it’s done in javascript, if I’m not mistaken, is to go something like this:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","MathMenu.js", "MathZoom.js",
"color.js", "https://sonoisa.github.io/xyjax_ext/xypic.js"],
Macros: {
// custom macros, quite important too
}
}
});
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML"></script>
It would be awesome if it could be added indeed, lots of people doing math research can’t make do with vanilla MathJax unfortunately (especially in fields like category theory, where commutative diagrams are everywhere )