TocMacro20
This is a XWiki macro, bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Toc Macro
Generates a Table Of Content for titles (headings) in a document. Each title has an anchor associated to it. It also shows the TOC in PDF output with working links to the corresponding destinations of the PDF document.Usage
{{toc start=2 depth=6 numbered=false scope=page /}}Parameters definition
| Name | Optional | Allowed values | Default value | Description |
|---|---|---|---|---|
| start | yes | 1 - 6 | 2 | an initial level where the TOC generation should start at (the default is level 2 because level 1 is considered as a document title) |
| depth | yes | 1 - 6 | 6 | maximum level the TOC is generated for |
| numbered | yes | true/false | false | if should generate numbering (1.2.3 format) for titles (see also Note 2) |
| scope | yes | page/local | page | If local, only section in the current scope will be listed. For example if the macro is written in a section, only subsections of this section will be listed. |
Example 1: Simple
{{toc /}}
= Level 1
Hello
== Level 2Result
Example 2: Floating
{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}
= Level 1
Hello
== Level 2Result