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'",
    //"-silent",
"-f", "-pdf"],

to

"cmd": ["latexmk", 
        "-r",
    "/Users/jody/.latexmkrc"
       ],

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

Advertisements

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:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s