Next: , Previous: , Up: GNU troff Reference   [Contents][Index]

5.3 Measurements

The formatter sometimes requires the input of numeric parameters to specify measurements. These are specified as integers or decimal fractions with an optional scaling unit suffixed. A scaling unit is a letter that immediately follows the last digit of a number. Digits after the decimal point are optional. Measurement expressions include ‘10.5p’, ‘11i’, and ‘3.c’.

Measurements are scaled by the scaling unit and stored internally (with any fractional part discarded) in basic units. The device resolution can therefore be obtained by storing a value of ‘1i’ to a register. The only constraint on the basic unit is that it is at least as small as any other unit.


Basic unit.


Inch; defined as 2.54 centimeters.


Centimeter; a centimeter is about 0.3937 inches.


Point; a typesetter’s unit used for measuring type size. There are 72 points to an inch.


Pica; another typesetter’s unit. There are 6 picas to an inch and 12 points to a pica.


See Using Fractional Type Sizes, for a discussion of these units.


GNU troff defines this unit to scale decimal fractions in the interval [0, 1] to 16-bit unsigned integers. It multiplies a quantity by 65,536. See Colors, for usage.

The magnitudes of other scaling units depend on the text formatting parameters in effect. These are useful when specifying measurements that need to scale with the typeface or vertical spacing.


Em; an em is equal to the current type size in points. It is named thus because it is approximately the width of the letter ‘M’.


En; an en is one-half em.


Vee; recall Page Geometry.


Hundredth of an em.

Next: , Previous: , Up: GNU troff Reference   [Contents][Index]