# Chapter headings too wide for page, but won't break

I'm preparing a document (scrreprt) which has pretty long chapter titles. Apparently, those are too long: they exceed the right margin by quite a bit, and of course I'm getting Overfull \hbox messages. It looks like this:

Any ideas on how I could prevent this? I initially thought LaTeX would insert line breaks between Marketing- and Forschung (and und and Organisationen), but it won't do that.

A minimal example:

\documentclass[10pt]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{titlesec}
\titleformat{\chapter}{\fontseries{eb}\huge}{\thechapter}{1em}{}
\usepackage[default,osfigures]{opensans}
\usepackage[T1]{fontenc}
\usepackage{geometry}

\begin{document}

\chapter{Käuferverhalten und Marketing-Forschung als Gegenstandsbereiche des Marketing}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
\end{document}

• Is that German? Are you using the babel package with german option? – Sigur Nov 16 '13 at 14:19
• Yep, that's German and I'm using babel with the ngerman option. Hyphenation works fine for the rest of the document... – Daniel Nov 16 '13 at 14:23
• You can do it by yourself. Use \- to split a word. – Sigur Nov 16 '13 at 14:28
• Then you will have to supplement your question with a self-contained and minimal example. – Thorsten Donig Nov 16 '13 at 15:24
• Do you really need titlesec You can achieve the same with \addtokomafont{chapter}{\fontseries{eb}\huge}. However it seems that titlesec doesn't use \raggedright. – Marco Daniel Nov 17 '13 at 15:15

Since you're already using babel with the ngerman option, you could solve the issue at hand by (i) replacing Marketing-Forschung with Marketing"=Forschung in the chapter header and (ii) adding \raggedright to the second argument of the \titleformat{chapter}{...}{...}{} directive:
\titleformat{\chapter}{\fontseries{eb}\huge\raggedright}{\thechapter}{1em}{}

• @Sveinung - Since there's already a hyphen in the composite noun "Marketing-Forschung", I think it's OK to let a line break happen at that hyphen. I'm also familiar with Bringhurst's recommendation not to hyphenate words in sectioning headers. :-) However, given that his book is on English (and, more specifically, North American) rather than on German typographic usage, I'm not sure if this recommendation carries over directly. Notice that by using the directive \raggedright in the sectioning headers, no new hyphenation points will be created. – Mico Nov 18 '13 at 7:07