Orm Finnendahl escreveu:
> Hi,
>
> I try to define a markup for vertical arrows and can't get the
> function to take two numbers as arguments. Using strings as arguments
> or a number and a string works. It seems the last argument to
> define-markup-command has to be a string. Does anybody know why and
> how to make it work with numbers? I'd rather supply the y-offset and
> length of the arrow as a number.
>
> This doesn't work:
>
> \version "2.11.2"
>
> #(define-markup-command (varrow layout props yoff len) (number? number?)
> (interpret-markup layout props
> (markup
> #:line
> (#:postscript
> (string-append
> "1 1 scale 0.1 setlinewidth 0 "
> (number->string yoff)
> " translate 0 0 moveto -0.25 1 lineto 0.25 1 lineto 0 0 lineto
> closepath fill 0 1 moveto 0 "
> (number->string len)
> " rlineto stroke")))))
>
> {c4^\markup {\varrow #3 #10}}
>
> lilypond signals an error about the 10 being an unbound variable. I
> don't get this error when supplying the "10" directly as a string:
try
#10 }
iso
#10}
--
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user