lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Combine two markups in a toplevel markup


From: Urs Liska
Subject: Combine two markups in a toplevel markup
Date: Fri, 12 Oct 2018 17:51:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

basically this is a follow-up question to the one where I needed to align a text over a slur. I wanted to apply the techniques I learned from your valuable help but ran against the next wall (or: I didn't see that there is no wall after all ...).

The overall goal now is to create a centered score with a centered caption below it. Of course I don't know how wide both the score and the caption will be.

My first attempt was quite straightforward: produce both the score and the markup as markups centered with \fill-line.

While this worked perfectly at aligning the score and markup it turned out not to be good enough: While this centers perfectly on the page I can't get correctly cropped output because the bounding box seems to reach both line ends, resulting in uncropped whitespace to the left and right of the score/caption.

If there's a solution to this problem everything below can be ignored.

So I thought to make this *one* markup stencil, align the two parts manually against each other and print the result as one (left-aligned) markup, so it should be properly cropped. Now while I feel quite confident that I would manage to deal with the alignment and stencil issues this time I don't see how I can get at them at the right moment when I'm dealing with a top-level markup (and not inside some music).

What I *have* is two markups (one regular and one score wrapped in a markup), both stored in variables.

What I *need* is a way to combine these markups to one and use the result as a top-level markup, the problem being that I need to access the resulting extents of the markups in order to properly align them against each other.

Any suggestions? (In fact I'd actually prefer suggestions over solutions this time ...)

Best
Urs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]