On Sun, 2017-07-09 at 13:15 +0200, Malte Meyn wrote: > > Am 09.07.2017 um 12:50 schrieb Richard Shann: > > Thanks - here is such a small patch then. It fixes the centering of > > isolated accidentals and digits on whole notes which is currently too > > far to the left. > > From your patch: > > + (if (and (eqv? 0 (ly:duration-log (ly:event-property event > 'duration))) (markup? fig-markup)) > > Shouldn’t you consider negative duration logs (\breve and longer notes) > too, i. e. “>=” instead of “eqv?”? > > (if (and (>= 0 (ly:duration-log (ly:event-property event 'duration))) > (markup? fig-markup))
it seems so, I was unsure what values duration log could take, perhaps being set sometimes to #f so I used eqv? to be safe. Attached is the revised patch which works on this: 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< << { \time 4/2 c''\breve c'' c''1 c'' c''4 c'' c'' c'' } \new FiguredBass { \figuremode { <_+>\breve <_-> <3>1 <3+> <_+>4 <_-> <3> <3+> } } >> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< Richard
--- ORIG_translation-functions.scm 2017-07-08 12:36:17.716097042 +0100 +++ translation-functions.scm 2017-07-09 14:05:34.084003967 +0100 @@ -184,13 +184,10 @@ way the transposition number is displaye (set! alt-markup #f))) - ;; hmm, how to get figures centered between note, and - ;; lone accidentals too? - - ;; (if (markup? fig-markup) - ;; (set! - ;; fig-markup (markup #:translate (cons 1.0 0) - ;; #:center-align fig-markup))) + (if (and (>= 0 (ly:duration-log (ly:event-property event 'duration))) (markup? fig-markup)) + (set! + fig-markup (markup #:translate (cons 1.0 0) + #:center-align fig-markup))) (if alt-markup (set! fig-markup
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel