# \part and text on same page in book documentclass

I wonder how to get \part and text on same page with book documentclass. Thanks for any help.

\documentclass{book}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{lipsum}

\begin{document}

\part{Test1}

\lipsum[1-5]

\part{Test2}

\lipsum[2-6]

\end{document}

• \part uses either a \cleardoublepage or a \clearpage -- you have to get rid of them. I am pretty sure this has been asked already here on TeX.SE – user31729 May 15 '17 at 13:05

What you need is the titlesec package.

\documentclass{book}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{lipsum}

\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}[display]
{\huge\bfseries\centering}{\partname~\thepart}{0pt}{}
\titlespacing*{\part}{0pt}{40pt}{40pt}

\begin{document}
\part{Test1}
\lipsum[1-5]
\part{Test2}
\lipsum[2-6]
\end{document}