Creating the TOC Template
The TOC template is the template that produces the table of contents in the output. It can be created anywhere within the SPS design, and multiple TOC templates can be created in a single SPS design.
The steps to create a TOC template are as follows:
1.Place the cursor at the location where the TOC template is to be inserted.
2.Click the menu command Insert | Insert Table of Contents | Table of Contents. This pops up the Create TOC Page dialog (screenshot below). (Alternatively, this command can be accessed via the context menu, which appears when you right-click.)
3.Enter the information requested in the dialog: (i) The name of the generated TOC page is the (TOCref) name that will be used to reference the TOC bookmarks in the design document. If you select multiple levels for the TOC (level references, to be more accurate; next option), the same TOCref name will be used in all level references (though individual TOCref names can be edited subsequently). (ii) The number of TOC level references (levelrefs) specifies how many level references the TOC is to have. (iii) For printed media, the option to output page references (i.e. page numbers) is available. (iv) The text entries in the TOC can be used as links to the TOC bookmarks.
4.Click OK to finish. The TOC template is created with the specified number of levelrefs (screenshot below; the formatting of the TOC template has been modified from that which is created initially).
Within each levelref is a TOCref having a name that identifies TOC bookmarks that are to be the TOC items for that levelref. Within each TOCref is a default template for the TOC item, which you can edit at any time.
Editing the TOC template
The following editing options are available:
•The TOC template can be dragged to another location in the SPS. Note, however, that a change of context node could affect XPath expressions within the TOC template.
•Levelrefs can be added to or deleted from the structure of the TOC template.
•The properties of individual TOC references (TOCrefs) can be edited. The name and scope of a TOCref can be changed, and you can choose whether the TOC item corresponding to the TOCref is created as a hyperlink or not.
•TOCrefs can be added to or deleted from any levelref in the TOC template.
•Standard SPS features (such as images, Auto-Calculations, and block-formatting components) can be inserted anywhere in the TOC template.