LaTeX compiler directives are very useful

Many programming languages (include LaTeX) have compiler directives–a type of pragma in the form of a specifically formatted comment. For LaTeX, de facto directives have evolved compatible with popular LaTeX editors including Atom and TeXstudio.

Specify LaTeX compiler

At the top of your main/root LaTeX document:

% !TeX TS-program = xelatex

or other compiler of your choice.

Specify root/master LaTeX document

Particularly for large or multi-chapter LaTeX documents, it is good practice to have multiple documents. To help your LaTeX editor recognize which is the top-level master document, in the other .tex files you \include or \input, put at the top of each of those .tex files:

% !TEX root = thesis.tex

or whatever your main document filename is.

Leave a Comment