The CreateToc plugin allows to create a dynamical Table of Contents of all headers. It also allows to number the headers in the page.
The headers might be in classic Phpwiki syntax or in Wikicreole/Mediawiki syntax (see below).
The Table of Contents can easily be inserted by clicking on the TOC button in the Edit toolbar.
Usage
<<CreateToc arguments>>
Arguments
Plugin 'MediawikiTable' does not exist.
Headers
Syntax: a comma-separated list of levels. !!!,!!,! also allowed
Plugin 'MediawikiTable' does not exist.
Examples
Default values
<<CreateToc>>
Only two levels of headers
<<CreateToc headers=1,2>>
Table of Contents with hierarchical numbering
<<CreateToc with_counter=1>>
No Table of Contents, but headers are numbered
<<CreateToc notoc=1>>
Table of Contents with hierarchical numbering, first level in roman
<<CreateToc with_counter=1 firstlevelstyle=roman>>
See Also
Known Problems
- If you include pages via Template or IncludePage plugins, the Table of Contents will not contain the headers of the included pages.
The Table of Contents will be incorrect if a header contains:
- a Template plugin call via {{ }},
- an image,
- or a ~.
- If you preview the page, the Table of Contents will not be correct if you modified headers. The Table of Contents will be taken from the last saved revision.
- If you display an old revision of a page, the Table of Contents will not be correct. The Table of Contents will be taken from the last saved revision.