lilypond-user
[Top][All Lists]
Advanced

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

Re: context properties within def-markup-command


From: Han-Wen Nienhuys
Subject: Re: context properties within def-markup-command
Date: Thu, 08 Dec 2005 01:02:34 +0100
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Andrzej Kopec wrote:
Dear list,

How to obtain context properties from within def-markup-command, or is it 
possible though?

I would like to use it to get properly scaled embeded-ps fragments 
AUTOMATICALLY. Maybe
example would present clearer my problem:

this works with an argument:

#(def-markup-command (myCustomClefScaled layout props scaleFactor) (number?)
  (ly:stencil-add
(ly:make-stencil (list 'embedded-ps (string-append (ly:number->string scaleFactor) " " (ly:number->string scaleFactor) " scale
     %%AND HERE GOES FURTHER PART OF PS CODE
     " )) '(-3.5 . 3.5) '(-1.5 . 1.5))
  ))

and I want to know value of Staff.fontSize inside this macro, which in turn I 
want to
assign to scaleFactor variable.

Staff.fontSize ends up in the font-size property in PROPS. You can't access context variables from markups.

--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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