Re: Outside-staff-priority and vertical order of grobs
Am Mo., 9. Dez. 2019 um 18:00 Uhr schrieb Paolo Pr : > > > > On Mon, Dec 9, 2019 at 5:38 PM Thomas Morley wrote: >> >> Am Mo., 9. Dez. 2019 um 17:05 Uhr schrieb Paolo Pr : >> > > > >> >> > 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. >> > > Hello Thomas, > > This method, unfortunately, seems redundant, because I have to specify the > value for all the objects that are near the OttavaBracket. Instead, I wonder > if is there an automatic way to vertically order them, given that the order > is already set in the list of outside-staff-priority valuse. And that's the misunderstanding. The grob are only ordered following outside-staff-priority _if_ collisions would happen otherwise. If you manually move grob4, in a way grob1/2/3 _can't_ collide with it any longer then collision-avoidence following outside-staff-priority happens only for grob1/2/3 > For example, if I have in the following vertical order (grob1 on the top, > grob4 on the bottom): > > grob1 > grob2 > grob3 > grob4 > > --- > --- > --- > --- > --- > > I wonder if is there a way to shift grob4 vertically and automatically shift > grob1,2,3 as a consequence... I'm not aware of such a possibility. Cheers, Harm
Re: Outside-staff-priority and vertical order of grobs
On Mon, Dec 9, 2019 at 5:38 PM Thomas Morley wrote: > Am Mo., 9. Dez. 2019 um 17:05 Uhr schrieb Paolo Pr : > > > > > 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. > > Hello Thomas, This method, unfortunately, seems redundant, because I have to specify the value for all the objects that are near the OttavaBracket. Instead, I wonder if is there an automatic way to vertically order them, given that the order is already set in the list of outside-staff-priority valuse. For example, if I have in the following vertical order (grob1 on the top, grob4 on the bottom): grob1 grob2 grob3 grob4 --- --- --- --- --- I wonder if is there a way to shift grob4 vertically and automatically shift grob1,2,3 as a consequence... Thanks.
Re: Outside-staff-priority and vertical order of grobs
Am Mo., 9. Dez. 2019 um 17:05 Uhr schrieb Paolo Pr : > > 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
Outside-staff-priority and vertical order of grobs
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? 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? Thanks, Paolo