Re: [NTG-context] \startMPcode and \startMPpage

2020-04-16 Thread Jeong Dal
Dear Hans,

Thank you for the reply.
Since  \startMPcode … \stopMPcode form is used in the manual, I think that it 
is OK to use it for all cases.

Thank you again.

Best regards,

Dalyoung


> 2020. 4. 17. 오전 5:01, Hans Hagen  작성:
> 
> On 4/16/2020 8:36 PM, Jeong Dal wrote:
>> Hi,
>> The following sample code is working well in the \startMPpage ~ \stopMPpage, 
>> but is not working in the \startMPcode ~ \stopMPcode.
>> The error message is
>> \textfont0 is undefined (character 63)
>> l.6 \setstrut\strut $A$
>> If I remove “$” from the code, it is also working in \startMPcode ~ 
>> \stopMPcode.
>> Is there anything which I have to set for \startMPcode?
> 
> \starttext ... \stoptext
> 
> or
> 
> \startMPpage[instance=doublefun]
> 
> \stopMPpage
> 
>> Best regards,
>> Dalyoung
>> 
>> \startMPcode{doublefun}
>> %\startMPpage
>> numeric count, temp[], tt, minus, u; u := 1cm;
>> path p,q,r;
>> pair A,B,C,D;
>> string varName, ss, pos[];
>> p := unitsquare xyscaled (8u,3.5u);
>> *draw p;*
>> *
>> *
>> pos[0] := "bot";
>> pos[1] := "rt";
>> pos[2] := "top";
>> pos[3] := "lft";
>> varName := "yxwz";
>> count := 0;
>> pickup pencircle scaled 5pt;
>> for i = 0 upto 3:
>> drawdot (point i of p);
>> draw lmt_text[
>> text = "$" & char(65+i) & "$",
>> anchor = pos[i],
>> offset = 2pt,
>> position = point i of p,
>> ];
>> endfor;
>> %\stopMPpage
>> \stopMPcode
>> ___
>> 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 
>> ___
> 
> 
> -- 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl  | 
> www.pragma-pod.nl 
> -

___
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
___


Re: [NTG-context] \startMPcode and \startMPpage

2020-04-16 Thread Hans Hagen

On 4/16/2020 8:36 PM, Jeong Dal wrote:

Hi,

The following sample code is working well in the \startMPpage ~ 
\stopMPpage, but is not working in the \startMPcode ~ \stopMPcode.


The error message is

\textfont0 is undefined (character 63)

l.6 \setstrut\strut $A$

If I remove “$” from the code, it is also working in \startMPcode ~ 
\stopMPcode.


Is there anything which I have to set for \startMPcode?


\starttext ... \stoptext

or

\startMPpage[instance=doublefun]

\stopMPpage


Best regards,

Dalyoung


\startMPcode{doublefun}
%\startMPpage
numeric count, temp[], tt, minus, u; u := 1cm;
path p,q,r;
pair A,B,C,D;
string varName, ss, pos[];
p := unitsquare xyscaled (8u,3.5u);
*draw p;*
*
*
pos[0] := "bot";
pos[1] := "rt";
pos[2] := "top";
pos[3] := "lft";
varName := "yxwz";
count := 0;
pickup pencircle scaled 5pt;

for i = 0 upto 3:
drawdot (point i of p);
draw lmt_text[
text = "$" & char(65+i) & "$",
anchor = pos[i],
offset = 2pt,
position = point i of p,
];
endfor;
%\stopMPpage
\stopMPcode



___
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
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] \startMPcode and \startMPpage

2020-04-16 Thread Jeong Dal
Hi,

The following sample code is working well in the \startMPpage ~ \stopMPpage, 
but is not working in the \startMPcode ~ \stopMPcode.

The error message is 

\textfont0 is undefined (character 63)

l.6 \setstrut\strut $A$

If I remove “$” from the code, it is also working in \startMPcode ~ \stopMPcode.

Is there anything which I have to set for \startMPcode?

Best regards,

Dalyoung


\startMPcode{doublefun}
%\startMPpage
numeric count, temp[], tt, minus, u; u := 1cm;
path p,q,r;
pair A,B,C,D;
string varName, ss, pos[];
p := unitsquare xyscaled (8u,3.5u);
draw p;

pos[0] := "bot";
pos[1] := "rt";
pos[2] := "top";
pos[3] := "lft";
varName := "yxwz";
count := 0;
pickup pencircle scaled 5pt;

for i = 0 upto 3: 
drawdot (point i of p);
draw lmt_text[
text = "$" & char(65+i) & "$",
anchor = pos[i],
offset = 2pt,
position = point i of p,  
];
endfor;
%\stopMPpage
\stopMPcode


___
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
___