4.5.5 Line width

The most basic settings influencing the spacing are indent and line-width. They are set in the \layout block. They control the indentation of the first line of music, and the lengths of the lines.

If ragged-right is set to true in the \layout block, then systems ends at their natural horizontal length, instead of being spread horizontally to fill the whole line. This is useful for short fragments, and for checking how tight the natural spacing is. The normal default setting is false, but if the score has only one system the default value is true.

The option ragged-last is similar to ragged-right, but only affects the last line of the piece. No restrictions are put on that line. The result is similar to formatting text paragraphs. In a paragraph, the last line simply takes its natural horizontal length.

\layout {
  indent = #0
  line-width = #150
  ragged-last = ##t
}

See also

Snippets: Spacing.


LilyPond — Notation Reference v2.24.4 (stable-branch).