如何消除段落中间的大量随机空白?

如何消除段落中间的大量随机空白?
\documentclass[12pt]{report}
\usepackage{graphicx, longtable}
\graphicspath{{images/}}
\usepackage[margin=1in]{geometry}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tabularx}
\usepackage{varwidth}
\usepackage{stackengine}
\usepackage{tikz}
\usepackage{adjustbox}
\usepackage{amsmath}
\usepackage{array}
\usepackage{caption}
\usepackage{times}
\usepackage{titlesec}
\usepackage{float}
\usepackage{hyperref}
\usepackage{biblatex}
\usepackage{enumerate}
\usepackage{enumitem}
% \usepackage{needspace}
% \usepackage{indentfirst}
% \usepackage[
% backend=biber,
% style=alphabetic,
% sorting=ynt
% ]{biblatex}
% \addbibresource{sample.bib}
\addbibresource{ref.bib}
% \restylefloat{table}
% \newcolumntype{C}{>{\centering\arraybackslash $}X<{$}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
% \usepackage{geometry}
% \renewcommand{\familydefault}{\rmdefault}
% \usepackage{newtxtext,newtxmath}
\usepackage{titlesec}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
% \makeatletter
% \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
% \makeatother
% \usepackage{titlesec}    
% \titleformat{\chapter}[display]
% {\normalfont%
    % \Huge% %change this size to your needs for the first line
    % \bfseries}{\chaptertitlename\ \thechapter}{30pt}{%
    % \Large %change this size to your needs for the second line
    % }

% \newcommand{\chapfnt}{\fontsize{16}{19}}
% \newcommand{\secfnt}{\fontsize{14}{17}}
% \newcommand{\ssecfnt}{\fontsize{12}{14}}

% \renewcommand*{\chapterheadstart}{%
%   \par
%   \needspace{10\onelineskip}
%   \vspace{\beforechapskip}
%   \mbox{}\\\mbox{}\rule[0pt]{\textwidth}{0.4pt}\par}

\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        %\huge\bfseries \@chapapp\space \thechapter
        \Huge\bfseries \thechapter.\space%
        %\par\nobreak
        %\vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother
\makeatletter
% Redefine the \chapter* header macro to remove vertical space
% b
\makeatletter
\newcommand*{\radiobutton}{%
  \@ifstar{\@radiobutton0}{\@radiobutton1}%
}
\newcommand*{\@radiobutton}[1]{%
  \begin{tikzpicture}
    \pgfmathsetlengthmacro\radius{height("X")/2}
    \draw[radius=\radius] circle;
    \ifcase#1 \fill[radius=.6*\radius] circle;\fi
  \end{tikzpicture}%
}
\makeatother



\newcommand\xrowht[2][0]{\addstackgap[.5\dimexpr#2\relax]{\vphantom{#1}}}

 
% \titleformat{\chapter}[display]
%   {\normalfont\bfseries}{}{0pt}{\Huge}
  
\usepackage{lipsum}  
 



% \topmargin -20pt
\begin{document}

\pagenumbering{roman} 
% \vspace{-0.5cm}
\input{chapters/title}
\input{chapters/revision_history}
% \pagenumbering{arabic}
\input{chapters/tableofcontents}
% \pagenumbering{arabic}
% \chapter*{Abstract}%
% \addcontentsline{toc}{chapter}{\numberline{}abstract}%
\input{chapters/abbreviations}

\input{chapters/abstract}
\newpage
% \pagenumbering{arabic}
\chapter{Introduction}
\pagenumbering{arabic}
% \small
% \input{chapters/1_introduction}

{\let\clearpage\relax \chapter{Problem Statement}}
\lipsum[1]
\lipsum[2]
% \\*
% \parindent
\input{chapters/2_problem_statement}

{\let\clearpage\relax \chapter{Problem Solution for the Proposed System}}
% \par
% \input{chapters/3_problem_solution}
\lipsum[2]
% \lipsum[3]


{\let\clearpage\relax \chapter{Related System Analysis/Literature Review}}
\input{chapters/4_related_system_analysis}
% \lipsum[1]
% \lipsum[2]

{\let\clearpage\relax \chapter{Advantages/Benefits of Proposed System}}
% \input{chapters/5_advantages_of_proposed_system}
\lipsum[1]
\lipsum[2]
\lipsum[3]


{\let\clearpage\relax \chapter{Project scope}}
% \chapter{Project scope}
% \input{chapters/6_project_scope}
\lipsum[1]
\lipsum[2]
% \lipsum[3]
% \newpage

{\let\clearpage\relax \chapter{Modules}}
\input{chapters/7_modules}

{\let\clearpage\relax \chapter{System limitation}}
% \input{chapters/8_system_limitation}
\lipsum[]

% \input{chapters/abstract}
% \printbibliography
% \printbibliography[heading=bibintoc,title={References}]
% \printbibliography[heading=bibintoc]
\end{document}

我希望第 7 章从第 6 章所在的同一页开始,因为还剩余一些空间,但由于某种原因发生了这种情况。

此外,如果我在第 7 章中不使用 \section,则不会出现此问题。

任何形式的帮助将不胜感激。

相关内容