Theses, Books, Title pagesline space in Table of Content

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

line space in Table of Content

Post by templateuser »

Hello,

In "Table of Content" we have different line space (vertical space) between each item . For example, space between "Declaration" and "Abstract" (between all sections with roman numbers) is much more than the space between Chapters!

I could change the line space between Chapters.but I could not do it for the "Declaration" and "Abstract" and so on.

Any solution?


The same problem I have in the List of Tables. The line space between items in different chapters is more than the same chapter. I want to have the same line spaces between all items.

Thank you in advance.

sam

Recommended reading 2024:

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

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

User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Re: line space in Table of Content

Post by Vel »

Hi Sam,

Search main.tex for "\addtocontents{toc}" and every occurrence of that has a height in curly brackets after it (e.g. \addtocontents{toc}{\vspace{2em}}). Those are adding whitespace to the table of contents so adjust them as you like if you want to remove gaps.

For removing gaps between chapters in the List of Tables have a read of this: http://tex.stackexchange.com/questions/ ... -of-tables

Hope that helps!

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: line space in Table of Content

Post by templateuser »

Hi,

Thank you for your answer.
But I cannot find it for table of content. my table of content has the following commands:

\pagestyle{fancy}
\lhead{\emph{Contents}}
\tableofcontents


As you can see in the picture, the red vertical space number 1 and 2 have different size. I want to have the same size.

http://i40.tinypic.com/2yoqqmp.jpg

Thank you.

sam
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Re: line space in Table of Content

Post by Vel »

Those are just the commands to print the table of contents and have nothing to do with what is in it.

In the abstract block you have:

\addtotoc{Abstract}

\abstract{\addtocontents{toc}{\vspace{1em}}

If you remove the \addtocontents{toc}{\vspace{1em}} from that second line you will see that the extra gap goes away. If you want to make it smaller, you can make the value within it negative. Do the same for the rest of the gaps by searching the entire main.tex file for "\addtocontents{toc}".
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: line space in Table of Content

Post by templateuser »

It worked well. Thank you so much for your answer.

sam
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Re: line space in Table of Content

Post by Vel »

No problem, good luck with your thesis!
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
Post Reply