I'm using the titlesec package to redefine the chapter format, and I noticed a spacing issue when adding a section which causes a page break. Essentially, I want the title displayed between two horizontal lines. However, as demonstrated in the MWE below, there is an additional gap between the first line and the title if I don't manually add a \newpage right before calling the \section command.
Here's a working example:
\documentclass[11pt]{book}
\usepackage{titlesec}
\titleformat
{\chapter}
[display]
{\sffamily\LARGE}
{\filcenter\rmfamily\bfseries\fontsize{4cm}{1cm}\selectfont\thechapter}
{6ex}
{\titlerule\vspace{1.5ex}\filcenter}
[\vspace{1.5ex}\titlerule]
\usepackage{lmodern}
\begin{document}
\chapter{Introduction}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce gravida nunc et
posuere condimentum. Nullam pretium, enim a iaculis vehicula, mauris dui
interdum arcu, ac egestas mi diam vitae nibh. Etiam at scelerisque ex, a
fringilla augue. Fusce leo diam, bibendum ut aliquam et, gravida at justo. Nam
rutrum augue in elit congue, vehicula tristique sem malesuada. Nulla porttitor
massa eget mollis accumsan. Aenean eu dolor ac ex congue auctor. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Sed et felis accumsan, congue magna eu, placerat quam. Aenean lobortis
maximus facilisis. Sed tristique vestibulum sodales. Suspendisse potenti. Nunc
eget nibh a libero dictum eleifend finibus at est. In hac habitasse platea
dictumst.
Pellentesque et tempor nisl. Proin aliquet tristique elit vitae lacinia.
Praesent accumsan nisl eu sapien sodales, ut hendrerit purus interdum. Praesent
eget viverra magna. Praesent non tincidunt neque. Vivamus fermentum maximus
porttitor. Integer vitae lacus dapibus, vulputate purus non, lacinia orci.
Aenean sodales, massa ut tincidunt iaculis, nulla velit mattis nibh, in aliquam
lectus lectus quis sapien.
% \newpage % Commenting in this line fixes the issue.
\section{Overview}
\end{document}
I should mention that the compiler does complain about an underfull vbox which goes away if I manually break the page. Is this something that can be fixed automatically or do I have to fix such issues manually?
Edit: here's what the whole thing looks like with and without the mentioned gap.


\raggedbottom. The default is\flushbottom. Also, in\fontsize, the second argument is usually 20-25% more than the first (it measures the interline skip), and usually one use points as units. – Bernard Jan 22 '19 at 20:07fontsizearguments. – Jan 22 '19 at 20:31