How it is possible to avoid page break between included files in a latex document?

Viewed 30

I'm working on a long document an I've splitted the text of a chapter in several .tex files. The compiled text (overleaf) inserts a page break between two of this files, not reflecting the continuity of the sources. How is it possible to avoid this page break?

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{amssymb} % Conjunto de símbolos matemáticos
%\usepackage{amsthm}  % Formato para enunciados y demostraciones
\usepackage{amsmath}
\usepackage{enumitem}
%

\usepackage[amsthm,thmmarks]{ntheorem}
%\usepackage[standard]{ntheorem}
%
\qedsymbol{$\blacksquare$}
\renewcommand\qedsymbol{$\blacksquare$}
%
\begin{document}


\chapter*{Preface}
% Main text
\include{Chapters/Chapter01}
\include{Chapters/Chapter01-cont}
\include{Chapters/Chapter02}
\end{document}

File Chapter01.tex

\chapter{Chapter01}
Text of chapter01

File Chapter01-cont.tex

\section{Section2}
Continuation of the contents of chapter01

File Chapter02.tex

   \chapter{Chapter02}
    Text of Chapter02
1 Answers

To avoid the automatic page break, you could use \input instead of \include

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{amssymb} % Conjunto de símbolos matemáticos
%\usepackage{amsthm}  % Formato para enunciados y demostraciones
\usepackage{amsmath}
\usepackage{enumitem}
%

\usepackage[amsthm,thmmarks]{ntheorem}
%\usepackage[standard]{ntheorem}
%
\qedsymbol{$\blacksquare$}
\renewcommand\qedsymbol{$\blacksquare$}
%


\begin{document}


\chapter*{Preface}
% Main text
\input{Chapter01}
\input{Chapter01-cont}
\input{Chapter02}
\end{document}

enter image description here

Related