4

I've just read this:

Abstract and title together on the first page of an article

Can I achieve the same for a report? If I use the same code in a report-class document, I still get a page break between the title and the abstract.

Example document:

\documentclass{report}
\usepackage{titling}
\usepackage{blindtext}

\title{This is my title}
\author{Me myself and I}
\date{\today}

\begin{document}
\begin{titlingpage}
\maketitle
\begin{abstract}
This is the abstract.
\end{abstract}
\end{titlingpage}
\blinddocument
\end{document}
einpoklum
  • 12,311

2 Answers2

3

A hackish way to do it, suggested here, is placing the \maketitle within a minipage, so its page-clearing is "contained" and doesn't really affect the outer document:

\documentclass{report}
\usepackage{blindtext}

\title{This is my title}
\author{Me myself and I}
\date{\today}

\begin{document}
\begin{minipage}{\textwidth}
\maketitle
\begin{abstract}
This is the abstract.
\end{abstract}
\end{minipage}
\blinddocument
\end{document}

Unfortunately, this will prevent footnotes from being set on the page.

einpoklum
  • 12,311
1

You can use the \maketitlehookd hook for this. Note that the abstract is input before \maketitle.

\documentclass{report}
\usepackage{titling}
\usepackage{blindtext}

\newsavebox{\abstractbox}
\renewenvironment{abstract}
 {%
  \global\setbox\abstractbox=\vtop\bgroup
  \begin{center}\bfseries\abstractname\end{center}%
 }
 {\par\egroup}
\renewcommand{\maketitlehookd}{%
  \par\vfil
  \box\abstractbox
}

\title{This is my title}
\author{Me myself and I}
\date{\today}

\begin{document}
\begin{titlingpage}
\begin{abstract}
\blindtext\blindtext
\end{abstract}
\maketitle
\end{titlingpage}
\blinddocument
\end{document}

enter image description here

egreg
  • 1,121,712