I would like to move the chapter number in the right margin (a bit like in the classicthesistheme) but all I tried just results in errors, it would be nice if some could have a look. My MWE is using scrreprt and I can't move to the memoir class.
\documentclass[
fontsize=12pt,
twoside,
a4paper,
parskip=half,
ngerman,
headings=big]
{scrreprt}
\usepackage[english,german]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{blindtext}
\usepackage{etoolbox}
\DeclareMathAlphabet\EuRoman{U}{eur}{m}{n}
\SetMathAlphabet\EuRoman{bold}{U}{eur}{b}{n}
\newcommand{\eurom}{\EuRoman}
% Define own Chapter style
% Pretty chapter pages
%------------------------------------------
\definecolor{nicered}{rgb}{.647,.129,.149}
\usepackage{soul}
\usepackage{pdfpages}
\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=-0pt%\eurom{A}
\colorbox{white}{\color{black}$\eurom{\thechapter}$}}}%
% \rotatebox{90}{%
% \resizebox{%
% \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
% {!}{\scshape\so\@chapapp}}\hspace{.4mm}%Abstand zum Wort Kapitel
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}
}
\renewcommand*{\chapterformat}{%
\hspace{\leftmargin} \feline@chm[1.61cm] % Height of the colored box
\hspace{0.3cm}%Abstand zur Colorbox
}
\patchcmd{\@@makechapterhead}
{\usekomafont{chapter}{#1}}
{\parbox[b]{\dimexpr\textwidth-4cm\relax}{\raggedright\usekomafont{chapter}{#1}}}
{\typeout{great}}
{\typeout{too bad}}
\makeatother
%------------------------------------------
\begin{document}
\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\blindtext[2]
\end{document}





\addtokomafont{chapter}{\normalsize\MakeUppercase}(\MakeUppercaseis from\usepackage{textcase}) leads to the error message! Missing number, treated as zero.,! Color stack action is missing.and! Missing number, treated as zero.Do you have any clue how to prevent this from happening? – jlk Sep 09 '15 at 14:23\raisboxto shift the chapter number:\renewcommand\chapterlinesformat[3]{ \ifstr{#1}{chapter} {\@hangfrom{\raisebox{3\baselineskip}{#2}}{\MakeUppercase{#3}}}{\@hangfrom{#2}{#3}}}– esdd Feb 27 '17 at 23:29