Next: Lists, Previous: Headings and sections, Up: Structural markup elements [Contents][Index]
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 org-export-with-toc
,
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 org-export-with-toc
or
#+OPTIONS
and insert #+TOC: headlines N
at the desired
location(s).
#+OPTIONS: toc:nil (no default TOC) ... #+TOC: headlines 2 (insert TOC here, with two headline levels)
Multiple #+TOC: headline
lines are allowed. The same TOC
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
setting ALT_TITLE
property accordingly. It will then be used when
building the table.