gnu-music-discuss
[Top][All Lists]
Advanced

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

thiscontext


From: Rune Zedeler
Subject: thiscontext
Date: Tue, 06 Mar 2001 01:24:29 +0100

Okay.
Been busy learning metafont... Couldn't find docu on the web, so I just
had to look at examples... Don't understand what the #'s mean... Where
can I find docu?

Well, it's a general problem that macros operate on specific context.
For instance \clef F; is a shorthand for

         \property  Staff.clefGlyph = "clefs-F"
         \property  Staff.clefPosition = 2
         \property  Staff.clefOctavation = 0

Okay. But what if I have defined my own staff-context and named it
FancyStaff...? To get an F-clef I would then need

         \property  FancyStaff.clefGlyph = "clefs-F"
         \property  FancyStaff.clefPosition = 2
         \property  FancyStaff.clefOctavation = 0

which I cannot do in a shortform; - I have to enter all three lines as
above.

The solution, ofcourse, would be to redefine \clef F to some sort of

         \property  \thiscontext.clefGlyph = "clefs-F"
         \property  \thiscontext.clefPosition = 2
         \property  \thiscontext.clefOctavation = 0

thiscontext should then default to "Staff", and to set clef on i.e.
FancyStaff, one would do

thiscontext = "FancyStaff"; \clef F;

neat eh...?

Actually, it would also work just to do

         \property  xxx.clefGlyph = "clefs-F"
         \property  xxx.clefPosition = 2
         \property  xxx.clefOctavation = 0

... don't really know why... Of course this is dirty and produces
warnings - but it works.

Well, but nevertheless please allow the

\property \var.foh = bar

syntax... It'll sure come handy. Sorry for language ugly... Late in the
evening... Brushes her long blond hair... Noooott :-((( C.U.

-Rune



reply via email to

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