I have a customized KOMA-Script chapter heading, similar to cleanthesis. The chapter title and the chapter number should align on the bottom.
The problem occurs when the chapter title has two lines. The the second line is below the chapter number:
Here is the MWE:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preambel
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[
DIV=8,
twoside=false,
]{scrbook}
\usepackage{microtype}
\usepackage{lmodern}
\usepackage{xcolor}
\usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Layout chapter heading
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Space from top
\renewcommand*\chapterheadstartvskip{\vspace*{-4.1cm}}
\renewcommand*\chapterheadendvskip{\vspace*{2.5\baselineskip}}
\renewcommand*{\chapterformat}{\chapternumber{\thechapter}}
\renewcommand{\chapterlinesformat}[3]{\chaptertitle{#3}#2}
% Chapter rule and number
\newcommand{\chapternumber}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.3\textwidth}%
\raggedleft{%
{\color{red}\rule[-5pt]{2pt}{7cm}}%
\hspace{5mm}%
{\color{red}\fontsize{60}{60}\selectfont#1}%
}%
\end{minipage}%
}
% Chapter title
\newcommand{\chaptertitle}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.7\textwidth}%
\vspace*{6.39cm}%
#1%
\end{minipage}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\chapter{Test chapter}
\section{Test section}
\Blindtext[2]
\chapter{Test chapter with very long title}
\section{Test section}
\Blindtext[2]
\end{document}
If I change the argument of the minipages from t to b, I get the desired vertical alignment on the bottom. Unfortunately, the chapter number and the rule move down as well:
I would like to anchor the position of both chapter number and rule and then stack the lines from the chapter title above each other, aligning on the bottom with the chapter number.
PS: Please ignore the horizontal jumping of the red line. This can be fixed with tabular figures.






\smash? In my case, it seemed to work without it. – Jan 12 '17 at 10:46\vspace*{6.39cm}. – Jan 12 '17 at 12:03\smashand add the rule back, does that cover your use cases? – David Carlisle Jan 12 '17 at 12:16\vspace*{6.39cm}%in\chaptertitlebefore\leavevmode. To fix the hereby arising problem with the vertical position of the rule and the chapter number, add\vspace*{-6.39cm}%as new first line in the minipage of\chapternumber. Note that in this case I do need\smash. – Jan 12 '17 at 12:32