From: http://peter-simons.myopenid.com/ Date: Tue, 27 Nov 2012 12:24:30 +0000 (-0400) Subject: Describe the asymptote directive. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/7c3fe95e5282c2fca3159c93d8b3b7303d192869?hp=40bb88164666e932135bd7992c69f115fd8b086c Describe the asymptote directive. --- diff --git a/doc/plugins/ikiwiki/directive/asymptote.mdwn b/doc/plugins/ikiwiki/directive/asymptote.mdwn new file mode 100644 index 000000000..3036fc030 --- /dev/null +++ b/doc/plugins/ikiwiki/directive/asymptote.mdwn @@ -0,0 +1,27 @@ +The `asymptote` directive is supplied by the [[!iki plugins/asymptote +desc=asymptote]] plugin. + +This directive allows embedding [asymptote](http://asymptote.sourceforge.net/) +diagrams in a page. Example usage: + + \[[!asymptote src=""" + import geometry; + unitsize(1cm); + triangle t = triangle((0,0), (4,0), (0.5,2)); + show(La="\$D\$", Lb="\$E\$", Lc="", t); + dot(t.A^^t.B^^t.C); + point pD = midpoint(t.BC); dot(pD); + point pE = midpoint(t.AC); dot(pE); + draw(pD--pE); + point A_ = (pD-t.A)*2+t.A; dot("\$A'\$", A_, NE); + draw(t.B--A_--t.C, dashed); + draw(t.A--A_, dashed); + point E_ = midpoint(line(t.B,A_)); dot(Label("\$E'\$", E_, E)); + draw(E_--pD, dashed); + """]] + +The `asymptote` directive supports the following parameters: + +- `src` - The asymptote source code to render. + +[[!meta robots="noindex, follow"]]