> Am 01.09.2021 um 14:45 schrieb Hans Hagen via ntg-context 
> <ntg-context@ntg.nl>:
> 
> On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to 
>> ConTeXt and would like to avoid the doubling of MP code like:
>> \startMP
>>     path p;
>>     p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>>     draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMP
>> \startMPcode
>>     path p;
>>     p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>>     draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMPcode
>> I’m quite sure there’s a possibility with buffers, but how?
>> \startbuffer
>>     path p;
>>     p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>>     draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopbuffer
>> \typebuffer
>> ... and then how do I get the MP graphic?
> \processMPbuffer

“of course”

Thank you!

Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to