I'm currently doing an assignment, where I have to do the report in LaTeX. When it comes to writing, I try to do everything I can in Sublime Text, so I wanted to find a proper workflow for LaTeX in Sublime Text too. This is what I came up with.

The main components needed for doing documentation in LaTeX is:

  • LaTeX distribution (containing a variety of packages)
  • LaTeXTools package for Sublime Text 2

Get a LaTeX distribution

First you need a LaTeX distribution - I used MacTeX. The distributions are pretty heavy in filesize, so be prepared to download around 2 GB. And even worse, once you run the installer, it will tell you that it's going to take up 4 GB of disk space.

Install LaTeXTools

Marciano Siniscalchi has created a nice Sublime Text tool to effortlessly connect with MacTeX. The easiest way to install it is through Will Bond's Package Control

So go ahead and hit Cmd+Shift+p and type latextools and you should see it right away.. hit enter to install

package_control_latex

That's everything you need. If you open up a valid .tex file and type Cmd+b, it will build the files including a PDF file.

I'd suggest you take a look at the default key bindings to get to know a few handy shortcuts.. they're located under:

Sublime Text 2 > Preferences > Package Settings > LaTeXTools > Key Bindings - Default

to name a few:

  • Cmd+l,b will give you \textbf{} for bold text.
  • Cmd+l,e will give you \emph{} for italic text.