This is the official manual for the latest Org-mode release.
The table of contents is normally inserted directly before the first headline
of the file. The depth of the table is by default the same as the number of
headline levels, but you can choose a smaller number, or turn off the table
of contents entirely, by configuring the variable
or on a per-file basis with a line like
#+OPTIONS: toc:2 (only to two levels in TOC) #+OPTIONS: toc:nil (no default TOC at all)
If you would like to move the table of contents to a different location, you
should turn off the default table using
#+OPTIONS and insert
#+TOC: headlines N at the desired
#+OPTIONS: toc:nil (no default TOC) ... #+TOC: headlines 2 (insert TOC here, with two headline levels)
#+TOC: headline lines are allowed. The same
keyword can also generate a list of all tables (resp. all listings) with a
caption in the buffer.
#+TOC: listings (build a list of listings) #+TOC: tables (build a list of tables)
The headline's title usually determines its corresponding entry in a table of
contents. However, it is possible to specify an alternative title by
ALT_TITLE property accordingly. It will then be used when
building the table.