raise markup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

raise markup

bobroff@centrum.is
I've created a markup, simplified to 'X' in my example, and I would like to move it up partway into the staff.  I can move it down with a negative number but it won't move higher than '0' in \translate.  There must be a way to do this.

-David

%%%%%
\version "2.18.2"

\score {
  \relative {
    \relative c' {
      R1_\markup{ \translate #'(0 . 7 ) "X" }
    }
  }
}
%%%%%

Reply | Threaded
Open this post in threaded view
|

Re: raise markup

Malte Meyn-3


Am 22.03.20 um 09:06 schrieb [hidden email]:
> I've created a markup, simplified to 'X' in my example, and I would like to move it up partway into the staff.  I can move it down with a negative number but it won't move higher than '0' in \translate.  There must be a way to do this.

Yes, there is a way: You have to set outside-staff-priority and
staff-padding to #'(). You can then use Y-offset instead of \translate
to fine-tune the position.

You can either use [\once] \override or \tweak, the following works both
for LilyPond 2.18.2 and 2.20.0:

{
   \once \override Score.MultiMeasureRestText.outside-staff-priority = #'()
   \once \override Score.MultiMeasureRestText.staff-padding = #'()
   \once \override Score.MultiMeasureRestText.Y-offset = -2
   R1_"X"

   R1-\tweak staff-padding #'() -\tweak outside-staff-priority #'()
-\tweak Y-offset -2 _"X"
}