I want chapters in the report class to start 3em below the end of the previous chapter. To do this, I patch the \chapter command using titlesec and etoolbox. However, this adds blank space above the chapter name even if is on the top of a new page, which I don't want. How can I remove the spacing if the chapter starts at the top of a new page?
I want the Sixth chapter heading like in the right hand side figure below, not the one at the left.
\documentclass[12pt,a4paper]{report}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}%
{\par\vspace{\baselineskip}}{}{}
\makeatother
\titlespacing*{\chapter}{0mm}{3em}{1em}
\begin{document}
\chapter*{First chapter}
\lipsum[1-4]
\chapter*{Second chapter}
\lipsum[1-2]
\chapter*{Third chapter}
\lipsum[2]
\chapter*{Fourth chapter}
\lipsum[1-3]
\chapter*{Fifth chapter}
\lipsum[2]
\chapter*{Sixth chapter}
\lipsum[1-2]
\end{document}



\@makechapterheadcontains the spacing command\vspace*{50\p@}. to make this space not persist at the top of a page, patch\@makechapterheadto remove the*from the\vspace. – barbara beeton Mar 16 '18 at 17:15