16

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}

\titlehead{University}
\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?

4 Answers 4

10

You could misuse the \publishers element:

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

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

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

\publishers{%
    \normalfont\normalsize%
    \parbox{0.8\linewidth}{%
        Your abstarct Text. Your abstarct Text. Your abstarct Text. 
        Your abstarct Text. Your abstarct Text. Your abstarct Text. 
        Your abstarct Text. Your abstarct Text.
    }
}

\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).

result

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}{%
        Your abstarct Text. Your abstarct Text. Your abstarct Text. 
        Your abstarct Text. Your abstarct Text. Your abstarct Text. 
        Your abstarct Text. Your abstarct Text.
    }
}

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.

3
  • 1
    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.
    – letmaik
    Jan 9, 2012 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, 2012 at 15:43
  • Ok that seems to work quite well. Thanks for your hack! It's greatly appreciated :D
    – letmaik
    Jan 9, 2012 at 16:51
20

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}

\titlehead{University}
\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.


enter image description here

5
  • 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 ^^
    – letmaik
    Jan 9, 2012 at 17:03
  • 2
    @neo I added some explanations for the code, hoping it's less like voodoo and more like white magic. :)
    – egreg
    Jan 9, 2012 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 :)
    – letmaik
    Jan 9, 2012 at 21:24
  • +1 for not abusing other commands. This feels more in the spirit of *TeX anyway. :-)
    – jvriesem
    Jan 9, 2016 at 19:05
  • Is it possible to do something like this without using scrartcl?
    – jvriesem
    Jan 9, 2016 at 19:11
6

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

That is, change the first line

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

of your document to

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

Then your code produces the following output.

enter image description here

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .