diff options
author | http://peter-simons.myopenid.com/ <http://peter-simons.myopenid.com/@web> | 2012-11-27 08:21:13 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2012-11-27 08:21:13 -0400 |
commit | 40bb88164666e932135bd7992c69f115fd8b086c (patch) | |
tree | e2280bab2a6071b6c4dff7bb285bd562b4d2ddc5 | |
parent | 7ae648a4288f61a452edcaf52064e3ca49315eea (diff) | |
download | ikiwiki-40bb88164666e932135bd7992c69f115fd8b086c.tar ikiwiki-40bb88164666e932135bd7992c69f115fd8b086c.tar.gz |
Added description of the asymptote plugin.
-rw-r--r-- | doc/plugins/asymptote.mdwn | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/plugins/asymptote.mdwn b/doc/plugins/asymptote.mdwn new file mode 100644 index 000000000..85a0c6f4b --- /dev/null +++ b/doc/plugins/asymptote.mdwn @@ -0,0 +1,35 @@ +[[!template id=plugin name=asymptote author="[[PeterSimons]]"]] +[[!tag type/widget]] + +This plugin provides the [[ikiwiki/directive/asymptote]] +[[ikiwiki/directive]]. This directive allows embedding +[asymptote](http://asymptote.sourceforge.net//) diagrams in a page. + +Security implications: asymptote has functions for reading files and +other dangerous stuff, so enabling this plugin means that everyone who +can edit your Wiki can also read any file from your hard drive thats +accessible to the user running Ikiwiki. + +[[!if test="enabled(asymptote)" then=""" +An example diagram: + +[[!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); +"""]] +"""]] + +This plugin uses the [[!cpan Digest::SHA]] perl module. |