Create a variable style

Build 1501 on 14/Nov/2017  This topic last edited on: 11/May/2017, at 14:08

This topic applied to the variable (parametric) styles.

To create a variable style        

1.Repeat steps to create any style.

2.Since version 2.5, optionally disable prompting for the parameters. See the first note in Variable (parametric) styles for instructions how to prevent the dialog box to appear.

3.In Style Commands, insert the GNML tags, but - instead to type the absolute values as the parameters of GNML tags, use the string #1-#9 or #A to mark the parameter number.

4.For each #x, key-in the related field, the parameter label.

5.For each #x, in the related field, choose the parameter type. Please note that it's your responsability to choose the type suitable for the chosen GNML tag.

6.For each #x, click the Default button, and choose parameter defaults.

About parameters

10 types of parameters are supported:

Integer parameter is suitable for all GNML tags that require an integer parameter, such as number of lines or characters in a drop capital, or number of lines in an indentend paragraph and similar.

Measure parameter is suitable for all GNML tags that require parameter of measure type, such as type size, leading, type base or characters in a drop capital, or number of lines in an indentend paragraph and similar.

String parameter is suitable to insert the protected text through a dialog box.

Colour parameter is suitable for the GNML tag >co..<. It returns the color name as the string.

Tint parameter is suitable for the GNML tag >gray..<. It returns the integer number between 0 and 100.

Font parameter is suitable for the GNML tag >f..<. It returns the integer number as the font number, e.g. 71.

Flag parameter is suitable for all the GNML tags that accept the toggle of the integer type such as 0 or 1.

Hyphenation parameter is suitable for the GNML tag >hyp...<. It returns the string of the hyphenation rule, e.g. EN. that aept the toggle of the integer type such as 0 or 1.

Alignment parameter is suitable for the GNML tags >pa...< or >q...<. It returns the integer number.

Note

Character styles are rendered in the XML only if they match an element in the schema – otherwise to render them you need to declare them as hidden styles, not a character styles (as >em<, >en< and >thin<).