Indexing: Table of Contents, Figure lists, Table lists#

The Ansys Dynamic Reporting system provides basic support for the dynamic generation of report 'index' features. These features include a traditional 'table of contents', 'lists of figures' and 'lists of tables. The entries for the table of contents and the lists are collected as the report is generated and can be inserted into the final, output report using the Table of Contents Layout. Entries can be generated for layout templates and for data items.

Properties#

There are five properties that are used to generate the entries for the table of contents and lists. As with all properties, they are inherited by layout children. It is not uncommon to set TOCItem on a upper-level template and disable it on lower-level templates to scope the hierarchical generation of table of contents entries.

  • TOCItem - flag the generation of table of contents entries. This property can have three values: 0=disable the generation of entries, 1=generate an entry for this layout (note that it will be inherited by layout children of this layout), 2=generate entries for the children of this layout (both layout children and any data items displayed by this layout).

  • TOCLevel - for table of contents entries, the value of this property determines the indent level of TOCItem entries. Entries at the sane TOCLevel will appear at the same indent level in the table of contents (with the same number of decimals in the numbering). The TOCLevel is not the absolute level of indent, rather it controls if the indent moves up or down. If a new TOCItem entry is generated with level greater than the previous level, it will appear one level deeper than the previous level, even if the number is two or more greater than the previous entry. If a new TOCItem entry is generated with a level less than the previous level, it will appear at the level it specifies.

  • TOCFigure - flag the generation of list of figures entries. This property can have three values: 0=disable the generation of entries, 1=generate an entry for this layout (note that it will be inherited by layout children of this layout), 2=generate entries for the children of this layout (both layout children and any data items displayed by this layout).

  • TOCTable - flag the generation of list of tables entries. This property can have three values: 0=disable the generation of entries, 1=generate an entry for this layout (note that it will be inherited by layout children of this layout), 2=generate entries for the children of this layout (both layout children and any data items displayed by this layout).

  • TOCName - specify a name for generated entities of any kind. By default, the name displayed with the entity is the name field of the template or the item. This property allows a specific name to be specified instead.

Macros#

When generating entries, three macros are available for use when creating things like custom HTML headers or even properties for things like plot titles, etc. These three macros expand to the current number for the Item, Figure and Table lists. They are:

  • {{toc_item_number}} - The current item number string (e.g. 1.2, 1.2.3, 1)

  • {{toc_figure_number}} - The current figure number

  • {{toc_table_number}} - The current table number

In a custom HTML header they can be used like this:

<h2>{{toc_item_number}} Data</h2>

or in a table property to dynamically label the table (plots) within a layout:

Image

Exceptions#

There are several exceptions from the basic inheritance rules. Generator layouts cannot be added to the lists. Some report layouts do not allow their children (layouts or items) to generate entities. The carousel, tab and slider layouts are three examples. This is because they do not support links pointing to their specific children.