Page LayoutHow 2 split \section{abc} onto 2 lines 4 \tableofcontents?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
dev00790
Posts: 2
Joined: Thu May 07, 2009 2:52 am

How 2 split \section{abc} onto 2 lines 4 \tableofcontents?

Post by dev00790 »

Hi I need to know how to split \section{mylongtitle} onto two lines for my \tableofcontents ? - The \tableofcontents for \section{mylongtitle} runs off the right hand side of page at the moment. The piece of work is due in later today, so I'ld appreciate prompt replies! :)

I'm using Winedt 5.5 with MitTeX 2.7.

Thanks a lot.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: How 2 split \section{abc} onto 2 lines 4 \tableofcontents?

Post by kaiserkarl13 »

The exact title would help. My suggestion is to either re-word your heading so there's a space in a better place or insert an optional hyphen. To do the latter, type my\-long\-word\-that\-has\-optional\-hyphens\-everywhere.
dev00790
Posts: 2
Joined: Thu May 07, 2009 2:52 am

Re: How 2 split \section{abc} onto 2 lines 4 \tableofcontents?

Post by dev00790 »

This is the section title in concern:

\section{The\-Elastic\-Differential\-Equation\-,\-SLE,\-EP,\-and\-Method\-of\-separation\-of\-variables}\label{EDEsection}

The doesn't work unfortunately - the line doesn't break. Am I doing something wrong?
dayaknagar
Posts: 1
Joined: Fri May 15, 2009 10:39 pm

Re: How 2 split \section{abc} onto 2 lines 4 \tableofcontents?

Post by dayaknagar »

Do the following

\section[The Elastic Differential Equation, SLE, EP,\\ and Method of separation of variables]{The Elastic Differential Equation, SLE, EP,\\ and Method of separation of variables}

LaTeX twice
In toc this will give you

Section #. The Elastic Differential Equation, SLE, EP,
and Method of separation of variables .... page #
Post Reply