0

I am having issues with the \tableofcontents command.

My table of contents is too long to fit in one page so it starts at page 2 and ends at page 3. My actual \section{introduction} starts at page 4 but the \tableofcontents detects it to be page 3? All of the sections are shifted one page back because of this?

2
  • 3
    run latex again, it takes a few runs to stabilize Apr 4, 2015 at 22:04
  • I assume you are not using a document class where chapter 1 starts on page 1. Apr 4, 2015 at 22:44

1 Answer 1

2

As David said in the comments, you need several runs of LaTeX to solve problems like this. Actually LaTeX checks such discrepancies, and if the position of page references changes, it suggests you to rerun itself. Generally you need to rerun LaTeX until the logs no longer contain the phrase "Rerun LaTeX to get the references right".

The problem of page shifting due to TOC have been present in manual typesetting for a long time. Besides the iterative approach (note the page shifts, correct table of contents until no more changes) there are other approaches:

  1. In Russian typographic tradition the table of contents is typeset in the end, rather than in the beginning, so no page shifting occurs.

  2. In many books front matter pages and main matter pages are numbered separately, usually front matter in Roman and main matter in Arabic. Then adding pages to front matter does not shift main matter. You can achieve this effect using the commands \pagenumbering{roman} (or Roman for uppercase numerals) and \pagenumbering{arabic}; note that \pagenumbering resets the page numbers.

These approaches may decrease the number of LaTeX runs necessary to typset the text.

2
  • I didn't know that about Russian tradition – interesting! Apr 5, 2015 at 3:31
  • Nope, it didnt change anything?
    – Anaon
    Apr 5, 2015 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .