0

With

\documentclass[a4paper,12pt]{scrartcl}
\title{Lorem ipsum}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
  \apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{Dolor sit amet}
\date{}

\begin{document}
\maketitle

\section{Consectetuer adipiscing elit}

Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis.
Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan
nisl.


\end{document}

I get

enter image description here

(Obviously without the red arrow.) Now I want to decease the distance between the title block and the text (as indicated by the red arrow).

Is there any length in the Koma-scripts I can tweak? Or how would I need to modify the Koma macros to achieve this? All modifications have to happen in the preamble and not in the document text (after \begin{document}).

Note:

I did find another question similar to this one: spacing - Decreasing space between title and body in scrartcl, but it doesn't ask for a solution only in the preamble and the question with anser are 4 years old - so maybe the Koma scripts got more flexible on this front since.

1

AFAIK there is no length that can be changed. But you can patch \maketitle to remove vertical space at its end:

\usepackage{xpatch}
\xapptocmd{\maketitle}{\vspace{-78.5pt}}{}{\PatchFailed}

Example:

\documentclass[a4paper,12pt]{scrartcl}

\usepackage{xpatch}
\xapptocmd{\maketitle}{\vspace{-78.5pt}}{}{\PatchFailed}

\title{Lorem ipsum}
\subtitle{Dolor sit amet}
\date{}
\begin{document}
\maketitle
\section{Consectetuer adipiscing elit}
Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis.
Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan
nisl.
\end{document}

enter image description here

  • Thanks, this is so cool! I didn't know about xpatch. – halloleo Jul 28 at 2:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.