| 1 | [[PageOutline(2-5,Contents,pullout)]] |
| 2 | |
| 3 | = MetapostPlugin = |
| 4 | |
| 5 | == Description == |
| 6 | |
| 7 | Plugin for embedding Metapost diagrams into Wiki-pages. |
| 8 | |
| 9 | == Bugs/Feature Requests == |
| 10 | |
| 11 | Existing bugs and feature requests for MetapostPlugin are |
| 12 | [report:9?COMPONENT=MetapostPlugin here]. |
| 13 | |
| 14 | If you have any issues, create a |
| 15 | [http://trac-hacks.org/newticket?component=MetapostPlugin&owner=seas new ticket]. |
| 16 | |
| 17 | == Download == |
| 18 | |
| 19 | Download the zipped source from [download:metapostplugin here]. |
| 20 | |
| 21 | == Source == |
| 22 | |
| 23 | You can check out MetapostPlugin from [http://trac-hacks.org/svn/metapostplugin here] using Subversion, or [source:metapostplugin browse the source] with Trac. |
| 24 | |
| 25 | == Example == |
| 26 | |
| 27 | #!metapost |
| 28 | input metauml; |
| 29 | beginfig(1); |
| 30 | |
| 31 | Begin.b; |
| 32 | Activity.eat("Eat something good", "from the kitchen"); |
| 33 | Branch.enough; |
| 34 | Fork.fork("h", 50); |
| 35 | Activity.read("Read a book"); |
| 36 | Activity.listen("Listen to music", "(and ignore it)"); |
| 37 | Fork.join("h", 50); |
| 38 | End.e; |
| 39 | |
| 40 | leftToRight.top(10)(read, listen); |
| 41 | Group.readListen(read, listen); |
| 42 | |
| 43 | leftToRight(30)(b, eat); |
| 44 | topToBottom(20)(eat, enough, fork, readListen, join, e); |
| 45 | |
| 46 | drawObjects(b, eat, enough, fork, readListen, join, e); |
| 47 | |
| 48 | clink(transition)(b, eat); |
| 49 | clink(transition)(eat, enough); |
| 50 | link(transition)(pathStepX(enough.e, eat.e, 80)); |
| 51 | clink(transition)(enough, fork); |
| 52 | clink(transition)(fork, read); |
| 53 | clink(transition)(fork, listen); |
| 54 | clink(transition)(read, join); |
| 55 | clink(transition)(listen, join); |
| 56 | clink(transition)(join, e); |
| 57 | |
| 58 | item(iGuard)("still hungry")(obj.sw = enough.e + (20, 0)); |
| 59 | item(iGuard)("had enough")(obj.nw = enough.s + (0, -4)); |
| 60 | |
| 61 | endfig; |
| 62 | end |
| 63 | |
| 64 | == Recent Changes == |
| 65 | |
| 66 | [[ChangeLog(metapostplugin, 3)]] |
| 67 | |
| 68 | == Author/Contributors == |
| 69 | |
| 70 | '''Author:''' [wiki:seas] [[BR]] |
| 71 | '''Maintainer:''' [wiki:seas] [[BR]] |
| 72 | '''Contributors:''' |