Next: Programming, Previous: Drawing [Contents][Index]

### 4.2 Label Commands

Label commands are useful to mark segments or angles with usual symbols, or to write point names. As for drawing commands, a label command is either a single or a multiple statement.

Example: `label B.C double`

Example:

    label blue
      A.B
      B.C cross, black
      E.F double
    end

Local parameters override global ones.

#### Label parameters

Segment mark shape

  `simple` (default), `double`, `triple`, `cross`.

Angle mark shape

  `simple` (default), `double`, `triple`, `right`, `forth`, `back`.

Angle mark decoration

  `none` (default), `dotted`, `dashed`.

Color

  `black` (default), `darkgray`, `gray`, `lightgray`, `white`, `red`, `green`, `blue`, `cyan`, `magenta`, `yellow`.

Scale factor

  A number greater than 0 (default: 1).

Font

  `font(s)` where s is a string containing the font description.

#### Single label statements

`label s list`

  Marks segment s where list may contain shape, color and scale parameters.

`label B, A, C list`

  Marks angle BAC (i.e. angle from ray AB to ray AC in anticlockwise direction) where list may contain shape, decoration, color and scale parameters. The `forth` and `back` shape yield arrowed angle marks (respectively in direct and reverse direction). The `dotted` decoration adds a dot inside the angle mark. The `dashed` decoration adds a tick on the angle mark.

`label P a list`

  Assuming variable P contains a point, writes the name of P in direction a from P, where list may contain color, scale and font parameters. The scale factor determines the distance from the center of the label to the point (default: 3 mm).

Next: Programming, Previous: Drawing [Contents][Index]