As the title says, how do I increase the space between the title and the subtitle in the scrartcl
document class?
[Tex/LaTex] Increase white space between title and subtitle in scrartcl
koma-scriptspacingtitles
Related Solutions
The scrartcl
class adds a wealth of vertical spaces:
2em
at the top\topsep
due to\begin{center}
1.5em
after the “subject”, if given.5em
after the title1em
after the subtitle, present or not- at least
\baselineskip+.5em
for the author, present or not 1em
after the author, present or not0pt plus 1em
after the date, empty or not\topsep
due to\end{center}
- a final
2em
In your case, \baselineskip
is 13.6pt, 1em is 11pt and \topsep
is 9.0pt plus 3.0pt minus 5.0pt. So after the title you have a vertical space of
5.5 + 11 + 13.6 + 5.5 + 11 + 9 + 22 = 77.6
points, that is more than five and a half full lines.
To that you have to add the space left before a section title (since \maketitle
uses \vskip
, the \addvspace
in front of section titles can't realize there's no space to add.
If I try
\documentclass{scrartcl}
%\areaset{16.5cm}{31.0cm}
\usepackage[sc,osf]{mathpazo}
\title{Here is A Title}
\date{}
\begin{document}
\maketitle
\vspace{-77.6pt}
some text to show the real space
\bigskip
\hrule
\bigskip
{\centering\sffamily\bfseries\huge Here is A Title\par}
some text to show the real space
\end{document}
I get
You can notice that there's some more space that I probably lost somewhere.
How to remedy to this situation? Asking Markus Kohm to write a better \@maketitle
macro.
By replacing \insertsubtitle
with \visible<2>{\insertsubtitle}
in the default definition of the titlepage, the subtitle gets only visible on the second slide, but its space is already reserved on the first slide.
For more information, I recommend the the section about overlays in the beameruserguide.
\documentclass{beamer}
\usetheme{default}
\title{bla}
\subtitle{blub}
\makeatletter
\setbeamertemplate{title page}
{
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center]{title}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\visible<2>{\insertsubtitle}\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\endgroup
\vfill
}
\makeatother
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
EDIT:
A quick hack to get a second line:
\documentclass{beamer}
\usetheme{default}
\title{bla}
\subtitle{blub}
\makeatletter
\setbeamertemplate{title page}
{
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center]{title}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}%
\visible<2->{\insertsubtitle}
\visible<3>{I am a second line}\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\endgroup
\vfill
}
\makeatother
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
Best Answer
Update: Thanks to egreg's suggestion, here's a shorter patch. We don't need to identify the whole block since
\vskip.5em
is the only occurrence in the command definition.:)
We could patch
\maketitle
and replace the original\vskip
value (.5em
) by our our adjustment. Here's my humble attempt with the help of the amazingxpatch
package:Note that we created a new length (
\myspace
) to hold our new value. The output is as expected:Hope it helps.
:)