[NTG-context] \startuseMPgraphic

Meer, Hans van der H.vanderMeer at uva.nl
Mon Apr 11 21:50:49 CEST 2016


But why should typing \MPcolor{\MPvar{color}}be necessary or useful when \MPvar(color) obviously is sufficient?
Or is there a special reason for the nested macros?

> On 11 Apr 2016, at 19:16, Aditya Mahajan <adityam at umich.edu> wrote:
> 
> On Mon, 11 Apr 2016, Meer, Hans van der wrote:
> 
>> 
>> On 11 Apr 2016, at 16:17, Alan BRASLAU <alan.braslau at cea.fr<mailto:alan.braslau at cea.fr>> wrote:
>> 
>> Remember that ConTeXt colors can be accessed in MP as
>> \MPcolor{orange}
>> 
>> Alan
>> 
>> However with the snippet below I see the default black with MPcolor and the wanted red with \MPvar. Thus?
>> 
>> Hans van der Meer
>> 
>> \starttext
>> \startuseMPgraphic{example1}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>        withcolor \MPcolor{color};
> 
> This is looking for a color named 'color'. You need \MPcolor{\MPvar{color}}.
> 
> 
>> \stopuseMPgraphic
>> \startuseMPgraphic{example2}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>        withcolor \MPvar{color};
>> \stopuseMPgraphic
>> \useMPgraphic{example1}{color=red}
>> \useMPgraphic{example2}{color=red}
>> \stoptext
> 
> Aditya

Hans van der Meer






More information about the ntg-context mailing list