Search code examples
svgmathjax

MathJax: How to change the default color for svg output


I've changed the HTML/CSS color output using

  MathJax.Hub.Config({
    styles: { ".MathJax": { color: "#fff" } }
  });

I've also inverted the png-based output (by inverting every image) with:

find ./fonts/HTML-CSS/TeX/png -name "*.png" -exec convert {} -negate {} \;

Now I'm stuck figuring out the way to fill the SVG glyphs with white instead of the default black. Any suggestions?

Thanks.


Solution

  • Try

    MathJax.Hub.Config({
      styles: {
        ".MathJax_SVG svg > g, .MathJax_SVG_Display svg > g": {
          fill: "#FFF",
          stroke: "#FFF"
        }
      }
    });
    

    to get the SVG output to be white.