2018-02-22 11:03 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>: > 2018-02-22 10:58 GMT+01:00 Gianmaria Lari <gianmarial...@gmail.com>: >> Dear Harm, >> >> thank you for your really nice help. Your fix worked well and now your >> example is perfect! >> >> I hope others will take advantage of it. >> >> I copy here the final working code with a screenshot. > > Glad you like it :) > > This morning I observed a certain weakness in the code, a missing > safety net to be more precise. > I'll have a deeper look this evening. Now I have to run for my regular job ... > > Cheers, > Harm
Likely safer to check whether a stencil is present before trying to change it. At least it calms down my paranoia ... adjustFC = \override Staff.FingeringColumn.before-line-breaking = #(lambda (grob) "Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and applies @code{centered-stencil} to every fingering-stencil" (let* ((fingerings (ly:grob-object grob 'fingerings)) (fingering-ls (if (ly:grob-array? fingerings) (ly:grob-array->list fingerings) '()))) (ly:grob-set-property! grob 'snap-radius 3) (for-each (lambda (f) (let ((f-stil (ly:grob-property f 'stencil))) (if (ly:stencil? f-stil) (ly:grob-set-property! f 'stencil (centered-stencil f-stil))))) fingering-ls))) Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user