Suppose I have this code:
\startMPpage
vardef MyShape(expr w, h) =
save pth; path pth ;
save pic; picture pic;
pth = fullsquare xysized (w, h);
pic := image (
draw pth;
% all kind of stuff here
);
setbounds pic to pth;
pic
enddef ;
picture s ; s := MyShape(4cm,
Hi,
> On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
>
> Suppose I have this code:
>
>
> Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions:
\startMPinclusions
vardef MyShape(expr w, h) =
...
enddef ;
\stopMPinclusions
\startMPpage
picture s
On Fri, 13 Mar 2020, Taco Hoekwater wrote:
Hi,
On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
Suppose I have this code:
Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions:
or \startMPdefinitions ... \stopMPdefinitions (don't remember what
Thank you. And if I want these in a separate file, what is the correct way to
include them?
> On 13 Mar 2020, at 13:24, Taco Hoekwater wrote:
>
> Hi,
>
>
>
>> On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
>>
>> Suppose I have this code:
>>
>>
>> Can I reuse that varied across follow-up
On 3/13/2020 2:33 PM, Aditya Mahajan wrote:
On Fri, 13 Mar 2020, Taco Hoekwater wrote:
Hi,
On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
Suppose I have this code:
Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions:
or \startMPdefinition