4

Does scrartcl provide an option to modify the spacing of the \maketitle objects? For example, I would like to reduce the spacing between the title and the author, and author and date.

gTcV
  • 1,065
  • 2
    No, the spaces are hard-coded. If you want a different layout you should use the titlepage environment. – Ulrike Fischer Aug 06 '19 at 08:01
  • 1
    Can I make titlepage not put the title on a separate page? I.e., article layout, not book layout for title. – gTcV Aug 06 '19 at 08:12
  • There is an alternative approach, that does not require to edit your title, shared at https://tex.stackexchange.com/a/636852/34551 – Clément Mar 12 '22 at 16:05

1 Answers1

3

Yes you can! Just abuse the command \addtokomafont and (if needed) put a command into the title:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}

\title{\vspace*{-4\baselineskip}Title of the document}
\subtitle{with a subtitle}
\author{gTcV}
\date{2019/08/06}

\addtokomafont{author}{\vspace*{2em}}
\addtokomafont{date}{\vspace*{-1em}}

\begin{document}
\maketitle{}

Text below the title.

\end{document}
Keks Dose
  • 30,892
  • Now, that's out of the box thinking! – Faheem Mitha Mar 04 '22 at 12:20
  • Any ideas about reducing the space after the date? – Faheem Mitha Mar 04 '22 at 12:25
  • @FaheemMitha Add \vspace*{-2cm} to the beginning of the next element, here »Text below the title.« – Keks Dose Mar 04 '22 at 12:36
  • So, add it just before "Text below the title."? – Faheem Mitha Mar 04 '22 at 12:44
  • Note: If you use the same letter code multiple times within a document (as would be the case with a form letter), the line \addtokomafont{date}{\vspace*{-1em}} keeps adding that space each time the letter code is run, which is probably not what you want. If there is a better approach, I would like to know of it. – Faheem Mitha Mar 07 '22 at 19:13
  • One workaround if one has multiple letters is to have a counter, and just run the command once, at the first counter. I.e. \ifnumcomp{\value{letternum}}{=}{1}{\addtokomafont{date}{\vspace*{-1.7em}}}{} if using \ifnumcomp from the etoolbox package. This isn't the nicest solution, so I would like to learn if there are better options. – Faheem Mitha Mar 08 '22 at 11:28
  • @FaheemMitha Sorry, I don't understand your issue. Ask a new question, please. – Keks Dose Mar 08 '22 at 12:40