2

I have maybe the same problem as this closed question : add table of contents in table of contents

I want the line "Table of contents" to appear in my Table of Contents, with page number and so on.

I tried to put \addcontentsline{toc}{chapter}{Table of contents} below the \tableofcontents command with no result.

Here is my MWE

\documentclass{report}

\begin{document}

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

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\end{document}
5
  • 1
    \usepackage{tocbibind} will add the Contents to the ToC itself. Or use the memoir class where this is done automatically, unless \tableofcontents* is applied
    – user31729
    Feb 3 '17 at 12:32
  • 1
    @ChristianHupfer It works very well, thanks ! But how to adapt the name of the line instead of "Table of contents" ?
    – Valacar
    Feb 3 '17 at 12:37
  • 1
    That depends on your setup. Are you using babel? No? Then \renewcommand{\contentsname}{Contents} should be sufficient
    – user31729
    Feb 3 '17 at 12:38
  • 1
    What's the point of adding the table of contents to the table of contents? When you read the toc, you know it's the toc, you don't have to find at which page it is to be found!
    – Bernard
    Feb 3 '17 at 13:12
  • 1
    @Bernard: well, the only application in my point of view is to have the ToC in the bookmarks, but the on the other hand, the other ToC entries are most likely in the bookmarks as well...
    – user31729
    Feb 3 '17 at 13:19
3
\documentclass{report}
\usepackage{tocbasic}
\setuptoc{toc}{totoc}
\begin{document}

\listoftoc[Something like the Table of \contentsname]{toc}

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\end{document}

You can replace "Something like the Table of \contentsname" by whatever should be the title of the table of contents. You need at least two LaTeX runs after changing the title.

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