# Integrating MathJax to Ghost

If you are using mathematical functions, MathJax is the first joice.

To integrate it with ghost, simply open up ghost/content/themes/YOUR_THEME_NAME/default.hbs
And insert the following before the </body> tag:

{{! Mathjax configuration}}<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [[','], ['$$','$$']]}});</script>

And now if you create a new post and add something like $\sum \frac{1}{n} = H_n$ it should look like this: $\sum \frac{1}{n} = H_n$

A little hint: you have to escape underscores in your function to get it working properly!(_ instead of _) like in $\sum_{n=1}^\infty \frac{1}{n} = H_n$ => $\sum_{n=1}^\infty \frac{1}{n} = H_n$

#### Robin

Software Engineer / Application Developer

Integrating MathJax to Ghost