Is there a way to disable hyphenation (splitting up a word) in all section and subsection titles (while leaving hyphenation in the main text unchanged)? They look a bit odd to me. Thank you.
Asked
Active
Viewed 1.2k times
3 Answers
31
The titlesec package offers an according option.
\usepackage[raggedright]{titlesec}
Details in the package manual. I guess the sectsty package has similar capabilities.
Thorsten Donig
- 46,014
9
try \section{\sloppy My section title without hyphenating}
6
You have to control in template itself:
put \raggedright in the section:
\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries\raggedright}}
lockstep
- 250,273
S. Murugan
- 1,139
titleformatfromtitlesecto style titles -- You can do it explicitly:\titleformat{\section}{\color{teal}\LARGE\raggedright}{\hspace{0.5cm}\thetitle\hspace{0.5cm}}{0cm}{}(note the\raggedright), – Adobe Jul 01 '14 at 17:58