[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Centering markup between staves
From:       Michael Gerdau <mgd () qata ! de>
Date:       2015-09-25 19:41:10
Message-ID: 2542411.fDosRpRxic () hamiller
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


> >> 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: mgd@qata.de
 GPG-keys available on request or at public keyserver
["signature.asc" (application/pgp-signature)]

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic