Theses, Books, Title pagesLong section names extend into margins of Table of Contents

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
dadrivr
Posts: 8
Joined: Sat Sep 11, 2010 3:49 pm

Long section names extend into margins of Table of Contents

Post by dadrivr »

I am using version 1.4 of the Doctoral Thesis template at http://www.latextemplates.com/template/ ... ral-thesis.

My university has strict requirements for 1-inch margins, and I am running into a problem where I have long section names that are running into the margins. I would like to force the long section names to wrap (or force a linebreak) so they don't extend into the margins. Basically, my issue is similar to the one here:
https://tex.stackexchange.com/questions ... -the-margi

However, I tried the solution (adding \- in the section name to help it know where to break), but it didn't work. Any help would be greatly appreciated (I'm not sure how to provide a MWE given my dissertation is over 300 pages long and it uses the custom template).
Last edited by dadrivr on Sat Jul 30, 2016 9:35 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Long section names extend into margins of Table of Contents

Post by Johannes_B »

Use shorter names.
\section[short here]{long and descriptive name at the beginning of the chapter}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Long section names extend into margins of Table of Contents

Post by Stefan Kottwitz »

dadrivr wrote:I tried the solution (adding /- in the section name to help it know where to break), but it didn't work.
What does it mean? No change but in the margin, or an error message? It should be \- by the way, not /-. And in a word, what shall be broken at the margin, not just somewhere. This \- stands for an allowed breakpoint.

Stefan
LaTeX.org admin
dadrivr
Posts: 8
Joined: Sat Sep 11, 2010 3:49 pm

Long section names extend into margins of Table of Contents

Post by dadrivr »

Stefan_K wrote:
dadrivr wrote:I tried the solution (adding /- in the section name to help it know where to break), but it didn't work.
What does it mean? No change but in the margin, or an error message? It should be \- by the way, not /-. And in a word, what shall be broken at the margin, not just somewhere. This \- stands for an allowed breakpoint.

Stefan
Yes, I used \- (sorry for the confusion). I don't get an error, but the long section name doesn't wrap into the next line at the suggested place, either.
dadrivr
Posts: 8
Joined: Sat Sep 11, 2010 3:49 pm

Re: Long section names extend into margins of Table of Conte

Post by dadrivr »

Nevermind, I tried placing the break in a different part of the word and it worked. Thanks!
Post Reply