Improve documentation of TOC placement.

* doc/org.texi: (Table of contents) Improve documentation of TOC placement.
This commit is contained in:
Carsten Dominik 2013-05-02 05:20:51 +02:00
parent 00badf1b70
commit 73ce77f991
1 changed files with 19 additions and 10 deletions

View File

@ -9607,21 +9607,30 @@ per-file basis with a line
@cindex #+TOC @cindex #+TOC
@vindex org-export-with-toc @vindex org-export-with-toc
The table of contents is normally inserted directly before the first headline The table of contents is normally inserted directly before the first headline
of the file. If you would like to get it to a different location, insert of the file. The depth of the table is by default the same as the number of
@code{#+TOC: headlines} at the desired location. The depth of the table of headline levels, but you can choose a smaller number, or turn off the table
contents is by default the same as the number of headline levels, but you can of contents entirely, by configuring the variable @code{org-export-with-toc},
choose a smaller number, or turn off the table of contents entirely, by or on a per-file basis with a line like
configuring the variable @code{org-export-with-toc}, or on a per-file basis
with a line like
@example @example
#+OPTIONS: toc:2 (only to two levels in TOC) #+OPTIONS: toc:2 (only to two levels in TOC)
#+TOC: headlines 2 (the same, at a specific location) #+OPTIONS: toc:nil (no default TOC at all)
#+OPTIONS: toc:nil (no TOC at all)
@end example @end example
The same @code{TOC} keyword can also generate a list of all tables (resp.@: If you would like to move the table of contents to a different location, you
all listings) with a caption in the buffer. should turn off the detault table using @code{org-export-with-toc} or
@code{#+OPTIONS} and insert @code{#+TOC: headlines N} at the desired
location(s).
@example
#+OPTIONS: toc:nil (no default TOC)
...
#+TOC: headlines 2 (insert TOC here, with two headline levels)
@end example
Multiple @code{#+TOC: headline} lines are allowed. The same @code{TOC}
keyword can also generate a list of all tables (resp.@: all listings) with a
caption in the buffer.
@example @example
#+TOC: listings (build a list of listings) #+TOC: listings (build a list of listings)