# Redefined abstract environment aligned incorrectly

In order to prevent the abstract environment from resetting the page numbering, I have redefined the environment as follows

\documentclass[11pt,a4paper]{report}

\makeatletter
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\makeatother

\begin{document}

\begin{abstract}
This is the abstract...
\end{abstract}

\end{document}


This does the job but the abstract is no longer centred vertically. I'm not familiar with redefining environments - can anyone tell me how I can adjust the code above so that my abstract stays in the middle of the page?

Use this definition for your abstract:

\renewenvironment{abstract}{%
\clearpage\small
\null\vfil
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{0pt}}%
\end{center}%
\quotation
}
{\endquotation\vfil\null\clearpage}


MWE:

\documentclass[11pt,a4paper]{report}

\renewenvironment{abstract}{%
\clearpage\small
\null\vfil
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{0pt}}%
\end{center}%
\quotation
}
{\endquotation\vfil\null\clearpage}

\begin{document}

\begin{abstract}
This is the abstract...
\end{abstract}

\tableofcontents
\chapter{Chapter 1}

\end{document}


Output:

• Thanks, I wasn't aware of the command \vfil. Out of interest, the original definition of the abstract environment uses \@beginparpenalty, is this what causes the page number to reset? – Tom Offer Mar 30 '15 at 17:08
• @TomOffer No, \endtitlepage resets it. – karlkoeller Mar 30 '15 at 17:11
• \vspace*{\fill} is better, IMO. In any case, the \null at the end does nothing and you should instead add \clearpage. Also \par is redundant: \endquotation issues one. – egreg Mar 30 '15 at 17:37
• @karlkoeller Yes, it makes a difference. \vspace*{\fill} is more infinite than \vfil, so it will kill the flexible glue around center and quotation even if it had first order infinite components. Moreover, if what comes after \end{abstract} doesn't start a new page, you'd be in trouble without \clearpage, wouldn't you? Besides, promoting \null is wrong, because it's quite a dangerous command. I'd prefer \clearpage\vspace*{\fill} to start, for the same reason why \clearpage is needed at the end. – egreg Mar 30 '15 at 17:42
• @egreg I agree only about \par and \clearpage – karlkoeller Mar 30 '15 at 17:45

I'd not vertically center the abstract: it appears to hang from nothing.

However, here's a possible definition that leaves you a different choice: the optional argument to \begin{abstract} is a fraction for stating the relative distance from the top of the page.

\documentclass[11pt,a4paper]{report}

\renewenvironment{abstract}[1][1]
{\clearpage
\vspace*{\stretch{#1}}
\begin{center}
\bfseries\abstractname
\end{center}
\quotation}
{\endquotation\vfill\clearpage}

\begin{document}

\begin{abstract}
This is the abstract...
\end{abstract}

\begin{abstract}[.3]
This is the abstract...
\end{abstract}

\end{document}


Personally, I'd use the book class and \chapter{\abstractname} in \frontmatter.

• Using \vfil` as in the answer above seems to align the abstract roughly vertically central, like the original environment does. It works for me! – Tom Offer Mar 30 '15 at 18:30