Running a sample code with \usepackage{asymptote}, I get asymptote.sty not found. I have installed ProTeXt which installed MikTeX 2.9. Now, to resolve this issue, I installed asypictureb package the definiton given as User-Friendly Integration of Asymptote into LaTeX by MikTeX Package Manager (I couldn't find a package named asymptote). Even after installation and rebuilding the system, I get the same error. What should I do?
The Code:
\documentclass{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}[width=10cm,height=10cm]
import three;
currentprojection=perspective(300,-650,500,center=true);
// define two types of ions
surface iona = scale3(20)*unitsphere;
surface ionb = scale3(25)*unitsphere;
// surface properties and color of the ions
material White = material(diffusepen=gray(0.4),emissivepen=gray(0.6));
material Red = material(diffusepen=red,emissivepen=lightred);
// style of lines connecting ions
pen thick=linewidth(2);
for(int x=-1; x<2; ++x) {
for(int y=-1; y<2; ++y) {
for(int z=-1; z<2; ++z) {
draw(shift(100*(x,y,z))*iona,White);
}
}
}
for(int x=-1; x<2; ++x) {
for(int y=-1; y<2; ++y) {
for(int z=-1; z<2; ++z) {
if(x<1) draw(100*(x,y,z)--100*(x+1,y,z),thick);
if(y<1) draw(100*(x,y,z)--100*(x,y+1,z),thick);
if(z<1) draw(100*(x,y,z)--100*(x,y,z+1),thick);
}
}
}
for(int x=-1; x<2; x+=2) {
for(int y=-1; y<2; y+=2) {
for(int z=-1; z<2; z+=2) {
draw(shift(50*(x,y,z))*ionb,Red);
}
}
}
\end{asy}
\end{document}
\documentclassto\end{document}. – Charles Staats May 10 '14 at 16:56asypictureBpackage uses different code from theasymptotepackage; in particular, if you're usingasypictureB, you should include the line\usepackage{asypictureB}but not the line\usepackage{asymptote}. (Full disclosure: I am the author ofasypictureB.) – Charles Staats May 10 '14 at 16:58asymptote-2.27-setup.exefile from this website. For a less minimal solution, follow the link in Joseph Wright's comment. – Charles Staats May 10 '14 at 17:05settings.prc=false;just beforeimport three. In any case, the specific error you are getting is likely to be fixed by following the installation instructions in the answers linked to by Joseph Wright. – Charles Staats May 10 '14 at 17:49