Wednesday, September 19, 2007

How to Edit LaTeX with TextMate

Installing LaTeX


The TextMate website lists two ways to install LaTeX. If you have MacPorts installed, then you simply need to run sudo port install tetex. If you don't have MacPorts installed, I would highly suggest installing it, since the alternative officially sanctioned way of getting LaTeX, through i-Installer, is no longer actively maintained.


Installing TextMate


TextMate is one of the most highly regarded editors on the Mac OS X platform. It was popularized by DHH of Ruby on Rails fame and has spawned several copy cats, such as E, a TextMate clone for Windows. You can pick up a copy of TextMate at Macromates. Once you have TextMate installed, enable Cutting-Edge updates by going to TextMate > Preferences > Software Update > Watch For: > Cutting-Edge.



Installing Skim


Skim is the spiritual successor to PDFView. It has many noteworthy features, including, but not limited to note-taking and annotation features, highlighting, and TextMate / pdfsync integration. Once you have Skim installed, activate Skim > Preferences > Sync > Check for file changes. TextMate should already be entered as the default editor.


Configuring the new LaTeX bundle


To configure the new LaTeX bundle in TextMate, go to Bundles > LaTeX > Preferences ... and set your viewer to Skim. Now you should be all set to write LaTeX documents in TextMate!