2

I'm using Koma Script's scrbook for a document. I would like to insert some text above chapter headings, which can be done like this:

\documentclass[chapterprefix=true]{scrbook}

\begin{document}
\setchapterpreamble[o]{Text above chapter title}
\chapter{Chapter title}
\end{document}

Now I would like to increase the vertical distance (by let's say 20\baselineskip) between Text above chapter title and Chapter title. How could I do this?

I know that the command \chapterheadstartvskip exists, but it doesn't do what I want:

\documentclass[chapterprefix=true]{scrbook}

\renewcommand*{\chapterheadstartvskip}{\vspace*{20\baselineskip}}   

\begin{document}
\setchapterpreamble[o]{Text above chapter title}
\chapter{Chapter title}
\end{document}

Instead of having this output:

20\baselineskip
Text above chapter title
Chapter title

I would like this output:

Text above chapter title
20\baselineskip
Chapter title

Text above chapter title should stay on the upper part of the page and not move down.

By the way, I know that this doesn't make much sense from a typographical point of view, but in my use case, it is required.

2

The chapter preamble is inserted at the bottom of the space above the chapter title. So if your preamble is one line and there should be a space of 20\baselineskip you can adjust the space above the chapter using

\RedeclareSectionCommand[beforeskip=-21\baselineskip]{chapter}

Then you can use a \parbox with the same height, outer alignment bottom and inner alignment top.

\setchapterpreamble[o]{%
  \parbox[b][21\baselineskip][t]{\linewidth}{%
    \strut Text above chapter title}}
\chapter{Chapter title}

enter image description here

Code:

\documentclass{scrbook}
\RedeclareSectionCommand[beforeskip=-21\baselineskip]{chapter}
\begin{document}
\setchapterpreamble[o]{%
  \parbox[b][21\baselineskip][t]{\linewidth}{%
    \strut Text above chapter title}}
\chapter{Chapter title}
Normal text
\end{document}

or

\documentclass{scrbook}
\RedeclareSectionCommand[beforeskip=-21\baselineskip]{chapter}
\newcommand\mychapterpreamble[1]{%
  \parbox[b][21\baselineskip][t]{\linewidth}{\strut\ignorespaces#1}}
\begin{document}
\setchapterpreamble[o]{\mychapterpreamble{  Text above chapter title}}
\chapter{Chapter title}
Normal text
\end{document}

or only local for one chapter

\documentclass{scrbook}
\begin{document}
{
  \RedeclareSectionCommand[beforeskip=-21\baselineskip]{chapter}
  \setchapterpreamble[o]{%
    \parbox[b][21\baselineskip][t]{\linewidth}{%
    \strut Text above chapter title}}
  \chapter{Chapter title}
}
\chapter{Second chapter title}
\end{document}
  • 1
    Thanks a lot for the solution and explication. Is is working perfectly well in my document. Just a small remark: I noticed that there is a \ missing before baselineskip in "or only local for one chapter". – Jon Snow Sep 9 '15 at 15:48
  • Thank you for the hint. Now I have inserted the missing backslash. – esdd Sep 9 '15 at 20:09

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.