%%% SNIPPET BEGINS #(define ((custom-script-tweaks ls) grob) (let* ((grob-cause (ly:grob-property grob 'cause)) (type (ly:prob-property grob-cause 'articulation-type)) (tweaks (assoc-ref ls type))) (if tweaks (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) tweaks)))) #(define my-scripts `( ("staccato" . ((font-size . -5))) ("fermata" . ((padding . 5))) ("accent" . ((color . ,red))) )) \layout { \context { \Score \override Script.before-line-breaking = #(custom-script-tweaks my-scripts) } } \score { { c'4-. c2\fermata c4 \accent c4-\tweak #'color #blue \accent ^"should be blue" } } %%% SNIPPET ENDS