Jump to content

Blanking staff lines using the \whiteout command: Difference between revisions

From LilyPond wiki
No edit summary
m New category
Tags: Mobile edit Mobile web edit
Line 16: Line 16:
[[Category:Text]]
[[Category:Text]]
[[Category:Really cool]]
[[Category:Really cool]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Revision as of 23:26, 21 November 2025

The \whiteout command underlays a markup with a white box. Since staff lines are in a lower layer than most other grobs, this white box will not overlap any other grob.

\version "2.24"

\layout { 
  ragged-right = ##f 
}

\relative c' {
  \override TextScript.extra-offset = #'(2 . 4)
  c2-\markup { \whiteout \pad-markup #0.5 "middle C" } c
}