Current Version:
1.1
download
1.1
download
LaTeX is the popular format for outputting well-formed mathematical formulas and special text on the web. This plugin provides an interface between the Linux/Unix implementation of TeX and a published Movable Type page.
Install: Download, untar and place the LaTeX folder inside your Movable Type plugins folder. Next, edit any template where you'd like to see your LaTeX formulas published and add the attribute 'latex="1"' such as for an entry body which would look like this: <mt:EntryBody latex="1">. The format for including LaTeX code in your posts looks like this: $latex YOUR_LATEX_FORMULA$ and when you republish a post with latex code it will be replaced inline with xhtml-compliant image tags containing your formula.


This plugin ships with and uses the Perl port of LaTeXRender from Alex at Chapter Zero with some modifications for configuration and display.
Install: Download, untar and place the LaTeX folder inside your Movable Type plugins folder. Next, edit any template where you'd like to see your LaTeX formulas published and add the attribute 'latex="1"' such as for an entry body which would look like this: <mt:EntryBody latex="1">. The format for including LaTeX code in your posts looks like this: $latex YOUR_LATEX_FORMULA$ and when you republish a post with latex code it will be replaced inline with xhtml-compliant image tags containing your formula.

Add LaTeX code into your posts inline...

...and it's automatically converted to a well-formatted image!
Requirements:- Movable Type 4.0+
- LaTeX, ImageMagick installed
- Some flavor of Linux/Unix (tested on Mac OSX, Debian)
This plugin ships with and uses the Perl port of LaTeXRender from Alex at Chapter Zero with some modifications for configuration and display.
1.1:
- Added ability to set the path for TeX and ImageMagick tools via the settings tab on the plugin listing page
- Translates many LaTeX commands into gif images with transparent backgrounds

Post a comment
Comments
I'm interested in using this plugin, but I get an odd error:
FileInfo.pm: Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at /home/ektopos/www/movabletype/cgi-bin/plugins/LaTeX/lib/LaTeXRender.pm line 201.
February 6, 2008
7:32 PM
From Matthew
I've been rendering LaTeX on my MT blog for several years now. I use a custom solution that is built into a currently unreleased text processor. I blogged about it a while back: http://dererumnatura.us/archives/2007/10/rendering-equat.html. I'll be happy to discuss rendering algorithms with you if you want.
February 9, 2008
9:05 PM
From Reed A. Cartwright
FYI, Matthew's error message was caused by an old version of the perl module File::Copy. Upgrading via CPAN seemed to clear it up for him.
February 10, 2008
9:18 PM
From Nick
hi, i got the same error like your blog post above ([Unparseable or potentially dangerous latex formula. Error 4 problem running latex (syntax error?), so dvi file not created]) - see your blog post after "The format for including LaTeX code in your posts looks like this:"
can you explain this error message. what should i do?
thanks
stefan
February 20, 2008
8:34 AM
From Stefan
to stefan:
make sure your system tools in the proper path. By default plugin uses /usr/bin/.
Also plugin uses two directory ./blogpath/tmp and /blogpath/latex. You should create it manually.
Nick, thank you very much for this plugin. Clean and tidy code. Thanks.
By the way, I didn't manage to get authorized using liverjournal account
June 3, 2008
9:34 AM
From Alexander Mikhalev
@Alexander:
Thanks for the tips! I've seen the case where 'tmp' and 'latex' need to be created and given correct permissions, it'll definitely be automatic in a future version. OpenID login from LiveJournal seems like it's working for me, I'll try it out in a couple other browsers just to be sure.
June 3, 2008
9:42 AM
From Nick
Nick,
I sent you a patch with a hack to create dirs automatically.
LJ authorization works, it's seems to be the problem specific to my lj account. I created new one and it worked just fine.
June 4, 2008
2:05 AM
From Alexander Mikhalev
Nick, I have a problem which I don't understand how to solve.
I have an entry in my template which looks like this:
This produces my post twice, first with rendered latex formulas and second time without.
Initially I thought you code in while loop adding this twice, but it doesn't do it in separate file.
Can you please advice me where to look in order to change this behaviour?
I am fine with latex code after the equation as an option, but I don't want my post to be repeated twice.
June 4, 2008
9:25 AM
From Alexander Mikhalev
Hi. Thanks for a great plugin.
Sometimes, I find myself wanting to use displaymath or eqnarray*. Any chance of supporting this in future?
June 5, 2008
9:48 PM
From Pseudonym
@Pseudonym:
It's not unlikely that I'll add support for those two. The original LaTeXRender.pm strips them, possibly for security reasons. Perhaps in the future you'll be able to configure the plugin in two modes: an unrestricted mode for posts where you control all the LaTeX that goes in and a more secure mode if commenters want to use LaTeX code.
June 6, 2008
10:29 AM
From Nick