>> I have to typeset a snippet that is an excerpt of a longer piece,
>> and this snippet ends with a key change:
>>
>>   \relative c' {
>>     \key d \major
>>     d1
>>     \key c \major
>>   }
>>
>> However, the staff stops right before the key change, see attached
>> image.  What can I do to avoid that?
>
> Try:
>
>  \relative c' {
>   \override Staff.StaffSymbol.break-align-symbols =
>   #'(time-signature key-cancellation key-signature staff-bar break-alignment)
>     \key d \major
>     d1
>     \tweak X-extent #'(0.25 . 2.4)
>     \key c \major
>   }
>
> The StaffSymbol being too short is a consequence of a bug-fix some
> time ago, though in this case the cure isn't nice either.
> Furthermore you need to add some padding to the right manually.

Very nice, thanks!  I didn't think of manipulating the X-extent.  Any
chance that this could be done in an official way as a bug fix to
LilyPond?  I don't think that the current behaviour is ever wanted...


    Werner

Reply via email to