This plugin eases the inclusion of images produced by
the
The asy
tool must be installed to use this plugin.
Moreover, to produce SVG output, the
dvisvgm
Usage:
This plugin adds a new
Code | Result |
---|---|
Output to asy.svg , using an
void testline(real y) {
draw((0,y)--(100,y),currentpen+solid);
draw((0,y-10)--(100,y-10),currentpen+dotted);
draw((0,y-20)--(100,y-20),currentpen+Dotted());
draw((0,y-30)--(100,y-30),currentpen+dashed);
draw((0,y-40)--(100,y-40),currentpen+longdashed);
draw((0,y-50)--(100,y-50),currentpen+dashdotted);
draw((0,y-60)--(100,y-60),currentpen+longdashdotted);
}
currentpen=linewidth(0.5);
testline(100);
currentpen=linewidth(4);
testline(0);
]]>
|
|
Output a png file to asy2.png
and read source from code2.asy :
]]>
code2.asy .
The additional attributes (here width ) are
passed to the |
|
With
real margin=1.5mm;
object left=align(
object("
outfile attribute is given, the svg
file produced is included (no use of |
|
Including again the produced svg file. To avoid
conflicts in ids, we use the ]]>
code4.asy .
|
|
The contents of the args attribute is used
as additional argument to the command which is run:
]]>
code4.asy . |