Changes

Jump to navigation Jump to search
no edit summary
== Description ==
This command sets up a custom MetaPost style with particular features that can be selected using the first argument. The instance <code>metafun</code> is the default one and does not need to be created. However, custom Custom styles can inherit from the <code>metafun</code> instance, or not. The MetaPost instance to use is specified as follows:* {{cmd|startMPcode}}.* {{cmd|useMPgraphic|{instancename::graphicname}|}}* {{cmd|startuseMPgraphic|{instancename::graphicname|}}{{since|2012|nov 2012}}* {{cmd|startuseMPgraphic|{graphicname}|}}{{Until|2012|nov 2012}} == Predefined Instances == <texcode>\defineMPinstance [metafun] [format=metafun, extensions=yes, initializations=yes]\defineMPinstance [metapost] [format=mpost]</texcode>
== Example ==
<texcodecontext mode="mkiv" source="yes" text="Gives:">
\defineMPinstance
[important]
draw textext("some text") ;
\stopMPcode
 
% a graphic that uses a custom instance
% This does not work with the current stable version
\startuseMPgraphic{veryimportant::mygraphic}
draw textext("some text") ;
\stopuseMPgraphic
 
\useMPgraphic{veryimportant::mygraphic}
\stoptext
</texcodecontext>
== See also ==
<!-- something like {{cmd|gotoMetaPost see also}} --> {{cmd|setupMPinstance}}, [[Mpgraphic]]
== Help from ConTeXt-Mailinglist/Forum ==
{{Forum|{{SUBPAGENAME}}}}
[[Category:CommandsCommand/MetaPost|definestartstop]]

Navigation menu