Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-18 Thread Geert Verhaag
On 18-09-2020 09:03, Hans Hagen wrote: On 9/17/2020 9:41 PM, Geert Verhaag wrote: Hi ConTeXt users, That's indeed magic and it works! Hans, thanks for your prompt answer! But I would like to take this a step further, by introducing a macro within the start/stopuseMPgraphic structure like so:

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-18 Thread Hans Hagen
On 9/17/2020 9:41 PM, Geert Verhaag wrote: Hi ConTeXt users, That's indeed magic and it works! Hans, thanks for your prompt answer! But I would like to take this a step further, by introducing a macro within the start/stopuseMPgraphic structure like so: \startuseMPgraphic{name}{s::lbl}  

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-17 Thread Geert Verhaag
Hi ConTeXt users, That's indeed magic and it works! Hans, thanks for your prompt answer! But I would like to take this a step further, by introducing a macro within the start/stopuseMPgraphic structure like so: \startuseMPgraphic{name}{s::lbl}   def mymacro (text lb) =     pair a ; a :=

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-17 Thread Hans Hagen
On 9/16/2020 4:32 PM, Geert Verhaag wrote: Hi, I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work: Tried the following: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext  

[NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-16 Thread Geert Verhaag
Hi, I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work: Tried the following: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=1} \stoptext The above works as