Setting up Mathjax ↗ for your website allows you to add mathematical symbols as either inline math $E = mc^2$, or display math: \[ R_{\mu \nu} - \frac 12 g_{\mu \nu} R + g_{\mu \nu} \Delta = \frac{8\pi G}{c^4}T_{\mu \nu} \] Such mathematics are written in LaTeX format ↗. If you already have old Mathjax 2 setup, you can use Conversion tool ↗ to migrate.
To setup the math from zero we enable inline math to be entered using dollar symbols $E = mc^2$
or display math by using escaped square brackets:
\[
R_{\mu \nu} - \frac 12 g_{\mu \nu} R + g_{\mu \nu} \Delta = \frac{8\pi G}{c^4}T_{\mu \nu}
\]
The code to enable such math on your website is added to the head tag.
<head>
...
<script>
window.MathJax = {
tex: {
inlineMath: [ ['$','$'] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true,
autoload: {
color: [],
colorv2: ['color']
},
packages: {'[+]': ['noerrors']}
},
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process',
renderActions: {
addMenu: [0, '', '']
}
},
loader: {
load: ['[tex]/noerrors']
}
};
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" id="MathJax-script"></script>
</head>