Interesting, thanks David. Cheers, Pierre 2015-03-08 16:52 GMT+01:00 David Nalesnik <david.nales...@gmail.com>:
> Hi, > > On Sun, Mar 8, 2015 at 9:35 AM, Pierre Perol-Schneider < > pierre.schneider.pa...@gmail.com> wrote: > >> No clue. >> I just know that some grobs, like 'StaffSymbol' too, need to be reverted >> that way : >> > > Consider this snippet: > > \version "2.19.16" > > #(define ledgerInfo > (lambda (grob) > (let* ((refp (ly:grob-system grob)) > (all (ly:grob-array->list (ly:grob-object refp 'all-elements))) > (ledgers (filter (lambda (l) > (grob::has-interface l > 'ledger-line-spanner-interface)) > all))) > (display ledgers) (newline)))) > > > \relative c' { > \override Staff.StaffSymbol.after-line-breaking = > #(lambda (grob) (display grob) (newline)) > \override Staff.LedgerLineSpanner.after-line-breaking = #ledgerInfo > \override NoteHead.color = #grey > \override Stem.color = #grey > \override Staff.LedgerLineSpanner.color = #grey > \override Staff.StaffSymbol.color = #grey > a4 a a a > %\stopStaff > %\startStaff > \revert NoteHead.color > \revert Stem.color > \revert Staff.LedgerLineSpanner.color > \revert Staff.StaffSymbol.color > %\startStaff > a a a a > } > %%%%%%%% > > Notice that with the \stopStaff and \startStaff commented out, there is a > single StaffSymbol grob in the example. It makes sense that any override > will apply to the whole object. When \stopStaff and \startStaff are in > effect, a second StaffSymbol grob is created, and it can of course take a > new override or revert. > > Very surprisingly, there is only a single LedgerLineSpanner per > StaffSymbol object! This means that any override of LedgerLineSpanner will > affect all of them. > > --David >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user