Module:Table of contents/doc

This module provides a way to generate tables of contents for books.

Usage
This module, in order to be used, must be invoked directly, which means there is no intermediary template. In theory, an intermediary template could be created, but it would only support a limited number of arguments, while the direct invocation of the modules allows an unlimited number of arguments.

This module recognizes an unlimited number of sequences of four numbered parameters that respectively indicate the name of a section, the page of that section (the name of the page on the wiki to which the section label will link), the description of that section and the completion status of that section (a multiple of 25 smaller than 100 followed by a percentage sign). Only the first is required, and the format of the table of contents will adapt automatically depending on which parameters are given values to.

The module recognizes some named parameters that are described in the next section. Parameters, both named and numbered, are considered to have a value when they are provided an argument that does not contain only whitespace.

Parameters
All the parameters described here are optional.


 * indent
 * This is the length of the left margin of the section list, specified as a CSS margin length.


 * list style
 * The value of this parameter will be used as the value for the  CSS property of the section list. The most common use is to remove the bullets of a list by setting it to.


 * page name prefix
 * This is a prefix added to all page names given for sections. It is most commonly used to add the name of the book to the page names with.


 * unordered
 * The list of sections will be ordered unless an argument is provided for this parameter.

Examples
This module will, depending on whether descriptions are provided and on whether the section list is ordered or not, adapt the layout and appearance of the table of contents.