Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The toc::[] macro must be surrounded by empty lines for the table of contents to be displayed.

Anchor
_title_for_table_of_contents
_title_for_table_of_contents
Title for Table of Contents

Specifying a title for the table of contents using the toc-title attribute is currently not supported. Instead, when using the macro mode, a custom title can be emulated using arbitrary AsciiDoc markup.

Custom table of contents title using some bold text:

No Format
= Page Title
:toc: macro

*My Table of Contents*

toc::[]

== Some Section

Custom table of contents title using a collapsible block title:

No Format
= Page Title
:toc: macro

.My Table of Contents
====
toc::[]
====

== Some Section

Anchor
_levels
_levels
Levels

By default, sections of level 1 and 2 are contained in the table of contents. The number of levels displayed can be customized using the toclevels attribute (for both default and macro mode):

No Format
= Page Title
:toc:
:toclevels: 4

== Some Section
Info
Specifying a title for the table of contents is currently not supported.