Skip to content

Commit

Permalink
- Fix: line break for long chapter headlines, caused text overlapping (
Browse files Browse the repository at this point in the history
…fixes #1)
  • Loading branch information
derric committed Apr 7, 2014
1 parent 8dbd918 commit e5403bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion cleanthesis.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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{%
Expand All @@ -562,7 +569,7 @@
}%
}%
{-2.1em}%
{\raggedright}%
{\ctformatchapter}%
[\phantomsection]
%
% > formats: \section
Expand Down
2 changes: 1 addition & 1 deletion content/chapter-concepts.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% !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}

\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}
Expand Down
Binary file modified thesis-example.pdf
Binary file not shown.

0 comments on commit e5403bc

Please sign in to comment.