lilypond-user
[Top][All Lists]
Advanced

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

Re: Centering markup between staves


From: Michael Gerdau
Subject: Re: Centering markup between staves
Date: Fri, 25 Sep 2015 21:41:10 +0200
User-agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.12; x86_64; ; )

> >> I hope this also work in more complicated situations.
> 
> This (admittedly extreme) example shows that it doesn’t:
> 
> \version "2.19.27"
> regR = \markup \general-align #Y #0 {
>  \normal-text { R }
>  \override #'(font-encoding . fetaBraces) \lookup #"brace60"
> }
> 
> \score {
>  \new PianoStaff <<
>    \new Staff \relative c' {
>      c4 d e,,, f''' |
>      g a b c |
>    }
>    \new Dynamics \with {
>      \override DynamicText.self-alignment-Y = 0
>      \consists Stanza_number_engraver
>    } {
>      \set stanza = \regR s1\p
>    }
>    \new Staff \relative c {
>      c4 d e f |
>      g a b c |
>    }
> 
> }
> 
> I wonder how to solve that…

You could manually adjust such extreme situations. In a real world
example you'd need a new regR for each spacing, like this

\version "2.19.27"

regR = \markup \normal-text {
  \upright R
  \raise #0.7 {
    \override #'(font-encoding . fetaBraces)
    \lookup #"brace140"
  }
}

\score {
  \new PianoStaff <<
    \new Staff \relative c' {
%      c4 d e f |
      c4 d e,,, f''' |
      g a b c |
    }
    \new Dynamics {
      s1 -\tweak Y-offset #-3.5 \p -\tweak self-alignment-X #2 -\regR
    }
    \new Staff \relative c {
      c4 d e f |
      g a b c |
    }
  >>
}

Such a regR could be parameterized with the size of the brace as
parameter. We then would need a function to determine the used up
vertical space, before that regP function is invoked...

Isn't that a tricky one for the scheme gurus on this list ? :)

Kind regards,
Michael
-- 
 Michael Gerdau       email: address@hidden
 GPG-keys available on request or at public keyserver

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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