GeneralChapter without numbering in Table of Contents?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Chapter without numbering in Table of Contents?

Post by benowar »

I am writing on a preface and wanted it to appear in the table of contents. However, using \chapter, its adding a number to the chapter. Is there any option to let the chapter appear in the TOC, but not with any number?

Thanks,
ben

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Chapter without numbering in Table of Contents?

Post by gmedina »

This thread can be useful.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Re: Chapter without numbering in Table of Contents?

Post by benowar »

Thanks! I should have known that

\addcontentsline{toc}{chapter}{Introduction}

helps out here since I am using it already in another place...
DaveFromOz
Posts: 6
Joined: Tue Sep 11, 2007 6:27 am

Chapter without numbering in Table of Contents?

Post by DaveFromOz »

You can also use this format --

Code: Select all

\documentclass{book}
\begin{document}
\bf{Title Page}

\frontmatter
  \chapter{Preface}
    this is the preface
  \tableofcontents

\mainmatter
  \chapter{Introduction}
    Words, words, words

\backmatter
  \chapter{Appendix}
    A small vermiform organ in humans \ldots
\end{document}
\mainmatter gives you normal chapter numbering and arabic page numbering.
\frontmatter gives you unnumbered chapters and roman page numbering.
\backmatter gives you unnumbered chapters and arabic page numbering.

Copy and paste the whole code segment into a TeX editor and process it to see the results. This approach is much easier than trying to re-code chapter definitions.

Regards
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Chapter without numbering in Table of Contents?

Post by gmedina »

If the documentclass is report, then \frontmatter, \mainmatter and \backmatter have no effect at all. In fact, those cammands are not recognized. In this case you will have to use \chapter* and \addcontentsline
1,1,2,3,5,8,13,21,34,55,89,144,233,...
srivathsan
Posts: 3
Joined: Tue Jul 29, 2008 4:21 pm

Re: Chapter without numbering in Table of Contents?

Post by srivathsan »

Hi,
Thanks for all the previous comments. Despite following all your suggestions, I have the following issue. I am using Texnic Center and MikTex.

objective: In my table of contents, I want a text "Chapter" without the dotted lines and the subsequent page number. Eg.,

============================================
Table of Contents

Acknowledgments ................ ii

Abstract ........................ v

Chapter
1 Introduction .................. 1
1.1 Network Design .............. 1
1.1.1 Steiner Tree Problems ..... 2
============================================

Trial-1: When I do "\addcontentsline{toc}{chapter}{\protect Chapter}", it adds the required text (Chapter) to toc. But, the dotted lines and page number is present.

Trial-2: The same happens when I do "\addcontentsline{toc}{chapter}{\protect \numberline{}Chapter}" .

Q1) Also, I want only one-line spacing between "Chapter" and "1 Introduction". Currently, I get 2 line-spacing (like between Acknowledgments and Abstract). How do I get rid of that 2 line spacing and make it 1-line spacing?

Thanks for your suggestions. Appreciate your time.

Srinivas.
Post Reply