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 - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to