#StackBounty: #spacing #vertical-alignment #titles #abstract Long abstract for technical report orphaning Abstract title due to vfil

Bounty: 100

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

Two page view of abstract title orphaned when the abstract content is long

The intended behaviour of long abstracts

enter image description here

But without breaking short abstracts

enter image description here

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}
  nullvfil %Toggling this line will align to the top in multipage abstract
  begin{center}
    setlength{parskip}{0pt}
    {textscnormalsize University par}
    bigskip
    {underline{Abstract} par}
    bigskip
    {textscnormalsize Faculty par}
    {textscnormalsize Department par}
    bigskip
    {normalsize underline{A progress report submitted for continuation towards a PhD}par}
    bigskip
    {normalsizebf title par}
    medskip
    {normalsize by [Author] par}
    bigskip
  end{center}
}
{
  vfilvfilvfilnull
  cleardoublepage
}

title{bf An MWE}
author{for SO}
date{today}

begin{document}
frontmatter
maketitle
begin{abstract}
lipsum[1-4]
end{abstract}
end{document}


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.