On Tue, Mar 26, 2013 at 1:13 PM, James Worlton
<address@hidden> wrote:
Hello,
I've been trying to get certain markups to overlay staff lines in a keyboard score and have made some progress using \tweak #'extra-offset. However, it appears that the space generated by the markup remains between the staves after the object has moved.
The property 'extra-offset is applied at a late stage, when the positions of layout objects have already been determined. Here, the staves have been moved apart to accommodate the tall markup. Setting 'extra-offset moves your bracket, but no recalculation of spacing happens.
Is there a better way to create markups that overlay staff lines than what I'm doing? Or is there a way to reduce the unnecessary space that shows up in my second example?
The problem is that TextScript is an outside-staff-object, and the spacing between staves will be calculated so that there are no collisions when it is placed above the staff.
Below, I've set 'outside-staff-priority to #f, meaning that the grob will be treated as a within-staff object. You can then move it around with 'extra-offset. I used 'X-offset and 'Y-offset so the spacing will accommodate the object,
\score {
\new PianoStaff <<
\new Staff { \notes }
\new Staff {
r4
\once \override TextScript.outside-staff-priority = ##f
a'2.^\tweak #'Y-offset #-1 ^\tweak #'X-offset #-1 \bracket }
>>
}
HTH,
David