Jean Abou Samra <j...@abou-samra.fr> writes: > Certainly. Kieren, try this: > > \version "2.22.1" > > \layout { ragged-right = ##f } > > music = \chordmode { > c1 c:7 c:m7 c':m6.4.2/ees \once \omit ChordName c > } > > \score { > << > \new ChordNames \music > \new Staff \music > >> > \layout { > \context { > \Score > \override ChordName.X-offset = > #(lambda (grob) > (let ((sten (ly:grob-property grob 'stencil))) > (if (ly:stencil? sten) > (let* ((xex (ly:stencil-extent sten X)) > (width (interval-length xex))) > (max -2 (* -0.5 (max 0 (- width 2)))))))) > } > } > } > %%%%
Your "if" has no else path. Maybe replace it with "and", assuming that ChordName knows how to deal with an X-offset of #f (which tends to be a valid setting for any predicate in grob properties). -- David Kastrup