Friday, May 25, 2012

MathJax: LaTeX on Blogger - finally!

I am easily excited when I find yet another place where I can use LaTeX syntax to typeset mathematics (Google Docs, OpenOffice, again, presentations using BeamerInkscape).

Finally, it seems, it is not incredibly clunky to write math in Blogger. In fact, it is as convenient as writing it in a native LaTeX document.

The latest avataar of MathJax, while not really new, is new to me. Here are a few links which describe how to go about empowering your Blogger account.

The easiest permanent fix is to add some script in your Blogger template file, as described here.

If you don't like messing with your template, you can take the approach outlined here. Basically, you add some lines to each post in the "html" view, which has math in it.

Here is a mandatory test:
\[\frac{df}{dx} = \frac{1}{2} \left(\frac{ab \textrm{ sech}^2(b \sqrt{x})}{x} - \frac{a \tanh(b \sqrt{x})}{x^{3/2}} \right)\]
Beautiful!

26 comments:

Anonymous said...

Testing if MathJax works in comments

$$\frac{df}{dx} = \frac{1}{2} \left(\frac{ab \textrm{ sech}^2(b \sqrt{x})}{x} - \frac{a \tanh(b \sqrt{x})}{x^{3/2}} \right)$$

Anonymous said...

$\Latex$

Unknown said...

$LaTex$

Taewoo Lee said...

Does this still work?
$$\sum_{n=0}^{N-1} x^n

Sachin Shanbhag said...

$$\sum_{n=0}^{N-1} x^n$$

Anonymous said...

$$\sum _{2}^{2}$$

Giacomo Alzetta said...

It doesn't seem to work anymore... At least I cannot see any LaTeX rendered.

Not yet! said...

$$\theta(x) = t$$

Do we put a double $$ sign around the code, or how is it done.?

Sachin Shanbhag said...

@Giacomo: Seems to work fine for me. Could it be your browser?
@NotYet: You got it!

Matt Zefferman said...
This comment has been removed by the author.
Unknown said...

$$ A_f=A_i+C $$

Anonymous said...

test
(∑k=1nakbk)2≤(∑k=1na2k)(∑k=1nb2k)

GRP said...

As a matter of curiosity, I'm using MathJax with a 'Classic' Blogger template. And I'm inserting the necessary code in each post in which it is needed.

Albert Schueller said...

On blogger/blogspot there is a security feature that prevents the loading of http: links in https: content (like blogger/blogspot). I don't know if it's a new feature, but it can prevent latex rendering on some browsers. If you're having trouble, replace the url to the MathJax.js library with:
https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js

It's not pretty, but it's a legit https link to the mathjax library. It is discussed on the official mathjax site here: http://www.mathjax.org/resources/faqs/#problem-https

Sachin Shanbhag said...

Thanks, Albert.

PlatoHagel said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Anonymous said...

$$x=1$$

Anonymous said...

\int e^{\alpha x²}dx

fast tooth said...

test: $ x = 1 $

Anonymous said...

\[ x=y\]

Unknown said...

No one is dumb who is curious. The people who don't ask questions remain clueless throughout their lives. See the link below for more info.


#clueless
www.ufgop.org

Unknown said...

$$\LaTeX$$

AndriusMan said...

I would like to hear more about latex typesetting. Really good article

Fonts Mania said...

Awesome work, So if you need an online converter for your files then use this;

Best File Converter

Fonts Mania said...

That will surely help you to transfer one file into another;

Cbz to Docx

Mp4 to Jpeg

Html to Odf

Mov to Jpg

Zip to Rar