# Chapter heading formatting with scrreprt

I'm using scrreprt, and I want chapter headings to be formatted like in this question: Chapter number in left right margin ...with one small change. How can I get the number to be aligned with the bottom line of the multi-line chapter title rather than the first line?

It seems like this should be a simple change, but I don't understand the answer given there well enough to know what to change.

Thanks!

Since KOMA-Script version 3.19 you can redefine \chapterlinesformat to use a bottom aligned parbox:

\documentclass[
fontsize=12pt,
twoside,
ngerman,
parskip=half,
open=right
]
{scrreprt}[2015/10/03]

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{xcolor}

\usepackage{blindtext}% dummy text

\DeclareMathAlphabet\EuRoman{U}{eur}{m}{n}
\SetMathAlphabet\EuRoman{bold}{U}{eur}{b}{n}
\newcommand{\eurom}{\EuRoman}

\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\setlength{\fboxsep}{0pt}%
\colorbox{white}{\color{black}$\eurom\thechapter$}}}%
\raisebox{\depth}{\usebox{\feline@chapter}}%
}
\renewcommand*{\chapterformat}{\feline@chapter@marker[1.61cm]}

\renewcommand\chapterlinesformat[3]{%
\ifstr{#1}{chapter}
{%
\makebox[\textwidth][l]{%
\parbox[b]{\textwidth}{\raggedchapter #3}%
\hspace*{\marginparsep}#2%
}\\*[-.5\baselineskip]
\rule{\textwidth}{.4pt}%
\par%
}
{\@hangfrom{#2}{#3}}%
}
\makeatother

\begin{document}
\tableofcontents
\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\blindtext[2]
\end{document}


Maybe it is a simple change if one knows the internals of this particular class. I don't, but I can offer a less elegant solution until some more knowledgable person comes around.

Take the code from the answer that you mentioned, and add the following definition before \begin{document}.

\newcommand\mychapter[2][\mychapterheading]%
\chapter[#1]{\parbox[b]{\linewidth}{#2}}%
}


As an example consider the following document.

... Code from the other posting up to \begin{document} ...
... Definition of \mychapter above
\begin{document}
\tableofcontents
\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\mychapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\mychapter{Lorem ipsum dolor sit amet,\\consectetuer adipiscing elit}
\mychapter[Lorem ipsum dolor sit amet, consectetuer adipiscing elit]%
{Lorem ipsum dolor sit amet,\\consectetuer adipiscing elit}
\end{document}