Wrong Page Number for List of Figures within Table of Contents

Yqazra's picture

Hi, I have a problem when I typeset my document. The document class is book. I added the List of Figures to Table of Contents manually using following command:

\addcontentsline{toc}{chapter}{List of Figures}

The Table of Contents itself contains of 3 pages and started at page xii. The List of Figures appears at page xv. However, the Table of Contents showed that the List of Figures is at page xiii (which is wrong).

I have also tried this command:

\addcontentsline{toc}{chapter}{List of Figures}

but the problem still occurs. Every page number within the Table of Contents is correct, except for the List of Figures. Strangely, when I open the .toc files, the page number for the List of Figures is correct (it showed xv).

For clarity, you can see some files in the attachment. Thanks for your help.

Example.pdf80.89 KB
Example.tex7.82 KB

To generate the toc with an

To generate the toc with an entry in the toc, you are using an encapsulated TeX field containin:

\addcontentsline{toc}{chapter}{Report Contents} \markboth{Report Contents}{\textbf{Reports Contents}}

This prints the toc, then adds an entry for the toc, but by that time the counter is at the end of the toc so you get the last page of the toc instead of the first page of the toc listed.

Try this instead:

\addcontentsline{toc}{chapter}{Report Contents}
\markboth{Report Contents}{\textbf{Reports Contents}}

This starts a new page, adds the current page to the toc with "Report Contents", then does the toc starting on the current page.  This way the beginning of the toc matches the entry you created.