Changes

Jump to navigation Jump to search
167 bytes removed ,  07:52, 24 June 2020
m
→‎Documentation & Tutorials: delete link to deleted wiki page
__TOC__
MetaPost is a graphical programming language, based on Donald Knuth's MetaFont. Normally MP graphics are converted to PostScript and used with dvips, but ConTeXt can use it directly with PDF (see the
[http://www.pragma-ade.com/general/sources/mptopdf.pdf MP to PDF] manual).
MetaPost is ConTeXt's native graphics language. [[MetaFun- MetaPost in ConTeXt]] is a MetaPost module by Hans Hagen that adds a lot of extra features; it is enabled by default, so one could say that MetaFun is ConTeXt's default dialect of MetaPost.
= Documentation & Tutorials =
* [http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html Lots of examples]
* [[Color in MetaPost]] describes how to get color mixtures, TeX colors, and transparent effects in MetaPost graphics.
* [http://wiki.contextgarden.net/MetaPost_in_ConTeXt MetaPost in ConTeXt]
= Using MetaPost in ConTeXt =
With {{cmd|startuseMPgraphic}}, you define a piece of graphics code that is processed anew every time the graphic is placed with {{cmd|useMPgraphic}}. Further commands are described at [[MetaFun - MetaPost in ConTeXt]].
<context source=yes>
<context mode="mkiv" source="yes" text="Gives:">
\setupbodyfont[8pt]
\defineoverlay[Myframe][\reuseMPgraphic{Frame}]
</context>
There is some strange cropping going on on the Wiki-implementation. Of course the left frame is in reality equal to the right frame...
There is one important remark: The MPcalculation and the drawing itself must be inside \starttext ... \stoptext.
 
= Other Links =

Navigation menu