On Mon, 16 Mar 2020, Gerben Wierda wrote:
This worked when I was just doing METAPOST. Now, I am using my lua code to
produce the METAPOST code that produces the pictures. And the picture itself is
put in a file for METAPOST as follows:
File test4-mplib-run-001.mp:
% begin graphic: n=0
; beg
This worked when I was just doing METAPOST. Now, I am using my lua code to
produce the METAPOST code that produces the pictures. And the picture itself is
put in a file for METAPOST as follows:
File test4-mplib-run-001.mp:
% begin graphic: n=0
; beginfig(1) ; defaultfont:="name:dejavuserif*def
> On 13 Mar 2020, at 14:59, Hans Hagen wrote:
>
> 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 a
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
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 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
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
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,