| Search Locate Previous Next | Contents |
NewLeaf maintains a table, nlgallery, that contains a set of defined paragraph styles. This table is referenced each time the style is changed. If you plan to use a style that does not appear in this table, you can add it through nlDefineStyle. The function is ambivalent:
{stylename} nlDefineStyle props
where props is a two-column nested matrix with text property names in the first column and the corresponding value in the second column. styleName, if supplied, is a simple, mixed-case text vector containing the unique name for this style together with a brief description. The name and description are separated by one of these three characters: =;©. If there is no left argument, a default name ('Newx' where x is one greater than the number of rows in the table) and description (;'(untitled)') are provided. For example:
props2 2½'Font' 'HE,36' 'Align' 'Centre' 'Title;Main document title' nlDefineStyle props
adds a style called Title that, when specified, will centre 36-point Helvetica text on the page. If the Title style already exists in the table, the original entry is deleted and the new definition appended. So, if you decide that 36 text is too large, change the property value(s) and redefine it:
props2 2½'Font' 'HE,24' 'Align' 'Centre' 'Title;Main document title' nlDefineStyle props
Similarly, because a style must have at least one valid text property and value, you can remove an entry in the table by trying to define one with an empty set of properties:
'Title' nlDefineStyle ''