I want the "Table of contents" position to appear in the table of contents. I'm using \addcontentsline to add this position, but the page numeration seems a bit odd.

I have a table of contents beggining at the page 3 (and it takes 2 pages). But using this combination of commands:

\addcontentsline{toc}{chapter}{Table of contents}
\chapter{First chapter}

I get following output:

Table of contents..... 2 (should be 3!)
First chapter......... 5

When I use something like this

\addcontentsline{toc}{chapter}{Table of contents}
\chapter{First chapter}

I also get the numeration wrong:

Table of contents..... 4 (should be 3!)
First chapter......... 5

How can I add the "table of contents" position to TOC correctly?

  • 3
    \usepackage{tocbibind}; but I can't understand why one would put a TOC entry for the table of contents itself. Or use \cleardoublepage instead of \newpage. – egreg Jun 23 '13 at 13:02
  • Why? I just need to, I have such requirements for my work. Package tocbibind works great, thanks! – Gacek Jun 23 '13 at 13:08

While I'm not sure why one would want to add a TOC entry for the table of contents, there can be a case where this is wanted: institutions that don't know better than imposing hilarious requirements for theses.

If you load the tocbibind package with


not only the table of contents will appear automatically, but also the list of figures, the list of tables, the bibliography and the index.

Just in case, it's easy to avoid the TOC in the TOC by adding the nottoc option:


Why didn't your method work? Because you probably are using a two-sided setup. So the \newpage will simply end the current page (1) and \addcontentsline{toc}{chapter}{Table of contents} appears at page 2, but \tableofcontents starts on the next right hand page, which is number 3.

The "manual" method should be


but a higher level method is preferable; for instance, tocbibind works correctly also with hyperref, while the manual method requires another intervention.

Note that with the memoir class the declaration


adds the TOC in the TOC; the \tableofcontents* variant doesn't.

| improve this answer | |

As egreg mentioned in the comment there is the package tocbibind by PEter Wilson that supports inclusion of a the headings that are by default not showing up in the ToC. Via package options you can direct which of them should appar and which should be left out.

To explain why you approach doesn't work: the \addcontentsline will derive its page number from the placement it was put in the document. Now if you put it in front of \tableofcontents then the number wil be off by one, because the chapter inside the ToC will start a new page. If you put it after, then it will be wrong if the ToC has several pages. So its placement really needs to go into the definition of \tableofcontents and this is what the package does.

| improve this answer | |

The best solution is using a feature of the document class, if the class supports this:

  • KOMA-Script classes: \setuptoc{toc}{totoc}
  • Class memoir: \tableofcontents adds a self-reference by default, it is suppressed by the star form \tableofcontents*.

For other classes, package tocbibind can be used, as already explained in other answers and comments.

Also the \addcontentsline method will work, if it is put in the right place, either inside the definition of \tableofcontents or at the beginning of the .toc file. Example code for the latter:


\renewcommand*{\contentsname}{Table of contents}
% if babel is loaded, e.g.:
% \addto\captionsenglish{% 
%   \renewcommand*{\contentsname}{Table of contents}%
% }


Title page\newpage

After the first run, the .toc file starts with

\addcontentsline {toc}{chapter}{\contentsname }
\contentsline {chapter}{\numberline {1}Introduction}{3}

The second run reads the .toc file and executes the \addcontentsline and the .toc will contain the \contentsline entry for the table of contents:

\addcontentsline {toc}{chapter}{\contentsname }
\contentsline {chapter}{Table of contents}{2}
\contentsline {chapter}{\numberline {1}Introduction}{3}

After the third run, the table of contents if finished:



  • The example also shows, how the standard name Contents can be changed into Table of contents.

  • egreg's method is simpler, because it does not require an additional LaTeX run:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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