RES home

Global values

There are five types of global value that may change within one fragment of hieroglyphic. Such global values are also called toggles.

Color

At the beginning of a fragment, the global value for color is black. The global value may be changed inside a switch.

The color of a glyph (or related object other than a string) is determined by the following.

The color of a string in a note is determined by the following.

Shading

At the beginning of a fragment, the global value for shading is 'off'. The global value may be changed inside a switch: the argument shade sets it to 'on' and noshade sets it to 'off', irrespective of the current setting.

Shading for a certain object is determined by the following.

In the case of one or more shade_args, shading is determined by the following. The shade_args in a box_arg-bracketed_list only concern the area surrounding the boundaries. Whether the contents is shaded depends on the global value for shading while processing the hieroglyphic in the box and on the shade_args therein. For example, in 'A1 - ![shade] cartouche[noshade](A2 ![noshade]) - A3', only the glyph 'A2' is shaded. The boundaries of the cartouche are not shaded because of the 'noshade' in the box_arg-bracketed_list, and 'A3' is not shaded since that follows the switch '![noshade]'.

For another example, in '![shade] stack(M14,I10[noshade])', both the glyphs 'M14' and 'I10' are shaded. The reason 'I10' is shaded despite the local 'noshade' argument is that 'M14' shaded, and shading in the first top_group of a stack pertains to the entire area.

The 'sep' factor

The (minimal) distance between glyphs and groups of glyphs and related objects is an issue relevant to the treatment of occurrences of the operators '-', ':' and '*', and of occurrences of the function insert and of boxes. This distance is determined by various factors. The font that is used provides one factor, another is computed from the effect of previous scaling within the subexpressions. The distance that this would yield is multiplied by yet another factor, referred to as 'sep', which can be explicitly changed within the encoding.

At the beginning of a fragment, the global value is 1.0. The global value may be changed inside a switch by specifying a value for the attribute 'sep'.

For determining the 'sep' factor at an object, the same rules are used as in the case of color. In particular, an attribute 'sep' specified locally at an object overrides the global value. Note that at a box there are four attributes that take the global value for 'sep' if they are not explicitly specified in the box_arg-bracketed_list. These attributes are 'opensep', 'closesep', 'undersep' and 'oversep'.

Fitting

For the operators '-', ':' and '*', the 'sep' factor normally pertains to the distance between bounding boxes. However, it pertains instead to the distance between pixels in the case of fitting.

Fitting can be indicated by arguments 'fit' and 'nofit' at operators, but one may also use switches to change the global value for fitting. At the beginning of a fragment, the global value for fitting is 'off' and the arguments 'fit' and 'nofit' in a switch set the global value to 'on' and 'off', respectively. For determining whether to apply fitting for an occurrence of one of the operators '-', ':' or '*', the same rules are used as in the case of shading.

Mirroring

An individual named_glyph can be mirrored by specifying the argument 'mirror', but one may also use switches to change the global value for mirroring. Retrograde text is obtained by setting that value to 'on'.

For determining whether to mirror an individual glyph, the same rules are used as in the case of shading and fitting.