io7m
io7m-jstructural 4.1.0
5.21
section-contents

- 5.21.1. Description
- 5.21.2. Processing
- 5.21.3. CSS
- 5.21.4. Example

5.21.1
Description
1
The section-contents element specifies that a table of contents should be generated for the given section.
5.21.2
Processing
1
The table of contents appears at the start of the parent section and contains references to all the children of that element.
5.21.3
CSS
1
In addition to any classes specified by the type attribute, the main list structure is assigned the classes st200_section_contents and st200_contents.
2
The XHTML lists that are generated as children of the lists generated for part-contents elements are assigned CSS as if they were generated from section-contents elements. In order to correctly indent elements in CSS, it's necessary to be able to distinguish between lists that were generated as part of a section-contents element, and lists that were generated as children of those generated as part of a part-contents element. In other words, it's desirable to be able to indent the list differently if it is the "outermost" list. Therefore, the main list structure is also assigned the class st200_section_contents_outer if it is appearing in XHTML due to a section-contents element.
3
Each element of the list is assigned the class st200_contents_item in addition to st200_contents_item1. All subsection elements appearing in the list are assigned the class st200_contents_subsection.
5.21.4
Example
1
The table of contents above was generated by adding a section-contents element at the beginning of the section.