lilypond-user
[Top][All Lists]
Advanced

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

Re: markup function


From: Thomas Morley
Subject: Re: markup function
Date: Sun, 6 Jan 2013 14:33:05 +0100

2013/1/5 David Kastrup <address@hidden>:
> Noeck <address@hidden> writes:
[...]
>> The words "layout props" and the "interpret-markup" are still cryptic
>> to me. Is there a documentation where this is described for noobs like
>> me?
>
> No.  I don't think there is reasonable documentation where this is
> described for experts either.  Consider it a magic incantation.
[...]

Hi Joram,

you could have a look at the top of /scm/define-markup-commands.
There you'll find some explanations.

Par example:

;;;   layout and props
;;;     arguments that are automatically passed to the command when it
;;;     is interpreted.
;;;     `layout' is an output def, which properties can be accessed
;;;     using `ly:output-def-lookup'.
;;;     `props' is a list of property settings which can be accessed
;;;     using `chain-assoc-get' (more on that below)
;;;

`interpret-markup` turns the markup-argument into a stencil.
It's defined in /scm/markup.scm:

(define-public interpret-markup ly:text-interface::interpret-markup)

I defined a markup-command which displays the layout- and props-variable.
Well, it's not very useful for `layout´. You should look for examples
how it is used via `ly:output-def-lookup'
Displaying the `props' works nice and may be of some help.

#(define-markup-command (write-layout-props layout props arg)
   (markup?)
   (newline)(display "layout ")(write layout)
   (newline)(display "props ")(write props)
   (interpret-markup
     layout
     props
     arg))

\markup \write-layout-props "X"


HTH,
  Harm



reply via email to

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