I have built a very nice chapter style with titlesec:
Unfortunately there's a warning for the use together with "scrbook". That's why I want to replace titlesec with KOMA.
Can anyone please help me or give me a hint, how to replace this code?
\usepackage{titlesec}
%CHAPTER
\titleformat{\chapter}[display] %shape
{\usefont{T1}{lmss}{b}{n}\filleft\huge\bfseries} %format
{\makebox[\linewidth][r]{\raisebox{103pt}[0pt][0pt]{\textcolor{gray!25}{\usefont{T1}{lmss}{b}{n}\fontsize{80pt}{95pt}\selectfont\thechapter}}}
{} %default would be huge
} %label
{-14ex} %sep
{} %before-code
[\vspace{0.5ex}\titlerule]
\titleformat{name=\chapter,numberless}[display]
{\usefont{T1}{lmss}{b}{n}\filleft\huge\bfseries} %format
%{\makebox[25pt][l]{\raisebox{100pt}[0pt][0pt]{\textcolor{gray!25}{\usefont{T1}{lmss}{b}{n}\fontsize{80pt}{80pt}\selectfont\thechapter}}}
{\makebox[10pt][l]{\raisebox{10pt}[0pt][0pt]{\textcolor{gray!25}{\usefont{T1}{lmss}{b}{n}\fontsize{10pt}{12pt}\selectfont}}}
{} %default would be huge
} %label
{-16.8ex} %sep
{} %before-code
[\vspace{1ex}\titlerule]
\titlespacing{\chapter}
{0pc}{*30}{*5}[0pc] %Abstand zum linken Rand |Abstand zum oberen Text | Abstand zum unteren Text | Abstand zum rechten Rand
%SECTION
\titleformat{\section}
{\usefont{T1}{lmss}{b}{n}\filright\Large}
{\thesection}{1em}{}
\titlespacing{\section}
{0pc}{*0}{*-1}[0pc]
\setcounter{secnumdepth}{3}
%SUBSECTION
\titleformat{\subsection}
{\usefont{T1}{lmss}{b}{n}\large}
{\thesubsection}{1em}{}
\titlespacing{\subsection}
{0pc}{*0}{*-1}[0pc]
Also I want the appendix to have the same look like a normal chapter.
The other chapters without a number should look like this:
The height above the title for a chapter without number and the height above the chapter numer for a chapter with number should be the same.
A lot of questions... -.- I hope somebody will help me to solve this as my KOMA knowledge is very poor -.-
Thanks!
After some research, I ended up with
\renewcommand*\raggedchapter{\raggedleft}
\addtokomafont{chapter}{\raggedleft\usefont{T1}{lmss}{b}{n}\huge\bfseries}
\newcommand\titlerule[1][.4pt]{\rule[.5\baselineskip]{\textwidth}{#1}}
\renewcommand*{\chapterformat}{%
\makebox[\width][l]{\scalebox{1}{{\nobreakspace}}%
\scalebox{4}{\textcolor{gray!25}\thechapter\autodot}\enskip}
}
\renewcommand*\chapterheadendvskip{\noindent\rule{\linewidth}{0.5pt}\par\vspace{\baselineskip}}
It seems to work, but unfortunately some things are missing:
- the number of the chapter is not completely on the right hand side
- how do I change the space between the number, the name and the line?
- The height above the title for a chapter without number and the height above the chapter numer for a chapter with number is not the same.
titlesec
package for my customized version of theclassicthesis
package which I use for my thesis.