unprotect
\def\setupgreek#1[#2]{%
\getparameters[GG][Scale=,Font=,#2]%Font,Scale
\xdef\MyScale{\GGScale}%
\processaction[\GGFont]
[ SomeFont=>\xdef\MyFont{somefont }]%
}\protect
the macro \MyFont would always expand to "somefont ". But it doesn't seem to do so in
\definefont[Gf][\MyFont]
I still get the error message. When I assign it "manually"
\definefont[Gf][somefont ]
it works. I tried every combination of \expanded, \xdef or \edef, but it doesn't seem to work (while it does work in \definebodyfont). So it must be something within ConTeXt that doesn't let it expand, and I don't see how I could escape this problem. The \definebodyfont is a workaround for now, but it has the problem that I have to give precise font dimensions, which might fail in certain circumstances.
Thanks again
Thomas
On Jan 23, 2005, at 3:06 PM, Taco Hoekwater wrote:
Thomas A.Schmitz wrote:This, however, will not work: \definefont[Gf][\MyFont sa \MyScale]
It looks like \MyFont doesn't get expanded when the \definefont command is read, but this is an area of TeX that I find especially opaque...
I see. You need
\expanded{\definefont[Gf][\MyFont sa \MyScale]}
Or you could \xdef the MyScale (instead of \edef), making it global.
Greetings, Taco _______________________________________________ ntg-context mailing list [email protected] http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list [email protected] http://www.ntg.nl/mailman/listinfo/ntg-context
