You can also use the same approach to implement complex mathematical stuff inside your document.
In this example, you see integration with MathJax.
Quadratic formula example:
Source code for quadratic equation then looks like this:
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
More complex example:
And again the source code:
\sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2}