lilypond-user
[Top][All Lists]
Advanced

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

Re: centering some markup under a bracket


From: Robin Bannister
Subject: Re: centering some markup under a bracket
Date: Sat, 22 Aug 2009 21:36:46 +0200

Denis Roegel wrote:
I am trying to center a markup under a bracket

This was discussed recently here: http://lists.gnu.org/archive/html/lilypond-user/2009-03/msg00426.html


But, instead of OUHM, you could perhaps do it like the "Expressive marks" snippet "Center text below hairpin dynamics" (cf LSR 223)

midHB =
#(define-music-function (parser location text) (markup?)
#{
 \once \override Staff.HorizontalBracket #'stencil = #(lambda (grob)
   (ly:stencil-aligned-to
    (ly:stencil-combine-at-edge
     (ly:stencil-aligned-to (ly:horizontal-bracket::print grob) X CENTER)
     Y (ly:grob-property grob 'direction)
     (ly:stencil-aligned-to (grob-interpret-markup grob $text)
     X CENTER) 1 0 )
    X LEFT))
#})


\midHB \markup { X } a'\startGroup b'\stopGroup


Cheers,
Robin




reply via email to

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