Toc Macro

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.

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

NameOptionalAllowed valuesDefault valueDescription
startyes1 - 62an initial level where the TOC generation should start at (the default is level 2 because level 1 is considered as a document title)
depthyes1 - 66maximum level the TOC is generated for
numberedyestrue/falsefalseif should generate numbering (1.2.3 format) for titles (see also Note 2)
scopeyespage/localpageIf 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 2

Result

toc1.png

Example 2: Floating

{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}

= Level 1

Hello

== Level 2

Result

toc2.png

Tags:
Created by Thomas Mortagne on 2008/09/30 11:44
Last modified by Vincent Massol on 2009/11/24 15:35

This wiki is licensed under a Creative Commons license
2.0.2.24648