Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the following code.

\newpage
\section*{Abstract}
\addcontentsline{toc}{section}{Abstract}

\newpage
\tableofcontents
\addcontentsline{toc}{section}{Table of Contents}

\newpage
\listoftables
\addcontentsline{toc}{section}{List of Tables}

\newpage
\listoffigures
\addcontentsline{toc}{section}{List of Figures} 

In my actual document, I have many sections, so the table of contents is actually two pages long. Unfortunately, when I run my LaTeX file, the 'Table of Contents' section in the Table of Contents has the incorrect page number (while everything else seems to be in order). It looks like the Table of Contents is using the page number of the second page, instead of the first page.

e.g. In the Table of Contents, 'Table of Contents' is listed as being under page iii, when actually it starts on page ii. Page iii is actually the second page of my Table of Contents.

Anybody know a quick fix for this?

share|improve this question
1  
Try putting \addcontentsline{toc}{section}{Table of Contents} before \tableofcontents. – Harish Kumar Sep 28 '12 at 1:28
Hi Suzu Welcome to TeX.SE! Code snippets are good, but a complete MWE would be even better- could you make one to help folks? :) – cmhughes Sep 28 '12 at 1:28

1 Answer

up vote 4 down vote accepted

Change the order of \addcontentsline:

\newpage
\section*{Abstract}
\addcontentsline{toc}{section}{Abstract}

\newpage
\addcontentsline{toc}{section}{Table of Contents}
\tableofcontents

\newpage
\addcontentsline{toc}{section}{List of Tables}
\listoftables

\newpage
\addcontentsline{toc}{section}{List of Figures} 
\listoffigures

If the hyperref package is going to be used, you might add \phantomsection to produce the right anchors for hyperlinks:

\newpage
\phantomsection
\addcontentsline{toc}{section}{Table of Contents}
\tableofcontents

As a suggestion, instead of using "manual" names, you could use the macros containing the pre-defined names; so instead of

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

you could say

\addcontentsline{toc}{section}{\listfigurename}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.