[Top][All Lists]

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

Re: Aligning "sempre pp" with "p"...

From: Mats Bengtsson
Subject: Re: Aligning "sempre pp" with "p"...
Date: Mon, 11 Feb 2008 14:43:52 +0100
User-agent: Thunderbird (X11/20070716)

Kieren MacMillan wrote:

For the record, why can't #:right-align be made to work inside the dynamic markup without sidestepping the collision mechanism?
Actually, it turns out that you can. The horizontal placement of a textual dynamic indication is determined by the X-offset property, which by default is set to the function ly:self-alignment-interface::x-aligned-on-self, which looks at the full markup, determines its full width and then finds its center to get the alignment point. In other words, it doesn't bother about any alignment points defined internally in the markup. If you unset the X-offset property, on the other hand, then the existing alignment point of the markup is used instead. So, the following example works
as you request:

sempp = #(make-dynamic-script (markup #:line(#:right-align #:normal-text #:italic "sempre"
#:dynamic "pp")))
\relative c'{
\override DynamicText #'X-offset = #0 % Setting to ##f (false) gives the same result
c \sempp d e d \sempp
\layout{ragged-right = ##t }

The problem is that with this setting, all the normal dynamics will be left aligned instead of centered below the note, so you're back at a situation where you want to tweak some extra property only for a specific dynamics (unless you redefine all standard
dynamics to get a center aligned reference point).


reply via email to

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