% !TEX root = ../manual.tex
% !XTEX program = xelatexmk
% !TEX spellcheck = en_GB

\section{Editor tricks}

Most \LaTeX\ programs support so-called \emph{directives}. These are comments at the start of the file that instruct your editor to use a certain setting.

\begin{itemize}
\item
\begin{lstlisting}
% !TEX program = xelatex
\end{lstlisting}
The program to run this file with. This is not an actual command line and needs to correspond to a configured command.

\item
\begin{lstlisting}
% !TEX spellcheck = en_GB
\end{lstlisting}
The language to use for the spell-check of your editor. This is usually the language code.

\item
\begin{lstlisting}
% !TEX root = main-document.tex
\end{lstlisting}
If the current file is included, adding this will make sure the editor typesets the main document instead of the current file.

\end{itemize}
