HOME > Office programs > Latex: Create Table Of Contents - How It Works

LaTex: Create table of contents - how it works

If you use LaTex as a word processor, you can have it create a table of contents automatically. However, depending on the type of document you are using, this may require you to enter various commands. Get an overview of how to proceed correctly to create the table of contents.

LaTex: Use these commands to create a table of contents

If you need a table of contents for a text created in LaTex, you can generate one by entering various commands. First, enter the command "\tableofcontents" at the beginning of your document or at the place where you want to insert the directory.
  1. Depending on the type of document you create in LaTex, you now need different commands to enter the content for the directory. In total, there are three document classes in LaTex with article, book and report.
  2. In the classes book and report, you need the command "\chapter{}" to insert a heading into the table of contents at the top outline level. If you also want to insert subheadings, please use the command "\section{})" for this.
  3. If the created document is a document of the class article, create a heading on the first level with the command "\section{}" and further subheadings with "\subsection {}" and "\subsubsection{}".

Table of contents: Creating more outline levels in LaTex

If you also want to add more outline levels to your table of contents, it is necessary to modify the "tocdepth" counter, which specifies the depth of the table of contents. To do this, enter the command "\setcounter{tocdepth} {value}" in LaTex and replace "value" with the number "4", for example, to add a fourth level. Afterwards, you can add more headings with the commands "\subsubsection{}" for the classes book and report, respectively, and "\paragraph{}" for the class article.

By Schulze Majied

LinkedIn networking: How to make new contacts :: DaVinci Resolve: Change language - here's how to do it
USEFUL LINKS