Urs Liska <li...@openlilylib.org> writes: > Am 21.10.2018 um 18:17 schrieb David Kastrup: >> David Kastrup <d...@gnu.org> writes: >> >>> Urs Liska <li...@openlilylib.org> writes: >>> >>>> What I would *like* to do is a function like >>>> >>>> propagate-direction = >>>> #(define-event-function (text)(markup?) >>>> #{ >>>> -\tweak direction #UP >>>> -( >>>> -\tweak direction #UP >>>> -\markup #text >>>> #}) >>>> >>>> but instead of hard-coding #UP I'd like to calculate the values based >>>> on something. For example let the text have the opposite direction of >>>> the slur and have the slur accept the ^\_ operator. >>> Even assuming PostEvents are fixed, you'd still be stuck having to >>> look at one event from another, independent one. You'd be missing a >>> reliable handle for that. You'd need to use an engraver for doing >>> that kind of interaction. >> Correction: you could put a callback into a direction tweak on the text >> event and this callback could check the _text_ event's direction and >> then assume the _opposite_. So after "assuming PostEvents are fixed" >> should more or less work for this particular scenario, > > My impression is: no. When I tried that I got a > "calculation-in-progress" error.
Event properties are not evaluated using callbacks, so checking the text event's direction cannot result in calculation-in-progress. You probably checked the text grob's direction instead. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user