# How to include abstract into titlepage?

I don't want to have the abstract on a separate page but rather under the title. Also I then want to end the page and don't begin with the actual document.

This is my minimal example:

\documentclass[a4paper,12pt,abstracton,titlepage]{scrartcl}

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern}

\title{Title}
\subject{Subject}
\author{Author}

\begin{document}

\maketitle

\begin{abstract}
...
\end{abstract}

\newpage

\tableofcontents
...
\end{document}


I tried to use \let\endtitlepage\relax which was suggested in another question but it doesn't change anything.

If I don't use titlepage then it's not centered vertically which I understand because the document is supposed to start right after it.

So, how can I get this layout without creating a custom titlepage?

-

You could misuse the \publishers element:

\documentclass[a4paper,12pt,abstracton,titlepage]{scrartcl}

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern}

\title{Title}
\subject{Subject}
\author{Author}

\publishers{%
\normalfont\normalsize%
\parbox{0.8\linewidth}{%
}
}

\begin{document}

\maketitle

\end{document}


Since it’s value normally is centered an in \Large you have to put in it a \parbox of the desired width and set the font back to \normalsize (the \normalfont is a little superfluous here but does no harm at all).

If this doesn’t fits your needs on can redefine {abstract} and \maketitle to let the first collect and store it’s contest and the latter print out the content. But this would be an equal effort as making the title page manually. And only gainful if you need this in more than one or two documents …

## Update

How to misuse the \date field to make the abstract appear higher on the page?

\date{%
\today% thats the default I guess
\\[2\baselineskip]% Space between date and abstract
\normalfont\normalsize%
\parbox{0.8\linewidth}{%
}
}


There’s only the little problem that the argument of \date can‘t contain paragraphs (i.e. blank lines or \par) so we must use \\[<dim>] to get a new line an insert some space.

-
Thanks for your answer, that's indeed a way to go. But what annoys me a bit is that the text is too far at the bottom. Usually it's placed directly after the date. On the other hand I don't have any example for that at the moment. –  neo Jan 9 '12 at 14:40
@neo Since the date is a text filed too, you can use ist in the same way as \publishers. See my edit. –  Tobi Jan 9 '12 at 15:43
Ok that seems to work quite well. Thanks for your hack! It's greatly appreciated :D –  neo Jan 9 '12 at 16:51

You could also use the notitlepage option instead of titlepage option.

That is, change the first line

\documentclass[a4paper,12pt,abstracton,titlepage]{scrartcl}

\documentclass[a4paper,12pt,abstracton,notitlepage]{scrartcl}.

Then your code produces the following output.

-
Well, notitlepage is the default for scrartcl and I especially want the layout like in titlepage (which is more vertically centered) –  neo Jan 10 '12 at 12:44

Without abusing the usual commands, you can redefine abstract and patch the \maketitle command:

\documentclass[a4paper,12pt,titlepage]{scrartcl}

\newsavebox{\abstractbox}
\renewenvironment{abstract}
{\begin{lrbox}{0}\begin{minipage}{\textwidth}
\begin{center}\normalfont\sectfont\abstractname\end{center}\quotation}
{\endquotation\end{minipage}\end{lrbox}%
\global\setbox\abstractbox=\box0 }

\usepackage{etoolbox}
\makeatletter
\expandafter\patchcmd\csname\string\maketitle\endcsname
{\vskip\z@\@plus3fill}
{\vskip\z@\@plus2fill\box\abstractbox\vskip\z@\@plus1fill}
{}{}
\makeatother

\usepackage{lipsum}

\begin{document}

\title{Title}
\subject{Subject}
\author{Author}

\begin{abstract}
\lipsum[1]
\end{abstract}

\maketitle

\end{document}


You can play with the line

  {\vskip\z@\@plus2fill\box\abstractbox\vskip\z@\@plus1fill}


changing 2fill and 1fill till the result is pleasing.

The strategy is to save the abstract's typeset contents in a box for later use; the method with lrbox is rather standard; the only subtle point is to globally save the box, as we are doing the business inside the abstract environment. So the abstract is typeset in box register 0 and then the register \abstractbox is globally loaded with what's in \box0.

Where do you want it? Just between the \date and \publishers fields in the title page; so I looked at the code of \maketitle and found that between the two fields the code is

\vskip\z@\@plus3fill


(leave a flexible vertical space). With the help of etoolbox I change that code into

\vskip\z@\@plus2fill\box\abstractbox\vskip\z@\@plus1fill


so the previously saved box is typeset there, separated from the \date and \publisher fields by flexible vertical space.

Of course, the abstract environment must go before \maketitle. The code for typesetting the abstract itself is taken from the definition in scrartcl.cls, which basically puts "Abstract" (in the font used for section headings) centered above the text, which in turn is in a quotation environment.

-
Oh wow, I just refreshed the page and saw your answer after I accepted the other one. I like your solution very much, +1 for it. Although it's even more voodoo for me ^^ –  neo Jan 9 '12 at 17:03
@neo I added some explanations for the code, hoping it's less like voodoo and more like white magic. :) –  egreg Jan 9 '12 at 17:14
Thanks for your magical explanations! I understood most of it, of course not every command, but then you also just copy-pasted a bit :P I think tex-answers need a lot more explanations just like yours! Please keep that up, and have a nice day :) –  neo Jan 9 '12 at 21:24

You could just define a titlepage layout...example template given in this file and adapt to your own needs....

-