Hi,
I used Latex for several years, but with the built template. I have no much experience about modifying template myself.
Now I have struggling almost a day to do the required modification. There are a few questions left. Two of them are
a. The table of contents look like
1 INTTRODUCTION
1.1
1.2
Now I want to add "CHAPTER" before the chapter number, so that the TOC look like
CHAPTER 1 INTRODUCTION
1.1
1.2
How can I do that?
b. I hope the name of the chapters appear in the center of the paper. The default setting is flushleft.
Thanks.
General ⇒ Questions about TOC
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Questions about TOC
Hi,
that can be solved by the tocloft package.
Have a look at this thread: Include the word chapter in table of contents.
gmedina provided a working example there.
Stefan
that can be solved by the tocloft package.
Have a look at this thread: Include the word chapter in table of contents.
gmedina provided a working example there.
Stefan
LaTeX.org admin
-
- Posts: 2
- Joined: Wed Jul 23, 2008 1:47 am
Re: Questions about TOC
Thanks. Then what about the 2nd question, then?
I need each chapter caption displayed in the center, but now its flushleft.
I need each chapter caption displayed in the center, but now its flushleft.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Questions about TOC
This could be done by the titlesec package, for example:
Stefan
Code: Select all
\documentclass[a4paper,10pt]{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\centering\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Huge}\begin{document}
\tableofcontents
\chapter{Introduction}
Text
\chapter{Test}
Text
\end{document}
LaTeX.org admin