lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outside-staff-priority and vertical order of grobs


From: Thomas Morley
Subject: Re: Outside-staff-priority and vertical order of grobs
Date: Mon, 9 Dec 2019 17:37:58 +0100

Am Mo., 9. Dez. 2019 um 17:05 Uhr schrieb Paolo Pr <address@hidden>:
>
> Hello,
>
> in the following snippet, I assigned to the TupletBracket grob an 
> outside-staff-priority higher than the OttavaBracket. Then, the OttavaBracket 
> is placed below it, as expected.
>
> %%%%%%%%
> {
> \override TupletBracket.outside-staff-priority = #340
> \override Staff.OttavaBracket.outside-staff-priority = #300
> \ottava #1 \tuplet 3/2 { c' d' f' }
> }
> %%%%%%%%
>
> However, if I override the staff-padding property of the OttavaBracket, the 
> ottava grob il placed in a new position regardless of the previous 
> outside-staff-priority order. Then, the TupletBracket us now placed below the 
> moved OttavaBracket:
>
> %%%%%%%%
> {
> \override TupletBracket.outside-staff-priority = #340
> \override Staff.OttavaBracket.outside-staff-priority = #300
> \override Staff.OttavaBracket #'staff-padding = #'5
> \ottava #1 \tuplet 3/2 { c' d' f' }
> }
> %%%%%%%%
>
> Why?

In IR outside-staff-priority is explained as:
"
outside-staff-priority (number)

If set, the grob is positioned outside the staff in such a way as to
avoid all collisions. _In_ _case _of a potential _collision_, the grob
with the smaller outside-staff-priority is closer to the staff.
"

If you set staff-padding of OttavaBracket to a sufficient high value,
then no collision will occur anyway. Thus no need to follow the
staff-priority you've set.

> Is there a way to set the staff-padding property of a grob and preserve at 
> the same time the vertical order set with outside-staff-priority?

Provoke collision by setting staff-padding of TupletBracket to the
same value and let LilyPond sort it.

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]