I have the problem that my chapter title is too wide, because it has the same width like the line below. How can I change the width from the title? For example, when you uncomment the \geometry{...}
lines, it works but not much enough. AND why are the two lines not directly among each other (e.g. the two left "T"'s)?
MWE:
\documentclass[paper=a4, fontsize=12pt]{scrreprt}
\usepackage{classicthesis}
\usepackage{geometry}
\geometry{
a4paper,
top=3cm,
bottom=3cm,
left=3cm,
right=3cm
}
\titleformat{\chapter}[display]%
{\relax}{\vspace*{-3\baselineskip}\makebox[\linewidth][r]{\color{halfgray}\chapterNumber\thechapter}}{10pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
\begin{document}
\chapter{Test title Test title Test title Test title Test title Test title }
\end{document}
Title:
I wan't this, but with variable/more space between chapter title and right end (result by uncomment the geometry, but that is not the solution because I need it)
\chapter[short]{long long long}
?0.9\linewidth
like this\titleformat{\chapter}[display]{\relax}{\vspace*{-3\baselineskip}\makebox[\linewidth][r]{\color{halfgray}\chapterNumber\thechapter}}{10pt}{\begin{minipage}{0.9\linewidth}\raggedright\spacedallcaps}[\end{minipage}\linebreak\normalsize\vspace*{.8\baselineskip}\titlerule]
Or do you want where it wraps to depend on the width of the number?