[Tex/LaTex] Unwanted blank page inserted after abstract

abstractblank-page

I'm creating a thesis document using the report style and I'm running into an issue where latex wants to insert an extra blank page after my abstract. I would like the abstract to be a single page and immediately followed by the 'DEDICATION' section on the following page.

If I delete a single line of text, I notice that the blank page goes away, so I'm guessing that the page is close to being overfull and that's why it tries to insert a new page, but due to widow/orphan protection it instead keeps all of the text on one page.

I have tried using the \nopagebreak option but that serves to place a single line of text on the next page (while getting rid of the blank page), which is not allowed by my formatting guidelines. I've searched around on this site and elsewhere and haven't found a solution. Any help would be greatly appreciated!

\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage[toc,page]{appendix}
\usepackage[letterpaper, left=1.5in, right=1in, top=1in, bottom=1in, includefoot]{geometry}
\usepackage{titlesec}
\usepackage{amsmath}
\usepackage{mathrsfs}
\DeclareMathOperator{\sinc}{sinc}
\usepackage{siunitx}
\usepackage{rotating}
\usepackage{graphicx}
\graphicspath{{./figures/}}
\usepackage[section]{placeins}
\usepackage[space]{grffile}
\usepackage{todonotes}
\usepackage{amssymb}
\usepackage{lipsum}
%\usepackage{sectsty}
\usepackage{setspace}
%\allsectionsfont{\singlespacing}
\usepackage{standalone}
\usepackage{tikz}
\usetikzlibrary{dsp,chains,external,fit,arrows,calc,math}
\def\th{30}
\tikzmath{\ps = 90 - \th;}
\usepackage{circuitikz}
\usepackage{multirow}
\usepackage{subfig}
\usepackage{url}

% Guidelines - no less than 2 lines of a paragraph to be widowed/orphaned
\usepackage[defaultlines=2,all]{nowidow}

\pdfminorversion=7



% Table titles on top of table
\usepackage{float}
\floatstyle{plaintop}
\restylefloat{table}

% Chapters should be roman, no bold, centered upper case
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\renewcommand{\appendixpagename}{\textnormal{APPENDICES}}
\renewcommand{\appendixtocname}{APPENDICES}
\addto\captionsenglish{% Replace "english" with the language you use
    \renewcommand{\contentsname}%
    {TABLE OF CONTENTS}%
    \renewcommand{\listfigurename}{LIST OF FIGURES}
    \renewcommand{\listtablename}{LIST OF TABLES}
}


\titleformat{\chapter}[display]
    {}
    {\centering\MakeUppercase{\chaptertitlename} \thechapter}
    {2ex}
    {\centering}

\titleformat{\section}
    {\normalfont}
    {\thesection}
    {2ex}
    {}

\titleformat{\subsection}
    {\normalfont}
    {\thesubsection}
    {2ex}
    {}



\begin{document}
\singlespacing
\pagenumbering{roman}

\newpage
\doublespacing
\renewcommand{\abstractname}{\textnormal{ABSTRACT}}
\begin{abstract}
    \thispagestyle{plain}
    \setcounter{page}{3}
    \lipsum[1]

    \lipsum[2]

    more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page more text to fill up the whole page  
\end{abstract}

\setcounter{page}{4}
\chapter*{DEDICATION}
\vspace*{2in}
\begin{center}
    \textit{Dedicated to blah blah blah}
\end{center}
\vspace*{\fill}
\clearpage

\end{document}

Best Answer

Looking into the abstract environment, one finds it ends with

\par\vfil\null\endtitlepage

So one can patch the abstract environment, to get rid of that \null which is creating the empty page. Note, however, that this changes the appearance if your abstract is shorter. So just use it, if needed.

Add

\usepackage{etoolbox} % provides \patchcmd
\patchcmd{\endabstract}{\null}{}{}{} % replaces \null with third argument (empty)

to your preamble to remove this \null.

Related Question