When using a custom template to prepare a report I noticed that long abstracts split across pages, fine, but it leaves the abstract title hanging by itself on it's own page.
How can I structure the abstract environment to have vertically centered abstracts if they fit on one page and top aligned in long abstracts? The \vfil is useful for centering short abstracts, but then means it orphans the title in long abstracts
Actual Behavior of long abstracts
The intended behaviour of long abstracts
But without breaking short abstracts
The MWE of abstract environment and usage
Normally the environment def is split into the template class.
\documentclass[11pt]{book}
\usepackage{lipsum}
\newenvironment{abstract}
{
\thispagestyle{empty}
\null\vfil %Toggling this line will align to the top in multipage abstract
\begin{center}
\setlength{\parskip}{0pt}
{\textsc\normalsize University \par}
\bigskip
{\underline{Abstract} \par}
\bigskip
{\textsc\normalsize Faculty \par}
{\textsc\normalsize Department \par}
\bigskip
{\normalsize \underline{A progress report submitted for continuation towards a PhD}\par}
\bigskip
{\normalsize\bf \title \par}
\medskip
{\normalsize by [Author] \par}
\bigskip
\end{center}
}
{
\vfil\vfil\vfil\null
\cleardoublepage
}
\title{\bf An MWE}
\author{for SO}
\date{\today}
\begin{document}
\frontmatter
\maketitle
\begin{abstract}
\lipsum[1-4]
\end{abstract}
\end{document}





\null(the same as\hbox{}) the issue with the long abstracts is solved, but the short ones are not vertically "centered". Just replacing thecenterenvironment with\centeringit works, but the whole text is than centered. In the latter case, loading theragged2epackage lets you with\justifyto typeset fully-justified back. The drawback is the same output as with thecenterenvironment.centeris defined in terms oftrivlistand leaves vertical space before and after it. This is not the case for\centering. – Ñako Sep 21 '20 at 22:19