Text FormattingCustomizing \tableofcontents with book documentclass ??

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
heidib
Posts: 2
Joined: Sun Nov 15, 2009 6:02 pm

Customizing \tableofcontents with book documentclass ??

Post by heidib »

I am formatting my thesis with the book documentclass and have the following two issues:

This is what the table of contents currently looks like:

Contents
1 Introduction Page#

This is what the table of contents needs to look like:

Contents
1. Introduction............Page#

So I would like to put ldots after the chapter name and ideally, a dot after the enumerations, so 1. 2. 3. instead of 1 2 3. I'm just using the \tableofcontents tag. Any ideas how I can modify this? Help is 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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Customizing \tableofcontents with book documentclass ??

Post by localghost »

Use the titletoc package.


Best regards and welcome to the board
Thorsten¹
heidib
Posts: 2
Joined: Sun Nov 15, 2009 6:02 pm

Customizing \tableofcontents with book documentclass ??

Post by heidib »

Thank you. I ended up using the tocloft package with the following commands:

Code: Select all

\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}} 
\renewcommand{\cftchapaftersnum}{.} 
Post Reply