Altova StyleVision 2024 Enterprise Edition

The TOC item can contain up to four standard components, plus optional user-specified content. The four standard components are (see also screenshot below):

 

the text entry of the TOC item, indicated in the TOC template by (text ref)

the leader between the text entry and the page number (for paged media output), indicated by (.....)

the page reference of the TOC item (for paged media output), indicated by (page ref)

hierarchical or sequential numbering, indicated by (num-lvl) and (num-seq), respectively  

 

TOCItem

 

When the TOC template is initially created, the text entry is automatically inserted within TOCrefs. If the Include Page Reference option was selected, then the leader and page reference components are also included. Subsequently, components can be inserted and deleted from the TOC item. To insert a component, place the cursor at the desired insertion point within the TOC item, and in the context menu, select Insert Table Of Contents | TOC Reference | Entry Text / Leader / Page Reference or Insert Table Of Contents | Hierarchical Numbering / Sequential Numbering as required. (Hierarchical numbering should be inserted when the design is structured into nested levels, sequential numbering when there is no hierarchy, that is, just one flat TOC level. See the note below on flat TOCs) To delete a component, select it and press the Delete key.

 

Additionally, you can insert static content (e.g. text) and dynamic content (e.g. Auto-Calculations) within the TOC item.

 

Levels in flat TOCs

In a flat TOC hierarchy, TOC items will be output at a single level: for example, a simple list of the images in a document.

 

A flat hierarchy can be obtained in a number of ways.

 

The design document can be structured with just a single TOC level. The TOC template will then have a single levelref with a single TOC reference (TOCref) within it.

If the design document has more than one TOC level, then the TOC template could have a number of levelrefs equal to the sequential position of the TOC level being referenced. The levelref corresponding to the targeted TOC level will contain the single TOCref in the TOC template.

If the design document has more than one TOC level, then the single TOCref in the TOC template must have a scope that covers all the targeted document levels, which, in effect, will be flattened into a single level.

 

Let us say that we wish to gather all the images in a document in a single flat-hierarchy TOC. The document design must therefore contain at least one level, and this level must contain all the required TOC bookmarks. In the TOC template, the images to be listed are referenced in the usual way: (i) by creating a corresponding number of levelrefs; and (ii) creating a TOCref within the levelref corresponding to the targeted TOC level. The TOCref will have the name of TOC bookmarks in the targeted TOC level.

 

In the TOC template shown below, there is one levelref containing a TOCref that references TOC bookmarks named images. The scope of the TOCref has been set to Current level and below. As a result, all TOC bookmarks named images in the first level and below (that is, in the whole document) will be referenced.

 

TOCFlatTemplate

 

If the design contains more than one level, and a flat TOC is required, say, for items in the second level, then the TOC template could have two levelrefs with a TOCref only within the second level (no TOCref within the first level). Alternatively, the scope property of TOCrefs can be used to specify what level/s in the design document should be looked up for bookmarks of a given name.

 

 

Formatting the TOC item

The TOC item can be formatted with CSS styles via the Styles sidebar. Individual TOC item components can be separately formatted by selecting the component and assigning it style properties in the Styles sidebar.

 

© 2017-2023 Altova GmbH