Hi,
I like to use an extra-offset clef *with false X-extent* to move clefs into whitespace in my cutaway scores. This pair of overrides ...
\once \override Staff.Clef.X-extent = ##f
\once \override Staff.Clef.extra-offset = #'(-2.8 . 0)
... seems to do the trick.
The example from the top of the thread then rewrites this way:
%%% BEGIN %%%
\version "2.19.82"
<<
\new Staff {
\repeat unfold 100 { c'4 }
}
\new Staff {
\repeat unfold 20 { g'2 }
g'1
\stopStaff
s1*4
\startStaff
\once \override Staff.Clef.X-extent = ##f
\once \override Staff.Clef.extra-offset = #'(-2.8 . 0)
\clef treble
\repeat unfold 20 { e'2 }
}
>>
%%% END %%%
Usage notes:
1. As always, there's the question of Grob.X-extent = ##f versus Grob.X-extent = #'(0 . 0). I've never been able to understand, systematically, when to use one and when to use the other. Sometimes the overrides are interchangeable. But in this case the overrides differ importantly: make sure to use Staff.Clef.X-extent = ##f (as shown). If you use Staff.Clef.X-extent = #'(0 . 0) then Lily will mysteriously draw a little extra fringe of stafflines into the white cutaway part of your score.
2. The magic value of -2.8 in the extra-offset is eyeballed; tweak manually to control the whitespace between the clef and following barline. Change the number when using a C of F clef.
Trevor.