[Tex/LaTex] \input working but \include not showing anything

includeinput

I am facing the following issue. I have a big project on Overleaf that I split into many separate files. All those files are included into the main.tex file using the \input command. After some time I realised how slowly the project is compiling. I read something about the benefits of using \include for including the contents from different files. Mainly it will increase the speed because if the included file is not changed it does not need to be recompiled. Sadly the \input command is working but when I change to the \include the content is not showing up, but I am also not getting any error message. Maybe someone can help me with this.

\input{sections/conclusion.tex}

=> this command shows the content of the referenced file

\include{sections/conclusion.tex}

=> this command does not show the content of the referenced file

Best Answer

I had the opposite of the reported issue (\input{} was not displaying). Sharing this still since it is related. Hope this helps someone. My project setup is main.tex calls \input{file1.tex} then \input{file2.tex}. The issue I faced is, the contents upto file1.tex was displayed, but the content from file2.tex was not displaying.

The reason I found from log is, I had used the following block in the first file1.tex

\begin{document}

\end{document}

After removing the above block from the first input file, file1.tex, the content from file2.tex started displaying.