Thursday, March 5, 2015

MathJax for writing an equation on web page.

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

Then will look like,

$$ \textit{h}_{\theta }\left ( \textit{x} \right ) = \theta _{0} + \theta _{1} \textit{x} _{1} + \cdots + \theta _{n} \textit{x} _{n} $$