Include this text somewhere in your document. MathJax recommends to placing it in the HTML header, but it may also appear in the body of the document.
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$']],
processEscapes: true
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
</script>
For comprehensive documentation see the MathJax website
$
$$
and double-dollar sign, $$
If you wish to use dollar signs in ordinary text, you escape them. Just my \$0.02
becomes just my $0.02.
This text:
When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Becomes this output:
When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$