General ⇒ Questions about TOC
-
- Posts: 2
- Joined: Wed Jul 23, 2008 1:47 am
Questions about TOC
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Questions about TOC
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
-
- Posts: 2
- Joined: Wed Jul 23, 2008 1:47 am
Re: Questions about TOC
I need each chapter caption displayed in the center, but now its flushleft.
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Questions about TOC
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}