Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I'd like to add mathjax to tumblr site, although I'm a bit confused as to where to begin. Mathjax doesn't offer documentation for tumblr, just sites like wordpress and some others.

Thanks

share|improve this question

4 Answers 4

Looking through the MathJax install notes it appears all you need to do is link to the JavaScript file.

For Tumblr, this means you will need to customize your HTML Theme.

From what I can gather you will need to add this line just before the </head> tag.

<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>

Where path-to-MathJax is to where ever on your server you have uploaded the JS file.

e.g.

<html>
    <head>
        <title>My Tumblr site</title>
    <script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
    </head>
    <body>
        ...
    </body>
</html>
share|improve this answer
    
Thanks for the response - The issue I think, I that I'm hosting through tumblr - I just pointed by domain there. I think I may trying just customizing the HTML with the whole Mathjax source, then try. –  tshauck Feb 2 '11 at 20:34

MathJax is now available through a CDN, so you don't have to install it on a server any more. All you need to do is include a few lines in your html header and you can start using mathematics in your posts.

To do this, go to Theme -> Use custom HTML, and insert the following just above the </head> marker:

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Save changes, and you're ready to include mathematics on your Tumblr pages. Try, for example

\[ \exp(x) = \sum_{n=1}^{\infty} \frac{x^n}{n!} \]

Good luck, hope this helps.

share|improve this answer
    
Is it sufficient to just copy and paste that first line? Or are we supposed to replace cdn.mathjax.org/mathjax/latest/… with something else? I attempted to do this on tumblr, and the text post only displayed the raw TeX code. –  yunone Apr 16 '11 at 10:59

We've just released a video tutorial on using MathJax with Tumblr. See http://www.mathjax.org/demos/use-in-web-platforms/

Hope that's useful.

share|improve this answer

In addition to Barry's answer, you need to add some additional data to let Tumblr know what to do with the '$' and '$$' that you typically use with MathJax. Try adding these lines after what's posted above.

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
  inlineMath: [[ '$','$']],
  displayMath:  [['$$','$$']],
  processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script> 

[props to http://blog.angjookanazawa.com/post/15081007922/how-to-write-in-latex-use-mathjax-in-tumblr] for providing these.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.