I'm trying to put custom text in voltas when engraving with Lilypond. The problem is not adding text, but adding it with the formatting I want. I am aware that a similar question was asked and answered (Markup text inside second volta bracket) but it doesn't answer my problem because the result is really ugly. It's what I already have, except the method is different; I tried it, so expect if I did something wrong, it's not what I want.
What I have for now looks like:
The idea is that the text in the voltas would rather look like the text I put under the B and the C in the first two measures.
My code for now is :
\version "2.20.0"
aaaa = _\markup { \italic \teeny "Suite" }
bbbb = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic #:teeny "Fin")))
pianoUpper = \relative c' {
\override DynamicLineSpanner.staff-padding = #3
\clef "treble"
\key f \major
bes1 \bbbb
\set Score.repeatCommands = #'((volta "Suite"))
c \aaaa
\set Score.repeatCommands = #'((volta #f))
\bar "||"
\set Score.repeatCommands = #'((volta "Fin"))
d
\set Score.repeatCommands = #'((volta #f))
\bar "||"
e_"D.S. al Fine"
\bar "S-S"
\break
}
pianoLower = \relative c {
\clef "bass"
\key f \major
}
\score {
\new PianoStaff
<<
\new Staff = "upper" {
\pianoUpper
}
\new Staff = "lower" {
\pianoLower
}
>>
}
How can I get formatting (italics) in the volta bracket text?