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:
score with custom text under volta brackets

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
            #: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"))
    \set Score.repeatCommands = #'((volta #f))
    \bar "||"
    e_"D.S. al Fine" 
    \bar "S-S"

pianoLower = \relative c {
    \clef "bass"
    \key f \major

\score {
    \new PianoStaff 
            \new Staff = "upper" {
            \new Staff = "lower" {

How can I get formatting (italics) in the volta bracket text?

1 Answer 1


This seems to work. Just don't put anything before \text. Modified
\set Score.repeatCommands = #(list(list 'volta finVoltaTxt) 'end-repeat) to same form as \set Score.repeatCommands = #(list(list 'volta suiteVoltaTxt)) because the two variables suiteVoltaTxt and finVoltaTxt should really be together; not one done one way, the other done another way.

suiteVoltaTxt = \markup { \text \italic Suite}
finVoltaTxt = \markup { \text \italic Fin}

pianoUpper = \relative c' {
  \key f \major
  \time 4/4
   \set Score.repeatCommands = #(list(list 'volta suiteVoltaTxt))
   \set Score.repeatCommands = #(list(list 'volta finVoltaTxt) 'end-repeat)
   \set Score.repeatCommands = #'((volta #f))
   e |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.