[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change direction of already positioned markup?
From: |
David Kastrup |
Subject: |
Re: Change direction of already positioned markup? |
Date: |
Sat, 30 May 2015 21:50:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Thomas Morley <address@hidden> writes:
> 2015-05-30 20:28 GMT+02:00 Peter Crighton <address@hidden>:
>> Hello all,
>>
>> I have a variable divisiaIII = ^\markup { "div. a 3" } that should by
>> default appear above the staff (hence the ^). Now I need it to appear below
>> the staff in an instrument part edition, while it should still appear above
>> the staff in the full score. Both editions are made from the same input
>> files and realised with the edition-engraver.
>> Is there a way to change the direction of a markup that is already
>> positioned via the use of ^\markup or _\markup, or is there any other
>> property I could override to get the same effect? I don’t want to use
>> -\markup, as I’d like to be able to call the default direction just with
>> \divisiaIII.
>
> Two possibilities:
>
> \version "2.18.2"
>
> %% 1
> %% tweak has priority
> { a1-\tweak direction #DOWN ^"xy" }
>
> %% 2
> %% reset the 'direction-property
> force-text-script-down =
> #(define-music-function (parser location mus)(ly:music?)
> (music-map
> (lambda (m)
> (if (music-is-of-type? m 'rhythmic-event)
> (let ((arts (ly:music-property m 'articulations)))
> (for-each
> (lambda (e)
> (if (music-is-of-type? e 'text-script-event)
> (ly:music-set-property! e 'direction DOWN)))
> arts)
> m)
> m))
> mus))
>
> {
> \force-text-script-down
> a1^"xy"
> }
Number three:
divisiaIII = ^\markup { "div. a 3" }
\score {
{ a1_\divisiaIII }
}
--
David Kastrup