Jump to content

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

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The <code>\whiteout</code> 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.
The <code>\whiteout</code> 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.


<lilypond version="2.24.0">
<lilypond version="2.24">
\layout {  
\layout {  
   ragged-right = ##f  
   ragged-right = ##f  
Line 12: Line 12:
</lilypond>
</lilypond>


[[Category:Text]]
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Really cool]]
[[Category:Text]]
[[Category:Text]]
[[Category:Really cool]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 12:21, 11 December 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
}