LaTeX forum ⇒ Document ClassesOne chapter (of 13) is not included in Book class, table of contents Topic is solved

Information and discussion about specific document classes and how to create your own document classes.
bgreen
Posts: 23
Joined: Wed Nov 22, 2023 11:02 am

One chapter (of 13) is not included in Book class, table of contents

Postby bgreen » Sun Mar 17, 2024 5:00 am

I have created a document that has 13 chapters. The Table of Contents list 12 of the 13 chapters (maximum number of sections is 7), but not the final chapter.

One possibility is that Chapter 13 (with 3 sections) would carry over to the second page and as a result is not listed. If this is the problem can I compress the table of contents to one page or include text on the second currently blank page?
Another possibility is that chapter 13, which mostly consists of references formatted as a list (rather than in bibliographic database format) is an issue.

The preamble follows. After reading other posts I added the setcounter commands, but this made no difference.

\documentclass{book}
\setcounter{secnumdepth}{7}
\setcounter{tocdepth}{13}
\input{preamble}
\begin{document}
\tableofcontents
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
\include{Chapter5}
\include{Chapter6}
\include{Chapter7}
\include{Chapter8}
\include{Chapter9}
\include{Chapter10}
\include{Chapter11}
\include{Chapter12}
\include{Chapter13}
\end{document}


The references look like this:

\section{References}
\begin {itemize}
%\begin{compactenum}
%\begin{compactitem}
 \item  Adler, Ken (2010). Telephone interview. December 22. 
 \item  Anderson, Ian (2008). E-mail correspondence. October 15. 
 \item Anderson, Ian (2013). E-mail correspondence. September 15.
 \item Anderson, Ian (2015). E-mail correspondence. December 20.
 \enditemize 


Any advice is appreciated.

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10159
Joined: Mon Mar 10, 2008 9:44 pm

One chapter (of 13) is not included in Book class, table of contents

Postby Stefan Kottwitz » Sun Mar 17, 2024 11:28 am

Do you have an \end{document} command at the end of chapter 12? You had them in that topic, so you probably forgot to remove one.

Apart from this, do you have a \chapter command for chapter 13? Do you have an \includeonly command in the preamble? Does chapter 13 appear in the PDF together with the heading?

Can you post the .toc file here and the .log file as an attachment?

Stefan
LaTeX.org admin

bgreen
Posts: 23
Joined: Wed Nov 22, 2023 11:02 am

One chapter (of 13) is not included in Book class, table of contents  Topic is solved

Postby bgreen » Sun Mar 17, 2024 12:17 pm

Hello Stefan,

Many thanks again. The problem was an ' \end document' command at the end of Chapter 13 (which had compiled ok).

Regards

Bob


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 8 guests