Asymptote(2)

settings.outformat=”pdf”;
unitsize(1cm);
draw((-.1,0) — (2,0));
draw((0,-.1) — (0,2));
でx-y 座標をつくる.
unitsize(1cm,4cm); に unitsize(1cm); y座標のみ大きくなる.

unitsize(3cm); なら全体が大きくなる.

settings.outformat=”pdf”;
unitsize(1cm);
draw((-.1,0) — (2,0), arrow= Arrow(TeXHead));
draw( (0,-1) — (0,2), arrow = Arrow(TeXHead));
draw((0,0) — (1,1)– (2, sqrt(2)));
で曲線をえがく.

settings.outformat=”pdf”;
unitsize(1cm);
draw((-.1,0) — (2,0),arrow=Arrow(TeXHead));
draw((0,-.1) — (0,2), arrow =Arrow(TeXHead));
draw((0,0) .. (1,1) .. (2,sqrt(2)));
で滑らかな曲線をえがく.

Asymptote

C:\Users\hogehoge>asy fugafuga.asy
error: could not load module ‘fugafuga.asy’
C:\texlive\2020\bin\win32\runscript.tlu:915: command failed with exit code 1:
asy fugafuga.asy
はファイルがない(大体ファイル名を間違えている. )

GPL Ghostscript 9.50: **** Could not open the file hogehoge.pdf .
**** Unable to open the initial device, quitting.
C:/texlive/2020/texmf-dist\asymptote/plain_shipout.asy: 108.11: runtime: shipout failed
C:\texlive\2020\bin\win32\runscript.tlu:915: command failed with exit code 1:
asy -f pdf hogehoge.asy

すでに出力したpdfがある.asyファイルを, pdfを閉じずにもう一度pdfを出力しようとするとでてくる.

asy -f pdf(resp. png) hogehoge.asy
で.pdf(resp. png)に出力を指定できる.
あるいは, ソースコードの最初に, settings.outformat = “pdf”;
をつけたせばよい.