Text Formatting ⇒ Table of Contents
Table of Contents
i.e,
1. CHAPTER
1.1 SECTION
1.1.1 SUBSECTION
instead of
1. CHAPTER
1.1 Section
1.1.1 Subsection
does anybody have some idea how to do this?
Thanks
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
Table of Contents
Code: Select all
\documentclass[11pt,english]{report}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{titletoc}
\usepackage{blindtext}
\titlecontents{chapter}[1.8em]{}{\bfseries\contentslabel{1.5em}\MakeUppercase}{\hspace*{-1.5em}}{\bfseries\titlerule*{}\contentspage}
\titlecontents{section}[4.1em]{}{\contentslabel{2.3em}\MakeUppercase}{\hspace*{-2.3em}}{\titlerule*[8pt]{.}\contentspage}
\titlecontents{subsection}[6.4em]{}{\contentslabel{2.3em}\MakeUppercase}{\hspace*{-2.3em}}{\titlerule*[8pt]{.}\contentspage}
\begin{document}
\tableofcontents
\blinddocument
\end{document}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Table of Contents
I would like to have different spacings between these two in my TOC. And also, the numbered chapter should not have page number, only appear in the TOC, but the unnumbered chapter should have the page number.
Any idea?
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Table of Contents
welcome to the forum!
The

Btw. please open a new topic for your own question, don't attach to a very old topic.
Stefan
Re: Table of Contents
thanks for the reply. My temporary solution was to edit the TOC manually and call it manually using \input <filename>.toc instead of \tableofcontents
I am sorry for not creating a new topic.