How to change equations color in MathJax

ぃ、小莉子 提交于 2019-12-11 01:03:42

问题


I'm using the following snippet to display equations on my blog

<script src='http://www.mathjax.org/mathjax/MathJax.js' type='text/javascript'> 
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
    tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
  });
</script> 

and I would like to change equations color to white because my background is somewhat dark, how can this be done?


回答1:


Do this:

.MathJax_Display {
  color: #FFF !important;
}

It seems to work for me.




回答2:


Equations should inherit styles from ancestor elements, just like any normal element. You could try something like the following:

<head>
 <style>.equation { color: white; }</style>
</head>
<body>
 <span class="equation">$ax^2+bx+c$</span>
</body>


来源:https://stackoverflow.com/questions/3949100/how-to-change-equations-color-in-mathjax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!