How to have no pagebreak after \include in LaTeX

Léo Léopold Hertz 준영 picture Léo Léopold Hertz 준영 · Jul 30, 2009 · Viewed 77.4k times · Source

My LaTeX makes me pagebreaks after each subsection because my subsections are in separate files. I use the command \include{file} which adds a pagebreak after the use of it.

I would like to have no pagebreak caused by the use of \include{file}.

How can you no pagebreak after the use of include -command?

Answer

Will Robertson picture Will Robertson · Jul 31, 2009

\include always uses \clearpage, a not entirely sensible default. It is intended for entire chapters, not for subsections (why would you want subsections in separate files, anyway?).

You can fix it either by using \input{filename} or loading the newclude package and writing \include*{filename} instead.