Difference between revisions of "Command/MPcode"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \MPcode")
 
Line 29: Line 29:
 
Similar to the environment {{cmd|startMPcode}} but see the example.
 
Similar to the environment {{cmd|startMPcode}} but see the example.
 
</cd:description>
 
</cd:description>
<cd:examples><cd:example title="">\setuppapersize[A6]
+
<cd:examples><cd:example title=""><context source="yes">
 +
\setuppapersize[A6]
 
\setupbodyfont[12pt]
 
\setupbodyfont[12pt]
 
\starttext
 
\starttext
Line 53: Line 54:
 
and text after
 
and text after
  
\stoptext</cd:example></cd:examples>
+
\stoptext
 +
</context></cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
 
<cd:seealso>
 
<cd:seealso>

Revision as of 12:12, 8 May 2024


\MPcode

Summary

The command \MPcode is used for Metapost inline graphics.

Settings

\MPcode{...}{...}
{...}metafun minifun extrafun lessfun doublefun binaryfun decimalfun mprun metapost nofun doublepost binarypost decimalpost simplefun
{...}content

Description

Similar to the environment \startMPcode but see the example.

Examples

Example 1

\setuppapersize[A6]
\setupbodyfont[12pt]
\starttext

Text before
\startMPcode
        fill fullcircle scaled 1cm                   withcolor darkred;
\stopMPcode
and text after

Text before
\MPcode{fill fullcircle scaled 1cm                   withcolor darkred;}
and text after

Text before
\MPcode{fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred;}
and text after

Text before
\startMPcode
        fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred;
\stopMPcode
and text after

\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: