I am trying to restyle my chapter headings. I want the chapter number to strecht vertically over two lines. In this way for long chapter names, the number is before the whole name. Furthermore I would like to add a vertical line between the number and chapter name. I tried and searched some examples on the forum but not really succeed.
Does somebody have any idea??
\documentclass{scrreprt}
\usepackage[
includemp,
showframe,
reversemp,
paperwidth=20.1cm,
paperheight=25.80cm,
top=2.30cm,
bottom=3.4cm,
inner=2.7cm,
outer=2.7cm,
marginparwidth=1.6cm, % Fixed for now
marginparsep=0.4cm
]{geometry}
\makeatletter % to set the marginpar on the left side in showframe
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother
\renewcommand*{\chapterformat}{\makebox[0pt][r]{\chapappifchapterprefix{\
}\thechapter\autodot\hskip\marginparsep}}%
\renewcommand*{\sectionformat}{\makebox[0pt][r]
{\thesection\autodot\hskip\marginparsep}}
\renewcommand*{\subsectionformat}{\makebox[0pt][r]
{\thesubsection\autodot\hskip\marginparsep}}
\renewcommand*{\subsubsectionformat}{\makebox[0pt][r]
{\thesubsubsection\autodot\hskip\marginparsep}}
% remove the vertical skip before the chapter heading
\RedeclareSectionCommand[beforeskip=-1sp plus -1sp minus 1sp]{chapter}
\begin{document}
\chapter{test}
\chapter{Test with a longer name, test with a longer name, test with a
longer name}
\section{test}
\section{test}
\end{document}
\usepackage{graphicx} \renewcommand*{\chapterformat}{\makebox[0pt][r]{\scalebox{2}{\chapappifchapterprefix{\ }\thechapter\autodot\rule{1pt}{\ht\strutbox}}\hskip\marginparsep}}
or\usepackage{graphicx} \renewcommand*{\chapterformat}{\raisebox{-\ht\strutbox}[\ht\strutbox][\dp\strutbox]{\makebox[0pt][r]{\scalebox{2}{\chapappifchapterprefix{\ }\thechapter\autodot\rule[-\dp\strutbox]{1pt}{\baselineskip}}}}\hskip\marginparsep}
?