lilypond-user
[Top][All Lists]
Advanced

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

Re: Add 'generic' padding between two staves (once)


From: Aaron Hill
Subject: Re: Add 'generic' padding between two staves (once)
Date: Thu, 14 Jun 2018 12:31:24 -0700
User-agent: Roundcube Webmail/1.3.6

On 2018-06-14 12:04, Ben wrote:
On 6/14/2018 12:47 PM, Aaron Hill wrote:
On 2018-06-13 16:15, Torsten Hämmerle wrote:
There is only one complication I can think of: if there are several
markups/scripts, our "spacer" markup may push the other objects away from the stave, but then again, one use outside-staff-priority or, if there's already a TextScript markup, use this by changing its vertical extents.

Torsten,

Would it make more sense to use \with-dimensions to ensure the markup has minimal size?  Consider:

%%%%
  \version "2.19.81"
  <<
    \new Staff {
      \repeat unfold 40 { c''1 }
      d'1_\markup \with-dimensions #'(0 . 8) #'(0 . 8) " "
      \repeat unfold 40 { c''1 }
    }
    \new Staff {
      \repeat unfold 40 { c''1 }
      a''1
      \repeat unfold 40 { c''1 }
    }
  >>
%%%%

As I understand it, this will result in a markup that occupies a single point, which should have less chance of colliding with other neighboring markup.


Aaron,

I don't understand. I think that would be a big chunk vs. a small
space. (See attached)

i.e.
#'(0 . 0) #'(0 . 8) " "

instead of
#'(0 . 8) #'(0 . 8) " "

is a huge difference in space....right?

Sorry,

Two typos. I always keep thinking that dimensions are (x0,y0) (x1,y1), not (x0,x1) (y0,y1). I had meant to say #'(0 . 0) #'(8 . 8), which would create a single point. But then I tested that and found that it doesn't work. You need to have as you mentioned: #'(0 . 8) for the Y dimension.

But I also tested an overlapping markup with both \with-dimensions and \lower and didn't see any problem:

%%%%
  \version "2.19.81"
  <<
    \new Staff {
      \repeat unfold 40 { c''1 }
      d'4_\markup \with-dimensions #'(0 . 0) #'(0 . 8) ""
      % d'4_\markup \lower #8 " "
      d'2.-\tweak self-alignment-X #RIGHT _"overlap"
      \repeat unfold 40 { c''1 }
    }
    \new Staff {
      \repeat unfold 40 { c''1 }
      a''1
      \repeat unfold 40 { c''1 }
    }
  >>
%%%%

The only advantage my approach could possibly have is that you can specify the extents precisely. But that might not be of any real value since you can just mess about with \lower to get what seems visually appealing. And since \lower is less verbose, it is probably the better option.

So, sorry for the noise.

-- Aaron Hill



reply via email to

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