[Tex/LaTex] When author, date fields blank: remove whitespace between header and text

spacingtitles

I'm creating a document with KOMA-Script's scrartcl, the typical outcome would look something like

with-author

Now, I would like to leave the date and the author fields blank. This results in a lot of whitespace between the last line of the title and the actual text

noauthor

I could manually fiddle with negative vspace, but there must be a cleaner solution for it.

Minimal code to reproduce the last figure.

\documentclass{scrartcl}
\subject{Summer school 2013}
\author{}
\date{}

\title{Exercise sheet 1}
\subtitle{Numerical Optimization: Basics}
% =============================================================================
\begin{document}
\maketitle

random text random text random text random text random text random text random
text random text random text random text random text random text random text
random text random text random text random text random text random text random
text

\end{document}
% =============================================================================

Best Answer

I suggest you redefine the command \@maketitle that prints the titlepage information removing the parts for author and date, or rather just printing the fiedlds you are interested in:

Sample output

\documentclass{scrartcl}

\makeatletter
\renewcommand{\@maketitle}{\null\vskip 2em
\begin{center}
  \ifx\@subject\@empty \else
    {\subject@font \@subject \par}
    \vskip 1.5em
  \fi
  \titlefont\huge \@title\par
  \vskip .5em
  {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
\end{center}
\vskip 2em}
\makeatother

\begin{document}
\subject{Summer school 2013}
\title{Exercise sheet 1}
\subtitle{Numerical Optimization: Basics}
\maketitle

Text in document body.
\end{document}
Related Question