On 26/04/11 22:26, [email protected] wrote:
On Apr 26, 2011, at 8:02 AM, Nick Payne wrote:This code used to work for me about a year ago, but when I try to build it using 2.13.60, I get the weird error shown in the console log output at the bottom. Is this a bug or not? I'm running 2.13.60 on Ubuntu 10.04 amd64. %=================================== \version "2.13.60" % e.g. \spanbox #-8 #'(-1 . -1) spanbox = #(define-music-function (parser location yval shorten) (number? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'bound-details #'left #'text = \markup { \draw-line #'(0 . $yval) } \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . $yval) } \once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten) \once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten) #}) \relative c' { \spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan } %=================================== Processing `/home/nick/lilypond/examples/box.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems...ERROR: In procedure min: ERROR: Wrong type: lilyvartmpbhThis should do the trick - the problem is that you need to quasiquote the list and then unquote the temp variable that lilypond uses to store yval. spanbox = #(define-music-function (parser location yval shorten) (number? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'bound-details #'left #'text = \markup { \draw-line #`(0 . ,$yval) } \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #`(0 . ,$yval) } \once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten) \once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten) #}) \relative c' { \spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan }
Thanks. That fixes it. After experimenting a bit more with the two different single quotes (` and ') in different set and override expressions, it seems that in some situations, only ` is acceptable, in some only ' is acceptable, and in some situations either ` or ' are both valid. this seems a bad situation to have so far as making it easy to write valid lilypond source code.
Nick _______________________________________________ bug-lilypond mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-lilypond
