Am 11.05.2018 um 17:45 schrieb Malte Meyn:


Am 11.05.2018 um 17:39 schrieb Urs Liska:
Hi all,

somehow I have the feeling this is a stupid question, but I'm unable to find the solution.

Is there a convenient and semantically clean way to center a markup above/below a measure?

I need a solution that doesn't rely on separate contexts (e.g. a Dynamics context above the staff). What *would* be acceptable is a Scheme function that calculates the actual width of the measure and does the centering from that. But since that would probably only be possible in a after-line-breaking callback it would seem quite dirty to move around a markup at that point.

Any suggestions?
Thanks
Urs

MultiMeasureRestText above an invisible MMR?

OMG. That's what I meant.
Of course I thought about this, but I was convinced that making the MMR invisible wouldn't work because it would still affect the spacing and collision handling.
But this seems to do exactly what I need:

\version "2.19.80"

\score {
  \new Staff
  \relative {
    <<
      {
        \hide MultiMeasureRest
        R1
        ^\markup "Is this centered?"
        _\markup "and this?"
      }
      \new Voice {
        \oneVoice
        c'4 c c c
        \break
        c1
      }
    >>
  }
}


Thanks
Urs
Or have a look at the code that positions those grobs and adapt ;) Another grob that is centered: PercentRepeat.

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to