To get MathJax to work in Blogger, just go to your Blogger account, click "Design" (top right of the page), and then "Edit HTML". After the first

`<head>`

you see, paste<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes:true}, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic:true} } }); </script>

You're done! You can now use the usual

`$...$`

or `\(...\)`

for inline equations, and `$$...$$`

or`\[...\]`

for equations that are centered in their own line.
Time for an example:

\[

\cos^2\theta-\sin^2\theta=\cos 2\theta.

\] The above script loads AMSmath and AMSsymbols so that the macros defined in these popular packages are available for use in your blog.

\begin{equation}\label{eq:gravt}

F=G\frac{mM}{r^2}.

\end{equation}Also,

\begin{equation}\label{eq:gravo}

F=mg,

\end{equation}and so equations (\ref{eq:gravt}) and (\ref{eq:gravo}) lead to\[

g=G\frac{M}{r^2},

\]assuming the equivalence of inertial and gravitational mass.

\[

\cos^2\theta-\sin^2\theta=\cos 2\theta.

\] The above script loads AMSmath and AMSsymbols so that the macros defined in these popular packages are available for use in your blog.

**UPDATE:**Equations can now be numbered and referred to. For example, in Newtonian gravity we have\begin{equation}\label{eq:gravt}

F=G\frac{mM}{r^2}.

\end{equation}Also,

\begin{equation}\label{eq:gravo}

F=mg,

\end{equation}and so equations (\ref{eq:gravt}) and (\ref{eq:gravo}) lead to\[

g=G\frac{M}{r^2},

\]assuming the equivalence of inertial and gravitational mass.

Awesome post $\cos^2\theta-\sin^2\theta=\cos 2\theta$

ReplyDeleteno funtiona en celulares es decir todas las formulas de aqui se pueden ver en computadoras pero no en celulares una pena

DeleteThanks for the tips!

ReplyDeleteGreat post. Anything to make font bigger

ReplyDelete@SeerSucker The font should scale with the font you use in your blog.

ReplyDeleteRight click the equation and you can set the zoom factor and zoom trigger in the settings option.

ReplyDeleteI've tried that.Wonderful.$x^n+y^n=z^n$

ReplyDeleteI successfully used your JS in Blogger. Thanks for that.

ReplyDeleteOne thing that seems to be missing is equation numbering. Any mods to your script to enable that?

Done!

DeleteNice! Now applied to my blog.

ReplyDeleteFYI: I noticed that, since the numbering is applied globally then, with numbered eqns in say 2 separate blog posts, the

firsteqn in theolderpost will not be (1) but some higher number, e.g., (6), depending on how many numbered eqns precede it in thenewerpost.In LaTeX, the eqn counter can be reset as desired. Is there a similar feature in MathJax?

Thank you.Let me try

ReplyDelete\begin{equation}

x^n+y^n=z^n

\end{equation}

\begin{eqnarray}

ReplyDelete\begin{array}{rcl}

\alpha\beta & = & {1\over

2}\left(\alpha\otimes\beta+\beta\otimes\alpha\right),\\

\\

\alpha\wedge\beta & = & {1\over

2}\left(\alpha\otimes\beta-\beta\otimes\alpha\right).

\end{array}

\end{eqnarray}

This comment has been removed by the author.

Deletei followed your steps but im unable to get it working on my blog.. where am i going wrong? can you guide me a bit? Thanks

ReplyDeleteThis comment has been removed by the author.

ReplyDeleteThanks mate, it is just simply what I need. To write $3x+6y=8$ in my blog. :)

ReplyDeleteDo the formulas work in Preview mode? In my case, they don't.

ReplyDeleteThanks.

In my case the formulas work in Preview mode.

DeleteHow is anyone getting this to work? I just created a Blogger account. I see no "Design" option anywhere, and I certainly see no way to edit the raw HTML header of my blog.

ReplyDeleteI had a mathematics blog on a Joomla site a while back, where I had written a Joomla plugin to render LaTeX. That site is gone. I'd like to migrate that blog to Blogger, but not if I can't get MathJax working.

Ah, I almost got it. On my dashboard, left column, I click on Template. Under the thumbnail shown as "Live on Blog" I click "Edit HTML" and insert the javascript into the header.

DeleteThe problem is, it still isn't working.

Aha!

DeleteAndy posted this in 2011, and apparently things have changed, according to what I have found in the Google support forum.

The new dynamic view blogger themes make integrating MathJax a bit harder now.

To get MathJax to work in the modern Blogger, you have to insert the following Typeset() method call at the end of each post:

<script type="text/javascript">MathJax.Hub.Queue(["Typeset",MathJax.Hub]);</script>

See http://docs.mathjax.org/en/latest/typeset.html

There may be a place to insert this call near the end of the template, but I haven't found any place where this works. It works only if you insert it at the end of each blog post.

Unfortunately, this is kind of a kludge. And won't allow for math formulas in comments.

i put it on the end of the html code of a post and it didnt work

DeleteWell updating again regarding blogger. In my blogger is working fine just the numbering option that still not working....

ReplyDeleteUpdating it's working perfectly as long is you don't change anything in style, font syze, font type etc.... Any change on those things will include extra html code and mess-up with MathJax.

DeleteAgain... heheh just adding works perfectly with simple view.

DeleteAWESOME MAAAAAN

ReplyDeleteWork perfectly!!

ReplyDeleteThanks! I was hoping for a simple explanation and you delivered!

ReplyDelete\(x^2+y^2\)

ReplyDelete\begin{equation}

ReplyDelete\frac{1+x+x^2}{1+y+y^2}

\end{equation}

$a^2 + b^2 = c^2$

ReplyDeleteGood work

ReplyDeletetsg

mbaapti.blogspot.com

thanks

ReplyDeleteNice! thanks for sharing.

ReplyDeleteWorks great, thanks for sharing.

ReplyDelete

ReplyDelete\[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}

\mathbf{i} & \mathbf{j} & \mathbf{k} \\

\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\

\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0

\end{vmatrix} \]

This comment has been removed by the author.

ReplyDeletethis not work for cell , esta aplicacion no se puede ver en celulares

ReplyDelete$ \sum_{k=0}^\infty x^k = \frac{1}{1-x}$

ReplyDelete$x^2 + y^2 = 1$

ReplyDelete$x^n + y^n = z^n$

ReplyDelete\begin{equation} \frac{1+\sqrt{5}}{2} \end{equation}

ReplyDelete$E = mc^2$

ReplyDeleteit doesnt work on my blog

Deletethis worked great! Thanks for posting

ReplyDelete