1\version "2.21.0"
2
3\header {
4  texidoc = "Instrument names are removed when the staves are
5killed off.
6
7In this example, the second staff (marked by the bar number 2)
8disappears, as does the instrument name."
9}
10
11\new PianoStaff <<
12  \new Staff {
13    \override Staff.VerticalAxisGroup.remove-empty = ##t
14    \set PianoStaff.instrumentName = "up"
15    \set PianoStaff.shortInstrumentName = "u"
16    c'1\break R
17  }
18>>
19