ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* metapost -- mplib
@ 2010-10-23  8:00 Herbert Voss
  2010-10-23  8:04 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Voss @ 2010-10-23  8:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

When I run this example with mpost amd mptopdf, everything is fine.
But running it with context mkiv, using its mplib I get
an error.
The problematic command is dotlabels.top(0,1,2,3,4,5,6);
Commented it out, then it works with context, too.

Herbert

------------------------------------------------------
[...]
systems         : begin file latex5 at line 1
mplib           : initializing instance 'metafun' using format 'metafun'
mplib           : loading 'metafun.mp' (experimental metapost version two)
mplib           > mp terminal: ! Redundant equation.
<to be read again>
                   ;
<*> ...caled 0.2in yscaled 0.08 rotated 30; u=4cm;
                                                   path p; x0=x3=x4;
z1-z0=0...

mplib           > mp error: unknown, no error, terminal or log messages
mplib           > mp terminal: [1]
[...]
-------------------------------------------------------

\starttext
\startMPcode
pickup pencircle
  scaled 0.2in yscaled 0.08 rotated 30;
u=4cm;
path p; x0=x3=x4;
z1-z0=0.5in*dir 30; z2-z3=whatever*(z1-z0);
z6-z5=whatever*(z1-z0); z1-z6=1.2*(z3-z0);
rt x3=lft x2;x5=0.55[x4,x6]; y4=y6;
lft x3=bot y5=0; top y2=1in;
draw z0--z1--z2--z3--z4--z5--z6 withcolor .7white;
dotlabels.top(0,1,2,3,4,5,6);
\stopMPcode
\stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: metapost -- mplib
  2010-10-23  8:00 metapost -- mplib Herbert Voss
@ 2010-10-23  8:04 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2010-10-23  8:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/23/2010 10:00 AM, Herbert Voss wrote:
> When I run this example with mpost amd mptopdf, everything is fine.
> But running it with context mkiv, using its mplib I get
> an error.

Yes, you would. This is the text from 
http://wiki.contextgarden.net/MkIV_Differences about metapost in context 
mkiv:

   All inline metapost code in your document is executed in a large 
continuous run.

   This means there are two things you have to watch out for:

     You should load the MP packages you need in 
\startMPinclusions..\stopMPinclusions; not inside a graphic.
     You have to make sure that you do not re-state equations that were 
already solved in a previous graphic.

   These are in fact the exact same rules that you have to adhere to in 
mkii if \runMPgraphicsfalse is active.


Best wishes,
Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-10-23  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23  8:00 metapost -- mplib Herbert Voss
2010-10-23  8:04 ` Taco Hoekwater

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).