Difference between revisions of "Command/defineMPinstance"
< Command
Jump to navigation
Jump to search
m |
({{MetaPost see also}}) |
||
Line 68: | Line 68: | ||
== See also == | == See also == | ||
− | + | {{MetaPost see also}} | |
− | |||
− | |||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Revision as of 11:36, 26 November 2012
\defineMPinstance
Syntax
\defineMPinstance[...][...][...] | |
[...] | name |
[...] | name for inheritance (optional) |
[...] | see \setupMPinstance |
Description
This command sets up a custom MetaPost style with particular features that can be selected using the first argument. The instance metafun
is the default one and does not need to be created. However, custom styles can inherit from the metafun
instance.
Predefined Instances
\defineMPinstance [metafun] [format=metafun, extensions=yes, initializations=yes] \defineMPinstance [metapost] [format=mpost]
Example
\defineMPinstance [important] [metafun] % needs to be inherited from the global metafun instance [textcolor=red] \defineMPinstance [veryimportant] [important] [textstyle=bold] \starttext % normal black text \startMPcode draw textext("some text") ; \stopMPcode % red text \startMPcode{important} draw textext("some text") ; \stopMPcode % red bold text \startMPcode{veryimportant} draw textext("some text") ; \stopMPcode \stoptext
Gives:
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
- MetaFun - MetaPost in ConTeXt
Help from ConTeXt-Mailinglist/Forum
All issues with: