wiki:MetapostPlugin

Embed Metapost diagrams into wiki pages

Description

This is a plugin for embedding Metapost diagrams into wiki pages. MetaPost is a declarative language for manipulating diagrams with optionally text embedded, and is itself LGPL licensed.

Bugs/Feature Requests

Existing bugs and feature requests for MetapostPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out MetapostPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

{{{
#!metapost
input metauml;
beginfig(1);

Begin.b;
Activity.eat("Eat something good", "from the kitchen");
Branch.enough;
Fork.fork("h", 50);
Activity.read("Read a book");
Activity.listen("Listen to music", "(and ignore it)");
Fork.join("h", 50);
End.e;

leftToRight.top(10)(read, listen);
Group.readListen(read, listen);

leftToRight(30)(b, eat);
topToBottom(20)(eat, enough, fork, readListen, join, e);

drawObjects(b, eat, enough, fork, readListen, join, e);

clink(transition)(b, eat);
clink(transition)(eat, enough);
link(transition)(pathStepX(enough.e, eat.e, 80));
clink(transition)(enough, fork);
clink(transition)(fork, read);
clink(transition)(fork, listen);
clink(transition)(read, join);
clink(transition)(listen, join);
clink(transition)(join, e);

item(iGuard)("still hungry")(obj.sw = enough.e + (20, 0));
item(iGuard)("had enough")(obj.nw = enough.s + (0, -4));

endfig;
end
}}}

which gives us the following picture embedded:

http://lh6.ggpht.com/_w1Cadi273to/S_gXLvujqmI/AAAAAAAAAhA/Ja24JMiF5C4/s800/TracMetaPostExample.png

Recent Changes

16536 by rjollos on 2017-04-16 02:31:31
Fix indentation
7990 by seas on 2010-05-24 08:40:30
added examples
7987 by seas on 2010-05-22 17:37:09
first version
(more)

Author/Contributors

Author: seas
Maintainer: seas
Contributors: seas

Last modified 9 years ago Last modified on Nov 23, 2015, 11:22:57 AM