![](https://assets.isu.pub/document-structure/220818193509-b1659cf6fd7a5dd019057e842e09cd39/v1/ff2850d7601b40860b3f00b2f1558b59.jpeg?width=720&quality=85%2C50)
2 minute read
Style Sets, Or ‘One Database, Many Dictionaries’
Using entities for such cases allows the software to be aware that these labels are part of the metalanguage, and to thus provide a more meaningful response should the user click on them. A powerful extra mechanism for customisation is moreover provided, as the language/appearance of the labels can, again, easily be adapted in one single place.
Style Sets, Or ‘One Database, Many Dictionaries’
Advertisement
Not only can the dictionary grammar for any project be flexibly configured and then kept under control with the customisable and multilayered DTD editor dialog, given that all elements and attributes are also linked to a comprehensive Styles System for generating the output (and preview), one single database can efficiently hold several dictionaries. This outcome has been taken one step further, and functionality has been added with which it is possible to set up multiple sets of styles and to toggle between them. There is no upper limit as to the number of sets of styles that can be defined.
Broadly speaking, this is achieved by doing two things. Firstly, by making use of multiple element “categories” to which the various data attributes are assigned by the user depending on which dictionary or dictionaries they should appear in, and secondly by defining a different set of styles for each ‘view’ of the database, i.e. for each dictionary. Certain element categories are made visible or invisible in each style, which thus effectively functions as a kind of ‘mask’ that filters and reveals only the portions of data to be shown for the current dictionary. Additionally, this also allows a different ‘look’ to be defined for each dictionary. In other words, the multiple sets of styles available in a single database, allow for the simultaneous compilation of a multitude of dictionaries: ‘pocket’ vs. ‘full’ editions, ‘desktop’ vs. ‘electronic’ editions, ‘monolingual’ vs. ‘semi-bilingual’ vs. ‘bilingual’ vs. ‘multilingual’ editions, etc. Given that both the styles/formatting and the output (display) order can be manipulated for each “style set”, both the “Styles/formatting” and the “Output (display) order” tabs of the Styles editor (“Format/Styles...”) have a “Style sets” section in the top-left corner, as shown on the left screenshot below:
![](https://assets.isu.pub/document-structure/220818193509-b1659cf6fd7a5dd019057e842e09cd39/v1/db1c8a3b7a7759cfad5c481e5b6dc562.jpeg?width=720&quality=85%2C50)
Figure 53: “Edit sets of styles” under the “Format/Styles...” menu option
Clicking on the “Edit sets of styles” button brings up a new dialog, shown on the right screenshot above, where a new style set can be configured starting from a clone of an existing style. Given a detailed-enough DTD, all the features discussed in the present chapter can be applied in creating multiple views. A sample file demonstrating a full vs. a pocket edition is available in the “Projects/Samples” folder of TLex. Please refer to that file. The settings illustrated there result in the following views of the same database: • Full edition: