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:



import three;


// 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) {

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) {

  • Can you post the sample code you are using? Include everything, from \documentclass to \end{document}. – Charles Staats May 10 '14 at 16:56
  • Also, note that the asypictureB package uses different code from the asymptote package; in particular, if you're using asypictureB, you should include the line \usepackage{asypictureB} but not the line \usepackage{asymptote}. (Full disclosure: I am the author of asypictureB.) – Charles Staats May 10 '14 at 16:58
  • One final note: Neither package will work unless you have installed the Asymptote software. This happens automatically with TeXLive, but with MikTeX, you need to install it manually. At a minimum, you can probably do this by running the asymptote-2.27-setup.exe file from this website. For a less minimal solution, follow the link in Joseph Wright's comment. – Charles Staats May 10 '14 at 17:05
  • @CharlesStaats please see my edited question – subham soni May 10 '14 at 17:18
  • 1
    Due to a lack of feedback to the last comment, i vote to close as duplicate of @JosephWright's comment. – Johannes_B Feb 20 '15 at 20:56

Browse other questions tagged or ask your own question.