[OS X TeX] Turn off hyphenation of toc and titles

Alan Munn amunn at msu.edu
Fri Dec 11 22:24:45 EST 2009


At 4:52 PM -0800 12/11/09, Gilberto wrote:
>Dear list:
>
>Could anyone please help? I imagine it should be possible to ask 
>LaTeX to turn off hyphenation in the TOC and headings only (allowing 
>it in the rest of the document). If so, what should I do (I had no 
>luck googling).


Not hyphenating  this will result in overfull lines, so you would 
need to set the titles raggedright.   I'm not sure I would actually 
recommend this.

However, it can be done easily with the titlesec package:

\usepackage[raggedright]{titlesec}

For the table of contents, the titletoc package provides the relevant 
functionality, but for this particular task (assuming you don't want 
to redefine everything) the tocloft pacakge provides a simpler 
interface:

\usepackage{tocloft}

\renewcommand{\cftsecfont}{\raggedright}

(and similar commands for subsec, chap etc.)

Alan

-- 
Alan Munn						amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages		Tel. 
	517-355-7491
Michigan State University, East Lansing MI 48824 USA	Fax	517-432-2736



More information about the MacOSX-TeX mailing list