I am new to LaTeX. I have been creating a document with four chapters. As I am editing the chapters and compiling the code, sometimes Chapter 4 is being left out from the table of contents. To me, it seems that the chapter beginning after a certain page number is being left out and the problem is not specifically with Chapter 4 itself. For example, when Chapter 4 begins from page 12, it shows up in the table of contents as it should but disappears if it begins after page 12. However, I may be wrong. Also, I tried including Chapter 4 before Chapter 3 and everything worked perfectly.

Kindly help.

Here is the main.tex I am using:


\usepackage[a4paper,left=15mm,right=15mm,top=15mm,bottom=20mm, includefoot]{geometry}
  \cfoot{Page \thepage\ of \pageref{LastPage}}




Also, chapter 4 has

 All text...
  • 4
    \let\clearpage\relax is dangerous! – user11232 Oct 28 '13 at 10:01
  • 5
    Welcome to TeX.SX! I'd add to Harish's comment that it's not only dangerous, it's wrong if you use \include. – egreg Oct 28 '13 at 10:08
  • 1
    use \input instead of \include – user2478 Oct 28 '13 at 10:45
  • Since you haven't provided the (relevant) contents of Chapter 4, I don't think it's possible to diagnose correctly why including it either before or after Chapter 3 would make such a difference. – Mico Oct 28 '13 at 10:54
  • 1
    For obvious reasons, i VtC – Johannes_B Feb 22 '15 at 18:42