Coloring MathJax
Hello,
I'd like to color every MathJax equation and found out about the HTML-CSS output processor. I have added this at the front of my front-template
<script>
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
TeX: { extensions: ["color.js"] },
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": {
preferredFont: "TeX",
availableFonts: ["STIX","TeX"],
styles: {".MathJax": {color: "#00FF00 ! important"}}
}
});
MathJax.Hub.Configured();
</script>
Sadly this does not change the appearance of MathJax equations. What am I doing wrong? Is there a way to even do this using the normal CSS-styling?
Comments are closed, but you can start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Damien Elmes on 03 May, 2020 11:46 PM
Anki does not contain a complete MathJax install, so I'm afraid extensions that aren't enabled by default may not be available.
2 Posted by Matthias on 04 May, 2020 10:52 PM
I’m not talking about the “color.js” extension (it’s not loaded by default but actually works). I’m talking about the “HTML-CSS” Setting. This is not an external extension, but a basic MathJax setting. That’s why I’m wondering what I’m doing wrong.
Support Staff 3 Posted by Damien Elmes on 05 May, 2020 05:47 AM
This is not something I've tested I'm afraid, so I don't know whether it is possible or not.