deck.tab.active.background = #6495ED

This macro generates a Table of Contents for the current page based on its headings.

Table of Contents Plugin

  • toc - Generates a table of contents based on what headings are present in the current page.
  • toc-zone - Lists all the headings within the macro's body.

Generates a table of contents based on what headings are present in the current page.

The Code

{toc}

Result

Parameters

Name

Required?

Default

Description

type

(error)

list

The type of TOC to output. May be 'list' or 'flat'.

outlne

(error)

false

If true each item will be prefixed by a hierarchical number (e.g. '1.3').

style

(error)

none

The style of bullet-point to use for each item. Any CSS styles are valid.

separator

(error)

brackets

The type of separator when in 'flat' mode. May be any of the following: brackets, braces. parentheses (parens), etc.

indent

(error)

 

When displayed as a 'list', the amount to indent each heading level. Note: This is a CSS quantity, so make sure you use the quantity type (eg. '10px' not '10').

minLevel

(error)

1

The minimum level to report headings for, inclusive. Eg. '2' will list 'h2.' and 'h3.' headings, but not 'h1.'.

maxLevel

(error)

7

The maximum level to report headings for, inclusive. Eg. '2' will list 'h1.' and 'h2.' headings, but not 'h3.' or above.

include

(error)

 

If set, any headings not matching the regular expression will be ignored.

exclude

(error)

 

If set, any headings which do match the regular expression will be ignored.

printable

(error)

true

If set to false, the TOC will not be visible when printing.

class

(error)

 

If specified, a <div> surrounding the TOC will be output with the specified 'class' attribute. Use CSS styles to customize the look of the TOC.

Allows you to split a table of contents based on the headings of the current page. By default, the macro will also display links to headings both above and below the content which it contains.

The Code

{toc-zone}
h4. Heading 1
Some Content.

h4. Heading 2
More content.

h4. Heading 3
Some more content.
{toc-zone}

Result

Heading 1

Some Content.

Heading 2

More content.

Heading 3

Some more content.

Parameters

Name

Required?

Default

Description

location

(error)

both

This parameter allows you to specify where the table of contents should be displayed, either top or bottom of the content contained within the macro. If you do not specify anything with this parameter then the contents will be displayed at both the top and bottom of the content

type

(error)

list

The type of TOC to output. May be 'list' or 'flat'.

outlne

(error)

false

If true each item will be prefixed by a hierarchical number (e.g. '1.3').

style

(error)

none

The style of bullet-point to use for each item. Any CSS styles are valid.

separator

(error)

brackets

The type of separator when in 'flat' mode. May be any of the following: brackets, braces. parentheses (parens), etc.

indent

(error)

 

When displayed as a 'list', the amount to indent each heading level. Note: This is a CSS quantity, so make sure you use the quantity type (eg. '10px' not '10').

minLevel

(error)

1

The minimum level to report headings for, inclusive. Eg. '2' will list 'h2.' and 'h3.' headings, but not 'h1.'.

maxLevel

(error)

7

The maximum level to report headings for, inclusive. Eg. '2' will list 'h1.' and 'h2.' headings, but not 'h3.' or above.

includePages

(error)

 

If set to true, then the contents will also include any headings within included pages within the current page

filter

(error)

 

Allows you to use a Regular Expression to filter headings based on matching criteria. Not for the feint hearted!

printable

(error)

true

If set to false, the TOC will not be visible when printing.

class

(error)

 

If specified, a <div> surrounding the TOC will be output with the specified 'class' attribute. Use CSS styles to customize the look of the TOC.