Robert Schmaus <robert.schm...@web.de> 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" > > > > #(define-markup-command (jcStack layout props jcHi jcLo) (markup? markup?) > (interpret-markup layout props > (markup #:smaller jcHi #:larger jcLo ) > ) > ) > > > does anyone know what's my mistake here? and which one of the function > calls above would be the correct ones?
The last variant will likely not start working until a recently proposed change of mine gets in. The second variant would be fine, the first possibly not. Your mistake simply is that the markup macro accepts a markup, and you feed it two arguments. You either need to create a markup-list command (and let it create a list of two markups), or you create a single line-markup from the two markups you have. Or use concat or other ways of combining the two markups into one. If you don't want to think about all those intricacies, you can just side-step the issue of the internals, and use #(define-markup-command (jcStack layout props jcHi jcLo) (markup? markup?) (interpret-markup layout props #{ \markup { \smaller $jcHi \larger $jcLo } #} ) ) and then \markup will by itself be smart enough to create a \line-markup around the given markup list. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user