lilypond-user
[Top][All Lists]

## Re: multi-line markup inside a single box

 From: Aaron Hill Subject: Re: multi-line markup inside a single box Date: Tue, 07 Dec 2021 02:56:52 -0800 User-agent: Roundcube Webmail/1.4.9

On 2021-12-07 1:52 am, Mark Knoop wrote:

At 01:40 on 07 Dec 2021, Josiah Boothby wrote:

Maybe I'm missing something obvious (it's 1:30 in the morning...it's
not unlikely!), but I'm trying to include a small two-line markup
inside a single box. The thing that seems obvious is producing two
boxed lines, which is not what I'm aiming for and is too visually
cluttered for me to accept as a compromise:

\markup\right-column\box{
\line{Solos: 1st x tpt}
\line{2nd x clr}
}

Any ideas?


You want the box to be around the columns? So:

\markup \box \right-column {
\line{Solos: 1st x tpt}
\line{2nd x clr}
}



To add to this, markup commands that expect a single markup will work with markup lists, however they will be applied to each individual markup within the list:

%%%%
\displayScheme \markup \box { a b c }
\displayScheme \markup { \box a \box b \box c }
%%%%


The above code prints out the following, demonstrating that both are equivalent internally:

====
(markup #:line (#:box "a" #:box "b" #:box "c"))
(markup #:line (#:box "a" #:box "b" #:box "c"))
====


To box "a b c" as a unit, you need to use any markup command that operates specifically on a markup list to condense it into a single markup:

%%%%
\markup \box \line { a b c }    % for when you want space
\markup \box \concat { a b c }  % for when you do not want space
\markup \box \overlay { a b c } % for when you REALLY do not want space
%%%%

-- Aaron Hill