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
\usepackage{tocbibind}
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:
\usepackage[nottoc]{tocbibind}
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
\cleardoublepage
\addcontentsline{toc}{chapter}{\contentsname}
\tableofcontents
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
\tableofcontents
adds the TOC in the TOC; the \tableofcontents*
variant doesn't.
With titlesec
package:
\documentclass[oneside]{book}
\usepackage{titlesec}
\usepackage{lipsum} % only for the example
\titleformat{\chapter}
{\normalfont\Huge\bfseries}
{}
{0pt}
{}
\titlespacing*{\chapter}{0pt}{*11.5}{*8}
\renewcommand{\chaptermark}[1]{\markright{\MakeUppercase{#1}}}
\usepackage[colorlinks]{hyperref}
\begin{document}
\tableofcontents
\chapter{First}
\lipsum[1]
\section{test}
\lipsum[1-5]
\chapter{Second}
\end{document}

Best Answer
Add the line
Just after
MWE
Output
If you want a different alignment like this one
use instead