[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting the direction when defining a new markup command
From: |
Kevin Barry |
Subject: |
Getting the direction when defining a new markup command |
Date: |
Fri, 11 Nov 2016 22:04:19 +0000 |
Dear All,
I am trying to set the direction of an arrow in a markup function
based on whether the markup is placed above or below the staff, but I
am ready to give up. Here is a condensed version of my most recent
attempt. Does anyone know how to do this?
\version "2.19.45"
#(define-markup-command (test layout props arg)
(integer?)
(let ((dir (lambda (grob)
(if (= UP (ly:grob-property grob 'direction))
-1
1))))
(interpret-markup layout props
#{
\markup { \arrow-head #Y #dir ##f }
#})))
\markup \test #1
- Getting the direction when defining a new markup command,
Kevin Barry <=