Hello Richard,

to understand such problems better it can help to annotate the columns by 
including

    \override Score.NonMusicalPaperColumn.stencil = #ly:paper-column::print

for non musical columns and

    \override Score.PaperColumn.stencil = #ly:paper-column::print

for musical columns.

The issue here is that while a bar line defines a spacing to the next note, 
KeySignature does not. Setting this to the same value should fix this:

%%%
\version "2.25.18"
{
         \override Staff.KeySignature.space-alist.next-note = #'(semi-fixed-
space . 0.9)
         g'1
         a''
         g'
         \key f \major a''
}
%%%

Best regards,
Tina


Am Mittwoch, 12. November 2025, 16:43:54 Mitteleuropäische Normalzeit schrieb 
Richard Shann:
> A spurious non-keychange got in their sorry:
> 
> \version "2.25.18"
> {
>          g'1
>          a''
>          g'
>          \key f \major a''
> }
> 
> But it makes no difference - why the excessive space between the key
> change and the last note?
> 
> Richard
> 
> On Wed, 2025-11-12 at 15:33 +0000, Richard Shann wrote:
> > In this example, after a key signature change there seems to be
> > unnecessary extra space:
> > 
> > \version "2.25.18"
> > {
> >          g'1
> >          a''
> >          \key c \major g'
> >          \key f \major a''
> > }
> > 
> > I would expect the second of the two a's to be spaced away from the
> > flat of the key signature change at similar distance as the first a
> > is
> > from the bar line.
> > Is that a bug? How to adjust?
> > 
> > Richard Shann

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to