Enable MathJax
Put the following lines after the header (
<head>
) in the Blogger template (
Theme → Customize → Edit HTML):
Version 2 configuration:
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true,
processRefs: true,
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
Version 3 configuration:
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
window.MathJax = {
tex: {
inlineMath: [ ['$','$'],['\\(','\\)'] ],
displayMath: [ ['$$','$$'], ['\\[','\\]'] ],
processEscapes: true,
processEnvironments: true,
processRefs: true
},
options: {
ignoreHtmlClass: 'tex2jax_ignore|editor-rich-text'
}
};
</script>
Here on my site, I am using this latest version 3 configuration.
Write $\mathrm\LaTeX$
- Inline math:
- Input:
$E^2=m^2c^4 + p^2c^2$
- Output:
$E^2=m^2c^4 + p^2c^2$
- Display math:
- Input:
$$\displaystyle R_{\mu\nu}-\frac{1}{2}R\,g_{\mu\nu} + \Lambda\,g_{\mu\nu} = \frac{8\pi G}{c^4}T_{\mu\nu}$$
- Output: $$\displaystyle R_{\mu\nu}-\frac{1}{2}R\,g_{\mu\nu} + \Lambda\,g_{\mu\nu} = \frac{8\pi G}{c^4}T_{\mu\nu}$$
Resources