Sublime Text 2 with LaTeXTools

Sublime Text 2 is a new text editor for Mac. It has been around for Windows, originally created as a TextMate inspired windows editor. Sublime Text 2 has many great features and feels more emacs like than TextMate (which feels more Mac). Anyway, there is a nice LaTeX plugin for Sublime Text 2 called LaTeXTools which uses latexmk to compile the source (included e.g. with the MacTeX distribution).

Here is a note to myself and other on how to use an existing latexmk configuration file.

Change line 34 and onwards from

"cmd": ["latexmk", 
    "-e", "\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'",
"-f", "-pdf"],


"cmd": ["latexmk", 

This tells latexmk to use the configuration file /Users/jody/.latexmkrm for its settings (which in my case involves using xelatex and makeglossaries).


3 thoughts on “Sublime Text 2 with LaTeXTools”

  1. Hello.
    I use texshop since a while.
    I discover ST and the LatexTools plug-in.
    But I can’t run my latex project because they’re writen
    with xetex and fontspec. With texshop in preferences
    I just selected xetex as generating tool.
    I would like to know how to write my own configuration file.
    I did not find anything on the web. Any suggestion.
    Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s