On 2020-03-17 10:05 am, foxfanfare wrote:
Hi all,
Could anyone could tell me what's wrong with my shortcut?
It's printing the spanner correctly but not the text:
rit =
#(make-music 'TextSpanEvent
'span-direction -1
'span-type 'text
'span-text "rit.")
\score {
\new Staff \relative c'' {
c4\<\rit
d e f
g1\!\stopTextSpan
}
}
span-type and span-text are for dynamic text spanners (e.g.
CrescendoEvent). You can set these music properties for a
TextSpanEvent, but Text_spanner_engraver will just ignore them.
Instead, you should \override or \tweak the bound-details of TextSpanner
to attach text to the left or right end of the span. Something like
this avoids the need to use make-music:
%%%%
\version "2.20.0"
rit = -\tweak bound-details.left.text "rit." \startTextSpan
{ a'4\rit g'8 f' b'2\stopTextSpan }
%%%%
-- Aaron Hill