Coloring MathJax

Matthias's Avatar


02 May, 2020 04:26 PM


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

        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"}} 

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?

  1. Support Staff 1 Posted by Damien Elmes on 03 May, 2020 11:46 PM

    Damien Elmes's Avatar

    Anki does not contain a complete MathJax install, so I'm afraid extensions that aren't enabled by default may not be available.

  2. 2 Posted by Matthias on 04 May, 2020 10:52 PM

    Matthias's Avatar

    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.

  3. Support Staff 3 Posted by Damien Elmes on 05 May, 2020 05:47 AM

    Damien Elmes's Avatar

    This is not something I've tested I'm afraid, so I don't know whether it is possible or not.

Comments are closed, but you can start a new discussion.

Keyboard shortcuts


? 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