Thanks, well, i made a markup function "\harm-arrow" that needs three
arguments (length, displacement, dash)
ith this i draw manually the start point and the stop point.
Ex: \lyricmode {I2 \markup \harm-arrow #9.3 #0 ##t Vs II \markup
\harm-arrow #5 #0 ##f V I1}
Now i would like to have a function that automatically calculates the
correct start and stop points
ideally: \lyricmode {I2 \harm-arrow-dashed \startTextSpan Vs II
\stopTextSpan \harm-arrow \startTextSpan V \stopTextSpan I1}
... and not calculate manually the length and displacement.
Regards
\version "2.18.2"
#(define-markup-command (harm-arrow layout props
largoflechax xceroadd segmentadox rom)
(number? number? boolean? markup?)
"Draw a down curved arrow."
(interpret-markup layout props
#{\markup \combine #rom
\combine \path #0.0 #'((moveto 0 -1.4)(lineto 0 -1.4)) %solo amplia imagen
\postscript
#(string-append "
/ycero -0.4 def
/xcero {1.4 "(number->string xceroadd)" add} def
/largoflecha "(number->string largoflechax)" def
/segmentado "(if segmentadox "true" "false" ) " def
/arrowhead {% stack: s x1 y1 , current point: x0 y0
gsave
currentpoint % s x1 y1 x0 y0
4 2 roll exch % s x0 y0 y1 x1
4 -1 roll exch % s y0 y1 x0 x1
sub 3 1 roll % s x0-x1 y0 y1
sub exch % s y0-y1 x0-x1
atan rotate % s % rotate over arctan((y0-y1)/(x0-x1))
dup scale % scale by factor s
-7 3 rlineto
2 -3 rlineto
-2 -3 rlineto
closepath fill % fill arrowhead
grestore
newpath
} def
0.12 setlinewidth %ancho de la linea
segmentado {[0.42 0.35] 0 setdash} if %[lleno vacio] inicio setdash configurar segmentado
%curva
xcero ycero moveto
xcero ycero
xcero largoflecha 2 div add largoflecha -0.6 mul
xcero largoflecha add -0.4 add ycero -0.3 add
curveto stroke
%cabeza de flecha
xcero largoflecha add ycero moveto
0.16 xcero largoflecha 2 div add
largoflecha -0.5 mul
arrowhead
")
#}))
<<
\new Staff \relative c' {c2 d d g c,1 \bar "|."
}
\new Lyrics \lyricmode {
I2 \markup \harm-arrow #9.3 #0 ##t Vs II \markup \harm-arrow #5 #0 ##f V I1}
>>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user