[Tex/LaTex] quick build in latex

texstudio

I am using TexStudio for writing a thesis in latex. In order to access the chapters easier, I have made a separate folder for each chapter and ultimately, I have included all the tex files in the main Thesis.tex. When I want to built the pdf file, if I am on the main tex file which is called thesis.tex everything is fine; then I need to scroll down to reach a particular chapter.

When I am on another tex file, say, chapter2.tex and try to quick build, it gives error on my macbook while on my iMac it is fine. The only reason I need to compile on each of the files is that I need the to instantly view to the same place I just edited instead of scrolling all the way down.

I would appreciate your help.

Best Answer

In general, you should compile the main file, this is, the one that contains the \begin{document} and the \end{document}. If you try to compile a single chapter it should give an error. Maybe iMac supports this kind of partial compiling, but in general it's not supported.

What you can do is to define your main tex as "Master document" (Options -> Define current Document as "Master Document"). This way, everytime you press the QuickBuild Button, it is going to compile the main document, even if a single chapter is selected.

Moreover, to avoid the scrolling down you can keep you pdf open.