Home > Bluehost, Wordpress, latex > Latex on wordpress

Latex on wordpress

September 8th, 2007 rohitj Leave a comment Go to comments

So, you are a geek. You want to write lot of technical things on your wordpress blog. And since you are a geek you want to write technical things in Latex. How do you do? One way is that you write latex code, make pdf, take screenshot, pick the desirable part, and use that image on blog. Ofcourse thats inconvenient and surely doesn’t go with your nerd personality. You want to write Latex code in your blog post. Here are 2 solutions. One is that you use wp-latex plugin. Using this plugin you will be able to write proper Latex code in your blog using <latex></latex> tags. But the problem is that this plugin uses Latex, which is not usually supported by web hosts, including Bluehost. And installing tetex locally is painful. So, here comes the second solution. Use mimetex. Checkout http://www.forkosh.dreamhost.com/mimetex.cgi?l_2 . Similarly you can get other latex output by replacing l_2. One guy used this property and made a plugin. Using this plugin you can use latex code, basically mimetex (which is a bit different from Latex) with <tex></tex> tags. I couldn’t get it working. Another guy changed this script and made it working with \[tex\]\[\/tex\] tags. It didn’t work as well. This new plugin downloads this image and stores in wp-content/cache folder. But it downloads this image every time someone opens the post. Of course it consumes lot of server and bandwidth. So, I made a small tweak in it. I replaced it’s 15 lines with 1 line. :) Basically, now instead of downloading the image, it puts src as http://www.forkosh.dreamhost.com/mimetex.cgi? blah blah. And see I am able to use latex code.

 f(x) = x^2 + l_2

Enjoy

Update : You can download the plugin (after my modification) from Plugin for using Latex

Update2 : The plugin is under GPL.

Update3 : So, the code I changed was suggested by Nitin Munjal. You can find him here

Categories: Bluehost, Wordpress, latex Tags:
  1. September 8th, 2007 at 12:02 | #1

    Test :
    Lets see if it works with comments as well.
    f(x) = x^2 + l_3 :
    f(x) = x^2 + l_3

  2. September 10th, 2007 at 14:28 | #2

    e^i\$pi+1=0

  3. September 10th, 2007 at 17:40 | #3

    e^i\pi + 1 = 0

  4. September 18th, 2007 at 03:57 | #4

    dude.. atleast(!!) acknowledge. where’s my name??

  5. September 18th, 2007 at 05:25 | #5

    I apologize sir. See update 3. :) . Now I should get a good treat in CCC.

  6. October 24th, 2007 at 11:06 | #6

    test
    $$ \frac{a}{b} = \omega $$

  7. October 24th, 2007 at 12:04 | #7

    it should be [tex\]\frac{a}{b}=\omega[/tex\]
    Note: there is no space in between. space is replaced by +

    \frac{a}{b}=\omega

  8. test
    October 26th, 2007 at 14:52 | #8

    [tex\]\frac{a}{b}=\omega[/tex\]

  9. October 27th, 2007 at 00:59 | #9

    write “[tex" without quotes, then write "]” without quotes. Then you write your latex code, without any spaces. Then write “[/tex" without quotes and then write "]” …. Note you should not put “\”before “]” or “[”.

  10. January 2nd, 2008 at 04:50 | #10

    Latex is a great plugin for maths blogs.

  11. October 18th, 2008 at 16:58 | #11

    g this plugin you will be able to write proper Latex code in your blog using tags. But th

  12. November 5th, 2008 at 21:14 | #12

    Cool! Peshi ischo

  1. December 10th, 2007 at 07:56 | #1
  2. June 20th, 2008 at 02:13 | #2
  3. February 19th, 2009 at 22:58 | #3