lilypond-user
[Top][All Lists]
Advanced

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

RE: Trying to create a custom markup command


From: Carl D. Sorensen
Subject: RE: Trying to create a custom markup command
Date: Thu, 12 Jul 2007 11:01:07 -0600

Romel wrote:
> I liked the idea of a segue so much, that I decided that I 
> should write a custom markup command for it:
> 
> #(define-markup-command (segue layout props tosong)
>     (string?)
>     (interpret-markup layout props
>         (markup #:small #:column "segue to" #:italic tosong)
>     )
> )
> 
> The usage (as I extrapolated from the "character" and 
> "smallCaps" examples in the documentation) would be something like
> 
> c1_\segue #"Something Else"

Your usage is not quite correct.  As you can see in the "character"
example, the proper usage is 

c1_\markup \segue #"Something Else" 

That is, you need to keep the \markup keyword in there.

There is also a second problem, which is a Scheme problem that you might
be able to guess from the error message, once you get the call right.

#:column needs a list of arguments, rather than a single argument.
Therefore you need to change your code ever so slightly, to

#(define-markup-command (segue layout props tosong)
    (string?)
    (interpret-markup layout props
        (markup #:small #:column ("segue to"  #:italic tosong))
    )
)

Please notice the added parentheses before "segue to" and after tosong.

When this markup function is used with the following lilypond code, it
works

\score {
c'1_\markup \segue #"Something Else"
}

I hope this has been helpful.

Carl Sorensen




reply via email to

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