lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

define-markup-function problem


From: Carl D. Sorensen
Subject: define-markup-function problem
Date: Wed, 28 Jan 2009 20:54:20 -0700

Kieren MacMillan <kieren_macmillan <at> sympatico.ca> writes:

> 
> Hi all,
> 
> Could someone please explain why this works:
> 
> #(define-markup-command (test layout props stringA stringB) (string?
> string?)
>     (interpret-markup layout props
>     (markup #:bold stringA #:italic stringB)))
> 
> \markup \test #"one" #"two"
> 
> but this doesn't:
> 
> #(define-markup-command (test layout props stringA stringB) (string?
> string?)
>     (interpret-markup layout props
>     (markup #:column (cons stringA stringB))))
> 
> \markup \test #"one" #"two"
> 

Sorry for the noise earlier, Kieren.

See the known issues in Notation Reference 6.4.1.:
The markup-list argument of commands such as #:line, #:center, and #:column
cannot be a variable or the result of a function call.

     
(markup #:line (function-that-returns-markups))
is invalid. One should use the make-line-markup, make-center-markup, or
make-column-markup functions instead,

     
(markup (make-line-markup (function-that-returns-markups)))



So the code that works is:

\version "2.12.2"

#(define-markup-command (test layout props stringA stringB) (string?
string?)
(interpret-markup layout props
(markup (make-column-markup (list stringA stringB)))))

\score {
  c^\markup \test #"one" #"two"
}



HTH,

Carl                                                                            
      





reply via email to

[Prev in Thread] Current Thread [Next in Thread]