2011/9/24 David Nalesnik <david.nales...@gmail.com>

> ( . . .)
>
> In the following snippet, the override of 'Y-offset works, but the one of
> 'padding doesn't.
>
>  \version "2.14.2"
>
> \relative c' {
>   \once \override  Script #'padding = #(lambda (grob) (if (eq?
> (ly:grob-property grob 'direction) UP) 5 0.2))
>   c1^-
>   \once \override  Script #'Y-offset = #(lambda (grob) (if (eq?
> (ly:grob-property grob 'direction) UP) 5 0.2))
>   c1^-
> }
>
> -David
>

Hi David,

I don't know, why it doesn't work this way. But the following seems to be
successful:

#(define (proc x y)
  (lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1)
          (ly:grob-set-property! grob 'padding x)
          (ly:grob-set-property! grob 'padding y)
          )))

\relative c' {

  \once \override  Script #'after-line-breaking =
      #(proc 5 0.2)
  c1^-
%{
  \once \override  Script #'after-line-breaking =
      #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1)
          (ly:grob-set-property! grob 'padding 5)
          (ly:grob-set-property! grob 'padding 0.2)
          ))
  c1^-
%}
  \once \override  Script #'Y-offset =
      #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5
0.2))
  c1^-
}

Best,
  Harm
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to