The <rule/> command

Generates a fixed width rule or a rule fill.

Where allowed

Any mapping other than $document or $headfoot



Specifies a measure defining the width of the rule. If not specified, TopLeaf will generate a rule fill that is wide enough to fill any unallocated space on the line.


Specifies a measure defining the height of the rule. If not specified, a value of 0.5pt is assumed.


Specifies a measure defining the vertical shift of the rule above or below the baseline. By default, the bottom edge of the rule is positioned at the current baseline. The vshift attribute is used to raise or lower the rule. Negative values raise the rule off the baseline, while positive values push its lower edge below the baseline.

In TopLeaf there is no essential difference between a “horizontal” or a “vertical” rule. A rule with a width that is greater than its height will appear to be horizontal, whereas if the height is larger then the rule will appear to be vertical.

The one substantive difference between rule height and width is that the width of a rule affects surrounding characters, but the height does not. In other words if you make a rule wider, then the following characters move to accommodate it. A very tall rule does not force the line down, and the rule may overprint the line above. You can avoid this situation by setting an appropriate line leading in the Font tab.


  • <rule width="1em" vshift="-0.3em"/> generates a rule which looks much like "—" (&mdash;).

  • Signed <rule width="6cm"/> (Guarantor) gives the following:

  • <rule/> is a non-breaking rule fill.