Numbering List Items
You can use generated text to automatically number list items. The procedure described below demonstrates how to number the entries in an itemizedlist element.
Refer to Limitations of List Item Numbering for a summary of differences in support for list item numbering in certain outputs.
Example: Numbering List Items
1. In Arbortext Editor, open the transport.xml document located at Arbortext-path/samples/styler
2. Choose > to open the stylesheet currently associated with the document for edit. This is a read only stylesheet so you will need to save a local copy if you want to make amendments.
3. In Arbortext Editor, click within the para element within the first listitem element in the first chapter (item “Cruise Ship”).
4. In Arbortext Styler, with the para element selected in the Elements list, choose > to create a new context for the element. The New Context dialog box opens.
5. Click New Parent and select listitem from the drop down list. Click OK to save the new context and exit the Context dialog box.
6. With the para in listitem context selected in the Elements list, go to the Breaks category.
7. Set Structure type to Inline.
8. Select the listitem in itemizedlist context in the Elements list.
9. In the Generated text category, select the Number option in the Numbers and bullets field.
10. Click the Details button to open the List Item Number dialog box.
11. The Number format reflects the style selected in the Number style field. For example, to use roman numbers, select I, II, III, ... in the Number style field, and an I displays in the Number format field.
12. Select Right in the Alignment field to right align numbers.
13. Specify .2in in the Align at field.
14. To left align the content of a list item when the content wraps lines, choose Tab in the Follow number and suffix with field, and specify the same value (for example, .5in) in both the Tab to and Indent following lines fields.
15. Click OK to save the numbering settings and exit the dialog box.
16. Choose > .
In the Print Preview window, note that list items are now preceded by roman numerals, which are right aligned.
You can also specify output-specific numbering for lists.
Example: Defining Output-Specific Numbering for List Items
Here we will use the same type of standard list numbering as defined in Numbering list items above, but will change its numbering setting to alphanumeric format when the source document is published to HTML.
1. In Arbortext Styler, select the listitem in itemizedlist context in the Elements list.
2. Select HTML File from the Outputs to edit list.
3. Go to the Generated text category, and then click Details next to the Number option. The List Item Number dialog box opens.
4. Select A, B, C,... as the Number style; note that an A displays in the Number format field.
5. Set Alignment to Left, and enter 0in into the Align at field.
6. Select Tab from the Follow number and suffix with drop down list. Enter 0.25in into the Tab to field.
7. Enter 0in into the Indent following lines field.
8. Click OK to save the numbering and exit the dialog box.
9. Choose > .
In the Print Preview window, note that list items are still preceded by right-aligned roman numerals.
10. Choose > .
In the browser, note that list items are now preceded by uppercase alpha characters, aligned to the left.
Limitations of List Item Numbering
The table below details some limitations in the numbering available for list items:
Output | Limitation |
All HTML outputs | • Most list item styling properties (such as alignment, tab after number, labels, punctuation after number) will be ignored if list items are not formatted as tables. Ensure that the Format list items as tables options in the HTML tab of the Stylesheet Properties dialog box is selected. • Support for list item numbering styles varies greatly by browser. They may change as browsers change. A summary is given below though this may not be comprehensive: ◦ Internet Explorer 7: supports only decimal, upper and lower roman, and upper and lower alpha styles ◦ Internet Explorer 8 and 9: in addition to the styles supported by IE7, also support decimal-leading-zero and none ◦ Mozilla-based browsers (e.g.Firefox): in addition to the styles supported by IE8 and IE9, also support katakana, katakana-iroha, hiragana, and hiragana-iroha ◦ Chrome9.x: in addition to the styles supported by the Mozilla-based browsers, also supports cjk-earthly-branch, cjk-heavenly-stem, hangul, hangul-consonant, thai, arabic-indic, and urdu |