# Set initial line after chapter title relative to top margin, not relative to end of chapter title

I want to set the initial line of text in every chapter to start at the same position on the page relative to the top margin of the page, and not relative to the last line of the chapter title.

I just can't figure out how to do this, and would be grateful for any ideas.

Here's a minimal working example:

\documentclass{scrbook}

\usepackage[papersize={130mm,210mm},top=13mm,showframe]{geometry}

\usepackage[]{titlesec}
\titleformat{\chapter}[hang]{\MakeUppercase}{}{0mm}{}[]
\titlespacing{\chapter}{0pt}{-1\baselineskip}{3\baselineskip}

\begin{document}

\chapter{Short chapter title}
This initial line of the chapter’s text is 3 lines below the end of the title,
and 4 lines below the top margin.

\chapter{Long chapter title that keeps going on so long that it ends up on two lines}
This initial line of the chapter’s text is also 3 lines below the end of the title,
but \textit{I want it to be 2 lines below since the chapter title, being longer,
has moved the text down, too}.
It should start at the same distance from the top margin as the first line of text
in chapters with single-line titles.

\end{document}


## 1 Answer

You shouldn't use titlesec with KOMA-script generally. Assuming that you have needs, here is a way. We can use a \parbox or minipage to enclose the chapter title and fix the height of the \parbox/minipage. I have used explicit option for titlesec and used

\parbox[t][2\baselineskip][t]{\textwidth} {\MakeUppercase{#1}}


Here the height of the box is 2\baselineskip.

Code:

\documentclass{scrbook}

\usepackage[papersize={130mm,210mm},top=13mm,showframe]{geometry} %% better to use typerea by koma

\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
{}
{}{0mm}{\parbox[t][2\baselineskip][t]{\textwidth} {\MakeUppercase{#1}}}[]
\titlespacing{\chapter}{0pt}{-2\baselineskip}{2\baselineskip }

\begin{document}
\let\cleardoublepage\clearpage %%% Just for demo, remove
\chapter{Short chapter title}
This initial line of the chapter’s text is 3 lines below the end of the title,
and 4 lines below the top margin.

\chapter{Long chapter title that keeps going on so long that it ends up on two lines}
This initial line of the chapter’s text is also 3 lines below the end of the title,
but \textit{I want it to be 2 lines below since the chapter title, being longer,
has moved the text down, too}.
It should start at the same distance from the top margin as the first line of text
in chapters with single-line titles.

\end{document}


• Thanks a lot for the quick reply, Harish Kumar! This gets me the results I was looking for. Just curious: why shouldn't I use titlesec with KOMA-script classes? – jeutzsch Aug 29 '14 at 21:29
• @jeutzsch Your log file will have that warning. Compile the above code and check the log file for details. :-) – user11232 Aug 29 '14 at 22:58
• +1 both Q & A, but the problem of knowing too much LaTeX it that you can get exactly what you want. :) – Fran Aug 30 '14 at 6:30