Command/startMPcode old

From Wiki
< Command
Revision as of 16:47, 14 January 2017 by Lmsteffan (talk | contribs) (Categorize page.)
Jump to navigation Jump to search

\startMPcode

Syntax

\startMPcode
\startMPcode{...}
{...} name of a MetaPost instance defined with \defineMPinstance

Description

\startMPcode simply runs some MetaPost code and immediately inserts the resulting graphic. Optionally, you can specify a MetaPost instance to use; see \defineMPinstance.

Example

\starttext
This is the origin and radius of a circle:
\startMPcode
    draw fullcircle scaled 2cm ;
    dotlabel.bot(textext("(0,0)"),origin) ;
\stopMPcode 
\startMPcode
    draw fullcircle scaled 2cm ;
    drawarrow (0,0)--(1cm,0) ;
    label.bot(textext("$r$"),(5mm,0)) ;
\stopMPcode
\stoptext

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: