Text FormattingReducing space after heading in ToC

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
devo
Posts: 3
Joined: Mon Jul 19, 2010 8:30 pm

Reducing space after heading in ToC

Post by devo »

Greetings. I have a simple problem, the solution to which is eluding me.

I want to reduce the space between the heading and first item in my table of contents.

At present, I have the following:

\pagestyle{fancyplain}
\renewcommand{\contentsname}{\LARGE Contents}
\tableofcontents
\thispagestyle{empty}

All I want to do is insert \vspace{-4ex} between the heading and the first chapter.

Any suggestions would be greatly appreciated!

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

Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

Reducing space after heading in ToC

Post by Stefan Kottwitz »

Hi devo,

welcome to the board!
You could use \addtocontents:

Code: Select all

addtocontents{toc}{\vspace{-4ex}}
Stefan
LaTeX.org admin
devo
Posts: 3
Joined: Mon Jul 19, 2010 8:30 pm

Re: Reducing space after heading in ToC

Post by devo »

Stefan,

Greetings. It worked - thanks a lot!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Reducing space after heading in ToC

Post by localghost »

Now that the problem is obviously solved, please mark the topic accordingly as described in Section 3 of the Board Rules.


Best regards and welcome to the board
Thorsten
Post Reply