Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding a chapter from TOC

Tags:

latex

pdflatex

In my LaTeX document I've got a table of contents that is automatically generated by collecting everything that is of the form \chapter.

However, I've got an acknowledgements chapter before the table of contents and I don't want it to be automatically labelled "Chapter 1" or captured in the table of contents. Should I be avoiding \chapter altogether and use \section instead? I want to keep the font/formatting that other chapters have though.

like image 736
alamodey Avatar asked Feb 13 '09 05:02

alamodey


People also ask

How do you not include a chapter in a table of contents in LaTeX?

Put it after the \begin{document} , and then put \mainmatter right before the \chapter you want to correspond to chapter 1. This may only work in the book class. If you're using \chapter in a report , then \chapter* should also create a chapter that has no number and won't show up in the table of contents.

How do you create a contents page in LaTeX?

You put the command right where you want the table of contents to go; LaTeX does the rest for you. It produces a heading, but it does not automatically start a new page. If you want a new page after the table of contents, include a \newpage command after the \tableofcontents command.


2 Answers

Indeed, as unknown (google) mentioned, using \frontmatter and \mainmatter is the best solution. This will also adjust your page numbering to lowercase roman numerals for the front matter. However, it works only on book and similar document classes.

In case you're using report, try \chapter*. This will create a chapter without a number that does not appear in the table of contents.

like image 100
Thomas Avatar answered Sep 29 '22 05:09

Thomas


The usual way to handle that kind of thing is with the \frontmatter command. Put it after the \begin{document}, and then put \mainmatter right before the \chapter you want to correspond to chapter 1. This may only work in the book class. If you're using \chapter in a report, then \chapter* should also create a chapter that has no number and won't show up in the table of contents.

like image 38
user57368 Avatar answered Sep 30 '22 05:09

user57368