Table of contents

It is very simple to insert table of contents in LaTeX when using commands to make chapters and subchapters like we did in the previous task. You need just one command: \tableofcontents

Tips: remember to write notes to your commands! 

 

Task

Insert a table of contents into you document, and make sure it corresponds to the chapters you made in the previous task. 


Suggested solution

Screenshot from Overleaf showing a table of content


Unnumbered chapters

If you tried to add unnumbered chapters to your document in the previous task, you may have noticed that they were not automatically included in the table of contents. If you want to include an unnumbered chapter, e.g. the abstract, in the table of contents, add the following command right after the chapter command (\chapter*{Abstract)}:

\addcontentsline{toc}{chapter}{Abstract}

Read more about the table of contents here Lenker til en ekstern side..