Search

Monday, November 11, 2013

LaTeX in Blogs

Well I had tried several times to add math into the blog in a way that will be satisfying for the regular LaTeXian. As you can see from my previous posts that it is not very successful, I had to insert the symbols as images and the alignment is horrible, it may have worked with the equations but the inline math is absolutely ridiculous. So I came across this site of mathtype, which is a commercial software for typesetting math. And I found that the same info could be used without even having the software at all.

  1. From the left sidebar of the Dashboard, click Layout.
  2. Beneath the Header section of Layout, click Add a Gadget.
  3. Scroll down until you find the gadget labeled HTML/JavaScript, and click the + to the upper right of that gadget:
  4. Give it whatever title you want (it won't show on the blog). MathJax seems like an appropriate title.
  5. In the Content area, paste or type this code (it’s all 1 line; just let it wrap when it gets to the end):
    <script type="text/javascript"
    src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
    </script>

  6. Click Save.
  7. When the Gadget window closes, you should be back on the Layout screen, so click the orange Save Arrangement button near the top.

Now having followed this steps, and since I am using Windows Live Writer it would be interesting to see how it will turn out. Which is this post all about. For Display style math you just use the \[ and \] enclosing whatever \(\LaTeX \) formula you want to add.\[\sqrt {{\alpha^2} + {\beta^2}} \] And here for the inline format \(\sqrt {{\alpha^2} + {\beta^2}} \) where the enclosing brackets are \( and \) . And now I have to see the result of posting directly from the windows Live writer this formulas and how it will appear. It seems that it works very well.

1 comment:

  1. Glad the article was useful to you. You should be able to use the techniques with Windows Live Writer, posting to Blogger.

    ReplyDelete

Your comments are most welcomed