5.4.2 Distances and measurements

Distances in LilyPond are of two types: absolute and scaled.

Absolute distances are used for specifying margins, indents, and other page layout details, and are by default specified in millimeters. In general, distance units may be specified by appending \mm (millimeter), \cm (centimeter), \in (inches), \pt (points), or \bp (big points).

mmcminptbp
mm10.10.03942.84532.8346
cm1010.393728.452828.3465
in25.42.54172.2772
pt0.35150.03510.013810.996
bp0.35380.03540.01391.00381

Page layout distances can also be specified in scalable units (see the following paragraph) by appending \staff-space to the quantity. See Page layout for a detailed description of LilyPond’s page layout.

Scaled distances are always specified in units of the staff space or, rarely, the half staff space. The staff space is the distance between two adjacent staff lines. The default value can be changed globally by setting the global staff size, or it can be overridden locally by changing the staff-space property of StaffSymbol. Scaled distances automatically scale with any change to the either the global staff size or the staff-space property of StaffSymbol, but fonts scale automatically only with changes to the global staff size. The global staff size thus enables the overall size of a rendered score to be easily varied. For the methods of setting the global staff size see Setting the staff size.

If just a section of a score needs to be rendered to a different scale, for example an ossia section or a footnote, the global staff size cannot simply be changed as this would affect the entire score. In such cases the change in size is made by overriding both the staff-space property of StaffSymbol and the size of the fonts. A Scheme function, magstep, is available to convert from a font size change to the equivalent change in staff-space. For an explanation and an example of its use, see Length and thickness of objects.

See also

Learning Manual: Length and thickness of objects.

Notation Reference: Page layout, Setting the staff size.


LilyPond Notation Reference v2.25.21 (development-branch).