Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

If I did

\setcounter{chapter}{-1}
\chapter{Introduction}

then I get Chapter 0 Introduction. I just want the word Introduction, and I want it also in the contents when I use

 \tableofcontents

How can I do that?

share|improve this question

4 Answers 4

up vote 4 down vote accepted

If you're working in the book documentclass, then you should use the starred version of \chapter to obtain a chapter without the counter visible. See

\documentclass{book}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction} \markboth{INTRODUCTION}{} \lipsum[1-5]
\chapter{First chapter} \lipsum[6-10]
\chapter{Second chapter} \lipsum[11-15]
\chapter{Last chapter} \lipsum[16-20]
\end{document}​

The addition of \markboth{...}{...} ensures that the correct page heading is followed as with the other regular (unstarred) \chapter{...} commands.

share|improve this answer
    
As @Seamus suggests, you need to compile this at least twice in order for the table of contents entries to be picked up by \tableofcontents. –  Werner Jul 18 '11 at 17:19
    
what is lipsum? –  Peter E Jul 18 '11 at 17:20
    
@Peter The lipsum package is just a package to produce dummy text. It's not required for the solution. –  Alan Munn Jul 18 '11 at 17:22
    
The lipsum package is a LaTeX package for adding dummy text to your document. I just wanted to set up a reasonable-sized document, so I added some dummy text between the chapters. Also, here's some detailed information on the \addcontentsline command. –  Werner Jul 18 '11 at 17:24
1  
You might also want to add \chaptermark{Introduction} to get correct headers. –  lockstep Jul 18 '11 at 17:26
\documentclass{article}

\begin{document}

\tableofcontents
\section*{Introduction}

\addcontentsline{toc}{section}{Introduction}

\section{This is a section}

\end{document}

This needs to be run twice for the introduction to appear.

How LaTeX does tables of contents and similar things (tables of figures...) is that each time it finds a thing of the relevant sort (in this case a section command) it writes that information to a file (in this case file.toc if your main file is file.tex). What \addcontentsline does is it tells LaTeX to pay attention to this extra thing that it wouldn't normally add to the file. The three arguments are (roughly) what file to add the thing to, what sort of thing it is and what to actually add to the file at that point.

Then when it sees \tableofcontents it reads file.toc and outputs the table of contents. (This is why it won't show up on the first run through: it's read \tableofcontents already by the time it gets to \addcontentsline!)

For books, use \chapter* instead of \section* and change section to chapter in the \addcontentsline command

share|improve this answer
    
I'm working with the documentclass book and where there is the introduction in the up part of the page I read CONTENTS because before of the introduction I have the contents, how can I avoid that? –  Peter E Jul 18 '11 at 17:22
    
@Peter E does my edit help or is something else going on? –  Seamus Jul 18 '11 at 17:25

In the »book« class you can divide your document into three parts (front, main, back). This has some effects that should do what you want.

\documentclass[11pt,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
  \frontmatter
  \tableofcontents

  \chapter{Introduction}

  \mainmatter
  \chapter{Theorie}
  \chapter{Practice}

  \appendix
  \chapter{Notes}

  \backmatter
  \begin{thebibliography}{9}
    \bibitem{key} Bibliogrpahy Item
  \end{thebibliography}
\end{document}
share|improve this answer
2  
Depending on how the Introduction chapter page numbers are supposed to work, this may need some further adjustment, because the \frontmatter material uses lower case roman numbers by default. –  Alan Munn Jul 18 '11 at 18:33

The easiest way to do this is to set the secnumdepth to -1 before the introduction chapter and then set it to whatever value you need for the subsequent chapters after the introduction chapter:

\documentclass{book}

\begin{document}
\frontmatter
\tableofcontents
\setcounter{secnumdepth}{-1}
\mainmatter
\chapter{Introduction}
\setcounter{secnumdepth}{3} % or some other value
\chapter{First Chapter}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/23403/how-can-i-produce-an-unnumbered-chapter-for-the-introduction
tex.stackexchange.com
crawl=CC-MAIN-2014-35
88376
application/http; msgtype=response
sha1:6OI6PS5BXB4UFWXPEMBWXSCYZF374SPN
<urn:uuid:9e17b52e-b38f-476e-b930-1de329ce38a1>
2014-08-22T02:25:25Z
198.252.206.16
sha1:7ZNRJN65MYVYUKDBJGIYDPWH7UWASFMG
<urn:uuid:77b68166-008b-48c9-84e0-6d034e858bd8>
http://tex.stackexchange.com/questions/23403/how-can-i-produce-an-unnumbered-chapter-for-the-introduction
response
<urn:uuid:0a3108e8-60dd-49c4-bda7-3ac665049336>
robots: classic
hostname: ip-10-180-136-8.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-35
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for August 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf