Page LayoutWrong pagenumbers in ToC

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
nielsje_8
Posts: 1
Joined: Thu Jun 09, 2011 12:46 pm

Wrong pagenumbers in ToC

Post by nielsje_8 »

Hey all,

I'm almost done with my master thesis, but I can't work this last issue out. Everything works fine, except for some wrong page pagenumbers in my Table of Contents. I'm using the following code:

Code: Select all

%-----------------------------------------------------------
\documentclass
[a4paper,10pt,twoside]
{report}
%-----------------------------------------------------------

\include{titel/TITEL}

\pagenumbering{roman}

\cleardoublepage
\include{voorwoord/VOORWOORD}
%-----------------------------------------------------------
\cleardoublepage
\include{samenvatting/SAMENVATTING}
%-----------------------------------------------------------
\cleardoublepage
\tableofcontents
\addcontentsline{toc}{chapter}{Inhoudsopgave}

\setcounter{tocdepth}{5}
%-----------------------------------------------------------
\cleardoublepage
\include{symbolen/SYMBOLEN}
%-----------------------------------------------------------
\cleardoublepage
\listoffigures
\addcontentsline{toc}{chapter}{Lijst van figuren}
%-----------------------------------------------------------
\cleardoublepage
\listoftables
\addcontentsline{toc}{chapter}{Lijst van tabellen}

%-----------------------------------------------------------
%Document
%-----------------------------------------------------------

\cleardoublepage
\pagenumbering{arabic}
\include{inleiding/INLEIDING}
Everything from here on works great, but the problem is that in the ToC the chapters "Inhoudsopgave" (which is my ToC), "Symbolen" (list of symbols), "Lijst van figuren" (list of figures), "Lijst van tabellen" (list of tables) all are displayed a wrong number.

Anybody got any suggestion?
Thanks a lot in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Wrong pagenumbers in ToC

Post by meho_r »

1. Please read Board Rules, especially the section about providing a Minimal Working Example (MWE). The code you provided is almost useless.

2. Don't manually add TOC, LOF and LOT into the TOC, rather use tocbibind package.

3. Use babel package for languages other than english (or polyglossia if you're using xelatex instead of pdflatex).

E.g.:

Code: Select all

\documentclass[a4paper,10pt,twoside]{report}

\usepackage[dutch]{babel}

\usepackage{tocbibind}

\begin{document}

\pagenumbering{roman}

\tableofcontents
%\addcontentsline{toc}{chapter}{Inhoudsopgave}

\setcounter{tocdepth}{5}

%-----------------------------------------------------------

\cleardoublepage

\listoffigures
%\addcontentsline{toc}{chapter}{Lijst van figuren}

%-----------------------------------------------------------

\cleardoublepage

\listoftables
%\addcontentsline{toc}{chapter}{Lijst van tabellen}

\cleardoublepage

%-----------------------------------------------------------

\pagenumbering{arabic}

\chapter{One}

\section{Two}

Test.

\chapter{Three}

\begin{table}[htb]
\centering xyz
\caption{A table}
\end{table}

\chapter{Four}

\begin{figure}[htb]
\centering
zyx
\caption{A figure}
\end{figure}

\end{document}
Welcome to the forum :)
Post Reply