I am attempting to build a latex project with included files using LatexTools in sublime text 3. I cannot build a pdf from a subfile. Please tell me how to set up a sublime project to enable pdf building by using ctrl+b while having the editor opened on a child tex file.

Below is a minimal example:


\title{Exploratory review of QSARs in Toxicology}



This stack exchange question mentions that a root tex file can be created by putting the below in your .sublime-project file:

{ "settings": { "TEXroot": "./yourfilename.tex" } }

This should enable tex building from tex files that are included via a \include command. I believe I have done this correctly. If I run check system I get the below key/field:

TeX Root

However when I try to build from /home/my_user/path/to/sections/3_methods.tex I get:

entering extended mode
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
! Undefined control sequence.
l.1 \section

I found more instructions at latextools documentation but after a few hours of changing various settings I had no luck.

  • That does not look like the output from the LaTeXTools build system. Can you try to press ctrl+shift+b and select LaTeX. In addition you can try to check your builder settings in the file Preferences > Package Settings > LaTeXTools > Settings - User
    – r-stein
    Commented Jul 11, 2017 at 21:28

1 Answer 1


r-stein answered this in a comment. I had created my own latex build system and it wasn't functioning correctly. LatexTools build system fixed this problem.

After switching to the correct build system (Latex with the check below) everything worked:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .