- Fix: line break for long chapter headlines, caused text overlapping (fixes #1)
This commit is contained in:
@@ -552,6 +552,13 @@
|
|||||||
[\phantomsection]
|
[\phantomsection]
|
||||||
%
|
%
|
||||||
% > formats: \chapter
|
% > 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]%
|
\titleformat{\chapter}[display]%
|
||||||
{\usekomafont{chapter}}%
|
{\usekomafont{chapter}}%
|
||||||
{\vspace{-8em}\raggedleft{%
|
{\vspace{-8em}\raggedleft{%
|
||||||
@@ -562,7 +569,7 @@
|
|||||||
}%
|
}%
|
||||||
}%
|
}%
|
||||||
{-2.1em}%
|
{-2.1em}%
|
||||||
{\raggedright}%
|
{\ctformatchapter}%
|
||||||
[\phantomsection]
|
[\phantomsection]
|
||||||
%
|
%
|
||||||
% > formats: \section
|
% > formats: \section
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
% !TEX root = ../thesis-example.tex
|
% !TEX root = ../thesis-example.tex
|
||||||
%
|
%
|
||||||
\chapter{Concepts}
|
\chapter{Concepts: This text is here to test a very long title, to simulate the line break behavior, to show that an extremely long tilte also works}
|
||||||
\label{sec:concepts}
|
\label{sec:concepts}
|
||||||
|
|
||||||
\cleanchapterquote{Users do not care about what is inside the box, as long as the box does what they need done.}{Jef Raskin}{about Human Computer Interfaces}
|
\cleanchapterquote{Users do not care about what is inside the box, as long as the box does what they need done.}{Jef Raskin}{about Human Computer Interfaces}
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user