测试环境WinXP+TeXLive 2008+Asymptote 1.43
1. Texlive 2008中配置Asymptote
(1)在[TEXMFHOME]\tex\LaTeX下新建子目录asymptote
我的当前[TEXMFHOME]是D:\<USERNAME>\texmf
(2)把Asymptote安装目录(C:\Graphs\Asymptote)下asy.sty 和 asycolors.sty复制到新建的子目录asymptote中
(3)刷新文件名数据库
texhash
2.测试
%%foo.tex
%%---------------------------
\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage[inline]{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
import three;
size(0,100);
currentprojection=obliqueX;
draw(unitcube);
dot(unitcube,red);
label("$O$",(0,0,0),NW);
label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),N);
\end{asy}
\end{figure}
\end{document}
%%--------------------------
pdflatex foo
asy foo
pdflatex foo
浏览foo.pdf,查看结果。
1. Texlive 2008中配置Asymptote
(1)在[TEXMFHOME]\tex\LaTeX下新建子目录asymptote
我的当前[TEXMFHOME]是D:\<USERNAME>\texmf
(2)把Asymptote安装目录(C:\Graphs\Asymptote)下asy.sty 和 asycolors.sty复制到新建的子目录asymptote中
(3)刷新文件名数据库
texhash
2.测试
%%foo.tex
%%---------------------------
\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage[inline]{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
import three;
size(0,100);
currentprojection=obliqueX;
draw(unitcube);
dot(unitcube,red);
label("$O$",(0,0,0),NW);
label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),N);
\end{asy}
\end{figure}
\end{document}
%%--------------------------
pdflatex foo
asy foo
pdflatex foo
浏览foo.pdf,查看结果。
没有评论:
发表评论