14

Here's what my template looked like before:

\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

I changed it to this:

\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}{\cftsecfont}{\raggedright}

but ToC still hyphenates.

How do I turn off hyphenation in the ToC?

Werner
  • 603,163

2 Answers2

4

I've found the \hyphenchar approach to work well in my documents:

\hyphenchar\font=-1 % disable hyphen
\tableofcontents
\hyphenchar\font=`\- % reset hyphen
lblb
  • 3,454
3

It could be done in the following way without the tocloft package:

\begingroup
\raggedright
\tableofcontents
\endgroup