Archive for the ‘Python’ Category
Customizing LaTeX.tmbundle
TextMate is a great Mac OS X plain text editor with many features and supported coding languages. LaTeX support (syntax highlighting, commands, code snippets, etc.) in TextMate is provided by the LaTeX Bundle, that is contained in any TextMate installation by default.
LaTeX bundle defines a default shortcut Command+R to show a typesetting status dialog window with some buttons for additional actions – compiling bibliography, building index, previewing, etc. I wanted to have an additional action button to run MetaPost on the file with .mp extension:

To get the desired functionality, LaTeX bundle should be checked out from TextMate SVN and patched. Save the patch Latex.tmbundle.diff (file contents is listed below) to your Desktop and run the following commands in the Terminal:
$ cd ~/Desktop $ svn co http://svn.textmate.org/trunk/Bundles/Latex.tmbundle $ patch -p1 -d Latex.tmbundle < Latex.tmbundle.diff
To install updated LaTeX bundle into TextMate, simply double-click patched Latex.tmbundle, press “Update” in the dialog window. “Bundle Editor” TextMate window will be displayed, you may just close it.
That’s all. Your modified Latex.tmbundle was moved to ~/Library/Application Support/TextMate/Pristine Copy/Bundles and installed.
