[Tex/LaTex] LaTeX project together with Sublime Text 2


I am writing a paper divided into several sections. I would like to have one master file and then several file which I will only include. I would like to do it properly, since I am sending it to my professor and he has to work with on it too.

Let me show, what I mean.
The folder structure is:


The master.tex file:

    % preamble

And for example section_one.tex:

\section{Section 1}
Lorem ipsum

I am working in Sublime Text 2 with Latexing. I would like to

  1. create the project in recommended intelligent way (if such exists)
  2. while working on lets say section_one.tex be able to press Ctrl + b (standard for shortcut for building the project) and build the master.tex file not section_one.tex since it does not contain preamble and throws bunch of errors. Also I don't want to have to switch to the master.text file in ST2 every time I want to build.

Best Answer

From the LaTeXing documentation:

One option is to create a Sublime Text project and the other one is just to add the following line at the start of your tex file. The path can be absolute or a relative path to the current tex file.

% -*- root: Project_Example.tex -*-

Now, if you have specified a root file, you'll be able to edit the current .tex file and LaTeXing will build the main file upon compilation.