# Is it possible to use \includeonly, but display the full document?

Say I have

\documentclass{article}
\includeonly{part2}
\begin{document}
\include{part1}
\include{part2}
\include{part3}
\end{document}


Is it possible to compile only part2 by using the \includeonly command while displaying in the viewer the whole document so that I can scroll up and down to part1 and part3 to view what I have written there while writing new text to part2?

If it's important, I'm using TexStudio.

• No, that is not possible – user2478 Oct 26 '17 at 6:06

As @Herbert already said: this is not really possible with your \includeonly approach. As soon as you compile only part 2, the pdf will only contain this part.
Another approach would could be to use subfiles. This allows you to compile your main file and the individual parts separately. This means that during compilation of part 2 you can open the pdf of the main file and browse the other sections.