ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startMPcode and \startMPpage
@ 2020-04-16 18:36 Jeong Dal
  2020-04-16 20:01 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jeong Dal @ 2020-04-16 18:36 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl


[-- Attachment #1.1: Type: text/plain, Size: 991 bytes --]

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



[-- Attachment #1.2: Type: text/html, Size: 8584 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-16 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 18:36 \startMPcode and \startMPpage Jeong Dal
2020-04-16 20:01 ` Hans Hagen
2020-04-16 22:56   ` Jeong Dal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).