|
| From: | Robert Schmaus |
| Subject: | Re: Help with a 2-argument markup command definition |
| Date: | Sat, 19 Nov 2011 17:59:00 +0100 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Am 11/19/11 5:46 PM, schrieb David Kastrup:
Robert Schmaus<address@hidden> writes:Am 11/19/11 4:07 PM, schrieb David Kastrup:Robert Schmaus<address@hidden> writes:Hi everyone, I'm trying to define a 2-argument markup command. the definition below doesn't work, I get all sorts of errors when I call either \jcStack{"x"}{"y"} or \jcStack "x" "y" or \jcStack #"x" #"y"\markup{\jcRaise{"7"}\jcStack "5" "9" } I get Preprocessing graphical objects...ERROR: Wrong number of arguments to #<primitive-procedure ly:text-interface::interpret-markup> When I call the command as \markup{\jcRaise{"7"}\jcStack{"5"}{"9"} } I get error: syntax error, unexpected '{' <c e gis bes dis'>-\markup{\jcRaise{"7"}\jcStack {"5"}{"9"} } Well you already said that this last variant might not work. but I still don't see the error in the definition. Do you know what's happening?No, because you give a mishmash of inconsistent scraps for which one can only guess the underlying definitions. How about preparing an actual complete example illustrating your problem?
Ok, how about this example then:
\version "2.14.2"
#(define-markup-command (jcRaise layout props jcText) (markup?)
(interpret-markup layout props
(markup #:raise 1.5 #:smaller #:smaller #:smaller jcText )
)
)
#(define-markup-command (jcStack layout props jcHi jcLo) (markup?
markup?)
(interpret-markup layout props
#{ \markup{ $jcHi $jcLo } #}
)
)
\relative c'' {
% fine:
c1-\markup{\jcRaise "XXX"}
% those two don't work:
c1-\markup{ \jcStack{"x"}{"y"} }
c1-\markup{ \jcStack "x" "y" }
}
The definition of \jcRaise works fine. Of course, the definition of
\jcStack will be different later, for now, I'd just like it to work in
this simple example.
Sorry for the confusion ...
| [Prev in Thread] | Current Thread | [Next in Thread] |