How to Write Math Equations on Blogger?
What is MathJax?
Beautiful math in all browser - A JavaScript display engine for mathematics that works in all browsers.
Add MathJax for Blogs on Blogger
Layout -> SIdebar(bottom) [+ Add a Gadget] -> HTML/JavaScript
<script type="text/x-mathjax-config">
//<![CDATA[
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
//]]>
</script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
</script>
Display Math Notations in Blog Posts
Using the above setup, any math characters you require to display using MathJax, enclose characters with the "\$"(without quotes) for inline display or "\$\$" (without quotes) for a block notation display.
Examples:
The code as following:
This is a MathJax inline notation:$x^2$.
More text after inline notation $x^2$ $x^{y+1}$
Below is a MathJax block notation:
$$x^2$$
$$x^4$$
$$x^8$$
$$x^2$$
$$x^4$$
$$x^8$$
Quick Tips:
Use backslash "\" (without quotes) before a dollar sign to escape MathJax automated notations. Below are examples:
Escaped MathJax notations \$x^2\$
\$x^2\$
Non escaped MathJax notations $x^2$
$x^2$
References:
Add MathJax Beautiful Mathematic Notations for Blogger Blogs
MathJax basic tutorial and quick reference
Comments
Post a Comment