![](https://assets.isu.pub/document-structure/220818193509-b1659cf6fd7a5dd019057e842e09cd39/v1/cb0b5ddf1def33e1651ce5b12ce8c231.jpeg?width=720&quality=85%2C50)
3 minute read
Automatic Numbering
In addition to specifying a separator character, the group style options also allow one to configure text that should appear before or after the entire group of child elements of the same type. This can be used, for example, to precede every phrasal-verb section of an article with “PHR V”. The group style properties are also used to specify before/after text and separator characters for “list” type attributes that allow multiple list items to be selected from attribute lists, such as the part of speech attribute of the lemma and sense elements. Note that the group style properties have no effect for other non-list attribute types.
Automatic Numbering
Advertisement
A comprehensive “auto-numbering” system allows automatic numbering to be assigned to any element type, by means of an “Auto-number (Integer)” attribute type. So, for instance, to number the various senses of a polysemous lemma automatically, one will first have to create an “Autonumber (Integer)” attribute for the “Sense” element, as shown below:
Figure 48: “DTD structure” tab, Attribute editing window: Selecting the “Auto-number (Integer)” attribute type, used for automatic numbering of any elements
The type of numbering scheme to be displayed in the output can be configured in the Styles System, via the “Numbering” button on the “Styles/formatting” tab. So, for this example, if one first clicks on the “SenseNumber” attribute under the “Sense” element on the “Styles/formatting” tab, the following dialog will pop up:
![](https://assets.isu.pub/document-structure/220818193509-b1659cf6fd7a5dd019057e842e09cd39/v1/9bd15bb6d297af9f1161211b0daf1688.jpeg?width=720&quality=85%2C50)
Figure 49: Numbering styles dialog, used to select numbering schemes for “Auto-number (Integer)” attribute types
The list on the right shows various numbering schemes, and clicking the “<- Add” button selects one of them. Selecting several (different) numbering schemes allows you to number the different Tree View levels of an element.
For example, if in a particular dictionary a sense can have subsenses, and these subsenses can again have subsenses, then one will need three levels of numbering. In the screenshot the “circled SansSerif digit” numbering scheme has been chosen for level one (see e.g. Figure 11), “Latin –lowercase” for level two, and “Roman numerals – lowercase” for level three. One can of course choose the same numbering scheme for all levels, but choosing different ones generally increases readability. There are also options to always show the numbering (thus even if there is only one sense in a particular article, that sense will always be preceded with a number/letter “1”/“a”/“A”/“i”/...); or to only start numbering from the moment there are at least two items on the same level in a particular article; or to only start numbering when there are at least two items on different levels in a particular article.
TLex/tlTerm automatically recalculates the numbering for “Auto-number” attributes whenever you add, move or remove their associated elements in the Tree View. For homonyms, plain numerical digits are used by default (see the DTD in Figure 31). If one would rather have homonyms ‘numbered’ as, say, “a”, “b”, “c”, etc., then one can simply open the “Styles/formatting” tab in the Styles dialog, mark the “HomonymNumber” attribute, click on the “Numbering” button, and then select the “Latin – lowercase” numbering scheme. (Adding extra levels of numbering schemes will, of course, have no impact for homonyms.)
Note: For some numbering schemes to be displayed correctly, such as the “circled Sans-Serif digit”, one will need to choose a font for the auto-number attribute (on the “Styles/formatting” tab in the Styles dialog) that supports it. (A font that supports all but one, cf. Figure 49, is “Arial Unicode MS”.) In general, if you see hollow squares (◻) it means that the selected font does not support the required Unicode characters. Please try to use a different font in that case.