Difference between revisions of "Command/MPcode"
< Command
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
<cd:examples><cd:example title=""><context source="yes"> | <cd:examples><cd:example title=""><context source="yes"> | ||
\setuppapersize[A6] | \setuppapersize[A6] | ||
− | \setupbodyfont[ | + | \setupbodyfont[10pt] |
\starttext | \starttext | ||
− | + | With \tex{startMPcode} and no shift, text before | |
\startMPcode | \startMPcode | ||
fill fullcircle scaled 1cm withcolor darkred; | fill fullcircle scaled 1cm withcolor darkred; | ||
Line 40: | Line 40: | ||
and text after | and text after | ||
− | + | With \tex{MPcode} and no shift, text before | |
\MPcode{fill fullcircle scaled 1cm withcolor darkred;} | \MPcode{fill fullcircle scaled 1cm withcolor darkred;} | ||
and text after | and text after | ||
− | + | With \tex{MPcode} and with shift, text before | |
\MPcode{fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred;} | \MPcode{fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred;} | ||
and text after | and text after | ||
− | + | With \tex{startMPcode} and with shift, text before | |
\startMPcode | \startMPcode | ||
fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred; | fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred; |
Revision as of 12:13, 8 May 2024
Contents
\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[10pt] \starttext With \tex{startMPcode} and no shift, text before \startMPcode fill fullcircle scaled 1cm withcolor darkred; \stopMPcode and text after With \tex{MPcode} and no shift, text before \MPcode{fill fullcircle scaled 1cm withcolor darkred;} and text after With \tex{MPcode} and with shift, text before \MPcode{fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred;} and text after With \tex{startMPcode} and with shift, text before \startMPcode fill fullcircle scaled 1cm shifted (0,0.5cm) withcolor darkred; \stopMPcode and text after \stoptext