lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating markup macros


From: Paul Scott
Subject: Re: Creating markup macros
Date: Fri, 26 Nov 2004 18:23:46 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

Nicolas Sceaux wrote:

Paul Scott <address@hidden> writes:

#(def-markup-command (restOne layout props)
 (interpret-markup layout props
  (markup #:number #1)))

As soon as you are inside a Scheme expression, you don't have to use
`#' before expressions; the \number markup command takes a markup as
an argument, so use the string "1" instead of the number 1. Besides,
you forgot the signature argument of `def-markup-command, whih is
mandatory. Finally, you have defined a markup command, that you must
use after the \markup keyword. Here is a working example:

#(def-markup-command (restOne layout props) ()
  (interpret-markup layout props (markup #:number "1")))

rOne = { R1^\markup \restOne }

\score{ \rOne }
Thank you very much. Now can you give me a hint as to a good way to combine those two definitions so a the second definition of rOne isn't necessary? This is because I want to make rOne eventually generate the correct one measure rest for any time signature.

Thanks,

Paul










reply via email to

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