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).

Advertisement