Command/setupMPinstance
< Command
Jump to navigation
Jump to search
\setupMPinstance
Syntax (autogenerated)
\setupMPinstance[...,...][...=...,...] | |
[...,...] | name |
format | metafun minifun mpost |
initializations | yes no |
setups | name |
textstyle | style command |
textcolor | color |
extensions | yes no |
method | binary decimal double scaled default |
Syntax
\setupMPinstance[...][...,...=...,...] | |
[...] | name |
format | metafun mpost |
extensions | yes no |
initializations | yes no |
method | scaled double |
textstyle | bold sans mono … |
textcolor | color spec |
setups |
Description
This command sets up the default MetaPost instance metafun
or a custom MetaPost instance previously defined with \defineMPinstance.
The extensions
and initializations
keys control whether the content of the \startMPextensions
and \startMPinitializations
environment is used or ignored in the metapost code.
Note: the textstyle
and textcolor
keys only work when initializations=yes
is set.
Usage
To print all MetaPost labels in red:
\setupMPinstance [metafun] [textcolor=red] \starttext \startMPcode draw textext("some text") ; \stopMPcode \stoptext
Another example using the setups
key:
\defineMPinstance [mpinstanceprefixed] [metafun] [setups=mp:instanceprefix:one, textcolor=red] \startsetups mp:instanceprefix:one prefix:\space \stopsetups \starttext \startMPcode draw textext("normal text") ; \stopMPcode \startMPcode{mpinstanceprefixed} draw textext("red text") ; \stopMPcode \stoptext
produces
See also
- \defineMPinstance
- \setupMPinstance
- \startMPinclusions
- \startMPenvironment — deprecated
- \startMPcode
- \startuseMPgraphic — dynamic graphics that are recompiled at every use
- \useMPgraphic — use a dynamic graphic
- \startuniqueMPgraphic — dynamic graphics that are recompiled when parameters (width, height, depth, background color, line color) change
- \uniqueMPgraphic — use a dynamic graphic
- \startreusableMPgraphic — static graphics that are compiled once
- \reuseMPgraphic — use a static graphic
- \startstaticMPfigure — standalone graphics
- \usestaticMPfigure — use a standalone graphic
- \startMPpage — a page just large enough to fit its MetaPost contents
Help from ConTeXt-Mailinglist/Forum
All issues with: