How can I translate a section of a thesis into a PDF? For me it always throws an error if I want to quickbuild the file.

When I open the section and want to build it it says that it cannot find some pictures as well.

"Undefined control sequence. \chapter"
"Missing \begin{document}."
"Undefined control sequence."
"Environment figure undefined."
"Undefined control sequence. \includegraphics"

Any help is very much appreciated!

  • You cannot just compile a single chapter. You always need a complete document, even if it is just a chapter long.
    – Johannes_B
    Mar 31, 2018 at 8:47
  • Thanks a lot for your fast answer! So you cannot do a single chapter? That's sad...is there a workaround maybe?
    – MatlabNewb
    Mar 31, 2018 at 8:48

1 Answer 1


Are you trying to compile a file directly that's normally included in the main thesis? That won't work, as you are missing all the preamble and the \begin{document}...\end{document} statements.

What you can do if you use \include to read in the separate parts of your thesis: add a line \includeonly{<file1>[,<file*n*>]} in the preamble (before \begin{document}):




This will only read (and compile) the 'results.tex' file and output the result. Pagenumbers will be off, and cross references outside the included sections will not work as expected either.

Unfortunately, this won't work with files read in through \input

  • Works like a charm! Perfect!
    – MatlabNewb
    Mar 31, 2018 at 9:06

You must log in to answer this question.

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