JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<div id="containerMath">
$\definecolor{energy}{RGB}{255,255,0}\color{energy} ax+b=c $
</div>
CSS
#containerMath{
box-sizing: border-box;
position: relative;
top: 0;
left: 0;
margin: 20px;
padding: 50px;
width: 200px;
height: 200px;
border-width: 1px;
background-color: white;
}
JavaScript
MathJax.Hub.Config({
messageStyle: "none",
TeX: { equationNumbers: {autoNumber: "all"}},
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [ ['\\begin{displaymath}','\\end{displaymath}'], ['\\begin{equation}','\\end{equation}'] ],
processEscapes: true,
preview: "none"
}});
MathJax.Hub.Config({ TeX: { extensions: ["color.js"] }});