About Arbortext Styler > Adding Generated Text > Advanced Formatting of Titles and Numbering > Example: Create a Consecutive Numbering Sequence Based on an Attribute
Example: Create a Consecutive Numbering Sequence Based on an Attribute
This example describes how to create consecutively numbered titles for the tables in a document, where the table will only be counted in the sequence if it contains the attribute role=”number”. If the title does not include the attribute it will not be numbered and will not be included in the count for the table numbering sequence. The table is defined in a table element, and its title in a title element.
1. In Arbortext Styler, create or select the title in table context in the Elements list.
2. If the context is currently set to be numbered, remove that setting.
3. Create a new condition for the context, based on an attribute test that tests for the presence of the role=”number” attribute and value.
4. Set the condition to be numbered in the Generated text category, by selecting the Number option in the Numbers and bullets field.
5. Click the Details button in the Numbers and Bullets field to open the relevant title numbering dialog box and configure the numbering for the title.
6. Click the Restart button in the dialog box to open the Numbering Restart dialog box. In the Restart numbering at field, select (No restart) then click OK to exit the dialog box.
7. Make any other changes to the formatting of the number you desire, then click OK to exit the title numbering dialog box.
8. When previewing or publishing you will now see that all tables whose titles include the specified attribute will be numbered consecutively, while tables whose titles do not include the attribute are not included in the numbering scheme and are not numbered.