bell notificationshomepageloginNewPostedit profiledmBox

Hoots : Top-aligning scores inside Lilypond markup blocks I'm currently trying to typeset a hymn. Below the actual score I want two things: Some additional verses The voicing for "Amen." I'd like to lay these out adjacent to - freshhoot.com

10% popularity   0 Reactions

Top-aligning scores inside Lilypond markup blocks
I'm currently trying to typeset a hymn. Below the actual score I want two things:

Some additional verses
The voicing for "Amen."

I'd like to lay these out adjacent to each other to save space, like so:

However, when I put the score block with the Amen voicing inside a markup block, the default vertical alignment is off: it appears to align the bottom clef with the text to its left. This leads to a bunch of excess vertical space in the left column. I can fix it with a lower command (as I did to produce the image above). However, I would think there should be a way of doing this that doesn't rely on that kind of fine-tuning.

Is there any way to tell Lilypond that an entire score within markup should be top-aligned? Alternately, is there another way of getting the layout I want (perhaps a way to do multi-column layout without the entire thing being wrapped in a markup block?)

Lilybin link

My code:

version "2.18.2"

Amen = <<
new Staff << key g major
relative c'' { voiceOne g2 g bar"|." }
new Voice relative c' { voiceTwo e2 d bar"|." }
>>
new Lyrics lyricmode { A2 -- men. }
new Staff << key g major clef bass
relative c' { voiceOne c2 b bar"|." }
new Voice relative c { voiceTwo c2 g bar"|." }
>>
>>

markup {
hspace #0 .1
column {
line { bold "4."
column {
"A verse"
}
}
combine null vspace #0 .1
line { bold "5."
column {
"Another verse"
}
}
}
hspace #4
column {
lower #13
score {
Amen
layout { }
}
}
}


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

Try something like

version "2.18.2"

Amen = <<
new Staff << key g major
relative c'' { voiceOne g2 g bar"|." }
new Voice relative c' { voiceTwo e2 d bar"|." }
>>
new Lyrics lyricmode { A2 -- men. }
new Staff << key g major clef bass
relative c' { voiceOne c2 b bar"|." }
new Voice relative c { voiceTwo c2 g bar"|." }
>>
>>
markup {
general-align #Y #CENTER
{ column { line { bold "4." "A verse" }
vspace #2
line { bold "5." "Another verse" }
}
hspace #4
score {
Amen
layout { }
}
}
}

PostScriptum: if you want to align to the top, use #UP instead of #CENTER for the second general-align parameter.


Back to top Use Dark theme