aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins/contrib/asymptote/ikiwiki/directive/asymptote.mdwn
blob: c6bdb1a9953915e41fc805fb71ca91041150a2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The `asymptote` directive is supplied by the [[!iki plugins/contrib/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"]]