- Fix: line break for long chapter headlines, caused text overlapping (fixes #1)

This commit is contained in:
Ricardo Langner
2014-04-07 23:00:34 +02:00
parent 8dbd918d2c
commit e5403bc150
3 changed files with 9 additions and 2 deletions

View File

@@ -552,6 +552,13 @@
[\phantomsection]
%
% > formats: \chapter
%
% The following command is used to avoid overlapping
% of the chapter headline text, see bug/ticket #1
% Solution adapted according to the comment from "Gonzalo Medina" - Thanks
% http://tex.stackexchange.com/questions/165878/width-of-chapter-section-with-titlesec
\newcommand\ctformatchapter[1]{\parbox[t]{\dimexpr\textwidth-4em\relax}{\raggedright#1}}
%
\titleformat{\chapter}[display]%
{\usekomafont{chapter}}%
{\vspace{-8em}\raggedleft{%
@@ -562,7 +569,7 @@
}%
}%
{-2.1em}%
{\raggedright}%
{\ctformatchapter}%
[\phantomsection]
%
% > formats: \section