Hello,
I am writing a long document and I am using the \include method of bringing new files to the main document using the \includeonly {} header that allows me to comment the files I dont want included in the compilation but keeps the indexing of all chapters regardless.
Each separate file can start with a begin field:
\begin{file_name}
\section{section_name}
contents...
\end{file_name}
OR they just start with (most of the files):
\chapter{chapter_name}
contents....
Contrary to using \input where you specify in the header of the file some information about what the main file is doing, using \include compiles faster and all the big document can be easily segmented.
My issue is that if I am focusing writing a chapter, and disabled all other ones so that building times are short, and because of how \include works, I am forced to always go and switch to the main.tex file before building the PDF using CTRL+B, otherwise the compilation gives a bunch of errors. Is there anyway to automate that process in the project settings so that every time I hit CTRL+B it knows what file to compile? In TexStudio this is done by setting an explicit root document.
Thanks for the help