Monday, October 29, 2012

Getting MathJax Working

I just installed MathJax, with a little help from Christian Perfect. I want to test it out, so let’s type up some fancy math. First, we need to know if we can handle inline expressions like $e^{i\pi} = –1$. Then we need to test some serious displayed mathematics. My favorite “befuddle the students” identity is \[ \sum_{n=1}^{\infty} n^{-n} = \int_0^1 x^{-x} \, dx . \]

By the way, if you want to prove that last one, remember that the Taylor series expansion of the exponential function is uniformly and absolutely convergent on the whole real line. Therefore, any formal operation you want to do on that power series is justified.

Crossing my fingers…

Well, it took a little tweak. The first attempt didn’t work because I wrote the post in Markdown and exported the html, and I bet I screwed up the escape characters. And then it worked.

And then it didn’t work after I edited the post. I think Google’s WYSISYG editor rebroke my fixed thing when I added that paragraph. so I have gone back to markdown to edit and repost. Let’s see!

2 comments:

  1. Alright. I finally got it. I mislocated the javascript in the raw html for the template. I put it right before the [head] tag, when it should go right before the [/head] tag. Anyway, works now.

    ReplyDelete
  2. Update on Feb 16, 2013: Blogger has messed with the way they handle scripts, so the usual MathJax setup isn't working. But there is a workaround: a Sage cell contains MathJax, so implementing one brings the other.

    You can find my current workaround at this address: https://gist.github.com/theronhitchman/4968722
    All the work for that was done by Jason Grout and Ira Hanson, the developers of the Sage cell setup.

    ReplyDelete