# Avoid hyphenation in chapter title

I wonder if there is a way to avoid hyphenation of words in the title of a chapter.

I have tried `\mbox` but that makes the word run over the margin. I've also tried inserting a `\\` in front of the word, but while this has the intended result on the chapter title page it has the unwanted side effect that the breakline also appears in the ToC.

Any ideas?

-
 `\chapter{\mbox{maybe} \mbox{this} \mbox{would} \mbox{work}?}` – gerrit Nov 21 '11 at 22:19 No it won't, I already tried that (see question): it causes margin run-overs. – Matthias Nov 21 '11 at 22:50 @gerrit I converted this answer/question into a comment. – Stefan Kottwitz♦ Nov 22 '11 at 18:18

If you want to have linebreaks in the chapter title, but not in TOC, use the optional argument for `\chapter`:

``````\chapter[The long long long title]{The long long\\ long title}
``````
-

In ConTeXt, you can use

``````\setuphead[chapter][align=nothyphenated]
``````

or, slightly better

``````\setuphead[chapter][align={flushleft, nothyphenated, verytolerant}]
``````

which sets the title to be flushed left, not hyphenated, and the white space between words to be more stretchable.

-
Cool, but I can't risk switching to a new typesetting system at this (final) stage of the writing-up of my thesis :-). So I'm sticking with XeTeX. – Matthias Nov 23 '11 at 16:37
@Matthias: I understand. I gave a ConTeXt solution in case a ConTeXt user has the same question and is searching for a solution. – Aditya Nov 23 '11 at 17:39

The `hyphenat` package provides the command `\nohyphens`. You can control the hyphenation locally.

If you want to switch off hyphenation globally, use `\usepackage[none]{hyphenat}`.

-